X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdio%2F_PDCLIB_scan.c;h=c3429ecde125da9ba9284b8ec5ed917d7d4b4013;hb=a9938cd46aee465e7476ab3aac773b925fc00ed4;hp=6a31ff0692dbb8cce0743f0cf624869cd74e7599;hpb=af7b48b211498ff4ef7aba6db89b90b760cdd3d5;p=pdclib diff --git a/functions/stdio/_PDCLIB_scan.c b/functions/stdio/_PDCLIB_scan.c index 6a31ff0..c3429ec 100644 --- a/functions/stdio/_PDCLIB_scan.c +++ b/functions/stdio/_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). @@ -18,6 +16,8 @@ #ifndef REGTEST +#include "_PDCLIB_io.h" + /* Using an integer's bits as flags for both the conversion flags and length modifiers. */ @@ -118,7 +118,7 @@ static bool IN_SCANSET( const char * scanlist, const char * end_scanlist, int rc const char * _PDCLIB_scan( const char * spec, struct _PDCLIB_status_t * status ) { /* generic input character */ - int rc; + int rc = EOF; const char * orig_spec = spec; if ( *(++spec) == '%' ) { @@ -257,7 +257,7 @@ const char * _PDCLIB_scan( const char * spec, struct _PDCLIB_status_t * status ) { char * c = va_arg( status->arg, char * ); /* for %c, default width is one */ - if ( status->width == SIZE_MAX ) + if ( status->width == UINT_MAX ) { status->width = 1; }