fix scan_xlong, scan_xlonglong and scan_8long

master
leitner 20 years ago
parent c874604f12
commit 05bf627d01

@ -3,6 +3,7 @@
fix a few man pages fix a few man pages
optimize fmt_base64 (Dan Gundlach) optimize fmt_base64 (Dan Gundlach)
gcc 4 cleanups (mostly unsigned char* vs char*) gcc 4 cleanups (mostly unsigned char* vs char*)
fix scan_xlong, scan_xlonglong and scan_8long
0.22: 0.22:
uh, the scope_id detection #defined the wrong constant. libowfat uh, the scope_id detection #defined the wrong constant. libowfat

@ -2,7 +2,7 @@
unsigned int scan_8long(const char *src,unsigned long *dest) { unsigned int scan_8long(const char *src,unsigned long *dest) {
register const char *tmp=src; register const char *tmp=src;
register int l=0; register unsigned long l=0;
register unsigned char c; register unsigned char c;
while ((c=*tmp-'0')<8) { while ((c=*tmp-'0')<8) {
l=l*8+c; l=l*8+c;

@ -2,7 +2,7 @@
unsigned int scan_xlong(const char *src,unsigned long *dest) { unsigned int scan_xlong(const char *src,unsigned long *dest) {
register const char *tmp=src; register const char *tmp=src;
register int l=0; register unsigned long l=0;
register unsigned char c; register unsigned char c;
while ((c=scan_fromhex(*tmp))<16) { while ((c=scan_fromhex(*tmp))<16) {
l=(l<<4)+c; l=(l<<4)+c;

@ -2,7 +2,7 @@
unsigned int scan_xlonglong(const char* src,unsigned long long* dest) { unsigned int scan_xlonglong(const char* src,unsigned long long* dest) {
register const char *tmp=src; register const char *tmp=src;
register int l=0; register long long l=0;
register unsigned char c; register unsigned char c;
while ((c=scan_fromhex(*tmp))<16) { while ((c=scan_fromhex(*tmp))<16) {
l=(l<<4)+c; l=(l<<4)+c;

Loading…
Cancel
Save