]> pd.if.org Git - pdclib/blobdiff - functions/string/strcspn.c
Porting current working set from CVS.
[pdclib] / functions / string / strcspn.c
index 01f10e59bf0ab2da253c5004fb087f7b0b134cfd..2709e920b25ef82561c6d28203a24f48157f2a2f 100644 (file)
@@ -10,6 +10,8 @@
 
 #include <string.h>
 
+#ifndef REGTEST
+
 size_t strcspn( const char * s1, const char * s2 )
 {
     size_t len = 0;
@@ -29,12 +31,13 @@ size_t strcspn( const char * s1, const char * s2 )
     return len;
 }
 
+#endif
+
 #ifdef TEST
 #include <_PDCLIB_test.h>
 
-int main()
+int main( void )
 {
-    BEGIN_TESTS;
     TESTCASE( strcspn( abcde, "x" ) == 5 );
     TESTCASE( strcspn( abcde, "xyz" ) == 5 );
     TESTCASE( strcspn( abcde, "zyx" ) == 5 );