git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1374
4a8a32a2-be11-0410-ad9d-
d568d2c75423
#include <limits.h>
#include "newalloc.h"
+#if defined(__BORLANDC__) || defined(_MSC_VER)
+#define LONG_LONG __int64
+#else
+#define LONG_LONG long long
+#endif
+
int cNestLevel;
/*-----------------------------------------------------------------*/
short hex = 0, octal = 0;
char scanFmt[10];
int scI = 0;
- unsigned long sval;
+ LONG_LONG sval;
val = newValue (); /* alloc space for value */
/* create the scan string */
scanFmt[scI++] = '%';
+ scanFmt[scI++] = 'L';
+
if (octal)
scanFmt[scI++] = 'o';
else if (hex)
else
scanFmt[scI++] = 'd';
- scanFmt[scI++] = 'L';
scanFmt[scI++] = '\0';
sscanf (s, scanFmt, &sval);