mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-25 04:24:31 -04:00
Compile with MS VC6++ avoiding number constant suffix ULI
This commit is contained in:
parent
994c5adb10
commit
6ad8db3c77
1 changed files with 18 additions and 0 deletions
|
@ -324,8 +324,13 @@ void byteprocess(int *chainemc, int *mclength, unsigned char chaine[], int start
|
||||||
int debug = 0;
|
int debug = 0;
|
||||||
int len = 0;
|
int len = 0;
|
||||||
unsigned int chunkLen = 0;
|
unsigned int chunkLen = 0;
|
||||||
|
#if defined(_MSC_VER) && _MSC_VER == 1200
|
||||||
|
uint64_t mantisa = 0;
|
||||||
|
uint64_t total = 0;
|
||||||
|
#else
|
||||||
uint64_t mantisa = 0ULL;
|
uint64_t mantisa = 0ULL;
|
||||||
uint64_t total = 0ULL;
|
uint64_t total = 0ULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
if(debug) printf("\nEntering byte mode at position %d\n", start);
|
if(debug) printf("\nEntering byte mode at position %d\n", start);
|
||||||
|
|
||||||
|
@ -350,20 +355,33 @@ void byteprocess(int *chainemc, int *mclength, unsigned char chaine[], int start
|
||||||
{
|
{
|
||||||
chunkLen = 6;
|
chunkLen = 6;
|
||||||
len += chunkLen;
|
len += chunkLen;
|
||||||
|
#if defined(_MSC_VER) && _MSC_VER == 1200
|
||||||
|
total = 0;
|
||||||
|
#else
|
||||||
total = 0ULL;
|
total = 0ULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
while (chunkLen--)
|
while (chunkLen--)
|
||||||
{
|
{
|
||||||
mantisa = chaine[start++];
|
mantisa = chaine[start++];
|
||||||
|
#if defined(_MSC_VER) && _MSC_VER == 1200
|
||||||
|
total |= mantisa << (uint64_t)(chunkLen * 8);
|
||||||
|
#else
|
||||||
total |= mantisa << (uint64_t)(chunkLen * 8ULL);
|
total |= mantisa << (uint64_t)(chunkLen * 8ULL);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
chunkLen = 5;
|
chunkLen = 5;
|
||||||
|
|
||||||
while (chunkLen--)
|
while (chunkLen--)
|
||||||
{
|
{
|
||||||
|
#if defined(_MSC_VER) && _MSC_VER == 1200
|
||||||
|
chainemc[*mclength + chunkLen] = (int)(total % 900);
|
||||||
|
total /= 900;
|
||||||
|
#else
|
||||||
chainemc[*mclength + chunkLen] = (int)(total % 900ULL);
|
chainemc[*mclength + chunkLen] = (int)(total % 900ULL);
|
||||||
total /= 900ULL;
|
total /= 900ULL;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
*mclength += 5;
|
*mclength += 5;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue