]> pd.if.org Git - pdclib/blobdiff - functions/stdio/_PDCLIB_scan.c
PDCLib includes with quotes, not <>.
[pdclib] / functions / stdio / _PDCLIB_scan.c
index f3846b6967fdeff77c926637b51500cbec1b9735..aa7be84e75c768e186e6beccfb12c19689506bff 100644 (file)
@@ -16,6 +16,8 @@
 
 #ifndef REGTEST
 
+#include "_PDCLIB_io.h"
+
 /* Using an integer's bits as flags for both the conversion flags and length
    modifiers.
 */
@@ -116,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) == '%' )
     {
@@ -255,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;
             }
@@ -595,7 +597,7 @@ const char * _PDCLIB_scan( const char * spec, struct _PDCLIB_status_t * status )
 #define _PDCLIB_FILEID "_PDCLIB/scan.c"
 #define _PDCLIB_STRINGIO
 
-#include <_PDCLIB_test.h>
+#include "_PDCLIB_test.h"
 
 #ifndef REGTEST
 static int testscanf( char const * s, char const * format, ... )