X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2F_PDCLIB%2Fscan.c;h=811039317edc3467948f09bb05f7d7e70e095711;hb=0cd903b82201176f3148f6d18d68fd30b82746d5;hp=15b1d503c32a5fa9481c48f65d625a08922508bb;hpb=31fdebd6d624ffce068548cb4d63f4ec583cec04;p=pdclib diff --git a/functions/_PDCLIB/scan.c b/functions/_PDCLIB/scan.c index 15b1d50..8110393 100644 --- a/functions/_PDCLIB/scan.c +++ b/functions/_PDCLIB/scan.c @@ -1,5 +1,3 @@ -/* $Id$ */ - /* _PDCLIB_scan( const char *, struct _PDCLIB_status_t * ) This file is part of the Public Domain C Library (PDCLib). @@ -39,7 +37,7 @@ */ static int GET( struct _PDCLIB_status_t * status ) { - int rc; + int rc = EOF; if ( status->stream != NULL ) { rc = getc( status->stream ); @@ -384,7 +382,8 @@ const char * _PDCLIB_scan( const char * spec, struct _PDCLIB_status_t * status ) } case 'p': status->base = 16; - status->flags |= E_unsigned; + /* TODO: Assuming 'long' for pointers, this should be handled differently. */ + status->flags |= E_unsigned | E_long; break; case 'n': {