]> pd.if.org Git - pdclib/commitdiff
Added #ifdef to allow regression against system lib.
authorsolar <unknown>
Sat, 3 Dec 2005 21:34:32 +0000 (21:34 +0000)
committersolar <unknown>
Sat, 3 Dec 2005 21:34:32 +0000 (21:34 +0000)
21 files changed:
functions/string/memchr.c
functions/string/memcmp.c
functions/string/memcpy.c
functions/string/memmove.c
functions/string/memset.c
functions/string/strcat.c
functions/string/strchr.c
functions/string/strcmp.c
functions/string/strcoll.c
functions/string/strcpy.c
functions/string/strcspn.c
functions/string/strlen.c
functions/string/strncat.c
functions/string/strncmp.c
functions/string/strncpy.c
functions/string/strpbrk.c
functions/string/strrchr.c
functions/string/strspn.c
functions/string/strstr.c
functions/string/strtok.c
functions/string/strxfrm.c

index 75809e079d62a7b35a789ca863cd113d059287a4..972e7ffa82038908872e99f22e5ed2c4d9566922 100644 (file)
@@ -10,6 +10,8 @@
 
 #include <string.h>
 
+#ifndef REGTEST
+
 void * memchr( const void * s, int c, size_t n )
 {
     const unsigned char * p = (const unsigned char *) s;
@@ -24,6 +26,8 @@ void * memchr( const void * s, int c, size_t n )
     return NULL;
 }
 
+#endif
+
 #ifdef TEST
 #include <_PDCLIB_test.h>
 
index 3ac32a213c89d21800d60b80b1926ba0efa90dc0..167355f82a2f4255d7aa0cd08d27d49ac2338459 100644 (file)
@@ -10,6 +10,8 @@
 
 #include <string.h>
 
+#ifndef REGTEST
+
 int memcmp( const void * s1, const void * s2, size_t n )
 {
     const unsigned char * p1 = (const unsigned char *) s1;
@@ -26,6 +28,8 @@ int memcmp( const void * s1, const void * s2, size_t n )
     return 0;
 }
 
+#endif
+
 #ifdef TEST
 #include <_PDCLIB_test.h>
 
index b2606b7222af7e87476d5a3e7718fa4631f99f10..064cc3479f54a498ad0144a712f58eb16290dba5 100644 (file)
@@ -11,6 +11,8 @@
 #include <_PDCLIB_aux.h>
 #include <string.h>
 
+#ifndef REGTEST
+
 void * memcpy( void * _PDCLIB_restrict s1, const void * _PDCLIB_restrict s2, size_t n )
 {
     char * dest = (char *) s1;
@@ -22,6 +24,8 @@ void * memcpy( void * _PDCLIB_restrict s1, const void * _PDCLIB_restrict s2, siz
     return s1;
 }
 
+#endif
+
 #ifdef TEST
 #include <_PDCLIB_test.h>
 
index 7c50deeb6ead1e8d0c1cac5a3e2e3e793d7b6931..7a01996b3aceea9dec863bb7a836262d88670783 100644 (file)
@@ -10,6 +10,8 @@
 
 #include <string.h>
 
+#ifndef REGTEST
+
 void * memmove( void * s1, const void * s2, size_t n )
 {
     char * dest = (char *) s1;
@@ -33,6 +35,8 @@ void * memmove( void * s1, const void * s2, size_t n )
     return s1;
 }
 
+#endif
+
 #ifdef TEST
 #include <_PDCLIB_test.h>
 
index 753a33320fc4db576d23c9fd12a4724989b4c2d6..4abb466ebd763b5ef8cdfcdcc91a96037e8c4729 100644 (file)
@@ -10,6 +10,8 @@
 
 #include <string.h>
 
+#ifndef REGTEST
+
 void * memset( void * s, int c, size_t n )
 {
     unsigned char * p = (unsigned char *) s;
@@ -20,6 +22,8 @@ void * memset( void * s, int c, size_t n )
     return s;
 }
 
+#endif
+
 #ifdef TEST
 #include <_PDCLIB_test.h>
 
index d1135756069099dad2a478e9a55a19f65951750b..d9609157ffc77f048a63eb07054630589210c3a0 100644 (file)
@@ -9,6 +9,9 @@
 */
 
 #include <_PDCLIB_aux.h>
+#include <string.h>
+
+#ifndef REGTEST
 
 char * strcat( char * _PDCLIB_restrict s1, const char * _PDCLIB_restrict s2 )
 {
@@ -21,6 +24,8 @@ char * strcat( char * _PDCLIB_restrict s1, const char * _PDCLIB_restrict s2 )
     return rc;
 }
 
+#endif
+
 #ifdef TEST
 #include <_PDCLIB_test.h>
 
index 96ab0519aafbbdc8f4be004cf77929fabfc1914c..15155a4f41f625f772c4059a9145339b5700a4a2 100644 (file)
@@ -10,6 +10,8 @@
 
 #include <string.h>
 
+#ifndef REGTEST
+
 char * strchr( const char * s, int c )
 {
     do
@@ -22,6 +24,8 @@ char * strchr( const char * s, int c )
     return NULL;
 }
 
+#endif
+
 #ifdef TEST
 #include <_PDCLIB_test.h>
 
index fea5d2dfc7ac19352e3ce4014e72e74a239b2c70..6519b01d6c65733d71cb3529e6bd9f6142732ee9 100644 (file)
@@ -8,6 +8,10 @@
    Permission is granted to use, modify, and / or redistribute at will.
 */
 
+#include <string.h>
+
+#ifndef REGTEST
+
 int strcmp( const char * s1, const char * s2 )
 {
     while ( ( *s1 ) && ( *s1 == *s2 ) )
@@ -18,6 +22,8 @@ int strcmp( const char * s1, const char * s2 )
     return ( *s1 - *s2 );
 }
 
+#endif
+
 #ifdef TEST
 #include <_PDCLIB_test.h>
 
index 74a8aadb9a84cbb312c0d19f564730d3a509140e..4b7af32a8f1767d2875a9a1ed06729a5e0901b12 100644 (file)
@@ -8,15 +8,18 @@
    Permission is granted to use, modify, and / or redistribute at will.
 */
 
-/* TODO: Dummy function, PDCLib does not support locales yet. */
+#include <string.h>
 
-int strcmp( const char * s1, const char * s2 );
+#ifndef REGTEST
 
+/* TODO: Dummy function, PDCLib does not support locales yet. */
 int strcoll( const char * s1, const char * s2 )
 {
     return strcmp( s1, s2 );
 }
 
+#endif
+
 #ifdef TEST
 #include <_PDCLIB_test.h>
 
index 49204da54ba27d679de4fe6679daf1cb806131db..8d55b67f808eed138e7b2bbc3eb25d9b6573f655 100644 (file)
@@ -9,6 +9,9 @@
 */
 
 #include <_PDCLIB_aux.h>
+#include <string.h>
+
+#ifndef REGTEST
 
 char * strcpy( char * _PDCLIB_restrict s1, const char * _PDCLIB_restrict s2 )
 {
@@ -17,6 +20,8 @@ char * strcpy( char * _PDCLIB_restrict s1, const char * _PDCLIB_restrict s2 )
     return rc;
 }
 
+#endif
+
 #ifdef TEST
 #include <_PDCLIB_test.h>
 
index 01f10e59bf0ab2da253c5004fb087f7b0b134cfd..68dd8b42676afff932e73bfc993fbc6835879f08 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,6 +31,8 @@ size_t strcspn( const char * s1, const char * s2 )
     return len;
 }
 
+#endif
+
 #ifdef TEST
 #include <_PDCLIB_test.h>
 
index 02d105cf0b8e1b697dfddb97af47c5b33ade8770..17ab3cfd948b4331b43904a9f8f959b6db011347 100644 (file)
@@ -10,6 +10,8 @@
 
 #include <string.h>
 
+#ifndef REGTEST
+
 size_t strlen( const char * s )
 {
     size_t rc = 0;
@@ -20,6 +22,8 @@ size_t strlen( const char * s )
     return rc;
 }
 
+#endif
+
 #ifdef TEST
 #include <_PDCLIB_test.h>
 
index 7fdaa2670eff250cba6bc045723320d844667f71..57200489c97530d58e00901b6c22eca50f1b0b69 100644 (file)
@@ -11,6 +11,8 @@
 #include <_PDCLIB_aux.h>
 #include <string.h>
 
+#ifndef REGTEST
+
 char * strncat( char * _PDCLIB_restrict s1, const char * _PDCLIB_restrict s2, size_t n )
 {
     char * rc = s1;
@@ -29,6 +31,8 @@ char * strncat( char * _PDCLIB_restrict s1, const char * _PDCLIB_restrict s2, si
     return rc;
 }
 
+#endif
+
 #ifdef TEST
 #include <_PDCLIB_test.h>
 
index 35a9511da11174497d831d91857d56a8511d3dcb..286d41ed6baedaf951428f918828eb9e548a9bdd 100644 (file)
@@ -10,6 +10,8 @@
 
 #include <string.h>
 
+#ifndef REGTEST
+
 int strncmp( const char * s1, const char * s2, size_t n )
 {
     while ( n && ( *s1 == *s2 ) )
@@ -28,6 +30,8 @@ int strncmp( const char * s1, const char * s2, size_t n )
     }
 }
 
+#endif
+
 #ifdef TEST
 #include <_PDCLIB_test.h>
 
index 31602ec8a9fef4709ce87b2904c821fb6256d2f4..ea88d3f8a6648d41fca4fc341625c3bcb503496c 100644 (file)
@@ -11,6 +11,8 @@
 #include <_PDCLIB_aux.h>
 #include <string.h>
 
+#ifndef REGTEST
+
 char * strncpy( char * _PDCLIB_restrict s1, const char * _PDCLIB_restrict s2, size_t n )
 {
     char * rc = s1;
@@ -28,6 +30,8 @@ char * strncpy( char * _PDCLIB_restrict s1, const char * _PDCLIB_restrict s2, si
     return rc;
 }
 
+#endif
+
 #ifdef TEST
 #include <_PDCLIB_test.h>
 
index b317aed52fa00f4731f4340dc4ae075f3d997ace..2bec285abb02b1d724ec6f41525cf95871511528 100644 (file)
@@ -10,6 +10,8 @@
 
 #include <string.h>
 
+#ifndef REGTEST
+
 char * strpbrk( const char * s1, const char * s2 )
 {
     const char * p1 = s1;
@@ -29,6 +31,8 @@ char * strpbrk( const char * s1, const char * s2 )
     return NULL;
 }
 
+#endif
+
 #ifdef TEST
 #include <_PDCLIB_test.h>
 
index aa4c9301640a60c2ddcd918a94af4489ad77942f..69321b29e15e8ad4b2e6a37e81c2bfca80fabde9 100644 (file)
@@ -10,6 +10,8 @@
 
 #include <string.h>
 
+#ifndef REGTEST
+
 char * strrchr( const char * s, int c )
 {
     size_t i = 0;
@@ -24,6 +26,8 @@ char * strrchr( const char * s, int c )
     return NULL;
 }
 
+#endif
+
 #ifdef TEST
 #include <_PDCLIB_test.h>
 
index a5859cc2ca89b7b2d544457370fde2a74b6c550a..ed9b8b149fe51fb87094b44836113584517a37cc 100644 (file)
@@ -10,6 +10,8 @@
 
 #include <string.h>
 
+#ifndef REGTEST
+
 size_t strspn( const char * s1, const char * s2 )
 {
     size_t len = 0;
@@ -34,6 +36,8 @@ size_t strspn( const char * s1, const char * s2 )
     return len;
 }
 
+#endif
+
 #ifdef TEST
 #include <_PDCLIB_test.h>
 
index 2ad75058e75e21211a235b696c0c51151fa98804..0856030f18b0c8fa02e3002e9ef3bbf7a12de489 100644 (file)
@@ -10,6 +10,8 @@
 
 #include <string.h>
 
+#ifndef REGTEST
+
 char * strstr( const char * s1, const char * s2 )
 {
     const char * p1 = s1;
@@ -32,6 +34,8 @@ char * strstr( const char * s1, const char * s2 )
     return NULL;
 }
 
+#endif
+
 #ifdef TEST
 #include <_PDCLIB_test.h>
 
index 071f4f8607e4063f093674c3d81263f16d332793..991891dd258f0bc27b2b7cb3dc9a7b4eb8df5e6a 100644 (file)
@@ -11,6 +11,8 @@
 #include <_PDCLIB_aux.h>
 #include <string.h>
 
+#ifndef REGTEST
+
 char * strtok( char * _PDCLIB_restrict s1, const char * _PDCLIB_restrict s2 )
 {
     static char * tmp = NULL;
@@ -72,6 +74,8 @@ char * strtok( char * _PDCLIB_restrict s1, const char * _PDCLIB_restrict s2 )
     return ( tmp = NULL );
 }
 
+#endif
+
 #ifdef TEST
 #include <_PDCLIB_test.h>
 
index 650cfbf2ed3c48fccbbc84945e64e5a7d72a56a7..4b81c9375c624f47b50329b8ed16abf8fbd678b0 100644 (file)
@@ -11,8 +11,9 @@
 #include <_PDCLIB_aux.h>
 #include <string.h>
 
-/* TODO: Dummy function, no locale support yet. */
+#ifndef REGTEST
 
+/* TODO: Dummy function, no locale support yet. */
 size_t strxfrm( char * _PDCLIB_restrict s1, const char * _PDCLIB_restrict s2, size_t n )
 {
     size_t len = strlen( s2 );
@@ -26,6 +27,8 @@ size_t strxfrm( char * _PDCLIB_restrict s1, const char * _PDCLIB_restrict s2, si
     return len;
 }
 
+#endif
+
 #ifdef TEST
 #include <_PDCLIB_test.h>