X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2F_PDCLIB%2Fdigits.c;h=4837d461323d02fbea4fcd03c6f4b405f3bdb5ef;hb=1b1c0ce961e039ee602d179b9257abeabae65010;hp=3963f8b28b52729254ba4648058262075f65b728;hpb=b08f4b52b1cd1f7a9553c0f357a7c90859fa3e73;p=pdclib diff --git a/functions/_PDCLIB/digits.c b/functions/_PDCLIB/digits.c index 3963f8b..4837d46 100644 --- a/functions/_PDCLIB/digits.c +++ b/functions/_PDCLIB/digits.c @@ -1,19 +1,33 @@ -/* $Id$ */ - /* _PDCLIB_digits This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. */ -char _PDCLIB_digits[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +#ifndef REGTEST + +#include "_PDCLIB_int.h" + +const char _PDCLIB_digits[] = "0123456789abcdefghijklmnopqrstuvwxyz"; + +/* For _PDCLIB/print.c only; obsolete with ctype.h */ +const char _PDCLIB_Xdigits[] = "0123456789ABCDEF"; + +#endif #ifdef TEST +#include "_PDCLIB_test.h" + +#include + int main( void ) { - /* no tests for raw data */ - return 0; +#ifndef REGTEST + TESTCASE( strcmp( _PDCLIB_digits, "0123456789abcdefghijklmnopqrstuvwxyz" ) == 0 ); + TESTCASE( strcmp( _PDCLIB_Xdigits, "0123456789ABCDEF" ) == 0 ); +#endif + return TEST_RESULTS; } #endif