X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2F_PDCLIB%2Fscan.c;h=57f9831e457cd3dc918e4341befb2add07ced794;hb=219271fd548949abce8bd75c34dd42e519418fc4;hp=15b1d503c32a5fa9481c48f65d625a08922508bb;hpb=31fdebd6d624ffce068548cb4d63f4ec583cec04;p=pdclib diff --git a/functions/_PDCLIB/scan.c b/functions/_PDCLIB/scan.c index 15b1d50..57f9831 100644 --- a/functions/_PDCLIB/scan.c +++ b/functions/_PDCLIB/scan.c @@ -16,6 +16,8 @@ #include #include +#ifndef REGTEST + /* Using an integer's bits as flags for both the conversion flags and length modifiers. */ @@ -39,7 +41,7 @@ */ static int GET( struct _PDCLIB_status_t * status ) { - int rc; + int rc = EOF; if ( status->stream != NULL ) { rc = getc( status->stream ); @@ -588,7 +590,7 @@ const char * _PDCLIB_scan( const char * spec, struct _PDCLIB_status_t * status ) /* TODO: Floats. */ return NULL; } - +#endif #ifdef TEST #define _PDCLIB_FILEID "_PDCLIB/scan.c" @@ -596,6 +598,7 @@ const char * _PDCLIB_scan( const char * spec, struct _PDCLIB_status_t * status ) #include <_PDCLIB_test.h> +#ifndef REGTEST static int testscanf( char const * s, char const * format, ... ) { struct _PDCLIB_status_t status; @@ -612,13 +615,16 @@ static int testscanf( char const * s, char const * format, ... ) va_end( status.arg ); return status.n; } +#endif #define TEST_CONVERSION_ONLY int main( void ) { +#ifndef REGTEST char source[100]; #include "scanf_testcases.h" +#endif return TEST_RESULTS; }