@@ -16,26 +16,12 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
#include <string.h>
-#ifndef _LIBC
-/* We cannot generally use the name `basename' since XPG defines an unusable
- variant of the function but we cannot use it. */
-# define basename gnu_basename
-#endif
-
-
char *
-basename (filename)
- const char *filename;
+basename (const char *filename)
{
char *p = strrchr (filename, '/');
return p ? p + 1 : (char *) filename;
}
-#ifdef _LIBC
libc_hidden_def (basename)
-#endif
@@ -24,11 +24,7 @@
Return the position in DEST one byte past where C was copied, or
NULL if C was not found in the first N bytes of SRC. */
void *
-__memccpy (dest, src, c, n)
- void *dest;
- const void *src;
- int c;
- size_t n;
+__memccpy (void *dest, const void *src, int c, size_t n)
{
const char *s = src;
char *d = dest;
@@ -18,9 +18,7 @@
#include <string.h>
void *
-memfrob (s, n)
- void *s;
- size_t n;
+memfrob (void *s, size_t n)
{
char *p = (char *) s;
@@ -16,15 +16,12 @@
<http://www.gnu.org/licenses/>. */
#include <string.h>
-#include <memcopy.h>
#undef strcat
/* Append SRC on the end of DEST. */
char *
-strcat (dest, src)
- char *dest;
- const char *src;
+strcat (char *dest, const char *src)
{
char *s1 = dest;
const char *s2 = src;
@@ -21,16 +21,13 @@
<http://www.gnu.org/licenses/>. */
#include <string.h>
-#include <memcopy.h>
#include <stdlib.h>
#undef strchr
/* Find the first occurrence of C in S. */
char *
-strchr (s, c_in)
- const char *s;
- int c_in;
+strchr (const char *s, int c_in)
{
const unsigned char *char_ptr;
const unsigned long int *longword_ptr;
@@ -16,7 +16,6 @@
<http://www.gnu.org/licenses/>. */
#include <string.h>
-#include <memcopy.h>
#undef strcmp
@@ -24,9 +23,7 @@
greater than zero if S1 is lexicographically less than,
equal to or greater than S2. */
int
-strcmp (p1, p2)
- const char *p1;
- const char *p2;
+strcmp (const char *p1, const char *p2)
{
const unsigned char *s1 = (const unsigned char *) p1;
const unsigned char *s2 = (const unsigned char *) p2;
@@ -29,9 +29,7 @@
int
-STRCOLL (s1, s2)
- const STRING_TYPE *s1;
- const STRING_TYPE *s2;
+STRCOLL (const STRING_TYPE *s1, const STRING_TYPE *s2)
{
return STRCOLL_L (s1, s2, _NL_CURRENT_LOCALE);
}
@@ -17,15 +17,12 @@
#include <stddef.h>
#include <string.h>
-#include <memcopy.h>
#undef strcpy
/* Copy SRC to DEST. */
char *
-strcpy (dest, src)
- char *dest;
- const char *src;
+strcpy (char *dest, const char *src)
{
char c;
char *s = (char *) src;
@@ -26,8 +26,7 @@
/* Return the length of the null-terminated string STR. Scan for
the null terminator quickly by testing four bytes at a time. */
size_t
-strlen (str)
- const char *str;
+strlen (const char *str)
{
const char *char_ptr;
const unsigned long int *longword_ptr;
@@ -36,9 +36,7 @@ static char *olds;
// s = "abc\0=-def\0"
*/
char *
-STRTOK (s, delim)
- char *s;
- const char *delim;
+STRTOK (char *s, const char *delim)
{
char *token;