merged from PIEPIEPIE branch:

- min/max macros removed
- Plugins refactored
- more functions in util.{h,cpp}


git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4232 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
oripel 2005-08-27 19:56:00 +00:00
parent b33965c87d
commit 57ad3c18b3
12 changed files with 300 additions and 311 deletions

View file

@ -1,9 +1,11 @@
#include "growbuf.h"
#include "Platform.h"
#include <cstdlib> // for malloc/free
#include <cstring> // for memcpy
#include <cstdio> // for f*
#include <algorithm> // for std::min
#include "Platform.h"
GrowBuf::GrowBuf() { m_alloc=m_used=m_zero=0; m_s=NULL; m_bs=32768; }
GrowBuf::~GrowBuf() { free(m_s); }
@ -49,7 +51,7 @@ void GrowBuf::resize(int newlen)
}
quit();
}
memcpy(n,m_s,min(newlen,os));
memcpy(n,m_s,std::min(newlen,os));
free(m_s);
}
m_s=n;