]> pd.if.org Git - pdclib/commitdiff
Test-compile fixes.
authorsolar <unknown>
Tue, 11 Jan 2005 07:15:12 +0000 (07:15 +0000)
committersolar <unknown>
Tue, 11 Jan 2005 07:15:12 +0000 (07:15 +0000)
_PDCLIB_int.h
functions/string/strlen.c
functions/string/strrchr.c
functions/string/strtok.c
string.h

index bd0a47967453ba3eff13131b4c085e0f597738d4..24accb0da68e221d6f34821649f9cbb79a658257 100644 (file)
@@ -224,17 +224,17 @@ typedef unsigned _PDCLIB_fast64 _PDCLIB_uint_fast64_t;
 /* Various <stddef.h> typedefs and limits                                     */
 /* -------------------------------------------------------------------------- */
 
-typedef _PDCLIB_ptrdiff     _PDCLIB_ptrdiff_t
+typedef _PDCLIB_ptrdiff     _PDCLIB_ptrdiff_t;
 #define _PDCLIB_PTRDIFF_MIN concat( concat( _PDCLIB_, _PDCLIB_PTRDIFF ), _MIN )
 #define _PDCLIB_PTRDIFF_MAX concat( concat( _PDCLIB_, _PDCLIB_PTRDIFF ), _MAX )
 
 #define _PDCLIB_SIG_ATOMIC_MIN concat( concat( _PDCLIB_, _PDCLIB_SIG_ATOMIC ), _MIN )
 #define _PDCLIB_SIG_ATOMIC_MAX concat( concat( _PDCLIB_, _PDCLIB_SIG_ATOMIC ), _MAX )
 
-typedef _PDCLIB_size     _PDCLIB_size_t
+typedef _PDCLIB_size     _PDCLIB_size_t;
 #define _PDCLIB_SIZE_MAX concat( concat( _PDCLIB_, _PDCLIB_SIZE ), _MAX )
 
-typedef _PDCLIB_wchar     _PDCLIB_wchar_t
+typedef _PDCLIB_wchar     _PDCLIB_wchar_t;
 #define _PDCLIB_WCHAR_MIN concat( concat( _PDCLIB_, _PDCLIB_WCHAR ), _MIN )
 #define _PDCLIB_WCHAR_MAX concat( concat( _PDCLIB_, _PDCLIB_WCHAR ), _MAX )
 
@@ -251,4 +251,3 @@ typedef unsigned _PDCLIB_intmax _PDCLIB_uintmax_t;
 #define _PDCLIB_UINTMAX_MAX concat( concat( _PDCLIB_U, _PDCLIB_INTMAX ), _MAX )
 #define _PDCLIB_INTMAX_C( value )  concat( value, _PDCLIB_INTMAX_LITERAL )
 #define _PDCLIB_UINTMAX_C( value ) concat( value, concat( u, _PDCLIB_INTMAX_LITERAL ) )
-
index 24101b62f8b6a2fa18565032316d06359d8be4b7..c862805ed74840f0e5b906e3cf2008beb1beef43 100644 (file)
@@ -13,7 +13,7 @@
 size_t strlen( const char * s )
 {
     size_t rc = 0;
-    while ( src[rc] )
+    while ( s[rc] )
     {
         ++rc;
     }
index b29d0a6e26525d236a5d7ec64d963fb2c4e91b3a..77b633fffc6968ac6e8286d1c1f5aa8fd684a377 100644 (file)
 char * strrchr( const char * s, int c )
 {
     size_t i = 0;
-    while ( p[i++] );
+    while ( s[i++] );
     do
     {
-        if ( p[--i] == (char) c )
+        if ( s[--i] == (char) c )
         {
-            return (char *) p + i;
+            return (char *) s + i;
         }
     } while ( i );
     return NULL;
index 0a21a675068492785802306fca235dfb2126ba93..4d371afe29b0a6f392f4d5540b65a09e74c58e05 100644 (file)
@@ -25,7 +25,7 @@ char * strtok( char * _PDCLIB_restrict s1, const char * _PDCLIB_restrict s2 )
     {
         /* old string continued */
         if ( tmp == NULL )
-        }
+        {
             /* No old string, no new string, nothing to do */
             return NULL;
         }
index 5aca81817ffbfc4c251f127c18e4c492345b0559..08fcb96d29e58929ce292fe3f424a2d30f569422 100755 (executable)
--- a/string.h
+++ b/string.h
@@ -153,13 +153,13 @@ char * strrchr( const char * s, int c );
    consists only of characters from the character array s2.
    Returns the length of that substring.
 */
-size_t strspn( const char * s1, const char s2 );
+size_t strspn( const char * s1, const char s2 );
 
 /* Search the character array s1 for the substring in character array s2.
    Returns a pointer to that sbstring, or NULL. If s2 is of length zero,
    returns s1.
 */
-char * strstr( const char * s1, const char s2 );
+char * strstr( const char * s1, const char s2 );
 
 /* In a series of subsequent calls, parse a C string into tokens.
    On the first call to strtok(), the first argument is a pointer to the to-be-