This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Adding wcs* and wmem* in libc/string.


A few days ago, Egor submitted a patch to add wmem* functions to
libc/stdlib. I believe these functions should reside in
libc/string according to *BSD C Libraries.

And we can add wcs* functions in *BSD Library to newlib because
these functions don't depend on the implementation of wide
characters.
____
  | AIST      Kazuhiro Fujieda <fujieda@jaist.ac.jp>
  | HOKURIKU  Center for Information Science
o_/ 1990      Japan Advanced Institute of Science and Technology
2002-08-30  Kazuhiro Fujieda  <fujieda@jaist.ac.jp>
	* libc/include/wchar.h: Define NULL. Define WEOF more general
	way. Declare functions in newlib manner.
	* libc/stdlib/Makefile.am: Delete wmem*.c
	* libc/stdlib/wmemchr.c: Delete.
	* libc/stdlib/wmemcmp.c: Ditto.
	* libc/stdlib/wmemmove.c: Ditto.
	* libc/stdlib/wmemset.c: Ditto.
	* libc/string/Makefile.am: Add wmem*.c and wcs*.c.
	* libc/string/wcscat.c: New file derived from the NetBSD C Library.
	* libc/string/wcschr.c: Ditto.
	* libc/string/wcscmp.c: Ditto.
	* libc/string/wcscpy.c: Ditto.
	* libc/string/wcscspn.c: Ditto.
	* libc/string/wcslcat.c: Ditto.
	* libc/string/wcslcpy.c: Ditto.
	* libc/string/wcslen.c: Ditto.
	* libc/string/wcsncat.c: Ditto.
	* libc/string/wcsncmp.c: Ditto.
	* libc/string/wcsncpy.c: Ditto.
	* libc/string/wcspbrk.c: Ditto.
	* libc/string/wcsrchr.c: Ditto.
	* libc/string/wcsspn.c: Ditto.
	* libc/string/wcsstr.c: Ditto.
	* libc/string/wmemcmp.c: Ditto.
	* libc/string/wmemcpy.c: Ditto.
	* libc/string/wmemmove.c: Ditto.
	* libc/string/wmemset.c: Ditto.
diff -u cygwin-i18n/newlib/libc/include/wchar.h:1.1.1.1 cygwin-i18n/newlib/libc/include/wchar.h:1.1.2.2
--- cygwin-i18n/newlib/libc/include/wchar.h:1.1.1.1	Thu Aug 29 18:06:45 2002
+++ cygwin-i18n/newlib/libc/include/wchar.h	Fri Aug 30 00:12:08 2002
@@ -11,8 +11,12 @@
 /* For _mbstate_t definition. */
 #include <sys/_types.h>
 
+#ifndef NULL
+#define NULL	0
+#endif
+
 #ifndef WEOF
-# define WEOF (0xffffffffu)
+# define WEOF ((wint_t)-1)
 #endif
 
 #ifndef MBSTATE_T
@@ -20,18 +24,33 @@
 typedef _mbstate_t mbstate_t;
 #endif /* MBSTATE_T */
 
-wint_t btowc (int c);
-int wctob (wint_t c);
-int mbsinit(const mbstate_t *ps);
-size_t mbrlen(const char *s, size_t n, mbstate_t *ps);
-size_t mbrtowc(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps);
-size_t wcrtomb(char *s, wchar_t wc, mbstate_t *ps);
-size_t mbsrtowcs(wchar_t *dst, const char **src, size_t len, mbstate_t *ps);
-size_t wcsrtombs(char *dst, const wchar_t **src, size_t len, mbstate_t *ps);
-wchar_t *wmemchr(const wchar_t *ws, wchar_t wc, size_t n);
-int wmemcmp(const wchar_t *ws1, const wchar_t *ws2, size_t n);
-wchar_t *wmemcpy(wchar_t *ws1, const wchar_t *ws2, size_t n);
-wchar_t *wmemmove(wchar_t *ws1, const wchar_t *ws2, size_t n);
-wchar_t *wmemset(wchar_t *ws, wchar_t wc, size_t n);
+wint_t	_EXFUN(btowc, (int));
+int	_EXFUN(wctob, (wint_t));
+size_t	_EXFUN(mbrlen, (const char * , size_t, mbstate_t *));
+size_t	_EXFUN(mbrtowc, (wchar_t * , const char * , size_t, mbstate_t *));
+int	_EXFUN(mbsinit, (const mbstate_t *));
+size_t	_EXFUN(mbsrtowcs, (wchar_t * , const char ** , size_t, mbstate_t *));
+size_t	_EXFUN(wcrtomb, (char * , wchar_t, mbstate_t *));
+size_t	_EXFUN(wcsrtombs, (char * , const wchar_t ** , size_t, mbstate_t *));
+wchar_t	*_EXFUN(wcscat, (wchar_t * , const wchar_t *));
+wchar_t	*_EXFUN(wcschr, (const wchar_t *, wchar_t));
+int	_EXFUN(wcscmp, (const wchar_t *, const wchar_t *));
+wchar_t	*_EXFUN(wcscpy, (wchar_t * , const wchar_t *));
+size_t	_EXFUN(wcscspn, (const wchar_t *, const wchar_t *));
+size_t	_EXFUN(wcslcat, (wchar_t *, const wchar_t *, size_t));
+size_t	_EXFUN(wcslcpy, (wchar_t *, const wchar_t *, size_t));
+size_t	_EXFUN(wcslen, (const wchar_t *));
+wchar_t	*_EXFUN(wcsncat, (wchar_t * , const wchar_t * , size_t));
+int	_EXFUN(wcsncmp, (const wchar_t *, const wchar_t *, size_t));
+wchar_t	*_EXFUN(wcsncpy, (wchar_t *  , const wchar_t * , size_t));
+wchar_t	*_EXFUN(wcspbrk, (const wchar_t *, const wchar_t *));
+wchar_t	*_EXFUN(wcsrchr, (const wchar_t *, wchar_t));
+size_t	_EXFUN(wcsspn, (const wchar_t *, const wchar_t *));
+wchar_t	*_EXFUN(wcsstr, (const wchar_t *, const wchar_t *));
+wchar_t	*_EXFUN(wmemchr, (const wchar_t *, wchar_t, size_t));
+int	_EXFUN(wmemcmp, (const wchar_t *, const wchar_t *, size_t));
+wchar_t	*_EXFUN(wmemcpy, (wchar_t * , const wchar_t * , size_t));
+wchar_t	*_EXFUN(wmemmove, (wchar_t *, const wchar_t *, size_t));
+wchar_t	*_EXFUN(wmemset, (wchar_t *, wchar_t, size_t));
 
 #endif /* _WCHAR_H_ */
diff -u cygwin-i18n/newlib/libc/stdlib/Makefile.am:1.1.1.4 cygwin-i18n/newlib/libc/stdlib/Makefile.am:1.1.1.1.2.3
--- cygwin-i18n/newlib/libc/stdlib/Makefile.am:1.1.1.4	Thu Aug 29 18:06:50 2002
+++ cygwin-i18n/newlib/libc/stdlib/Makefile.am	Thu Aug 29 23:07:31 2002
@@ -49,12 +49,7 @@
 	wcstombs.c	\
 	wcstombs_r.c	\
 	wctomb.c	\
-	wctomb_r.c	\
-	wmemchr.c	\
-	wmemcmp.c	\
-	wmemcpy.c	\
-	wmemmove.c	\
-	wmemset.c
+	wctomb_r.c
 
 EXTENDED_SOURCES = \
 	drand48.c	\
Index: cygwin-i18n/newlib/libc/stdlib/Makefile.in
diff -u cygwin-i18n/newlib/libc/stdlib/Makefile.in:1.1.1.4 cygwin-i18n/newlib/libc/stdlib/Makefile.in:1.1.1.1.2.3
--- cygwin-i18n/newlib/libc/stdlib/Makefile.in:1.1.1.4	Thu Aug 29 18:06:50 2002
+++ cygwin-i18n/newlib/libc/stdlib/Makefile.in	Thu Aug 29 23:07:31 2002
@@ -155,12 +155,7 @@
 	wcstombs.c	\
 	wcstombs_r.c	\
 	wctomb.c	\
-	wctomb_r.c	\
-	wmemchr.c	\
-	wmemcmp.c	\
-	wmemcpy.c	\
-	wmemmove.c	\
-	wmemset.c
+	wctomb_r.c
 
 
 EXTENDED_SOURCES = \
@@ -311,10 +306,7 @@
 @USE_LIBTOOL_FALSE@mstats.$(OBJEXT) rand.$(OBJEXT) rand_r.$(OBJEXT) \
 @USE_LIBTOOL_FALSE@realloc.$(OBJEXT) strtod.$(OBJEXT) strtol.$(OBJEXT) \
 @USE_LIBTOOL_FALSE@strtoul.$(OBJEXT) wcstombs.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@wcstombs_r.$(OBJEXT) wctomb.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@wctomb_r.$(OBJEXT) wmemchr.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@wmemcmp.$(OBJEXT) wmemcpy.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@wmemmove.$(OBJEXT) wmemset.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@wcstombs_r.$(OBJEXT) wctomb.$(OBJEXT) wctomb_r.$(OBJEXT) \
 @USE_LIBTOOL_FALSE@drand48.$(OBJEXT) ecvtbuf.$(OBJEXT) efgcvt.$(OBJEXT) \
 @USE_LIBTOOL_FALSE@erand48.$(OBJEXT) jrand48.$(OBJEXT) \
 @USE_LIBTOOL_FALSE@lcong48.$(OBJEXT) lrand48.$(OBJEXT) \
@@ -334,8 +326,7 @@
 @USE_LIBTOOL_TRUE@mbstowcs.lo mbstowcs_r.lo mbtowc.lo mbtowc_r.lo \
 @USE_LIBTOOL_TRUE@mlock.lo mprec.lo mstats.lo rand.lo rand_r.lo \
 @USE_LIBTOOL_TRUE@realloc.lo strtod.lo strtol.lo strtoul.lo wcstombs.lo \
-@USE_LIBTOOL_TRUE@wcstombs_r.lo wctomb.lo wctomb_r.lo wmemchr.lo \
-@USE_LIBTOOL_TRUE@wmemcmp.lo wmemcpy.lo wmemmove.lo wmemset.lo \
+@USE_LIBTOOL_TRUE@wcstombs_r.lo wctomb.lo wctomb_r.lo \
 @USE_LIBTOOL_TRUE@drand48.lo ecvtbuf.lo efgcvt.lo erand48.lo jrand48.lo \
 @USE_LIBTOOL_TRUE@lcong48.lo lrand48.lo mrand48.lo msize.lo mtrim.lo \
 @USE_LIBTOOL_TRUE@nrand48.lo rand48.lo seed48.lo srand48.lo strtoll.lo \
Index: cygwin-i18n/newlib/libc/stdlib/wmemchr.c
diff -u cygwin-i18n/newlib/libc/stdlib/wmemchr.c:1.1.1.1 cygwin-i18n/newlib/libc/stdlib/wmemchr.c:removed
--- cygwin-i18n/newlib/libc/stdlib/wmemchr.c:1.1.1.1	Thu Aug 29 18:06:50 2002
+++ cygwin-i18n/newlib/libc/stdlib/wmemchr.c	Fri Aug 30 00:59:51 2002
@@ -1,49 +0,0 @@
-/*-
- * Copyright (c)1999 Citrus Project,
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *	citrus Id: wmemchr.c,v 1.2 2000/12/20 14:08:31 itojun Exp
- */
-
-#include <_ansi.h>
-#include <stdlib.h>
-#include <wchar.h>
-
-wchar_t	*
-_DEFUN (wmemchr, (s, c, n),
-	const wchar_t *s _AND
-	wchar_t c _AND
-	size_t n)
-{
-	size_t i;
-
-	for (i = 0; i < n; i++) {
-		if (*s == c) {
-			/* LINTED const castaway */
-			return (wchar_t *)s;
-		}
-		s++;
-	}
-	return NULL;
-}
Index: cygwin-i18n/newlib/libc/stdlib/wmemcmp.c
diff -u cygwin-i18n/newlib/libc/stdlib/wmemcmp.c:1.1.1.1 cygwin-i18n/newlib/libc/stdlib/wmemcmp.c:removed
--- cygwin-i18n/newlib/libc/stdlib/wmemcmp.c:1.1.1.1	Thu Aug 29 18:06:50 2002
+++ cygwin-i18n/newlib/libc/stdlib/wmemcmp.c	Fri Aug 30 00:59:51 2002
@@ -1,49 +0,0 @@
-/*-
- * Copyright (c)1999 Citrus Project,
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *	citrus Id: wmemcmp.c,v 1.2 2000/12/20 14:08:31 itojun Exp
- */
-
-#include <_ansi.h>
-#include <wchar.h>
-
-int
-_DEFUN (wmemcmp, (s1, s2, n), 
-	const wchar_t *s1 _AND
-	const wchar_t *s2 _AND
-	size_t n)
-{
-	size_t i;
-
-	for (i = 0; i < n; i++) {
-		if (*s1 != *s2) {
-			/* wchar might be unsigned */
-			return *s1 > *s2 ? 1 : -1; 
-		}
-		s1++;
-		s2++;
-	}
-	return 0;
-}
Index: cygwin-i18n/newlib/libc/stdlib/wmemcpy.c
diff -u cygwin-i18n/newlib/libc/stdlib/wmemcpy.c:1.1.1.1 cygwin-i18n/newlib/libc/stdlib/wmemcpy.c:removed
--- cygwin-i18n/newlib/libc/stdlib/wmemcpy.c:1.1.1.1	Thu Aug 29 18:06:50 2002
+++ cygwin-i18n/newlib/libc/stdlib/wmemcpy.c	Fri Aug 30 00:59:51 2002
@@ -1,41 +0,0 @@
-/*-
- * Copyright (c)1999 Citrus Project,
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *	citrus Id: wmemcpy.c,v 1.2 2000/12/20 14:08:31 itojun Exp
- */
-
-#include <_ansi.h>
-#include <string.h>
-#include <wchar.h>
-
-wchar_t *
-_DEFUN (wmemcpy, (d, s, n),
-	wchar_t *d _AND
-	const wchar_t *s _AND
-	size_t n)
-{
-
-	return (wchar_t *)memcpy(d, s, n * sizeof(wchar_t));
-}
Index: cygwin-i18n/newlib/libc/stdlib/wmemmove.c
diff -u cygwin-i18n/newlib/libc/stdlib/wmemmove.c:1.1.1.1 cygwin-i18n/newlib/libc/stdlib/wmemmove.c:removed
--- cygwin-i18n/newlib/libc/stdlib/wmemmove.c:1.1.1.1	Thu Aug 29 18:06:50 2002
+++ cygwin-i18n/newlib/libc/stdlib/wmemmove.c	Fri Aug 30 00:59:51 2002
@@ -1,41 +0,0 @@
-/*-
- * Copyright (c)1999 Citrus Project,
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *	citrus Id: wmemmove.c,v 1.2 2000/12/20 14:08:31 itojun Exp
- */
-
-#include <_ansi.h>
-#include <string.h>
-#include <wchar.h>
-
-wchar_t *
-_DEFUN (wmemmove, (d, s, n),
-	wchar_t *d _AND
-	const wchar_t *s _AND
-	size_t n)
-{
-
-	return (wchar_t *)memmove(d, s, n * sizeof(wchar_t));
-}
Index: cygwin-i18n/newlib/libc/stdlib/wmemset.c
diff -u cygwin-i18n/newlib/libc/stdlib/wmemset.c:1.1.1.1 cygwin-i18n/newlib/libc/stdlib/wmemset.c:removed
--- cygwin-i18n/newlib/libc/stdlib/wmemset.c:1.1.1.1	Thu Aug 29 18:06:50 2002
+++ cygwin-i18n/newlib/libc/stdlib/wmemset.c	Fri Aug 30 00:59:51 2002
@@ -1,47 +0,0 @@
-/*-
- * Copyright (c)1999 Citrus Project,
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *	citrus Id: wmemset.c,v 1.2 2000/12/20 14:08:31 itojun Exp
- */
-
-#include <_ansi.h>
-#include <wchar.h>
-
-wchar_t	*
-_DEFUN(wmemset, (s, c, n),
-	wchar_t *s _AND
-	wchar_t c _AND
-	size_t n)
-{
-	size_t i;
-	wchar_t *p;
-
-	p = (wchar_t *)s;
-	for (i = 0; i < n; i++) {
-		*p = c;
-		p++;
-	}
-	return s;
-}
Index: cygwin-i18n/newlib/libc/string/Makefile.am
diff -u cygwin-i18n/newlib/libc/string/Makefile.am:1.1.1.4 cygwin-i18n/newlib/libc/string/Makefile.am:1.1.1.1.2.4
--- cygwin-i18n/newlib/libc/string/Makefile.am:1.1.1.4	Thu Aug 29 18:06:50 2002
+++ cygwin-i18n/newlib/libc/string/Makefile.am	Thu Aug 29 23:07:34 2002
@@ -44,7 +44,27 @@
 	strxfrm.c  \
 	strstr.c \
 	swab.c \
-	u_strerr.c
+	u_strerr.c \
+	wcscat.c \
+	wcschr.c \
+	wcscmp.c \
+	wcscpy.c \
+	wcscspn.c \
+	wcslcat.c \
+	wcslcpy.c \
+	wcslen.c \
+	wcsncat.c \
+	wcsncmp.c \
+	wcsncpy.c \
+	wcspbrk.c \
+	wcsrchr.c \
+	wcsspn.c \
+	wcsstr.c \
+	wmemchr.c \
+	wmemcmp.c \
+	wmemcpy.c \
+	wmemmove.c \
+	wmemset.c
 
 if ELIX_LEVEL_1
 LIB_OBJS =
@@ -83,7 +103,11 @@
 memchr.def	strcat.def	strerror.def	strerror_r.def strrchr.def \
 memcmp.def	strchr.def	strlen.def	strnlen.def strspn.def \
 strcasecmp.def	strncasecmp.def strlwr.def	strupr.def  memccpy.def \
-mempcpy.def
+mempcpy.def \
+wcscat.def	wcschr.def	wcscmp.def	wcscpy.def wcscspn.def \
+wcslcat.def	wcslcpy.def	wcslen.def	wcsncat.def wcsncmp.def \
+wcsncpy.def	wcspbrk.def	wcsrchr.def	wcsspn.def wcsstr.def \
+wmemchr.def	wmemcmp.def	wmemcpy.def	wmemmove.def wmemset.def
 
 SUFFIXES = .def
 
Index: cygwin-i18n/newlib/libc/string/Makefile.in
diff -u cygwin-i18n/newlib/libc/string/Makefile.in:1.1.1.4 cygwin-i18n/newlib/libc/string/Makefile.in:1.1.1.1.2.5
--- cygwin-i18n/newlib/libc/string/Makefile.in:1.1.1.4	Thu Aug 29 18:06:50 2002
+++ cygwin-i18n/newlib/libc/string/Makefile.in	Thu Aug 29 23:07:34 2002
@@ -150,7 +150,27 @@
 	strxfrm.c  \
 	strstr.c \
 	swab.c \
-	u_strerr.c
+	u_strerr.c \
+	wcscat.c \
+	wcschr.c \
+	wcscmp.c \
+	wcscpy.c \
+	wcscspn.c \
+	wcslcat.c \
+	wcslcpy.c \
+	wcslen.c \
+	wcsncat.c \
+	wcsncmp.c \
+	wcsncpy.c \
+	wcspbrk.c \
+	wcsrchr.c \
+	wcsspn.c \
+	wcsstr.c \
+	wmemchr.c \
+	wmemcmp.c \
+	wmemcpy.c \
+	wmemmove.c \
+	wmemset.c
 
 @ELIX_LEVEL_1_TRUE@LIB_OBJS = 
 @ELIX_LEVEL_1_FALSE@LIB_OBJS = @ELIX_LEVEL_1_FALSE@\
@@ -173,7 +193,7 @@
 @USE_LIBTOOL_FALSE@lib_a_LIBADD = @USE_LIBTOOL_FALSE@$(LIB_OBJS)
 @USE_LIBTOOL_FALSE@lib_a_DEPENDENCIES = @USE_LIBTOOL_FALSE@$(LIB_OBJS)
 
-CHEWOUT_FILES = \
+CHEWOUT_FILES=\
 bcmp.def	memcpy.def	strcmp.def	strncat.def strstr.def \
 bcopy.def	memmove.def	strcoll.def	strncmp.def strtok.def \
 bzero.def	memset.def	strcpy.def	strncpy.def strxfrm.def \
@@ -181,9 +201,12 @@
 memchr.def	strcat.def	strerror.def	strerror_r.def strrchr.def \
 memcmp.def	strchr.def	strlen.def	strnlen.def strspn.def \
 strcasecmp.def	strncasecmp.def strlwr.def	strupr.def  memccpy.def \
-mempcpy.def
+mempcpy.def \
+wcscat.def	wcschr.def	wcscmp.def	wcscpy.def wcscspn.def \
+wcslcat.def	wcslcpy.def	wcslen.def	wcsncat.def wcsncmp.def \
+wcsncpy.def	wcspbrk.def	wcsrchr.def	wcsspn.def wcsstr.def \
+wmemchr.def	wmemcmp.def	wmemcpy.def	wmemmove.def wmemset.def
 
-
 SUFFIXES = .def
 
 CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
@@ -214,7 +237,16 @@
 @USE_LIBTOOL_FALSE@strpbrk.$(OBJEXT) strrchr.$(OBJEXT) strsep.$(OBJEXT) \
 @USE_LIBTOOL_FALSE@strspn.$(OBJEXT) strtok.$(OBJEXT) strtok_r.$(OBJEXT) \
 @USE_LIBTOOL_FALSE@strupr.$(OBJEXT) strxfrm.$(OBJEXT) strstr.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@swab.$(OBJEXT) u_strerr.$(OBJEXT)
+@USE_LIBTOOL_FALSE@swab.$(OBJEXT) u_strerr.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@wcscat.$(OBJEXT) wcschr.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@wcscmp.$(OBJEXT) wcscpy.$(OBJEXT) wcscspn.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@wcslcat.$(OBJEXT) wcslcpy.$(OBJEXT) wcslen.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@wcsncat.$(OBJEXT) wcsncmp.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@wcsncpy.$(OBJEXT) wcspbrk.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@wcsrchr.$(OBJEXT) wcsspn.$(OBJEXT) wcsstr.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@wmemchr.$(OBJEXT) wmemcmp.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@wmemcpy.$(OBJEXT) wmemmove.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@wmemset.$(OBJEXT)
 LTLIBRARIES =  $(noinst_LTLIBRARIES)
 
 @USE_LIBTOOL_TRUE@libstring_la_OBJECTS =  bcopy.lo bzero.lo index.lo \
@@ -225,7 +257,12 @@
 @USE_LIBTOOL_TRUE@strlen.lo strlwr.lo strncasecmp.lo strncat.lo \
 @USE_LIBTOOL_TRUE@strncmp.lo strncpy.lo strnlen.lo strpbrk.lo \
 @USE_LIBTOOL_TRUE@strrchr.lo strsep.lo strspn.lo strtok.lo strtok_r.lo \
-@USE_LIBTOOL_TRUE@strupr.lo strxfrm.lo strstr.lo swab.lo u_strerr.lo
+@USE_LIBTOOL_TRUE@strupr.lo strxfrm.lo strstr.lo swab.lo u_strerr.lo \
+@USE_LIBTOOL_TRUE@wcscat.lo wcschr.lo wcscmp.lo wcscpy.lo wcscspn.lo \
+@USE_LIBTOOL_TRUE@wcslcat.lo wcslcpy.lo wcslen.lo wcsncat.lo wcsncmp.lo \
+@USE_LIBTOOL_TRUE@wcsncpy.lo wcspbrk.lo wcsrchr.lo wcsspn.lo wcsstr.lo \
+@USE_LIBTOOL_TRUE@wmemchr.lo wmemcmp.lo wmemcpy.lo wmemmove.lo \
+@USE_LIBTOOL_TRUE@wmemset.lo
 CFLAGS = @CFLAGS@
 COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
Index: cygwin-i18n/newlib/libc/string/wcscat.c
diff -u /dev/null cygwin-i18n/newlib/libc/string/wcscat.c:1.1.2.3
--- /dev/null	Fri Aug 30 00:59:52 2002
+++ cygwin-i18n/newlib/libc/string/wcscat.c	Fri Aug 30 00:47:27 2002
@@ -0,0 +1,84 @@
+/*
+FUNCTION
+	<<wcscat>>---concatenate two wide-character strings
+INDEX
+	wcscat
+
+ANSI_SYNOPSIS
+	#include <wchar.h>
+	wchar_t *wcscat(wchar_t *<[s1]>, const wchar_t *<[s2]>);
+
+TRAD_SYNOPSIS
+	wchar_t *wcscat(<[s1]>, <[s2]>
+	wchar_t *<[s1]>;
+	const wchar_t *<[s2]>;
+
+DESCRIPTION
+	The <<wcscat>> function appends a copy of the wide-character string
+	pointed to by <[s2]> (including the terminating null wide-character
+	code) to the end of the wide-character string pointed to by <[s1]>.
+	The initial wide-character code of <[s2]> overwrites the null
+	wide-character code at the end of <[s1]>. If copying takes place between
+	objects that overlap, the behaviour is undefined. 
+
+RETURNS
+	The <<wcscat>> function returns <[s1]>;
+	no return value is reserved to indicate an error. 
+
+PORTABILITY
+<<wcscat>> is ISO/IEC 9899/AMD1:1995 (ISO C).
+No supporting OS subroutines are required.
+*/
+
+/*	$NetBSD: wcscat.c,v 1.1 2000/12/23 23:14:36 itojun Exp $	*/
+
+/*-
+ * Copyright (c)1999 Citrus Project,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	citrus Id: wcscat.c,v 1.1 1999/12/29 21:47:45 tshiozak Exp
+ */
+
+#include <_ansi.h>
+#include <wchar.h>
+
+wchar_t *
+_DEFUN (wcscat, (s1, s2),
+	wchar_t * s1 _AND
+	_CONST wchar_t * s2)
+{
+  wchar_t *p;
+  wchar_t *q;
+  _CONST wchar_t *r;
+
+  p = s1;
+  while (*p)
+    p++;
+  q = p;
+  r = s2;
+  while (*r)
+    *q++ = *r++;
+  *q = '\0';
+  return s1;
+}
Index: cygwin-i18n/newlib/libc/string/wcschr.c
diff -u /dev/null cygwin-i18n/newlib/libc/string/wcschr.c:1.1.2.3
--- /dev/null	Fri Aug 30 00:59:52 2002
+++ cygwin-i18n/newlib/libc/string/wcschr.c	Fri Aug 30 00:47:27 2002
@@ -0,0 +1,81 @@
+/*
+FUNCTION
+	<<wcschr>>---wide-character string scanning operation
+
+ANSI_SYNOPSIS
+	#include <wchar.h>
+	wchar_t *wcschr(const wchar_t *<[s]>, wchar_t <[c]>);
+
+TRAD_SYNOPSIS
+	wchar_t *wcschr(<[s]>, <[c]>
+	const wchar_t *<[s]>;
+	wchar_t <[c]>;
+
+DESCRIPTION
+	The <<wcschr>> function locates the first occurrence of <[c]> in the
+	wide-character string pointed to by <[s]>. The value of <[c]> must be a
+	character representable as a type wchar_t and must be a wide-character
+	code corresponding to a valid character in the current locale.
+	The terminating null wide-character string.
+
+RETURNS
+	Upon completion, <<wcschr>> returns a pointer to the wide-character
+	code, or a null pointer if the wide-character code is not found. 
+
+PORTABILITY
+<<wcschr>> is ISO/IEC 9899/AMD1:1995 (ISO C).
+No supporting OS subroutines are required.
+*/
+
+/*	$NetBSD: wcschr.c,v 1.1 2000/12/23 23:14:36 itojun Exp $	*/
+
+/*-
+ * Copyright (c)1999 Citrus Project,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	citrus Id: wcschr.c,v 1.2 2000/12/21 05:07:25 itojun Exp
+ */
+
+#include <_ansi.h>
+#include <wchar.h>
+
+wchar_t *
+_DEFUN (wcschr, (s, c),
+	_CONST wchar_t * s _AND
+	wchar_t c)
+{
+  _CONST wchar_t *p;
+
+  p = s;
+  while (*p)
+    {
+      if (*p == c)
+	{
+	  /* LINTED interface specification */
+	  return (wchar_t *) p;
+	}
+      p++;
+    }
+  return NULL;
+}
Index: cygwin-i18n/newlib/libc/string/wcscmp.c
diff -u /dev/null cygwin-i18n/newlib/libc/string/wcscmp.c:1.1.2.4
--- /dev/null	Fri Aug 30 00:59:52 2002
+++ cygwin-i18n/newlib/libc/string/wcscmp.c	Fri Aug 30 00:59:32 2002
@@ -0,0 +1,87 @@
+/*
+FUNCTION
+	<<wcscmp>>---compare two wide-character strings
+
+ANSI_SYNOPSIS
+	#include <wchar.h>
+	int wcscmp(const wchar_t *<[s1]>, *<[s2]>);
+
+TRAD_SYNOPSIS
+	int wcscmp(<[s1]>, <[s2]>
+	const wchar_t *<[s1]>, <[s2]>;
+
+DESCRIPTION
+	The <<wcscmp>> function compares the wide-character string pointed to
+	by <[s1]> to the wide-character string pointed to by <[s2]>.
+
+	The sign of a non-zero return value is determined by the sign of the
+	difference between the values of the first pair of wide-character codes
+	that differ in the objects being compared.
+
+RETURNS
+	Upon completion, <<wcscmp>> returns an integer greater than, equal to
+	or less than 0, if the wide-character string pointed to by <[s1]> is
+	greater than, equal to or less than the wide-character string pointed
+	to by <[s2]> respectively. 
+
+PORTABILITY
+<<wcscmp>> is ISO/IEC 9899/AMD1:1995 (ISO C).
+No supporting OS subroutines are required.
+*/
+
+/*	$NetBSD$	*/
+
+/*-
+ * Copyright (c) 1990, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Chris Torek.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <_ansi.h>
+#include <wchar.h>
+
+/*
+ * Compare strings.
+ */
+int
+_DEFUN (wcscmp, (s1, s2),
+	_CONST wchar_t * s1 _AND
+	_CONST wchar_t * s2)
+{
+
+  while (*s1 == *s2++)
+    if (*s1++ == 0)
+      return (0);
+  /* XXX assumes wchar_t = short */
+  return (*(_CONST unsigned short *) s1 - *(_CONST unsigned short *) --s2);
+}
Index: cygwin-i18n/newlib/libc/string/wcscpy.c
diff -u /dev/null cygwin-i18n/newlib/libc/string/wcscpy.c:1.1.2.3
--- /dev/null	Fri Aug 30 00:59:52 2002
+++ cygwin-i18n/newlib/libc/string/wcscpy.c	Fri Aug 30 00:47:27 2002
@@ -0,0 +1,78 @@
+/*
+FUNCTION
+	<<wcscpy>>---copy a wide-character string 
+
+ANSI_SYNOPSIS
+	#include <wchar.h>
+	wchar_t *wcscpy(wchar_t *<[s1]>, const wchar_t *,<[s2]>);
+
+TRAD_SYNOPSIS
+	wchar_t *wcscpy(<[s1]>, <[s2]>
+	wchar_t *<[s1]>;
+	const wchar_t *<[s2]>;
+
+DESCRIPTION
+	The <<wcscpy>> function copies the wide-character string pointed to by
+	<[s2]> (including the terminating null wide-character code) into the
+	array pointed to by <[s1]>. If copying takes place between objects that
+	overlap, the behaviour is undefined. 
+
+RETURNS
+	The <<wcscpy>> function returns <[s1]>; no return value is reserved to
+	indicate an error. 
+
+PORTABILITY
+<<wcscpy>> is ISO/IEC 9899/AMD1:1995 (ISO C).
+No supporting OS subroutines are required.
+*/
+
+/*	$NetBSD: wcscpy.c,v 1.1 2000/12/23 23:14:36 itojun Exp $	*/
+
+/*-
+ * Copyright (c)1999 Citrus Project,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	citrus Id: wcscpy.c,v 1.2 2000/12/21 04:51:09 itojun Exp
+ */
+
+#include <_ansi.h>
+#include <wchar.h>
+
+wchar_t *
+_DEFUN (wcscpy, (s1, s2),
+	wchar_t * s1 _AND
+	_CONST wchar_t * s2)
+{
+  wchar_t *p;
+  _CONST wchar_t *q;
+
+  *s1 = '\0';
+  p = s1;
+  q = s2;
+  while (*q)
+    *p++ = *q++;
+  *p = '\0';
+
+  return s1;
+}
Index: cygwin-i18n/newlib/libc/string/wcscspn.c
diff -u /dev/null cygwin-i18n/newlib/libc/string/wcscspn.c:1.1.2.3
--- /dev/null	Fri Aug 30 00:59:52 2002
+++ cygwin-i18n/newlib/libc/string/wcscspn.c	Fri Aug 30 00:47:27 2002
@@ -0,0 +1,85 @@
+/*
+FUNCTION
+	<<wcscspn>>---get length of a complementary wide substring 
+
+ANSI_SYNOPSIS
+	#include <wchar.h>
+	size_t wcscspn(const wchar_t *<[s]>, wchar_t *<[set]>);
+
+TRAD_SYNOPSIS
+	size_t wcscspn(<[s]>, <[set]>
+	const wchar_t *<[s]>;
+	const wchar_t *<[set]>;
+
+DESCRIPTION
+	The <<wcscspn>> function computes the length of the maximum initial
+	segment of the wide-character string pointed to by <[s]> which consists
+	entirely of wide-character codes not from the wide-character string
+	pointed to by <[set]>. 
+
+RETURNS
+	The <<wcscspn>> function returns the length of the initial substring of
+	<[s1]>; no return value is reserved to indicate an error.
+
+PORTABILITY
+<<wcscspn>> is ISO/IEC 9899/AMD1:1995 (ISO C).
+No supporting OS subroutines are required.
+*/
+
+/*	$NetBSD: wcscspn.c,v 1.1 2000/12/23 23:14:36 itojun Exp $	*/
+
+/*-
+ * Copyright (c)1999 Citrus Project,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	citrus Id: wcscspn.c,v 1.1 1999/12/29 21:47:45 tshiozak Exp
+ */
+
+#include <_ansi.h>
+#include <wchar.h>
+
+size_t
+_DEFUN (wcscspn, (s, set),
+	_CONST wchar_t * s _AND
+	_CONST wchar_t * set)
+{
+  _CONST wchar_t *p;
+  _CONST wchar_t *q;
+
+  p = s;
+  while (*p)
+    {
+      q = set;
+      while (*q)
+	{
+	  if (*p == *q)
+	    goto done;
+	  q++;
+	}
+      p++;
+    }
+
+done:
+  return (p - s);
+}
Index: cygwin-i18n/newlib/libc/string/wcslcat.c
diff -u /dev/null cygwin-i18n/newlib/libc/string/wcslcat.c:1.1.2.3
--- /dev/null	Fri Aug 30 00:59:52 2002
+++ cygwin-i18n/newlib/libc/string/wcslcat.c	Fri Aug 30 00:47:27 2002
@@ -0,0 +1,96 @@
+/*
+FUNCTION
+	<<wcslcat>>---to be written...
+
+ANSI_SYNOPSIS
+	#include <wchar.h>
+	size_t wcslcat(wchar_t *<[dst]>, const wchar_t *<[src]>, size_t <[siz]>);
+
+TRAD_SYNOPSIS
+	size_t wcslcat(<[dst]>, <[src]>, <[siz]>
+	wchar_t *<[dst]>;
+	const wchar_t *<[src]>;
+	size_t <[siz]>;
+
+DESCRIPTION
+	to be written...
+
+RETURNS
+	to be written...
+
+PORTABILITY
+No supporting OS subroutines are required.
+*/
+
+/*	$NetBSD: wcslcat.c,v 1.1 2000/12/23 23:14:36 itojun Exp $	*/
+/*	from OpenBSD: strlcat.c,v 1.3 2000/11/24 11:10:02 itojun Exp 	*/
+
+/*
+ * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
+ * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <_ansi.h>
+#include <wchar.h>
+
+/*
+ * Appends src to string dst of size siz (unlike wcsncat, siz is the
+ * full size of dst, not space left).  At most siz-1 characters
+ * will be copied.  Always NUL terminates (unless siz == 0).
+ * Returns wcslen(initial dst) + wcslen(src); if retval >= siz,
+ * truncation occurred.
+ */
+size_t
+_DEFUN (wcslcat, (dst, src, siz),
+	wchar_t * dst _AND
+	_CONST wchar_t * src _AND
+	size_t siz)
+{
+  wchar_t *d = dst;
+  _CONST wchar_t *s = src;
+  size_t n = siz;
+  size_t dlen;
+
+  /* Find the end of dst and adjust bytes left but don't go past end */
+  while (*d != '\0' && n-- != 0)
+    d++;
+  dlen = d - dst;
+  n = siz - dlen;
+
+  if (n == 0)
+    return (dlen + wcslen (s));
+  while (*s != '\0')
+    {
+      if (n != 1)
+	{
+	  *d++ = *s;
+	  n--;
+	}
+      s++;
+    }
+  *d = '\0';
+
+  return (dlen + (s - src));	/* count does not include NUL */
+}
Index: cygwin-i18n/newlib/libc/string/wcslcpy.c
diff -u /dev/null cygwin-i18n/newlib/libc/string/wcslcpy.c:1.1.2.3
--- /dev/null	Fri Aug 30 00:59:52 2002
+++ cygwin-i18n/newlib/libc/string/wcslcpy.c	Fri Aug 30 00:47:27 2002
@@ -0,0 +1,95 @@
+/*
+FUNCTION
+	<<wcslcpy>>---copy a wide-character string with 
+
+ANSI_SYNOPSIS
+	#include <wchar.h>
+	size_t wcslcpy(wchar_t *<[dst]>, const wchar_t *<[src]>, size_t <[siz]>);
+
+TRAD_SYNOPSIS
+size_t
+	size_t wcslcpy(<[dst]>, <[src]>, <[siz]>
+	wchar_t *<[dst]>;
+	const wchar_t *<[src]>;
+	size_t <[siz]>;
+
+DESCRIPTION
+	to be written...
+
+RETURNS
+	to be written...
+
+PORTABILITY
+No supporting OS subroutines are required.
+*/
+
+/*	$NetBSD: wcslcpy.c,v 1.1 2000/12/23 23:14:36 itojun Exp $	*/
+/*	from OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp 	*/
+
+/*
+ * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
+ * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <_ansi.h>
+#include <wchar.h>
+
+/*
+ * Copy src to string dst of size siz.  At most siz-1 characters
+ * will be copied.  Always NUL terminates (unless siz == 0).
+ * Returns wcslen(src); if retval >= siz, truncation occurred.
+ */
+size_t
+_DEFUN (wcslcpy, (dst, src, siz),
+	wchar_t * dst _AND
+	_CONST wchar_t * src _AND
+	size_t siz)
+{
+  wchar_t *d = dst;
+  _CONST wchar_t *s = src;
+  size_t n = siz;
+
+  /* Copy as many bytes as will fit */
+  if (n != 0 && --n != 0)
+    {
+      do
+	{
+	  if ((*d++ = *s++) == 0)
+	    break;
+	}
+      while (--n != 0);
+    }
+
+  /* Not enough room in dst, add NUL and traverse rest of src */
+  if (n == 0)
+    {
+      if (siz != 0)
+	*d = '\0';		/* NUL-terminate dst */
+      while (*s++)
+	;
+    }
+
+  return (s - src - 1);		/* count does not include NUL */
+}
Index: cygwin-i18n/newlib/libc/string/wcslen.c
diff -u /dev/null cygwin-i18n/newlib/libc/string/wcslen.c:1.1.2.3
--- /dev/null	Fri Aug 30 00:59:52 2002
+++ cygwin-i18n/newlib/libc/string/wcslen.c	Fri Aug 30 00:47:27 2002
@@ -0,0 +1,71 @@
+/*
+FUNCTION
+	<<wcslen>>---get wide-character string length 
+
+ANSI_SYNOPSIS
+	#include <wchar.h>
+	size_t wcslen(const wchar_t *<[s]>);
+
+TRAD_SYNOPSIS
+	size_t wcslen(<[s]>
+	const wchar_t *<[s]>;
+
+DESCRIPTION
+	The <<wcslen>> function computes the number of wide-character codes
+	in the wide-character string to which <[s]> points, not including the
+	terminating null wide-character code.
+
+RETURNS
+	The <<wcslen>> function returns the length of <[s]>; no return value is
+	reserved to indicate an error.
+
+PORTABILITY
+<<wcslen>> is ISO/IEC 9899/AMD1:1995 (ISO C).
+No supporting OS subroutines are required.
+*/
+
+/*	$NetBSD: wcslen.c,v 1.1 2000/12/23 23:14:36 itojun Exp $	*/
+
+/*-
+ * Copyright (c)1999 Citrus Project,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	citrus Id: wcslen.c,v 1.1 1999/12/29 21:47:45 tshiozak Exp
+ */
+
+#include <_ansi.h>
+#include <wchar.h>
+
+size_t
+_DEFUN (wcslen, (s),
+	_CONST wchar_t * s)
+{
+  _CONST wchar_t *p;
+
+  p = s;
+  while (*p)
+    p++;
+
+  return p - s;
+}
Index: cygwin-i18n/newlib/libc/string/wcsncat.c
diff -u /dev/null cygwin-i18n/newlib/libc/string/wcsncat.c:1.1.2.3
--- /dev/null	Fri Aug 30 00:59:52 2002
+++ cygwin-i18n/newlib/libc/string/wcsncat.c	Fri Aug 30 00:47:27 2002
@@ -0,0 +1,90 @@
+/*
+FUNCTION
+	<<wcsncat>>---concatenate part of two wide-character strings 
+
+ANSI_SYNOPSIS
+	#include <wchar.h>
+	wchar_t *wcsncat(wchar_t *<[s1]>, const wchar_t *<[s2]>, size_t <[n]>);
+
+TRAD_SYNOPSIS
+	wchar_t *wcsncat(<[s1]>, <[s2]>, <[n]>
+	wchar_t *<[s1]>;
+	const wchar_t *<[s2]>;
+	size_t <[n]>;
+
+DESCRIPTION
+	The <<wcsncat>> function appends not more than <[n]> wide-character
+	codes (a null wide-character code and wide-character codes that follow
+	it are not appended) from the array pointed to by <[s2]> to the end of
+	the wide-character string pointed to by <[s1]>. The initial
+	wide-character code of <[s2]> overwrites the null wide-character code
+	at the end of <[s1]>.
+	A terminating null wide-character code is always appended to the result.
+	If copying takes place between objects that overlap, the behaviour is
+	undefined.
+
+RETURNS
+	The <<wcsncat>> function returns <[s1]>; no return value is reserved to
+	indicate an error.
+
+PORTABILITY
+<<wcsncat>> is ISO/IEC 9899/AMD1:1995 (ISO C).
+No supporting OS subroutines are required.
+*/
+
+/*	$NetBSD: wcsncat.c,v 1.1 2000/12/23 23:14:36 itojun Exp $	*/
+
+/*-
+ * Copyright (c)1999 Citrus Project,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	citrus Id: wcsncat.c,v 1.1 1999/12/29 21:47:45 tshiozak Exp
+ */
+
+#include <_ansi.h>
+#include <wchar.h>
+
+wchar_t *
+_DEFUN (wcsncat, (s1, s2, n),
+	wchar_t * s1 _AND
+	_CONST wchar_t * s2 _AND
+	size_t n)
+{
+  wchar_t *p;
+  wchar_t *q;
+  _CONST wchar_t *r;
+
+  p = s1;
+  while (*p)
+    p++;
+  q = p;
+  r = s2;
+  while (*r && n)
+    {
+      *q++ = *r++;
+      n--;
+    }
+  *q = '\0';
+  return s1;
+}
Index: cygwin-i18n/newlib/libc/string/wcsncmp.c
diff -u /dev/null cygwin-i18n/newlib/libc/string/wcsncmp.c:1.1.2.3
--- /dev/null	Fri Aug 30 00:59:52 2002
+++ cygwin-i18n/newlib/libc/string/wcsncmp.c	Fri Aug 30 00:59:32 2002
@@ -0,0 +1,96 @@
+/*
+FUNCTION
+	<<wcscmp>>---compare part of two wide-character strings 
+
+ANSI_SYNOPSIS
+	#include <wchar.h>
+	int wcsncmp(const wchar_t *<[s1]>, const wchar_t *<[s2]>, size_t <[n]>);
+
+TRAD_SYNOPSIS
+	int wcsncmp(<[s1]>, <[s2]>, <[n]>
+	const wchar_t *<[s1]>;
+	const wchar_t *<[s2]>;
+	size_t <[n]>;
+
+DESCRIPTION
+	The <<wcsncmp>> function compares not more than <[n]> wide-character
+	codes (wide-character codes that follow a null wide-character code are
+	not compared) from the array pointed to by <[s1]> to the array pointed
+	to by <[s2]>.
+
+	The sign of a non-zero return value is determined by the sign of the
+	difference between the values of the first pair of wide-character codes
+	that differ in the objects being compared. 
+
+RETURNS
+	Upon successful completion, <<wcsncmp>> returns an integer greater than,
+	equal to or less than 0, if the possibly null-terminated array pointed
+	to by <[s1]> is greater than, equal to or less than the possibly
+	null-terminated array pointed to by <[s2]> respectively. 
+
+PORTABILITY
+<<wcscmp>> is ISO/IEC 9899/AMD1:1995 (ISO C).
+No supporting OS subroutines are required.
+*/
+
+/*	$NetBSD$	*/
+
+/*
+ * Copyright (c) 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <_ansi.h>
+#include <wchar.h>
+
+int
+_DEFUN (wcsncmp, (s1, s2, n),
+	_CONST wchar_t * s1 _AND
+	_CONST wchar_t * s2 _AND
+	size_t n)
+{
+
+  if (n == 0)
+    return (0);
+  do
+    {
+      if (*s1 != *s2++)
+	{
+	  /* XXX assumes wchar_t = short */
+	  return (*(_CONST unsigned short *) s1 -
+		  *(_CONST unsigned short *) --s2);
+	}
+      if (*s1++ == 0)
+	break;
+    }
+  while (--n != 0);
+  return (0);
+}
Index: cygwin-i18n/newlib/libc/string/wcsncpy.c
diff -u /dev/null cygwin-i18n/newlib/libc/string/wcsncpy.c:1.1.2.3
--- /dev/null	Fri Aug 30 00:59:52 2002
+++ cygwin-i18n/newlib/libc/string/wcsncpy.c	Fri Aug 30 00:47:28 2002
@@ -0,0 +1,89 @@
+/*
+FUNCTION
+	<<wcsncpy>>---copy part of a wide-character string 
+
+ANSI_SYNOPSIS
+	#include <wchar.h>
+	wchar_t *wcsncpy(wchar_t *<[s1]>, const wchar_t *<[s2]>, size_t <[n]>);
+
+TRAD_SYNOPSIS
+	wchar_t *wcsncpy(<[s1]>, <[s2]>, <[n]>
+	wchar_t *<[s1]>;
+	const wchar_t *<[s2]>;
+	size_t <[n]>;
+
+DESCRIPTION
+	The <<wcsncpy>> function copies not more than n wide-character codes
+	(wide-character codes that follow a null wide-character code are not
+	copied) from the array pointed to by <[s2]> to the array pointed to
+	by <[s1]>. If copying takes place between objects that overlap, the
+	behaviour is undefined.
+
+	If the array pointed to by <[s2]> is a wide-character string that is
+	shorter than <[n]> wide-character codes, null wide-character codes are
+	appended to the copy in the array pointed to by <[s1]>, until <[n]>
+	wide-character codes in all are written. 
+
+RETURNS
+	The <<wcsncpy>> function returns <[s1]>; no return value is reserved to
+	indicate an error. 
+
+PORTABILITY
+<<wcsncpy>> is ISO/IEC 9899/AMD1:1995 (ISO C).
+No supporting OS subroutines are required.
+*/
+
+/*	$NetBSD: wcsncpy.c,v 1.1 2000/12/23 23:14:36 itojun Exp $	*/
+
+/*-
+ * Copyright (c)1999 Citrus Project,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	citrus Id: wcsncpy.c,v 1.1 1999/12/29 21:47:45 tshiozak Exp
+ */
+
+#include <_ansi.h>
+#include <wchar.h>
+
+wchar_t *
+_DEFUN (wcsncpy, (s1, s2, n),
+	wchar_t * s1 _AND
+	_CONST wchar_t * s2 _AND
+	size_t n)
+{
+  wchar_t *p;
+  _CONST wchar_t *q;
+
+  *s1 = '\0';
+  p = s1;
+  q = s2;
+  while (n && *q)
+    {
+      *p++ = *q++;
+      n--;
+    }
+  *p = '\0';
+
+  return s1;
+}
Index: cygwin-i18n/newlib/libc/string/wcspbrk.c
diff -u /dev/null cygwin-i18n/newlib/libc/string/wcspbrk.c:1.1.2.3
--- /dev/null	Fri Aug 30 00:59:52 2002
+++ cygwin-i18n/newlib/libc/string/wcspbrk.c	Fri Aug 30 00:47:28 2002
@@ -0,0 +1,86 @@
+/*
+FUNCTION
+	<<wcspbrk>>----scan wide-character string for a wide-character code
+
+ANSI_SYNOPSIS
+	#include <wchar.h>
+	wchar_t *wcspbrk(const wchar_t *<[s]>, const wchar_t *<[set]>);
+
+TRAD_SYNOPSIS
+	wchar_t *wcspbrk(<[s]>, <[set]>
+	const wchar_t *<[s]>;
+	const wchar_t *<[set]>;
+
+DESCRIPTION
+	The <<wcspbrk>> function locates the first occurrence in the
+	wide-character string pointed to by <[s]> of any wide-character code
+	from the wide-character string pointed to by <[set]>. 
+
+RETURNS
+	Upon successful completion, <<wcspbrk>> returns a pointer to the
+	wide-character code or a null pointer if no wide-character code from
+	<[set]> occurs in <[s]>.
+
+PORTABILITY
+<<wcspbrk>> is ISO/IEC 9899/AMD1:1995 (ISO C).
+No supporting OS subroutines are required.
+*/
+
+/*	$NetBSD: wcspbrk.c,v 1.1 2000/12/23 23:14:37 itojun Exp $	*/
+
+/*-
+ * Copyright (c)1999 Citrus Project,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	citrus Id: wcspbrk.c,v 1.2 2000/12/21 05:07:25 itojun Exp
+ */
+
+#include <_ansi.h>
+#include <wchar.h>
+
+wchar_t *
+_DEFUN (wcspbrk, (s, set),
+	_CONST wchar_t * s _AND
+	_CONST wchar_t * set)
+{
+  _CONST wchar_t *p;
+  _CONST wchar_t *q;
+
+  p = s;
+  while (*p)
+    {
+      q = set;
+      while (*q)
+	{
+	  if (*p == *q)
+	    {
+	      /* LINTED interface specification */
+	      return (wchar_t *) p;
+	    }
+	  q++;
+	}
+      p++;
+    }
+  return NULL;
+}
Index: cygwin-i18n/newlib/libc/string/wcsrchr.c
diff -u /dev/null cygwin-i18n/newlib/libc/string/wcsrchr.c:1.1.2.3
--- /dev/null	Fri Aug 30 00:59:52 2002
+++ cygwin-i18n/newlib/libc/string/wcsrchr.c	Fri Aug 30 00:47:28 2002
@@ -0,0 +1,85 @@
+/*
+FUNCTION
+	<<wcsrchr>>---wide-character string scanning operation 
+
+ANSI_SYNOPSIS
+	#include <wchar.h>
+	wchar_t *wcsrchr(const wchar_t *<[s]>, wchar_t <[c]>);
+
+TRAD_SYNOPSIS
+	wchar_t *wcsrchr(<[s]>, <[c]>
+	const wchar_t *<[s]>;
+	wchar_t <[c]>;
+
+DESCRIPTION
+	The <<wcsrchr>> function locates the last occurrence of <[c]i> in the
+	wide-character string pointed to by <[s]>. The value of <[c]> must be a
+	character representable as a type wchar_t and must be a wide-character
+	code corresponding to a valid character in the current locale.
+	The terminating null wide-character code is considered to be part of
+	the wide-character string. 
+
+RETURNS
+	Upon successful completion, <<wcsrchr>> returns a pointer to the
+	wide-character code or a null pointer if <[c]> does not occur in the
+	wide-character string.
+
+PORTABILITY
+<<wcsrchr>> is ISO/IEC 9899/AMD1:1995 (ISO C).
+No supporting OS subroutines are required.
+*/
+
+/*	$NetBSD: wcsrchr.c,v 1.1 2000/12/23 23:14:37 itojun Exp $	*/
+
+/*-
+ * Copyright (c)1999 Citrus Project,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	citrus Id: wcsrchr.c,v 1.2 2000/12/21 05:07:25 itojun Exp
+ */
+
+#include <_ansi.h>
+#include <wchar.h>
+
+wchar_t *
+_DEFUN (wcsrchr, (s, c),
+	_CONST wchar_t * s _AND
+	wchar_t c)
+{
+  _CONST wchar_t *p;
+
+  p = s;
+  while (*p)
+    p++;
+  while (s <= p)
+    {
+      if (*p == c)
+	{
+	  /* LINTED interface specification */
+	  return (wchar_t *) p;
+	}
+      p--;
+    }
+  return NULL;
+}
Index: cygwin-i18n/newlib/libc/string/wcsspn.c
diff -u /dev/null cygwin-i18n/newlib/libc/string/wcsspn.c:1.1.2.3
--- /dev/null	Fri Aug 30 00:59:52 2002
+++ cygwin-i18n/newlib/libc/string/wcsspn.c	Fri Aug 30 00:47:28 2002
@@ -0,0 +1,86 @@
+/*
+FUNCTION
+	<<wcsspn>>---get length of a wide substring 
+
+ANSI_SYNOPSIS
+	#include <wchar.h>
+	size_t wcsspn(const wchar_t *<[s]>, const wchar_t *<[set]>);
+
+TRAD_SYNOPSIS
+	size_t wcsspn(<[s]>, <[set]>
+	const wchar_t *<[s]>;
+	const wchar_t *<[set]>;
+
+DESCRIPTION
+	The <<wcsspn>> function computes the length of the maximum initial
+	segment of the wide-character string pointed to by <[s]> which consists
+	entirely of wide-character codes from the wide-character string
+	pointed to by <[set]>.
+
+RETURNS
+	The wcsspn() function returns the length <[s1]>; no return value is
+	reserved to indicate an error.
+
+PORTABILITY
+<<wcsspn>> is ISO/IEC 9899/AMD1:1995 (ISO C).
+No supporting OS subroutines are required.
+*/
+
+/*	$NetBSD: wcsspn.c,v 1.1 2000/12/23 23:14:37 itojun Exp $	*/
+
+/*-
+ * Copyright (c)1999 Citrus Project,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	citrus Id: wcsspn.c,v 1.1 1999/12/29 21:47:45 tshiozak Exp
+ */
+
+#include <_ansi.h>
+#include <wchar.h>
+
+size_t
+_DEFUN (wcsspn, (s, set),
+	_CONST wchar_t * s _AND
+	_CONST wchar_t * set)
+{
+  _CONST wchar_t *p;
+  _CONST wchar_t *q;
+
+  p = s;
+  while (*p)
+    {
+      q = set;
+      while (*q)
+	{
+	  if (*p == *q)
+	    break;
+	}
+      if (!*q)
+	goto done;
+      p++;
+    }
+
+done:
+  return (p - s);
+}
Index: cygwin-i18n/newlib/libc/string/wcsstr.c
diff -u /dev/null cygwin-i18n/newlib/libc/string/wcsstr.c:1.1.2.2
--- /dev/null	Fri Aug 30 00:59:52 2002
+++ cygwin-i18n/newlib/libc/string/wcsstr.c	Fri Aug 30 00:47:28 2002
@@ -0,0 +1,104 @@
+/*
+FUNCTION
+	<<wcsstr>>---find a wide-character substring 
+
+ANSI_SYNOPSIS
+	#include <wchar.h>
+	wchar_t *wcsstr(const wchar_t *<[big]>, const wchar_t *<[little]>);
+
+TRAD_SYNOPSIS
+	wchar_t *wcsstr(<[big]>, <[little]>
+	const wchar_t *<[big]>;
+	const wchar_t *<[little]>;
+
+DESCRIPTION
+	The <<wcsstr>> function locates the first occurrence in the
+	wide-character string pointed to by <[big]> of the sequence of
+	wide-characters (excluding the terminating null wide-character) in the
+	wide-character string pointed to by <[little]>.
+
+RETURNS
+	On successful completion, <<wcsstr>> returns a pointer to the located
+	wide-character string, or a null pointer if the wide-character string
+	is not found.
+
+	If <[little]> points to a wide-character string with zero length,
+	the function returns <[big]>.
+
+PORTABILITY
+<<wcsstr>> is ISO/IEC 9899/AMD1:1995 (ISO C).
+
+*/
+
+/*	$NetBSD: wcsstr.c,v 1.1 2000/12/23 23:14:37 itojun Exp $	*/
+
+/*-
+ * Copyright (c)1999 Citrus Project,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	citrus Id: wcsstr.c,v 1.2 2000/12/21 05:07:25 itojun Exp
+ */
+
+#include <_ansi.h>
+#include <wchar.h>
+
+wchar_t *
+_DEFUN (wcsstr, (big, little),
+	_CONST wchar_t * big _AND
+	_CONST wchar_t * little)
+{
+  _CONST wchar_t *p;
+  _CONST wchar_t *q;
+  _CONST wchar_t *r;
+
+  if (!*little)
+    {
+      /* LINTED interface specification */
+      return (wchar_t *) big;
+    }
+  if (wcslen (big) < wcslen (little))
+    return NULL;
+
+  p = big;
+  q = little;
+  while (*p)
+    {
+      q = little;
+      r = p;
+      while (*q)
+	{
+	  if (*r != *q)
+	    break;
+	  q++;
+	  r++;
+	}
+      if (!*q)
+	{
+	  /* LINTED interface specification */
+	  return (wchar_t *) p;
+	}
+      p++;
+    }
+  return NULL;
+}
diff -u /dev/null cygwin-i18n/newlib/libc/string/wmemchr.c:1.1.2.3
--- /dev/null	Fri Aug 30 00:59:52 2002
+++ cygwin-i18n/newlib/libc/string/wmemchr.c	Fri Aug 30 00:47:28 2002
@@ -0,0 +1,88 @@
+/*
+FUNCTION
+	<<wmemchr>>---find a wide-character in memory
+ 
+
+ANSI_SYNOPSIS
+	#include <wchar.h>
+	wchar_t	*wmemchr(const wchar_t *<[s]>, wchar_t <[c]>, size_t <[n]>);
+
+TRAD_SYNOPSIS
+	wchar_t	*wmemchr(<[s]>, <[c]>, <[n]>
+	const wchar_t *<[s]>;
+	wchar_t <[c]>;
+	size_t <[n]>;
+
+DESCRIPTION
+	The <<wmemchr>> function locates the first occurrence of <[c]> in the
+	initial <[n]> wide-characters of the object pointed to be <[s]>. This
+	function is not affected by locale and all wchar_t values are treated
+	identically.  The null wide-character and wchar_t values not
+	corresponding to valid characters are not treated specially.
+
+	If <[n]> is zero, <[s]> must be a valid pointer and the function
+	behaves as if no valid occurrence of <[c]> is found. 
+
+RETURNS
+	The <<wmemchr>> function returns a pointer to the located
+	wide-character, or a null pointer if the wide-character does not occur
+	in the object. 
+
+PORTABILITY
+<<wmemchr>> is ISO/IEC 9899/AMD1:1995 (ISO C).
+No supporting OS subroutines are required.
+*/
+
+/*	$NetBSD: wmemchr.c,v 1.1 2000/12/23 23:14:37 itojun Exp $	*/
+
+/*-
+ * Copyright (c)1999 Citrus Project,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	citrus Id: wmemchr.c,v 1.2 2000/12/20 14:08:31 itojun Exp
+ */
+
+
+#include <_ansi.h>
+#include <wchar.h>
+
+wchar_t *
+_DEFUN (wmemchr, (s, c, n),
+	_CONST wchar_t * s _AND
+	wchar_t c _AND
+	size_t n)
+{
+  size_t i;
+
+  for (i = 0; i < n; i++)
+    {
+      if (*s == c)
+	{
+	  /* LINTED const castaway */
+	  return (wchar_t *) s;
+	}
+      s++;
+    }
+  return NULL;
+}
Index: cygwin-i18n/newlib/libc/string/wmemcmp.c
diff -u /dev/null cygwin-i18n/newlib/libc/string/wmemcmp.c:1.1.2.3
--- /dev/null	Fri Aug 30 00:59:52 2002
+++ cygwin-i18n/newlib/libc/string/wmemcmp.c	Fri Aug 30 00:47:28 2002
@@ -0,0 +1,88 @@
+/*
+FUNCTION
+	<<wmemcmp>>---compare wide-characters in memory 
+
+ANSI_SYNOPSIS
+	#include <wchar.h>
+	int wmemcmp(const wchar_t *<[s1]>, const wchar_t *<[s2]>, size_t <[n]>);
+
+TRAD_SYNOPSIS
+	int wmemcmp(<[s1]>, <[s2]>, <[n]>
+	const wchar_t *<[s1]>;
+	const wchar_t *<[s2]>;
+	size_t <[n]>;
+
+DESCRIPTION
+	The <<wmemcmp>> function compares the first <[n]> wide-characters of the
+	object pointed to by <[s1]> to the first <[n]> wide-characters of the
+	object pointed to by <[s2]>. This function is not affected by locale
+	and all wchar_t values are treated identically. The null wide-character
+	and wchar_t values not corresponding to valid characters are not treated
+	specially.
+
+	If <[n]> is zero, <[s1]> and <[s2]> must be a valid pointers and the
+	function behaves as if the two objects compare equal. 
+
+RETURNS
+	The <<wmemcmp>> function returns an integer greater than, equal to,
+	or less than zero, accordingly as the object pointed to by <[s1]> is
+	greater than, equal to, or less than the object pointed to by <[s2]>.
+
+PORTABILITY
+<<wmemcmp>> is ISO/IEC 9899/AMD1:1995 (ISO C).
+No supporting OS subroutines are required.
+*/
+
+/*	$NetBSD: wmemcmp.c,v 1.1 2000/12/23 23:14:37 itojun Exp $	*/
+
+/*-
+ * Copyright (c)1999 Citrus Project,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	citrus Id: wmemcmp.c,v 1.2 2000/12/20 14:08:31 itojun Exp
+ */
+
+#include <_ansi.h>
+#include <wchar.h>
+
+int
+_DEFUN (wmemcmp, (s1, s2, n),
+	_CONST wchar_t * s1 _AND
+	_CONST wchar_t * s2 _AND
+	size_t n)
+{
+  size_t i;
+
+  for (i = 0; i < n; i++)
+    {
+      if (*s1 != *s2)
+	{
+	  /* wchar might be unsigned */
+	  return *s1 > *s2 ? 1 : -1;
+	}
+      s1++;
+      s2++;
+    }
+  return 0;
+}
Index: cygwin-i18n/newlib/libc/string/wmemcpy.c
diff -u /dev/null cygwin-i18n/newlib/libc/string/wmemcpy.c:1.1.2.3
--- /dev/null	Fri Aug 30 00:59:52 2002
+++ cygwin-i18n/newlib/libc/string/wmemcpy.c	Fri Aug 30 00:47:28 2002
@@ -0,0 +1,75 @@
+/*
+FUNCTION
+	<<wmemcpy>>---copy wide-characters in memory 
+
+ANSI_SYNOPSIS
+	#include <wchar.h>
+	wchar_t *wmemcpy(wchar_t *<[d]>, const wchar_t *<[s]>, size_t <[n]>);
+
+TRAD_SYNOPSIS
+	wchar_t *wmemcpy(<[d]>, <[s]>, <[n]>
+	wchar_t *<[d]>;
+	const wchar_t *<[s]>;
+	size_t <[n]>;
+
+DESCRIPTION
+	The <<wmemcpy>> function copies <[n]> wide-characters from the object
+	pointed to by <[s]> to the object pointed to be <[d]>. This function
+	is not affected by locale and all wchar_t values are treated
+	identically.  The null wide-character and wchar_t values not
+	corresponding to valid characters are not treated specially.
+
+	If <[n]> is zero, <[d]> and <[s]> must be a valid pointers, and the
+	function copies zero wide-characters. 
+
+RETURNS
+	The <<wmemcpy>> function returns the value of <[d]>.
+
+PORTABILITY
+<<wmemcpy>> is ISO/IEC 9899/AMD1:1995 (ISO C).
+No supporting OS subroutines are required.
+*/
+
+/*	$NetBSD: wmemcpy.c,v 1.1 2000/12/23 23:14:37 itojun Exp $	*/
+
+/*-
+ * Copyright (c)1999 Citrus Project,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	citrus Id: wmemcpy.c,v 1.2 2000/12/20 14:08:31 itojun Exp
+ */
+
+#include <_ansi.h>
+#include <string.h>
+#include <wchar.h>
+
+wchar_t *
+_DEFUN (wmemcpy, (d, s, n),
+	wchar_t * d _AND
+	_CONST wchar_t * s _AND
+	size_t n)
+{
+
+  return (wchar_t *) memcpy (d, s, n * sizeof (wchar_t));
+}
Index: cygwin-i18n/newlib/libc/string/wmemmove.c
diff -u /dev/null cygwin-i18n/newlib/libc/string/wmemmove.c:1.1.2.3
--- /dev/null	Fri Aug 30 00:59:52 2002
+++ cygwin-i18n/newlib/libc/string/wmemmove.c	Fri Aug 30 00:47:29 2002
@@ -0,0 +1,81 @@
+/*
+FUNCTION
+	<<wmemmove>>---wmemmove - copy wide-characters in memory with overlapping areas 
+
+ANSI_SYNOPSIS
+	#include <wchar.h>
+	wchar_t *wmemmove(wchar_t *<[d]>, const wchar_t *<[s]>, size_t <[n]>);
+
+TRAD_SYNOPSIS
+	wchar_t *wmemmove(<[d]>, <[s]>, <[n]>
+	wchar_t *<[d]>;
+	const wchar_t *<[s]>;
+	size_t <[n]>;
+
+DESCRIPTION
+	The <<wmemmove>> function copies <[n]> wide-characters from the object
+	pointed to by <[s]> to the object pointed to by <[d]>. Copying takes
+	place as if the <[n]> wide-characters from the object pointed to by
+	<[s]> are first copied into a temporary array of <[n]> wide-characters
+	that does not overlap the objects pointed to by <[d]> or <[s]>, and then
+	the <[n]> wide-characters from the temporary array are copied into the
+	object pointed to by <[d]>.
+
+	This function is not affected by locale and all wchar_t values are
+	treated identically. The null wide-character and wchar_t values not
+	corresponding to valid characters are not treated specially.
+
+	If <[n]> is zero, <[d]> and <[s]> must be a valid pointers, and the
+	function copies zero wide-characters. 
+
+RETURNS
+	The <<wmemmove>> function returns the value of <[d]>.
+
+PORTABILITY
+<<wmemmove>> is ISO/IEC 9899/AMD1:1995 (ISO C).
+No supporting OS subroutines are required.
+*/
+
+/*	$NetBSD: wmemmove.c,v 1.1 2000/12/23 23:14:37 itojun Exp $	*/
+
+/*-
+ * Copyright (c)1999 Citrus Project,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	citrus Id: wmemmove.c,v 1.2 2000/12/20 14:08:31 itojun Exp
+ */
+
+#include <_ansi.h>
+#include <string.h>
+#include <wchar.h>
+
+wchar_t *
+_DEFUN (wmemmove, (d, s, n),
+	wchar_t * d _AND
+	_CONST wchar_t * s _AND
+	size_t n)
+{
+
+  return (wchar_t *) memmove (d, s, n * sizeof (wchar_t));
+}
Index: cygwin-i18n/newlib/libc/string/wmemset.c
diff -u /dev/null cygwin-i18n/newlib/libc/string/wmemset.c:1.1.2.3
--- /dev/null	Fri Aug 30 00:59:52 2002
+++ cygwin-i18n/newlib/libc/string/wmemset.c	Fri Aug 30 00:47:29 2002
@@ -0,0 +1,82 @@
+/*
+FUNCTION
+	<<wmemset>>---set wide-characters in memory 
+
+ANSI_SYNOPSIS
+	#include <wchar.h>
+	wchar_t	*wmemset(wchar_t *<[s]>, wchar_t <[c]>, size_t <[n]>);
+
+TRAD_SYNOPSIS
+	wchar_t	*wmemset(<[s]>, <[c]>, <[n]>
+	wchar_t *<[s]>;
+	wchar_t <[c]>;
+	size_t <[n]>;
+
+DESCRIPTION
+	The <<wmemset>> function copies the value of <[c]> into each of the
+	first <[n]> wide-characters of the object pointed to by <[s]>.  This
+	function is not affected by locale and all wchar_t values are treated
+	identically.  The null wide-character and wchar_t values not
+	corresponding to valid characters are not treated specially.
+
+	If <[n]> is zero, <[s]> must be a valid pointer and the function
+	copies zero wide-characters.
+
+RETURNS
+	The <<wmemset>> functions returns the value of <[s]>.
+
+PORTABILITY
+<<wmemset>> is ISO/IEC 9899/AMD1:1995 (ISO C).
+No supporting OS subroutines are required.
+*/
+
+/*	$NetBSD: wmemset.c,v 1.1 2000/12/23 23:14:37 itojun Exp $	*/
+
+/*-
+ * Copyright (c)1999 Citrus Project,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	citrus Id: wmemset.c,v 1.2 2000/12/20 14:08:31 itojun Exp
+ */
+
+#include <_ansi.h>
+#include <wchar.h>
+
+wchar_t *
+_DEFUN (wmemset, (s, c, n),
+	wchar_t * s _AND
+	wchar_t c _AND
+	size_t n)
+{
+  size_t i;
+  wchar_t *p;
+
+  p = (wchar_t *) s;
+  for (i = 0; i < n; i++)
+    {
+      *p = c;
+      p++;
+    }
+  return s;
+}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]