diff options
Diffstat (limited to 'string')
-rw-r--r-- | string/strcoll.c | 20 | ||||
-rw-r--r-- | string/strxfrm.c | 18 |
2 files changed, 36 insertions, 2 deletions
diff --git a/string/strcoll.c b/string/strcoll.c index 1aab47e3be..96a83133e8 100644 --- a/string/strcoll.c +++ b/string/strcoll.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. @@ -34,6 +34,23 @@ # define STRCMP strcmp #endif +#ifndef USE_IN_EXTENDED_LOCALE_MODEL +int +STRCOLL (s1, s2) + const STRING_TYPE *s1; + const STRING_TYPE *s2; +#else +int +STRCOLL (s1, s2, l) + const STRING_TYPE *s1; + const STRING_TYPE *s2; + __locale_t l; +#endif +{ + return STRCMP (s1, s2); +} + +#if 0 /* Include the shared helper functions. `strxfrm'/`wcsxfrm' also use these functions. */ #include "../locale/weight.h" @@ -208,3 +225,4 @@ STRCOLL (s1, s2, l) return 0; } +#endif diff --git a/string/strxfrm.c b/string/strxfrm.c index c2b8f48310..2a3a8a9032 100644 --- a/string/strxfrm.c +++ b/string/strxfrm.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. @@ -34,6 +34,21 @@ # define STPNCPY __stpncpy #endif +#ifndef USE_IN_EXTENDED_LOCALE_MODEL +size_t +STRXFRM (STRING_TYPE *dest, const STRING_TYPE *src, size_t n) +#else +size_t +STRXFRM (STRING_TYPE *dest, const STRING_TYPE *src, size_t n, __locale_t l) +#endif +{ + if (n != 0) + STPNCPY (dest, src, n); + + return STRLEN (src); +} + +#if 0 /* Include the shared helper functions. `strxfrm'/`wcsxfrm' also use these functions. */ #include "../locale/weight.h" @@ -280,3 +295,4 @@ STRXFRM (STRING_TYPE *dest, const STRING_TYPE *src, size_t n, __locale_t l) /* Return length without counting the terminating '\0'. */ return written; } +#endif |