mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-23 03:26:56 -04:00
MSVC corrections thanks to Norbert Szabó
This commit is contained in:
parent
776154d3fe
commit
f48a8603e8
5 changed files with 39 additions and 29 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue