MSVC corrections thanks to Norbert Szabó

This commit is contained in:
hooper114 2009-08-06 19:44:30 +00:00
parent 776154d3fe
commit f48a8603e8
5 changed files with 39 additions and 29 deletions

View file

@ -61,12 +61,12 @@ int rssexpanded(struct zint_symbol *symbol, unsigned char source[]);
static UINT pwr928[69][7];
int min(int first, int second) {
if(first <= second) {
return first;
} else {
return second;
}
int _min(int first, int second) {
if(first <= second)
return first;
else
return second;
}
/* gets bit in bitString at bitPos */
@ -98,7 +98,7 @@ void init928(void) {
int encode928(UINT bitString[], UINT codeWords[], int bitLng) {
int i, j, b, bitCnt, cwNdx, cwCnt, cwLng;
for (cwNdx = cwLng = b = 0; b < bitLng; b += 69, cwNdx += 7) {
bitCnt = min(bitLng-b, 69);
bitCnt = _min(bitLng-b, 69);
cwLng += cwCnt = bitCnt/10 + 1;
for (i = 0; i < cwCnt; i++)
codeWords[cwNdx+i] = 0; /* init 0 */