X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fstring%2Fmemset.c;h=4946ec487812e3bd681ea0fe91da4520ce7f8d64;hp=753a33320fc4db576d23c9fd12a4724989b4c2d6;hb=da0f3f353d417fed71f358a48d5d5394145e460d;hpb=2f57d79a5a24856fdea69b2119d67e5fb5029b3e diff --git a/functions/string/memset.c b/functions/string/memset.c index 753a333..4946ec4 100644 --- a/functions/string/memset.c +++ b/functions/string/memset.c @@ -1,7 +1,3 @@ -/* $Id$ */ - -/* Release $Name$ */ - /* memset( void *, int, size_t ) This file is part of the Public Domain C Library (PDCLib). @@ -10,6 +6,8 @@ #include +#ifndef REGTEST + void * memset( void * s, int c, size_t n ) { unsigned char * p = (unsigned char *) s; @@ -20,13 +18,14 @@ void * memset( void * s, int c, size_t n ) return s; } +#endif + #ifdef TEST -#include <_PDCLIB_test.h> +#include "_PDCLIB_test.h" -int main() +int main( void ) { char s[] = "xxxxxxxxx"; - BEGIN_TESTS; TESTCASE( memset( s, 'o', 10 ) == s ); TESTCASE( s[9] == 'o' ); TESTCASE( memset( s, '_', 0 ) == s );