X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2F_PDCLIB%2Fprint.c;h=1c0f5d6d62509280ad3a75aeda0dd4398043e08f;hb=d865c4403fc91d1f1ac95ba76febcee9f429bb97;hp=5214612c630fa920a7b006fc8688a4ccc74006f7;hpb=5596d52a975696c29adc741ac1cdb49fb7315d73;p=pdclib diff --git a/functions/_PDCLIB/print.c b/functions/_PDCLIB/print.c index 5214612..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,11 +514,15 @@ 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> +#include "_PDCLIB_test.h" + +#ifndef REGTEST static int testprintf( char * buffer, const char * format, ... ) { @@ -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; }