diff options
Diffstat (limited to 'string/string.h')
-rw-r--r-- | string/string.h | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/string/string.h b/string/string.h index 4a49e45..db9bc00 100644 --- a/string/string.h +++ b/string/string.h @@ -33,6 +33,7 @@ __BEGIN_DECLS #include <stddef.h> +__BEGIN_NAMESPACE_STD /* Copy N bytes of SRC to DEST. */ extern void *memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) __THROW; @@ -40,6 +41,7 @@ extern void *memcpy (void *__restrict __dest, correct behavior for overlapping strings. */ extern void *memmove (void *__dest, __const void *__src, size_t __n) __THROW; +__END_NAMESPACE_STD /* Copy no more than N bytes of SRC to DEST, stopping when C is found. Return the position in DEST one byte past where C was copied, @@ -51,6 +53,7 @@ extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, #endif /* SVID. */ +__BEGIN_NAMESPACE_STD /* Set N bytes of S to C. */ extern void *memset (void *__s, int __c, size_t __n) __THROW; @@ -61,6 +64,7 @@ extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) /* Search N bytes of S for C. */ extern void *memchr (__const void *__s, int __c, size_t __n) __THROW __attribute_pure__; +__END_NAMESPACE_STD #ifdef __USE_GNU /* Search in S for C. This is similar to `memchr' but there is no @@ -73,6 +77,7 @@ extern void *memrchr (__const void *__s, int __c, size_t __n) #endif +__BEGIN_NAMESPACE_STD /* Copy SRC to DEST. */ extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) __THROW; @@ -100,6 +105,7 @@ extern int strcoll (__const char *__s1, __const char *__s2) /* Put a transformation of SRC into no more than N bytes of DEST. */ extern size_t strxfrm (char *__restrict __dest, __const char *__restrict __src, size_t __n) __THROW; +__END_NAMESPACE_STD #ifdef __USE_GNU /* The following functions are equivalent to the both above but they @@ -151,10 +157,12 @@ extern char *strndup (__const char *__string, size_t __n) })) #endif +__BEGIN_NAMESPACE_STD /* Find the first occurrence of C in S. */ extern char *strchr (__const char *__s, int __c) __THROW __attribute_pure__; /* Find the last occurrence of C in S. */ extern char *strrchr (__const char *__s, int __c) __THROW __attribute_pure__; +__END_NAMESPACE_STD #ifdef __USE_GNU /* This function is similar to `strchr'. But it returns a pointer to @@ -162,6 +170,7 @@ extern char *strrchr (__const char *__s, int __c) __THROW __attribute_pure__; extern char *strchrnul (__const char *__s, int __c) __THROW __attribute_pure__; #endif +__BEGIN_NAMESPACE_STD /* Return the length of the initial segment of S which consists entirely of characters not in REJECT. */ extern size_t strcspn (__const char *__s, __const char *__reject) @@ -177,15 +186,11 @@ extern char *strpbrk (__const char *__s, __const char *__accept) extern char *strstr (__const char *__haystack, __const char *__needle) __THROW __attribute_pure__; -#ifdef __USE_GNU -/* Similar to `strstr' but this function ignores the case of both strings. */ -extern char *strcasestr (__const char *__haystack, __const char *__needle) - __THROW __attribute_pure__; -#endif /* Divide S into tokens separated by characters in DELIM. */ extern char *strtok (char *__restrict __s, __const char *__restrict __delim) __THROW; +__END_NAMESPACE_STD /* Divide S into tokens separated by characters in DELIM. Information passed between calls are stored in SAVE_PTR. */ @@ -198,6 +203,12 @@ extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, #endif #ifdef __USE_GNU +/* Similar to `strstr' but this function ignores the case of both strings. */ +extern char *strcasestr (__const char *__haystack, __const char *__needle) + __THROW __attribute_pure__; +#endif + +#ifdef __USE_GNU /* Find the first occurrence of NEEDLE in HAYSTACK. NEEDLE is NEEDLELEN bytes long; HAYSTACK is HAYSTACKLEN bytes long. */ @@ -214,8 +225,10 @@ extern void *mempcpy (void *__restrict __dest, #endif +__BEGIN_NAMESPACE_STD /* Return the length of S. */ extern size_t strlen (__const char *__s) __THROW __attribute_pure__; +__END_NAMESPACE_STD #ifdef __USE_GNU /* Find the length of STRING, but scan at most MAXLEN characters. @@ -225,8 +238,10 @@ extern size_t strnlen (__const char *__string, size_t __maxlen) #endif +__BEGIN_NAMESPACE_STD /* Return a string describing the meaning of the `errno' code in ERRNUM. */ extern char *strerror (int __errnum) __THROW; +__END_NAMESPACE_STD #if defined __USE_XOPEN2K || defined __USE_MISC /* Reentrant version of `strerror'. If a temporary buffer is required, at most BUFLEN bytes of BUF will be used. */ |