X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2F_PDCLIB%2Fprint.c;h=1c0f5d6d62509280ad3a75aeda0dd4398043e08f;hb=d865c4403fc91d1f1ac95ba76febcee9f429bb97;hp=076cbeddf1bb1040b9378da4d387646427e03701;hpb=d6f1494a4f38a212b29a13ee713885058dcf0fe7;p=pdclib diff --git a/functions/_PDCLIB/print.c b/functions/_PDCLIB/print.c index 076cbed..1c0f5d6 100644 --- a/functions/_PDCLIB/print.c +++ b/functions/_PDCLIB/print.c @@ -10,12 +10,13 @@ #include #include +#ifndef REGTEST + /* Using an integer's bits as flags for both the conversion flags and length modifiers. */ /* FIXME: one too many flags to work on a 16-bit machine, join some (e.g. the - width flags) into a combined field. -*/ + width flags) into a combined field. */ #define E_minus 1<<0 #define E_plus 1<<1 #define E_alt 1<<2 @@ -513,12 +514,16 @@ const char * _PDCLIB_print( const char * spec, struct _PDCLIB_status_t * status return ++spec; } +#endif + #ifdef TEST #define _PDCLIB_FILEID "_PDCLIB/print.c" #define _PDCLIB_STRINGIO #include "_PDCLIB_test.h" +#ifndef REGTEST + static int testprintf( char * buffer, const char * format, ... ) { /* Members: base, flags, n, i, current, s, width, prec, stream, arg */ @@ -543,12 +548,16 @@ static int testprintf( char * buffer, const char * format, ... ) return status.i; } +#endif + #define TEST_CONVERSION_ONLY int main( void ) { +#ifndef REGTEST char target[100]; #include "printf_testcases.h" +#endif return TEST_RESULTS; }