Lines 3393-3398
Link Here
|
3393 |
static int gethex(FILE *sfd, uint32 *val) { |
3393 |
static int gethex(FILE *sfd, uint32 *val) { |
3394 |
char tokbuf[100]; int ch; |
3394 |
char tokbuf[100]; int ch; |
3395 |
char *pt=tokbuf, *end = tokbuf+100-2; |
3395 |
char *pt=tokbuf, *end = tokbuf+100-2; |
|
|
3396 |
uint32 u; |
3396 |
|
3397 |
|
3397 |
while ( isspace(ch = nlgetc(sfd))); |
3398 |
while ( isspace(ch = nlgetc(sfd))); |
3398 |
if ( ch=='#' ) |
3399 |
if ( ch=='#' ) |
Lines 3416-3422
Link Here
|
3416 |
} |
3417 |
} |
3417 |
*pt='\0'; |
3418 |
*pt='\0'; |
3418 |
ungetc(ch,sfd); |
3419 |
ungetc(ch,sfd); |
3419 |
*val = strtoul(tokbuf,NULL,16); |
3420 |
u = strtoul(tokbuf,NULL,16); |
|
|
3421 |
memcpy(val, &u, sizeof(u)); |
3420 |
return( pt!=tokbuf?1:ch==EOF?-1: 0 ); |
3422 |
return( pt!=tokbuf?1:ch==EOF?-1: 0 ); |
3421 |
} |
3423 |
} |
3422 |
|
3424 |
|