aboutsummaryrefslogtreecommitdiff
path: root/wcsmbs
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-12-31 00:04:07 +0000
committerUlrich Drepper <drepper@redhat.com>1999-12-31 00:04:07 +0000
commit83d660c76fb1287f2cd9e6b94ddccb7069a6fae5 (patch)
tree487671d11bec5118f65a145ef262b2a49b11d098 /wcsmbs
parent9eb157c8750f70adc4c35f09127055444672b63d (diff)
downloadglibc-83d660c76fb1287f2cd9e6b94ddccb7069a6fae5.tar
glibc-83d660c76fb1287f2cd9e6b94ddccb7069a6fae5.tar.gz
glibc-83d660c76fb1287f2cd9e6b94ddccb7069a6fae5.tar.bz2
glibc-83d660c76fb1287f2cd9e6b94ddccb7069a6fae5.zip
Update.
1999-12-30 Ulrich Drepper <drepper@cygnus.com> * wcsmbs/wcscoll.c: Use multibyte character version. * wcsmbs/wcsxfrm.c: Likewise. * string/strcoll.c: Prepare to be used for the wide character version. * string/strxfrm.c: Likewise. * locale/weightwc.h: New file.
Diffstat (limited to 'wcsmbs')
-rw-r--r--wcsmbs/wcscoll.c24
-rw-r--r--wcsmbs/wcsxfrm.c28
2 files changed, 20 insertions, 32 deletions
diff --git a/wcsmbs/wcscoll.c b/wcsmbs/wcscoll.c
index b5b6f5cb45..1dfe93918b 100644
--- a/wcsmbs/wcscoll.c
+++ b/wcsmbs/wcscoll.c
@@ -19,26 +19,18 @@
#include <wchar.h>
+#define STRING_TYPE wchar_t
+#define USTRING_TYPE wint_t
#ifdef USE_IN_EXTENDED_LOCALE_MODEL
# define STRCOLL __wcscoll_l
#else
# define STRCOLL wcscoll
#endif
#define STRCMP wcscmp
+#define STRLEN wcslen
+#define WEIGHT_H "../locale/weightwc.h"
+#define SUFFIX WC
+#define L(arg) L##arg
+#define WIDE_CHAR_VERSION 1
-
-#ifndef USE_IN_EXTENDED_LOCALE_MODEL
-int
-STRCOLL (s1, s2)
- const wchar_t *s1;
- const wchar_t *s2;
-#else
-int
-STRCOLL (s1, s2, l)
- const wchar_t *s1;
- const wchar_t *s2;
- __locale_t l;
-#endif
-{
- return STRCMP (s1, s2);
-}
+#include "../string/strcoll.c"
diff --git a/wcsmbs/wcsxfrm.c b/wcsmbs/wcsxfrm.c
index 99a359399e..c515657244 100644
--- a/wcsmbs/wcsxfrm.c
+++ b/wcsmbs/wcsxfrm.c
@@ -1,6 +1,6 @@
/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -19,23 +19,19 @@
#include <wchar.h>
+#define STRING_TYPE wchar_t
+#define USTRING_TYPE wint_t
#ifdef USE_IN_EXTENDED_LOCALE_MODEL
# define STRXFRM __wcsxfrm_l
#else
# define STRXFRM wcsxfrm
#endif
-
-
-#ifndef USE_IN_EXTENDED_LOCALE_MODEL
-size_t
-STRXFRM (wchar_t *dest, const wchar_t *src, size_t n)
-#else
-size_t
-STRXFRM (wchar_t *dest, const wchar_t *src, size_t n, __locale_t l)
-#endif
-{
- if (n != 0)
- __wcpncpy (dest, src, n);
-
- return __wcslen (src);
-}
+#define STRCMP wcscmp
+#define STRLEN wcslen
+#define STPNCPY __wcpncpy
+#define WEIGHT_H "../locale/weightwc.h"
+#define SUFFIX WC
+#define L(arg) L##arg
+#define WIDE_CHAR_VERSION 1
+
+#include "../string/strxfrm.c"