- Patch from Mike Lerwill <mike@homemjl.freeserve.co.uk>

turn "long long" into Bit64s
This commit is contained in:
Bryce Denney 2001-06-28 13:51:41 +00:00
parent 298d0dff1d
commit f22aac2100
1 changed files with 4 additions and 4 deletions

View File

@ -84,7 +84,7 @@ bx_strtoull (const char *nptr, char **endptr, int baseignore)
/* Contains the last character read. */
char c;
long long n = 0;
Bit64s n = 0;
char const *p;
/* Prepare number representation. */
@ -168,10 +168,10 @@ bx_strtoull (const char *nptr, char **endptr, int baseignore)
return 0;
for (p=start_of_digits; p!=cp; p++) {
n = n * (long long)base;
n = n * (Bit64s)base;
c = tolower (*p);
c = (c >= 'a') ? (10+c-'a') : c-'0';
n = n + (long long)c;
n = n + (Bit64s)c;
//printf ("after shifting in digit %c, n is %lld\n", *p, n);
}
return negative? -n : n;
@ -184,7 +184,7 @@ int main (int argc, char **argv)
{
char buf[256], *endbuf;
long l;
long long ll;
Bit64s ll;
while (1) {
printf ("Enter a long int: ");
gets (buf);