From 8493c1631643fada62384768408852bc0fa6ff44 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sun, 24 Jul 2016 15:44:43 +0200 Subject: [PATCH] Implement all per-locale ctype functions Signed-off by: Corinna Vinschen --- newlib/libc/ctype/Makefile.am | 35 ++- newlib/libc/ctype/Makefile.in | 347 ++++++++++++++++++++++--- newlib/libc/ctype/ctype.tex | 131 ++++++++++ newlib/libc/ctype/isalnum_l.c | 44 ++++ newlib/libc/ctype/isalpha_l.c | 43 +++ newlib/libc/ctype/isascii_l.c | 40 +++ newlib/libc/ctype/isblank_l.c | 39 +++ newlib/libc/ctype/iscntrl_l.c | 44 ++++ newlib/libc/ctype/isdigit_l.c | 42 +++ newlib/libc/ctype/islower_l.c | 43 +++ newlib/libc/ctype/isprint_l.c | 57 ++++ newlib/libc/ctype/ispunct_l.c | 45 ++++ newlib/libc/ctype/isspace_l.c | 43 +++ newlib/libc/ctype/isupper_l.c | 42 +++ newlib/libc/ctype/iswalnum_l.c | 36 +++ newlib/libc/ctype/iswalpha_l.c | 36 +++ newlib/libc/ctype/iswblank_l.c | 36 +++ newlib/libc/ctype/iswcntrl_l.c | 36 +++ newlib/libc/ctype/iswctype_l.c | 37 +++ newlib/libc/ctype/iswdigit_l.c | 34 +++ newlib/libc/ctype/iswgraph_l.c | 36 +++ newlib/libc/ctype/iswlower_l.c | 37 +++ newlib/libc/ctype/iswprint_l.c | 36 +++ newlib/libc/ctype/iswpunct_l.c | 36 +++ newlib/libc/ctype/iswspace_l.c | 36 +++ newlib/libc/ctype/iswupper_l.c | 36 +++ newlib/libc/ctype/iswxdigit_l.c | 37 +++ newlib/libc/ctype/isxdigit_l.c | 43 +++ newlib/libc/ctype/toascii_l.c | 39 +++ newlib/libc/ctype/tolower_l.c | 66 +++++ newlib/libc/ctype/toupper_l.c | 67 +++++ newlib/libc/ctype/towctrans_l.c | 40 +++ newlib/libc/ctype/towlower_l.c | 40 +++ newlib/libc/ctype/towupper_l.c | 38 +++ newlib/libc/ctype/wctrans_l.c | 40 +++ newlib/libc/ctype/wctype_l.c | 39 +++ newlib/libc/include/ctype.h | 70 ++++- newlib/libc/include/wctype.h | 26 ++ newlib/libc/locale/setlocale.h | 8 + winsup/cygwin/common.din | 35 +++ winsup/cygwin/ctype.cc | 1 + winsup/cygwin/include/cygwin/version.h | 8 +- winsup/doc/posix.xml | 67 ++--- 43 files changed, 2021 insertions(+), 70 deletions(-) create mode 100644 newlib/libc/ctype/isalnum_l.c create mode 100644 newlib/libc/ctype/isalpha_l.c create mode 100644 newlib/libc/ctype/isascii_l.c create mode 100644 newlib/libc/ctype/isblank_l.c create mode 100644 newlib/libc/ctype/iscntrl_l.c create mode 100644 newlib/libc/ctype/isdigit_l.c create mode 100644 newlib/libc/ctype/islower_l.c create mode 100644 newlib/libc/ctype/isprint_l.c create mode 100644 newlib/libc/ctype/ispunct_l.c create mode 100644 newlib/libc/ctype/isspace_l.c create mode 100644 newlib/libc/ctype/isupper_l.c create mode 100644 newlib/libc/ctype/iswalnum_l.c create mode 100644 newlib/libc/ctype/iswalpha_l.c create mode 100644 newlib/libc/ctype/iswblank_l.c create mode 100644 newlib/libc/ctype/iswcntrl_l.c create mode 100644 newlib/libc/ctype/iswctype_l.c create mode 100644 newlib/libc/ctype/iswdigit_l.c create mode 100644 newlib/libc/ctype/iswgraph_l.c create mode 100644 newlib/libc/ctype/iswlower_l.c create mode 100644 newlib/libc/ctype/iswprint_l.c create mode 100644 newlib/libc/ctype/iswpunct_l.c create mode 100644 newlib/libc/ctype/iswspace_l.c create mode 100644 newlib/libc/ctype/iswupper_l.c create mode 100644 newlib/libc/ctype/iswxdigit_l.c create mode 100644 newlib/libc/ctype/isxdigit_l.c create mode 100644 newlib/libc/ctype/toascii_l.c create mode 100644 newlib/libc/ctype/tolower_l.c create mode 100644 newlib/libc/ctype/toupper_l.c create mode 100644 newlib/libc/ctype/towctrans_l.c create mode 100644 newlib/libc/ctype/towlower_l.c create mode 100644 newlib/libc/ctype/towupper_l.c create mode 100644 newlib/libc/ctype/wctrans_l.c create mode 100644 newlib/libc/ctype/wctype_l.c diff --git a/newlib/libc/ctype/Makefile.am b/newlib/libc/ctype/Makefile.am index 58ec2f8bf..0cda2a3e0 100644 --- a/newlib/libc/ctype/Makefile.am +++ b/newlib/libc/ctype/Makefile.am @@ -24,28 +24,61 @@ if ELIX_LEVEL_1 ELIX_SOURCES = else ELIX_SOURCES = \ + isalnum_l.c \ + isalpha_l.c \ isascii.c \ + isascii_l.c \ isblank.c \ + isblank_l.c \ + iscntrl_l.c \ + isdigit_l.c \ + islower_l.c \ + isupper_l.c \ + isprint_l.c \ + ispunct_l.c \ + isspace_l.c \ iswalnum.c \ + iswalnum_l.c \ iswalpha.c \ + iswalpha_l.c \ iswblank.c \ + iswblank_l.c \ iswcntrl.c \ + iswcntrl_l.c \ iswctype.c \ + iswctype_l.c \ iswdigit.c \ + iswdigit_l.c \ iswgraph.c \ + iswgraph_l.c \ iswlower.c \ + iswlower_l.c \ iswprint.c \ + iswprint_l.c \ iswpunct.c \ + iswpunct_l.c \ iswspace.c \ + iswspace_l.c \ iswupper.c \ + iswupper_l.c \ iswxdigit.c \ + iswxdigit_l.c \ + isxdigit_l.c \ jp2uc.c \ toascii.c \ + toascii_l.c \ + tolower_l.c \ + toupper_l.c \ towctrans.c \ + towctrans_l.c \ towlower.c \ + towlower_l.c \ towupper.c \ + towupper_l.c \ wctrans.c \ - wctype.c + wctrans_l.c \ + wctype.c \ + wctype_l.c endif libctype_la_LDFLAGS = -Xcompiler -nostdlib diff --git a/newlib/libc/ctype/Makefile.in b/newlib/libc/ctype/Makefile.in index dc41adcfe..d29495ada 100644 --- a/newlib/libc/ctype/Makefile.in +++ b/newlib/libc/ctype/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -54,15 +53,11 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/../../Makefile.shared $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am + $(srcdir)/Makefile.am $(top_srcdir)/../../mkinstalldirs subdir = ctype ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/../../libtool.m4 \ - $(top_srcdir)/../../ltoptions.m4 \ - $(top_srcdir)/../../ltsugar.m4 \ - $(top_srcdir)/../../ltversion.m4 \ - $(top_srcdir)/../../lt~obsolete.m4 \ - $(top_srcdir)/../acinclude.m4 $(top_srcdir)/configure.in +am__aclocal_m4_deps = $(top_srcdir)/../acinclude.m4 \ + $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs @@ -79,28 +74,61 @@ am__objects_1 = lib_a-ctype_.$(OBJEXT) lib_a-isalnum.$(OBJEXT) \ lib_a-ispunct.$(OBJEXT) lib_a-isspace.$(OBJEXT) \ lib_a-isxdigit.$(OBJEXT) lib_a-tolower.$(OBJEXT) \ lib_a-toupper.$(OBJEXT) -@ELIX_LEVEL_1_FALSE@am__objects_2 = lib_a-isascii.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@am__objects_2 = lib_a-isalnum_l.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-isalpha_l.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-isascii.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-isascii_l.$(OBJEXT) \ @ELIX_LEVEL_1_FALSE@ lib_a-isblank.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-isblank_l.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-iscntrl_l.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-isdigit_l.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-islower_l.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-isupper_l.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-isprint_l.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-ispunct_l.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-isspace_l.$(OBJEXT) \ @ELIX_LEVEL_1_FALSE@ lib_a-iswalnum.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-iswalnum_l.$(OBJEXT) \ @ELIX_LEVEL_1_FALSE@ lib_a-iswalpha.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-iswalpha_l.$(OBJEXT) \ @ELIX_LEVEL_1_FALSE@ lib_a-iswblank.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-iswblank_l.$(OBJEXT) \ @ELIX_LEVEL_1_FALSE@ lib_a-iswcntrl.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-iswcntrl_l.$(OBJEXT) \ @ELIX_LEVEL_1_FALSE@ lib_a-iswctype.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-iswctype_l.$(OBJEXT) \ @ELIX_LEVEL_1_FALSE@ lib_a-iswdigit.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-iswdigit_l.$(OBJEXT) \ @ELIX_LEVEL_1_FALSE@ lib_a-iswgraph.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-iswgraph_l.$(OBJEXT) \ @ELIX_LEVEL_1_FALSE@ lib_a-iswlower.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-iswlower_l.$(OBJEXT) \ @ELIX_LEVEL_1_FALSE@ lib_a-iswprint.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-iswprint_l.$(OBJEXT) \ @ELIX_LEVEL_1_FALSE@ lib_a-iswpunct.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-iswpunct_l.$(OBJEXT) \ @ELIX_LEVEL_1_FALSE@ lib_a-iswspace.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-iswspace_l.$(OBJEXT) \ @ELIX_LEVEL_1_FALSE@ lib_a-iswupper.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-iswupper_l.$(OBJEXT) \ @ELIX_LEVEL_1_FALSE@ lib_a-iswxdigit.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-iswxdigit_l.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-isxdigit_l.$(OBJEXT) \ @ELIX_LEVEL_1_FALSE@ lib_a-jp2uc.$(OBJEXT) \ @ELIX_LEVEL_1_FALSE@ lib_a-toascii.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-toascii_l.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-tolower_l.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-toupper_l.$(OBJEXT) \ @ELIX_LEVEL_1_FALSE@ lib_a-towctrans.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-towctrans_l.$(OBJEXT) \ @ELIX_LEVEL_1_FALSE@ lib_a-towlower.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-towlower_l.$(OBJEXT) \ @ELIX_LEVEL_1_FALSE@ lib_a-towupper.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-towupper_l.$(OBJEXT) \ @ELIX_LEVEL_1_FALSE@ lib_a-wctrans.$(OBJEXT) \ -@ELIX_LEVEL_1_FALSE@ lib_a-wctype.$(OBJEXT) +@ELIX_LEVEL_1_FALSE@ lib_a-wctrans_l.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-wctype.$(OBJEXT) \ +@ELIX_LEVEL_1_FALSE@ lib_a-wctype_l.$(OBJEXT) @USE_LIBTOOL_FALSE@am_lib_a_OBJECTS = $(am__objects_1) \ @USE_LIBTOOL_FALSE@ $(am__objects_2) lib_a_OBJECTS = $(am_lib_a_OBJECTS) @@ -109,14 +137,25 @@ libctype_la_LIBADD = am__objects_3 = ctype_.lo isalnum.lo isalpha.lo iscntrl.lo isdigit.lo \ islower.lo isupper.lo isprint.lo ispunct.lo isspace.lo \ isxdigit.lo tolower.lo toupper.lo -@ELIX_LEVEL_1_FALSE@am__objects_4 = isascii.lo isblank.lo iswalnum.lo \ -@ELIX_LEVEL_1_FALSE@ iswalpha.lo iswblank.lo iswcntrl.lo \ -@ELIX_LEVEL_1_FALSE@ iswctype.lo iswdigit.lo iswgraph.lo \ -@ELIX_LEVEL_1_FALSE@ iswlower.lo iswprint.lo iswpunct.lo \ -@ELIX_LEVEL_1_FALSE@ iswspace.lo iswupper.lo iswxdigit.lo \ -@ELIX_LEVEL_1_FALSE@ jp2uc.lo toascii.lo towctrans.lo \ -@ELIX_LEVEL_1_FALSE@ towlower.lo towupper.lo wctrans.lo \ -@ELIX_LEVEL_1_FALSE@ wctype.lo +@ELIX_LEVEL_1_FALSE@am__objects_4 = isalnum_l.lo isalpha_l.lo \ +@ELIX_LEVEL_1_FALSE@ isascii.lo isascii_l.lo isblank.lo \ +@ELIX_LEVEL_1_FALSE@ isblank_l.lo iscntrl_l.lo isdigit_l.lo \ +@ELIX_LEVEL_1_FALSE@ islower_l.lo isupper_l.lo isprint_l.lo \ +@ELIX_LEVEL_1_FALSE@ ispunct_l.lo isspace_l.lo iswalnum.lo \ +@ELIX_LEVEL_1_FALSE@ iswalnum_l.lo iswalpha.lo iswalpha_l.lo \ +@ELIX_LEVEL_1_FALSE@ iswblank.lo iswblank_l.lo iswcntrl.lo \ +@ELIX_LEVEL_1_FALSE@ iswcntrl_l.lo iswctype.lo iswctype_l.lo \ +@ELIX_LEVEL_1_FALSE@ iswdigit.lo iswdigit_l.lo iswgraph.lo \ +@ELIX_LEVEL_1_FALSE@ iswgraph_l.lo iswlower.lo iswlower_l.lo \ +@ELIX_LEVEL_1_FALSE@ iswprint.lo iswprint_l.lo iswpunct.lo \ +@ELIX_LEVEL_1_FALSE@ iswpunct_l.lo iswspace.lo iswspace_l.lo \ +@ELIX_LEVEL_1_FALSE@ iswupper.lo iswupper_l.lo iswxdigit.lo \ +@ELIX_LEVEL_1_FALSE@ iswxdigit_l.lo isxdigit_l.lo jp2uc.lo \ +@ELIX_LEVEL_1_FALSE@ toascii.lo toascii_l.lo tolower_l.lo \ +@ELIX_LEVEL_1_FALSE@ toupper_l.lo towctrans.lo towctrans_l.lo \ +@ELIX_LEVEL_1_FALSE@ towlower.lo towlower_l.lo towupper.lo \ +@ELIX_LEVEL_1_FALSE@ towupper_l.lo wctrans.lo wctrans_l.lo \ +@ELIX_LEVEL_1_FALSE@ wctype.lo wctype_l.lo @USE_LIBTOOL_TRUE@am_libctype_la_OBJECTS = $(am__objects_3) \ @USE_LIBTOOL_TRUE@ $(am__objects_4) libctype_la_OBJECTS = $(am_libctype_la_OBJECTS) @@ -203,8 +242,10 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NEWLIB_CFLAGS = @NEWLIB_CFLAGS@ NM = @NM@ @@ -233,6 +274,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ aext = @aext@ @@ -307,28 +349,61 @@ GENERAL_SOURCES = \ toupper.c @ELIX_LEVEL_1_FALSE@ELIX_SOURCES = \ +@ELIX_LEVEL_1_FALSE@ isalnum_l.c \ +@ELIX_LEVEL_1_FALSE@ isalpha_l.c \ @ELIX_LEVEL_1_FALSE@ isascii.c \ +@ELIX_LEVEL_1_FALSE@ isascii_l.c \ @ELIX_LEVEL_1_FALSE@ isblank.c \ +@ELIX_LEVEL_1_FALSE@ isblank_l.c \ +@ELIX_LEVEL_1_FALSE@ iscntrl_l.c \ +@ELIX_LEVEL_1_FALSE@ isdigit_l.c \ +@ELIX_LEVEL_1_FALSE@ islower_l.c \ +@ELIX_LEVEL_1_FALSE@ isupper_l.c \ +@ELIX_LEVEL_1_FALSE@ isprint_l.c \ +@ELIX_LEVEL_1_FALSE@ ispunct_l.c \ +@ELIX_LEVEL_1_FALSE@ isspace_l.c \ @ELIX_LEVEL_1_FALSE@ iswalnum.c \ +@ELIX_LEVEL_1_FALSE@ iswalnum_l.c \ @ELIX_LEVEL_1_FALSE@ iswalpha.c \ +@ELIX_LEVEL_1_FALSE@ iswalpha_l.c \ @ELIX_LEVEL_1_FALSE@ iswblank.c \ +@ELIX_LEVEL_1_FALSE@ iswblank_l.c \ @ELIX_LEVEL_1_FALSE@ iswcntrl.c \ +@ELIX_LEVEL_1_FALSE@ iswcntrl_l.c \ @ELIX_LEVEL_1_FALSE@ iswctype.c \ +@ELIX_LEVEL_1_FALSE@ iswctype_l.c \ @ELIX_LEVEL_1_FALSE@ iswdigit.c \ +@ELIX_LEVEL_1_FALSE@ iswdigit_l.c \ @ELIX_LEVEL_1_FALSE@ iswgraph.c \ +@ELIX_LEVEL_1_FALSE@ iswgraph_l.c \ @ELIX_LEVEL_1_FALSE@ iswlower.c \ +@ELIX_LEVEL_1_FALSE@ iswlower_l.c \ @ELIX_LEVEL_1_FALSE@ iswprint.c \ +@ELIX_LEVEL_1_FALSE@ iswprint_l.c \ @ELIX_LEVEL_1_FALSE@ iswpunct.c \ +@ELIX_LEVEL_1_FALSE@ iswpunct_l.c \ @ELIX_LEVEL_1_FALSE@ iswspace.c \ +@ELIX_LEVEL_1_FALSE@ iswspace_l.c \ @ELIX_LEVEL_1_FALSE@ iswupper.c \ +@ELIX_LEVEL_1_FALSE@ iswupper_l.c \ @ELIX_LEVEL_1_FALSE@ iswxdigit.c \ +@ELIX_LEVEL_1_FALSE@ iswxdigit_l.c \ +@ELIX_LEVEL_1_FALSE@ isxdigit_l.c \ @ELIX_LEVEL_1_FALSE@ jp2uc.c \ @ELIX_LEVEL_1_FALSE@ toascii.c \ +@ELIX_LEVEL_1_FALSE@ toascii_l.c \ +@ELIX_LEVEL_1_FALSE@ tolower_l.c \ +@ELIX_LEVEL_1_FALSE@ toupper_l.c \ @ELIX_LEVEL_1_FALSE@ towctrans.c \ +@ELIX_LEVEL_1_FALSE@ towctrans_l.c \ @ELIX_LEVEL_1_FALSE@ towlower.c \ +@ELIX_LEVEL_1_FALSE@ towlower_l.c \ @ELIX_LEVEL_1_FALSE@ towupper.c \ +@ELIX_LEVEL_1_FALSE@ towupper_l.c \ @ELIX_LEVEL_1_FALSE@ wctrans.c \ -@ELIX_LEVEL_1_FALSE@ wctype.c +@ELIX_LEVEL_1_FALSE@ wctrans_l.c \ +@ELIX_LEVEL_1_FALSE@ wctype.c \ +@ELIX_LEVEL_1_FALSE@ wctype_l.c @ELIX_LEVEL_1_TRUE@ELIX_SOURCES = libctype_la_LDFLAGS = -Xcompiler -nostdlib @@ -430,12 +505,14 @@ lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES) $(EXTRA_lib_a_DEPENDENCIES) clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } libctype.la: $(libctype_la_OBJECTS) $(libctype_la_DEPENDENCIES) $(EXTRA_libctype_la_DEPENDENCIES) $(libctype_la_LINK) $(am_libctype_la_rpath) $(libctype_la_OBJECTS) $(libctype_la_LIBADD) $(LIBS) @@ -532,96 +609,246 @@ lib_a-toupper.o: toupper.c lib_a-toupper.obj: toupper.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-toupper.obj `if test -f 'toupper.c'; then $(CYGPATH_W) 'toupper.c'; else $(CYGPATH_W) '$(srcdir)/toupper.c'; fi` +lib_a-isalnum_l.o: isalnum_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isalnum_l.o `test -f 'isalnum_l.c' || echo '$(srcdir)/'`isalnum_l.c + +lib_a-isalnum_l.obj: isalnum_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isalnum_l.obj `if test -f 'isalnum_l.c'; then $(CYGPATH_W) 'isalnum_l.c'; else $(CYGPATH_W) '$(srcdir)/isalnum_l.c'; fi` + +lib_a-isalpha_l.o: isalpha_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isalpha_l.o `test -f 'isalpha_l.c' || echo '$(srcdir)/'`isalpha_l.c + +lib_a-isalpha_l.obj: isalpha_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isalpha_l.obj `if test -f 'isalpha_l.c'; then $(CYGPATH_W) 'isalpha_l.c'; else $(CYGPATH_W) '$(srcdir)/isalpha_l.c'; fi` + lib_a-isascii.o: isascii.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isascii.o `test -f 'isascii.c' || echo '$(srcdir)/'`isascii.c lib_a-isascii.obj: isascii.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isascii.obj `if test -f 'isascii.c'; then $(CYGPATH_W) 'isascii.c'; else $(CYGPATH_W) '$(srcdir)/isascii.c'; fi` +lib_a-isascii_l.o: isascii_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isascii_l.o `test -f 'isascii_l.c' || echo '$(srcdir)/'`isascii_l.c + +lib_a-isascii_l.obj: isascii_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isascii_l.obj `if test -f 'isascii_l.c'; then $(CYGPATH_W) 'isascii_l.c'; else $(CYGPATH_W) '$(srcdir)/isascii_l.c'; fi` + lib_a-isblank.o: isblank.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isblank.o `test -f 'isblank.c' || echo '$(srcdir)/'`isblank.c lib_a-isblank.obj: isblank.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isblank.obj `if test -f 'isblank.c'; then $(CYGPATH_W) 'isblank.c'; else $(CYGPATH_W) '$(srcdir)/isblank.c'; fi` +lib_a-isblank_l.o: isblank_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isblank_l.o `test -f 'isblank_l.c' || echo '$(srcdir)/'`isblank_l.c + +lib_a-isblank_l.obj: isblank_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isblank_l.obj `if test -f 'isblank_l.c'; then $(CYGPATH_W) 'isblank_l.c'; else $(CYGPATH_W) '$(srcdir)/isblank_l.c'; fi` + +lib_a-iscntrl_l.o: iscntrl_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iscntrl_l.o `test -f 'iscntrl_l.c' || echo '$(srcdir)/'`iscntrl_l.c + +lib_a-iscntrl_l.obj: iscntrl_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iscntrl_l.obj `if test -f 'iscntrl_l.c'; then $(CYGPATH_W) 'iscntrl_l.c'; else $(CYGPATH_W) '$(srcdir)/iscntrl_l.c'; fi` + +lib_a-isdigit_l.o: isdigit_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isdigit_l.o `test -f 'isdigit_l.c' || echo '$(srcdir)/'`isdigit_l.c + +lib_a-isdigit_l.obj: isdigit_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isdigit_l.obj `if test -f 'isdigit_l.c'; then $(CYGPATH_W) 'isdigit_l.c'; else $(CYGPATH_W) '$(srcdir)/isdigit_l.c'; fi` + +lib_a-islower_l.o: islower_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-islower_l.o `test -f 'islower_l.c' || echo '$(srcdir)/'`islower_l.c + +lib_a-islower_l.obj: islower_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-islower_l.obj `if test -f 'islower_l.c'; then $(CYGPATH_W) 'islower_l.c'; else $(CYGPATH_W) '$(srcdir)/islower_l.c'; fi` + +lib_a-isupper_l.o: isupper_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isupper_l.o `test -f 'isupper_l.c' || echo '$(srcdir)/'`isupper_l.c + +lib_a-isupper_l.obj: isupper_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isupper_l.obj `if test -f 'isupper_l.c'; then $(CYGPATH_W) 'isupper_l.c'; else $(CYGPATH_W) '$(srcdir)/isupper_l.c'; fi` + +lib_a-isprint_l.o: isprint_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isprint_l.o `test -f 'isprint_l.c' || echo '$(srcdir)/'`isprint_l.c + +lib_a-isprint_l.obj: isprint_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isprint_l.obj `if test -f 'isprint_l.c'; then $(CYGPATH_W) 'isprint_l.c'; else $(CYGPATH_W) '$(srcdir)/isprint_l.c'; fi` + +lib_a-ispunct_l.o: ispunct_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ispunct_l.o `test -f 'ispunct_l.c' || echo '$(srcdir)/'`ispunct_l.c + +lib_a-ispunct_l.obj: ispunct_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ispunct_l.obj `if test -f 'ispunct_l.c'; then $(CYGPATH_W) 'ispunct_l.c'; else $(CYGPATH_W) '$(srcdir)/ispunct_l.c'; fi` + +lib_a-isspace_l.o: isspace_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isspace_l.o `test -f 'isspace_l.c' || echo '$(srcdir)/'`isspace_l.c + +lib_a-isspace_l.obj: isspace_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isspace_l.obj `if test -f 'isspace_l.c'; then $(CYGPATH_W) 'isspace_l.c'; else $(CYGPATH_W) '$(srcdir)/isspace_l.c'; fi` + lib_a-iswalnum.o: iswalnum.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswalnum.o `test -f 'iswalnum.c' || echo '$(srcdir)/'`iswalnum.c lib_a-iswalnum.obj: iswalnum.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswalnum.obj `if test -f 'iswalnum.c'; then $(CYGPATH_W) 'iswalnum.c'; else $(CYGPATH_W) '$(srcdir)/iswalnum.c'; fi` +lib_a-iswalnum_l.o: iswalnum_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswalnum_l.o `test -f 'iswalnum_l.c' || echo '$(srcdir)/'`iswalnum_l.c + +lib_a-iswalnum_l.obj: iswalnum_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswalnum_l.obj `if test -f 'iswalnum_l.c'; then $(CYGPATH_W) 'iswalnum_l.c'; else $(CYGPATH_W) '$(srcdir)/iswalnum_l.c'; fi` + lib_a-iswalpha.o: iswalpha.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswalpha.o `test -f 'iswalpha.c' || echo '$(srcdir)/'`iswalpha.c lib_a-iswalpha.obj: iswalpha.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswalpha.obj `if test -f 'iswalpha.c'; then $(CYGPATH_W) 'iswalpha.c'; else $(CYGPATH_W) '$(srcdir)/iswalpha.c'; fi` +lib_a-iswalpha_l.o: iswalpha_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswalpha_l.o `test -f 'iswalpha_l.c' || echo '$(srcdir)/'`iswalpha_l.c + +lib_a-iswalpha_l.obj: iswalpha_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswalpha_l.obj `if test -f 'iswalpha_l.c'; then $(CYGPATH_W) 'iswalpha_l.c'; else $(CYGPATH_W) '$(srcdir)/iswalpha_l.c'; fi` + lib_a-iswblank.o: iswblank.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswblank.o `test -f 'iswblank.c' || echo '$(srcdir)/'`iswblank.c lib_a-iswblank.obj: iswblank.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswblank.obj `if test -f 'iswblank.c'; then $(CYGPATH_W) 'iswblank.c'; else $(CYGPATH_W) '$(srcdir)/iswblank.c'; fi` +lib_a-iswblank_l.o: iswblank_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswblank_l.o `test -f 'iswblank_l.c' || echo '$(srcdir)/'`iswblank_l.c + +lib_a-iswblank_l.obj: iswblank_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswblank_l.obj `if test -f 'iswblank_l.c'; then $(CYGPATH_W) 'iswblank_l.c'; else $(CYGPATH_W) '$(srcdir)/iswblank_l.c'; fi` + lib_a-iswcntrl.o: iswcntrl.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswcntrl.o `test -f 'iswcntrl.c' || echo '$(srcdir)/'`iswcntrl.c lib_a-iswcntrl.obj: iswcntrl.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswcntrl.obj `if test -f 'iswcntrl.c'; then $(CYGPATH_W) 'iswcntrl.c'; else $(CYGPATH_W) '$(srcdir)/iswcntrl.c'; fi` +lib_a-iswcntrl_l.o: iswcntrl_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswcntrl_l.o `test -f 'iswcntrl_l.c' || echo '$(srcdir)/'`iswcntrl_l.c + +lib_a-iswcntrl_l.obj: iswcntrl_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswcntrl_l.obj `if test -f 'iswcntrl_l.c'; then $(CYGPATH_W) 'iswcntrl_l.c'; else $(CYGPATH_W) '$(srcdir)/iswcntrl_l.c'; fi` + lib_a-iswctype.o: iswctype.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswctype.o `test -f 'iswctype.c' || echo '$(srcdir)/'`iswctype.c lib_a-iswctype.obj: iswctype.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswctype.obj `if test -f 'iswctype.c'; then $(CYGPATH_W) 'iswctype.c'; else $(CYGPATH_W) '$(srcdir)/iswctype.c'; fi` +lib_a-iswctype_l.o: iswctype_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswctype_l.o `test -f 'iswctype_l.c' || echo '$(srcdir)/'`iswctype_l.c + +lib_a-iswctype_l.obj: iswctype_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswctype_l.obj `if test -f 'iswctype_l.c'; then $(CYGPATH_W) 'iswctype_l.c'; else $(CYGPATH_W) '$(srcdir)/iswctype_l.c'; fi` + lib_a-iswdigit.o: iswdigit.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswdigit.o `test -f 'iswdigit.c' || echo '$(srcdir)/'`iswdigit.c lib_a-iswdigit.obj: iswdigit.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswdigit.obj `if test -f 'iswdigit.c'; then $(CYGPATH_W) 'iswdigit.c'; else $(CYGPATH_W) '$(srcdir)/iswdigit.c'; fi` +lib_a-iswdigit_l.o: iswdigit_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswdigit_l.o `test -f 'iswdigit_l.c' || echo '$(srcdir)/'`iswdigit_l.c + +lib_a-iswdigit_l.obj: iswdigit_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswdigit_l.obj `if test -f 'iswdigit_l.c'; then $(CYGPATH_W) 'iswdigit_l.c'; else $(CYGPATH_W) '$(srcdir)/iswdigit_l.c'; fi` + lib_a-iswgraph.o: iswgraph.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswgraph.o `test -f 'iswgraph.c' || echo '$(srcdir)/'`iswgraph.c lib_a-iswgraph.obj: iswgraph.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswgraph.obj `if test -f 'iswgraph.c'; then $(CYGPATH_W) 'iswgraph.c'; else $(CYGPATH_W) '$(srcdir)/iswgraph.c'; fi` +lib_a-iswgraph_l.o: iswgraph_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswgraph_l.o `test -f 'iswgraph_l.c' || echo '$(srcdir)/'`iswgraph_l.c + +lib_a-iswgraph_l.obj: iswgraph_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswgraph_l.obj `if test -f 'iswgraph_l.c'; then $(CYGPATH_W) 'iswgraph_l.c'; else $(CYGPATH_W) '$(srcdir)/iswgraph_l.c'; fi` + lib_a-iswlower.o: iswlower.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswlower.o `test -f 'iswlower.c' || echo '$(srcdir)/'`iswlower.c lib_a-iswlower.obj: iswlower.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswlower.obj `if test -f 'iswlower.c'; then $(CYGPATH_W) 'iswlower.c'; else $(CYGPATH_W) '$(srcdir)/iswlower.c'; fi` +lib_a-iswlower_l.o: iswlower_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswlower_l.o `test -f 'iswlower_l.c' || echo '$(srcdir)/'`iswlower_l.c + +lib_a-iswlower_l.obj: iswlower_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswlower_l.obj `if test -f 'iswlower_l.c'; then $(CYGPATH_W) 'iswlower_l.c'; else $(CYGPATH_W) '$(srcdir)/iswlower_l.c'; fi` + lib_a-iswprint.o: iswprint.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswprint.o `test -f 'iswprint.c' || echo '$(srcdir)/'`iswprint.c lib_a-iswprint.obj: iswprint.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswprint.obj `if test -f 'iswprint.c'; then $(CYGPATH_W) 'iswprint.c'; else $(CYGPATH_W) '$(srcdir)/iswprint.c'; fi` +lib_a-iswprint_l.o: iswprint_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswprint_l.o `test -f 'iswprint_l.c' || echo '$(srcdir)/'`iswprint_l.c + +lib_a-iswprint_l.obj: iswprint_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswprint_l.obj `if test -f 'iswprint_l.c'; then $(CYGPATH_W) 'iswprint_l.c'; else $(CYGPATH_W) '$(srcdir)/iswprint_l.c'; fi` + lib_a-iswpunct.o: iswpunct.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswpunct.o `test -f 'iswpunct.c' || echo '$(srcdir)/'`iswpunct.c lib_a-iswpunct.obj: iswpunct.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswpunct.obj `if test -f 'iswpunct.c'; then $(CYGPATH_W) 'iswpunct.c'; else $(CYGPATH_W) '$(srcdir)/iswpunct.c'; fi` +lib_a-iswpunct_l.o: iswpunct_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswpunct_l.o `test -f 'iswpunct_l.c' || echo '$(srcdir)/'`iswpunct_l.c + +lib_a-iswpunct_l.obj: iswpunct_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswpunct_l.obj `if test -f 'iswpunct_l.c'; then $(CYGPATH_W) 'iswpunct_l.c'; else $(CYGPATH_W) '$(srcdir)/iswpunct_l.c'; fi` + lib_a-iswspace.o: iswspace.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswspace.o `test -f 'iswspace.c' || echo '$(srcdir)/'`iswspace.c lib_a-iswspace.obj: iswspace.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswspace.obj `if test -f 'iswspace.c'; then $(CYGPATH_W) 'iswspace.c'; else $(CYGPATH_W) '$(srcdir)/iswspace.c'; fi` +lib_a-iswspace_l.o: iswspace_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswspace_l.o `test -f 'iswspace_l.c' || echo '$(srcdir)/'`iswspace_l.c + +lib_a-iswspace_l.obj: iswspace_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswspace_l.obj `if test -f 'iswspace_l.c'; then $(CYGPATH_W) 'iswspace_l.c'; else $(CYGPATH_W) '$(srcdir)/iswspace_l.c'; fi` + lib_a-iswupper.o: iswupper.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswupper.o `test -f 'iswupper.c' || echo '$(srcdir)/'`iswupper.c lib_a-iswupper.obj: iswupper.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswupper.obj `if test -f 'iswupper.c'; then $(CYGPATH_W) 'iswupper.c'; else $(CYGPATH_W) '$(srcdir)/iswupper.c'; fi` +lib_a-iswupper_l.o: iswupper_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswupper_l.o `test -f 'iswupper_l.c' || echo '$(srcdir)/'`iswupper_l.c + +lib_a-iswupper_l.obj: iswupper_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswupper_l.obj `if test -f 'iswupper_l.c'; then $(CYGPATH_W) 'iswupper_l.c'; else $(CYGPATH_W) '$(srcdir)/iswupper_l.c'; fi` + lib_a-iswxdigit.o: iswxdigit.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswxdigit.o `test -f 'iswxdigit.c' || echo '$(srcdir)/'`iswxdigit.c lib_a-iswxdigit.obj: iswxdigit.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswxdigit.obj `if test -f 'iswxdigit.c'; then $(CYGPATH_W) 'iswxdigit.c'; else $(CYGPATH_W) '$(srcdir)/iswxdigit.c'; fi` +lib_a-iswxdigit_l.o: iswxdigit_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswxdigit_l.o `test -f 'iswxdigit_l.c' || echo '$(srcdir)/'`iswxdigit_l.c + +lib_a-iswxdigit_l.obj: iswxdigit_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iswxdigit_l.obj `if test -f 'iswxdigit_l.c'; then $(CYGPATH_W) 'iswxdigit_l.c'; else $(CYGPATH_W) '$(srcdir)/iswxdigit_l.c'; fi` + +lib_a-isxdigit_l.o: isxdigit_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isxdigit_l.o `test -f 'isxdigit_l.c' || echo '$(srcdir)/'`isxdigit_l.c + +lib_a-isxdigit_l.obj: isxdigit_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isxdigit_l.obj `if test -f 'isxdigit_l.c'; then $(CYGPATH_W) 'isxdigit_l.c'; else $(CYGPATH_W) '$(srcdir)/isxdigit_l.c'; fi` + lib_a-jp2uc.o: jp2uc.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-jp2uc.o `test -f 'jp2uc.c' || echo '$(srcdir)/'`jp2uc.c @@ -634,36 +861,84 @@ lib_a-toascii.o: toascii.c lib_a-toascii.obj: toascii.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-toascii.obj `if test -f 'toascii.c'; then $(CYGPATH_W) 'toascii.c'; else $(CYGPATH_W) '$(srcdir)/toascii.c'; fi` +lib_a-toascii_l.o: toascii_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-toascii_l.o `test -f 'toascii_l.c' || echo '$(srcdir)/'`toascii_l.c + +lib_a-toascii_l.obj: toascii_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-toascii_l.obj `if test -f 'toascii_l.c'; then $(CYGPATH_W) 'toascii_l.c'; else $(CYGPATH_W) '$(srcdir)/toascii_l.c'; fi` + +lib_a-tolower_l.o: tolower_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-tolower_l.o `test -f 'tolower_l.c' || echo '$(srcdir)/'`tolower_l.c + +lib_a-tolower_l.obj: tolower_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-tolower_l.obj `if test -f 'tolower_l.c'; then $(CYGPATH_W) 'tolower_l.c'; else $(CYGPATH_W) '$(srcdir)/tolower_l.c'; fi` + +lib_a-toupper_l.o: toupper_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-toupper_l.o `test -f 'toupper_l.c' || echo '$(srcdir)/'`toupper_l.c + +lib_a-toupper_l.obj: toupper_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-toupper_l.obj `if test -f 'toupper_l.c'; then $(CYGPATH_W) 'toupper_l.c'; else $(CYGPATH_W) '$(srcdir)/toupper_l.c'; fi` + lib_a-towctrans.o: towctrans.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-towctrans.o `test -f 'towctrans.c' || echo '$(srcdir)/'`towctrans.c lib_a-towctrans.obj: towctrans.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-towctrans.obj `if test -f 'towctrans.c'; then $(CYGPATH_W) 'towctrans.c'; else $(CYGPATH_W) '$(srcdir)/towctrans.c'; fi` +lib_a-towctrans_l.o: towctrans_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-towctrans_l.o `test -f 'towctrans_l.c' || echo '$(srcdir)/'`towctrans_l.c + +lib_a-towctrans_l.obj: towctrans_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-towctrans_l.obj `if test -f 'towctrans_l.c'; then $(CYGPATH_W) 'towctrans_l.c'; else $(CYGPATH_W) '$(srcdir)/towctrans_l.c'; fi` + lib_a-towlower.o: towlower.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-towlower.o `test -f 'towlower.c' || echo '$(srcdir)/'`towlower.c lib_a-towlower.obj: towlower.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-towlower.obj `if test -f 'towlower.c'; then $(CYGPATH_W) 'towlower.c'; else $(CYGPATH_W) '$(srcdir)/towlower.c'; fi` +lib_a-towlower_l.o: towlower_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-towlower_l.o `test -f 'towlower_l.c' || echo '$(srcdir)/'`towlower_l.c + +lib_a-towlower_l.obj: towlower_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-towlower_l.obj `if test -f 'towlower_l.c'; then $(CYGPATH_W) 'towlower_l.c'; else $(CYGPATH_W) '$(srcdir)/towlower_l.c'; fi` + lib_a-towupper.o: towupper.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-towupper.o `test -f 'towupper.c' || echo '$(srcdir)/'`towupper.c lib_a-towupper.obj: towupper.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-towupper.obj `if test -f 'towupper.c'; then $(CYGPATH_W) 'towupper.c'; else $(CYGPATH_W) '$(srcdir)/towupper.c'; fi` +lib_a-towupper_l.o: towupper_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-towupper_l.o `test -f 'towupper_l.c' || echo '$(srcdir)/'`towupper_l.c + +lib_a-towupper_l.obj: towupper_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-towupper_l.obj `if test -f 'towupper_l.c'; then $(CYGPATH_W) 'towupper_l.c'; else $(CYGPATH_W) '$(srcdir)/towupper_l.c'; fi` + lib_a-wctrans.o: wctrans.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wctrans.o `test -f 'wctrans.c' || echo '$(srcdir)/'`wctrans.c lib_a-wctrans.obj: wctrans.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wctrans.obj `if test -f 'wctrans.c'; then $(CYGPATH_W) 'wctrans.c'; else $(CYGPATH_W) '$(srcdir)/wctrans.c'; fi` +lib_a-wctrans_l.o: wctrans_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wctrans_l.o `test -f 'wctrans_l.c' || echo '$(srcdir)/'`wctrans_l.c + +lib_a-wctrans_l.obj: wctrans_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wctrans_l.obj `if test -f 'wctrans_l.c'; then $(CYGPATH_W) 'wctrans_l.c'; else $(CYGPATH_W) '$(srcdir)/wctrans_l.c'; fi` + lib_a-wctype.o: wctype.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wctype.o `test -f 'wctype.c' || echo '$(srcdir)/'`wctype.c lib_a-wctype.obj: wctype.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wctype.obj `if test -f 'wctype.c'; then $(CYGPATH_W) 'wctype.c'; else $(CYGPATH_W) '$(srcdir)/wctype.c'; fi` +lib_a-wctype_l.o: wctype_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wctype_l.o `test -f 'wctype_l.c' || echo '$(srcdir)/'`wctype_l.c + +lib_a-wctype_l.obj: wctype_l.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-wctype_l.obj `if test -f 'wctype_l.c'; then $(CYGPATH_W) 'wctype_l.c'; else $(CYGPATH_W) '$(srcdir)/wctype_l.c'; fi` + mostlyclean-libtool: -rm -f *.lo @@ -719,6 +994,20 @@ GTAGS: && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-am: @@ -829,7 +1118,7 @@ uninstall-am: .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ - ctags distclean distclean-compile distclean-generic \ + cscopelist ctags distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi dvi-am html html-am info \ info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ diff --git a/newlib/libc/ctype/ctype.tex b/newlib/libc/ctype/ctype.tex index 9f0510aa5..b18f496fa 100644 --- a/newlib/libc/ctype/ctype.tex +++ b/newlib/libc/ctype/ctype.tex @@ -8,137 +8,268 @@ simple character mappings. The header file @file{ctype.h} defines the macros. @menu * isalnum:: Alphanumeric character predicate +* isalnum_l:: Alphanumeric character predicate * isalpha:: Alphabetic character predicate +* isalpha_l:: Alphabetic character predicate * isascii:: ASCII character predicate +* isascii_l:: ASCII character predicate * isblank:: Blank character predicate +* isblank_l:: Blank character predicate * iscntrl:: Control character predicate +* iscntrl_l:: Control character predicate * isdigit:: Decimal digit predicate +* isdigit_l:: Decimal digit predicate * islower:: Lowercase character predicate +* islower_l:: Lowercase character predicate * isprint:: Printable character predicates (isprint, isgraph) +* isprint_l:: Printable character predicates (isprint_l, isgraph_l) * ispunct:: Punctuation character predicate +* ispunct_l:: Punctuation character predicate * isspace:: Whitespace character predicate +* isspace_l:: Whitespace character predicate * isupper:: Uppercase character predicate +* isupper_l:: Uppercase character predicate * isxdigit:: Hexadecimal digit predicate +* isxdigit_l:: Hexadecimal digit predicate * toascii:: Force integers to ASCII range +* toascii_l:: Force integers to ASCII range * tolower:: Translate characters to lowercase +* tolower_l:: Translate characters to lowercase * toupper:: Translate characters to uppercase +* toupper_l:: Translate characters to uppercase * iswalnum:: Alphanumeric wide character predicate +* iswalnum_l:: Alphanumeric wide character predicate * iswalpha:: Alphabetic wide character predicate +* iswalpha_l:: Alphabetic wide character predicate * iswblank:: Blank wide character predicate +* iswblank_l:: Blank wide character predicate * iswcntrl:: Control wide character predicate +* iswcntrl_l:: Control wide character predicate * iswdigit:: Decimal digit wide character predicate +* iswdigit_l:: Decimal digit wide character predicate * iswgraph:: Graphic wide character predicate +* iswgraph_l:: Graphic wide character predicate * iswlower:: Lowercase wide character predicate +* iswlower_l:: Lowercase wide character predicate * iswprint:: Printable wide character predicate +* iswprint_l:: Printable wide character predicate * iswpunct:: Punctuation wide character predicate +* iswpunct_l:: Punctuation wide character predicate * iswspace:: Whitespace wide character predicate +* iswspace_l:: Whitespace wide character predicate * iswupper:: Uppercase wide character predicate +* iswupper_l:: Uppercase wide character predicate * iswxdigit:: Hexadecimal digit wide character predicate +* iswxdigit_l:: Hexadecimal digit wide character predicate * iswctype:: Extensible wide-character test +* iswctype_l:: Extensible wide-character test * wctype:: Compute wide-character test type +* wctype_l:: Compute wide-character test type * towlower:: Translate wide characters to lowercase +* towlower_l:: Translate wide characters to lowercase * towupper:: Translate wide characters to uppercase +* towupper_l:: Translate wide characters to uppercase * towctrans:: Extensible wide-character translation +* towctrans_l:: Extensible wide-character translation * wctrans:: Compute wide-character translation type +* wctrans_l:: Compute wide-character translation type @end menu @page @include ctype/isalnum.def +@page +@include ctype/isalnum_l.def + @page @include ctype/isalpha.def +@page +@include ctype/isalpha_l.def + @page @include ctype/isascii.def +@page +@include ctype/isascii_l.def + @page @include ctype/isblank.def +@page +@include ctype/isblank_l.def + @page @include ctype/iscntrl.def +@page +@include ctype/iscntrl_l.def + @page @include ctype/isdigit.def +@page +@include ctype/isdigit_l.def + @page @include ctype/islower.def +@page +@include ctype/islower_l.def + @page @include ctype/isprint.def +@page +@include ctype/isprint_l.def + @page @include ctype/ispunct.def +@page +@include ctype/ispunct_l.def + @page @include ctype/isspace.def +@page +@include ctype/isspace_l.def + @page @include ctype/isupper.def +@page +@include ctype/isupper_l.def + @page @include ctype/isxdigit.def +@page +@include ctype/isxdigit_l.def + @page @include ctype/toascii.def +@page +@include ctype/toascii_l.def + @page @include ctype/tolower.def +@page +@include ctype/tolower_l.def + @page @include ctype/toupper.def +@page +@include ctype/toupper_l.def + @page @include ctype/iswalnum.def +@page +@include ctype/iswalnum_l.def + @page @include ctype/iswalpha.def +@page +@include ctype/iswalpha_l.def + @page @include ctype/iswcntrl.def +@page +@include ctype/iswcntrl_l.def + @page @include ctype/iswblank.def +@page +@include ctype/iswblank_l.def + @page @include ctype/iswdigit.def +@page +@include ctype/iswdigit_l.def + @page @include ctype/iswgraph.def +@page +@include ctype/iswgraph_l.def + @page @include ctype/iswlower.def +@page +@include ctype/iswlower_l.def + @page @include ctype/iswprint.def +@page +@include ctype/iswprint_l.def + @page @include ctype/iswpunct.def +@page +@include ctype/iswpunct_l.def + @page @include ctype/iswspace.def +@page +@include ctype/iswspace_l.def + @page @include ctype/iswupper.def +@page +@include ctype/iswupper_l.def + @page @include ctype/iswxdigit.def +@page +@include ctype/iswxdigit_l.def + @page @include ctype/iswctype.def +@page +@include ctype/iswctype_l.def + @page @include ctype/wctype.def +@page +@include ctype/wctype_l.def + @page @include ctype/towlower.def +@page +@include ctype/towlower_l.def + @page @include ctype/towupper.def +@page +@include ctype/towupper_l.def + @page @include ctype/towctrans.def +@page +@include ctype/towctrans_l.def + @page @include ctype/wctrans.def +@page +@include ctype/wctrans_l.def diff --git a/newlib/libc/ctype/isalnum_l.c b/newlib/libc/ctype/isalnum_l.c new file mode 100644 index 000000000..e1d3b8ec9 --- /dev/null +++ b/newlib/libc/ctype/isalnum_l.c @@ -0,0 +1,44 @@ +/* +FUNCTION + <>---alphanumeric character predicate + +INDEX + isalnum_l + +ANSI_SYNOPSIS + #include + int isalnum_l(int <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a macro which classifies ASCII integer values by table +lookup in locale <[locale]>. It is a predicate returning non-zero for +alphabetic or numeric ASCII characters, and <<0>> for other arguments. +It is defined only if <[c]> is representable as an unsigned char or if +<[c]> is EOF. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining the macro using `<<#undef isalnum_l>>'. + +RETURNS +<_l> returns non-zero if <[c]> is a letter (<>--<> or +<>--<>) or a digit (<<0>>--<<9>>). + +PORTABILITY +<> is POSIX-1.2008. + +No OS subroutines are required. +*/ + +#include <_ansi.h> +#include + +#undef isalnum_l + +int +isalnum_l (int c, struct __locale_t *locale) +{ + return __locale_ctype_ptr_l (locale)[c+1] & (_U|_L|_N); +} diff --git a/newlib/libc/ctype/isalpha_l.c b/newlib/libc/ctype/isalpha_l.c new file mode 100644 index 000000000..fd1228a58 --- /dev/null +++ b/newlib/libc/ctype/isalpha_l.c @@ -0,0 +1,43 @@ +/* +FUNCTION + <>---alphabetic character predicate + +INDEX + isalpha_l + +ANSI_SYNOPSIS + #include + int isalpha_l(int <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a macro which classifies ASCII integer values by table +lookup in locale <[locale]>. It is a predicate returning non-zero when +<[c]> represents an alphabetic ASCII character, and 0 otherwise. It is +defined only if <[c]> is representable as an unsigned char or if <[c]> is EOF. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining the macro using `<<#undef isalpha_l>>'. + +RETURNS +<> returns non-zero if <[c]> is a letter (<>--<> or +<>--<>). + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ + +#include <_ansi.h> +#include + +#undef isalpha_l + +int +isalpha_l (int c, struct __locale_t *locale) +{ + return __locale_ctype_ptr_l (locale)[c+1] & (_U|_L); +} diff --git a/newlib/libc/ctype/isascii_l.c b/newlib/libc/ctype/isascii_l.c new file mode 100644 index 000000000..29b62a1a9 --- /dev/null +++ b/newlib/libc/ctype/isascii_l.c @@ -0,0 +1,40 @@ +/* +FUNCTION + <>---ASCII character predicate + +INDEX + isascii_l + +ANSI_SYNOPSIS + #include + int isascii_l(int <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a macro which returns non-zero when <[c]> is an ASCII +character, and 0 otherwise. It is defined for all integer values. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining the macro using `<<#undef isascii_l>>'. + +RETURNS +<> returns non-zero if the low order byte of <[c]> is in the range +0 to 127 (<<0x00>>--<<0x7F>>). + +PORTABILITY +<> is a GNU extension. + +No supporting OS subroutines are required. +*/ +#include <_ansi.h> +#include + +#undef isascii_l + +int +isascii_l (int c, struct __locale_t *locale) +{ + return c >= 0 && c < 128; +} diff --git a/newlib/libc/ctype/isblank_l.c b/newlib/libc/ctype/isblank_l.c new file mode 100644 index 000000000..3816a8b73 --- /dev/null +++ b/newlib/libc/ctype/isblank_l.c @@ -0,0 +1,39 @@ +/* +FUNCTION + <>---blank character predicate + +INDEX + isblank_l + +ANSI_SYNOPSIS + #include + int isblank_l(int <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a function which classifies ASCII integer values by table +lookup in locale <[locale]>. It is a predicate returning non-zero for blank +characters, and 0 for other characters. It is defined only if <[c]> is +representable as an unsigned char or if <[c]> is EOF. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +RETURNS +<> returns non-zero if <[c]> is a blank character. + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ + +#include <_ansi.h> +#include + +#undef isblank_l + +int +isblank_l (int c, struct __locale_t *locale) +{ + return (__locale_ctype_ptr_l (locale)[c+1] & _B) || (c == '\t'); +} diff --git a/newlib/libc/ctype/iscntrl_l.c b/newlib/libc/ctype/iscntrl_l.c new file mode 100644 index 000000000..30a2234cb --- /dev/null +++ b/newlib/libc/ctype/iscntrl_l.c @@ -0,0 +1,44 @@ + +/* +FUNCTION + <>---control character predicate + +INDEX + iscntrl_l + +ANSI_SYNOPSIS + #include + int iscntrl_l(int <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a macro which classifies ASCII integer values by table +lookup in locale <[locale]>. It is a predicate returning non-zero for +control characters, and 0 for other characters. It is defined only if +<[c]> is representable as an unsigned char or if <[c]> is EOF. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining the macro using `<<#undef iscntrl_l>>'. + +RETURNS +<> returns non-zero if <[c]> is a delete character or ordinary +control character (<<0x7F>> or <<0x00>>--<<0x1F>>). + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ + +#include <_ansi.h> +#include + +#undef iscntrl_l + +int +iscntrl_l (int c, struct __locale_t *locale) +{ + return __locale_ctype_ptr_l (locale)[c+1] & _C; +} diff --git a/newlib/libc/ctype/isdigit_l.c b/newlib/libc/ctype/isdigit_l.c new file mode 100644 index 000000000..7b350e77b --- /dev/null +++ b/newlib/libc/ctype/isdigit_l.c @@ -0,0 +1,42 @@ +/* +FUNCTION +<>---decimal digit predicate + +INDEX +isdigit_l + +ANSI_SYNOPSIS +#include +int isdigit_l(int <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a macro which classifies ASCII integer values by table +lookup in locale <[locale]>. It is a predicate returning non-zero for +decimal digits, and 0 for other characters. It is defined only if <[c]> +is representable as an unsigned char or if <[c]> is EOF. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining the macro using `<<#undef isdigit_l>>'. + +RETURNS +<> returns non-zero if <[c]> is a decimal digit (<<0>>--<<9>>). + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ + +#include <_ansi.h> +#include + +#undef isdigit_l + +int +isdigit_l (int c, struct __locale_t *locale) +{ + return __locale_ctype_ptr_l (locale)[c+1] & _N; +} diff --git a/newlib/libc/ctype/islower_l.c b/newlib/libc/ctype/islower_l.c new file mode 100644 index 000000000..ff9f257bb --- /dev/null +++ b/newlib/libc/ctype/islower_l.c @@ -0,0 +1,43 @@ + +/* +FUNCTION +<>---lowercase character predicate + +INDEX +islower_l + +ANSI_SYNOPSIS +#include +int islower_l(int <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a macro which classifies ASCII integer values by table +lookup in locale <[locale]>. It is a predicate returning non-zero for +minuscules (lowercase alphabetic characters), and 0 for other characters. +It is defined only if <[c]> is representable as an unsigned char or if +<[c]> is EOF. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining the macro using `<<#undef islower_l>>'. + +RETURNS +<> returns non-zero if <[c]> is a lowercase letter (<>--<>). + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ +#include <_ansi.h> +#include + +#undef islower_l + +int +islower_l (int c, struct __locale_t *locale) +{ + return (__locale_ctype_ptr_l (locale)[c+1] & (_U|_L)) == _L; +} diff --git a/newlib/libc/ctype/isprint_l.c b/newlib/libc/ctype/isprint_l.c new file mode 100644 index 000000000..60fafcd59 --- /dev/null +++ b/newlib/libc/ctype/isprint_l.c @@ -0,0 +1,57 @@ + +/* +FUNCTION + <>, <>---printable character predicates + +INDEX + isprint_l +INDEX + isgraph_l + +ANSI_SYNOPSIS + #include + int isprint_l(int <[c]>, locale_t <[locale]>); + int isgraph_l(int <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a macro which classifies ASCII integer values by table +lookup in locale <[locale]>. It is a predicate returning non-zero for +printable characters, and 0 for other character arguments. It is defined +only if <[c]> is representable as an unsigned char or if <[c]> is EOF. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining either macro using `<<#undef isprint_l>>' or `<<#undef isgraph_l>>'. + +RETURNS +<> returns non-zero if <[c]> is a printing character, +(<<0x20>>--<<0x7E>>). +<> behaves identically to <>, except that the space +character (<<0x20>>) is excluded. + +PORTABILITY +<> and <> are POSIX-1.2008. + +No supporting OS subroutines are required. +*/ + +#include <_ansi.h> +#include + +#undef isgraph_l + +int +isgraph_l (int c, struct __locale_t *locale) +{ + return __locale_ctype_ptr_l (locale)[c+1] & (_P|_U|_L|_N); +} + +#undef isprint_l + +int +isprint_l (int c, struct __locale_t *locale) +{ + return __locale_ctype_ptr_l (locale)[c+1] & (_P|_U|_L|_N|_B); +} diff --git a/newlib/libc/ctype/ispunct_l.c b/newlib/libc/ctype/ispunct_l.c new file mode 100644 index 000000000..d49112942 --- /dev/null +++ b/newlib/libc/ctype/ispunct_l.c @@ -0,0 +1,45 @@ + +/* +FUNCTION +<>---punctuation character predicate + +INDEX +ispunct_l + +ANSI_SYNOPSIS +#include +int ispunct_l(int <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a macro which classifies ASCII integer values by table +lookup in locale <[locale]>. It is a predicate returning non-zero for +printable punctuation characters, and 0 for other characters. It is +defined only if <[c]> is representable as an unsigned char or if <[c]> is EOF. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining the macro using `<<#undef ispunct_l>>'. + +RETURNS +<> returns non-zero if <[c]> is a printable punctuation character +(<) && !isalnum(<[c]>)>>). + +PORTABILITY +<> is POSIX-1.2008 + +No supporting OS subroutines are required. +*/ + +#include <_ansi.h> +#include + +#undef ispunct_l + +int +ispunct_l (int c, struct __locale_t *locale) +{ + return __locale_ctype_ptr_l (locale)[c+1] & _P; +} + diff --git a/newlib/libc/ctype/isspace_l.c b/newlib/libc/ctype/isspace_l.c new file mode 100644 index 000000000..67eed23a9 --- /dev/null +++ b/newlib/libc/ctype/isspace_l.c @@ -0,0 +1,43 @@ +/* +FUNCTION + <>---whitespace character predicate + +INDEX + isspace_l + +ANSI_SYNOPSIS + #include + int isspace_l(int <[c]>, locale_t *<[locale]>); + +DESCRIPTION +<> is a macro which classifies ASCII integer values by table +lookup in locale <[locale]>. It is a predicate returning non-zero for +whitespace characters, and 0 for other characters. It is defined only +when <>(<[c]>) is true or <[c]> is EOF. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining the macro using `<<#undef isspace_l>>'. + +RETURNS +<> returns non-zero if <[c]> is a space, tab, carriage return, new +line, vertical tab, or formfeed (<<0x09>>--<<0x0D>>, <<0x20>>). + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ +#include <_ansi.h> +#include + +#undef isspace_l + +int +isspace_l (int c, struct __locale_t *locale) +{ + return __locale_ctype_ptr_l (locale)[c+1] & _S; +} + diff --git a/newlib/libc/ctype/isupper_l.c b/newlib/libc/ctype/isupper_l.c new file mode 100644 index 000000000..8ad760dc7 --- /dev/null +++ b/newlib/libc/ctype/isupper_l.c @@ -0,0 +1,42 @@ +/* +FUNCTION +<>---uppercase character predicate + +INDEX +isupper_l + +ANSI_SYNOPSIS +#include +int isupper_l(int <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a macro which classifies ASCII integer values by table +lookup in locale <[locale]>. It is a predicate returning non-zero for +uppercase letters (<>--<>), and 0 for other characters. It is +defined only when <>(<[c]>) is true or <[c]> is EOF. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining the macro using `<<#undef isupper_l>>'. + +RETURNS +<> returns non-zero if <[c]> is a uppercase letter (A-Z). + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ +#include <_ansi.h> +#include + +#undef isupper_l + +int +isupper_l (int c, struct __locale_t *locale) +{ + return (__locale_ctype_ptr_l (locale)[c+1] & (_U|_L)) == _U; +} + diff --git a/newlib/libc/ctype/iswalnum_l.c b/newlib/libc/ctype/iswalnum_l.c new file mode 100644 index 000000000..4425014a3 --- /dev/null +++ b/newlib/libc/ctype/iswalnum_l.c @@ -0,0 +1,36 @@ +/* +FUNCTION + <>---alphanumeric wide character test + +INDEX + iswalnum_l + +ANSI_SYNOPSIS + #include + int iswalnum_l(wint_t <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a function which classifies wide-character values that +are alphanumeric in locale <[locale]>. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +RETURNS +<> returns non-zero if <[c]> is a alphanumeric wide character. + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ +#include <_ansi.h> +#include + +int +iswalnum_l (wint_t c, struct __locale_t *locale) +{ + /* We're using a locale-independent representation of upper/lower case + based on Unicode data. Thus, the locale doesn't matter. */ + return iswalpha (c) || iswdigit (c); +} diff --git a/newlib/libc/ctype/iswalpha_l.c b/newlib/libc/ctype/iswalpha_l.c new file mode 100644 index 000000000..fa59898ab --- /dev/null +++ b/newlib/libc/ctype/iswalpha_l.c @@ -0,0 +1,36 @@ +/* +FUNCTION + <>---alphabetic wide character test + +INDEX + iswalpha_l + +ANSI_SYNOPSIS + #include + int iswalpha_l(wint_t <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a function which classifies wide-character values that +are alphabetic. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +RETURNS +<> returns non-zero if <[c]> is an alphabetic wide character. + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ +#include <_ansi.h> +#include + +int +iswalpha_l (wint_t c, struct __locale_t *locale) +{ + /* We're using a locale-independent representation of upper/lower case + based on Unicode data. Thus, the locale doesn't matter. */ + return iswalpha (c); +} diff --git a/newlib/libc/ctype/iswblank_l.c b/newlib/libc/ctype/iswblank_l.c new file mode 100644 index 000000000..e19557cdf --- /dev/null +++ b/newlib/libc/ctype/iswblank_l.c @@ -0,0 +1,36 @@ +/* +FUNCTION + <>---blank wide character test + +INDEX + iswblank_l + +ANSI_SYNOPSIS + #include + int iswblank_l(wint_t <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a function which classifies wide-character values that +are categorized as blank. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +RETURNS +<> returns non-zero if <[c]> is a blank wide character. + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ +#include <_ansi.h> +#include + +int +iswblank_l (wint_t c, struct __locale_t *locale) +{ + /* We're using a locale-independent representation of upper/lower case + based on Unicode data. Thus, the locale doesn't matter. */ + return iswblank (c); +} diff --git a/newlib/libc/ctype/iswcntrl_l.c b/newlib/libc/ctype/iswcntrl_l.c new file mode 100644 index 000000000..9bc84e390 --- /dev/null +++ b/newlib/libc/ctype/iswcntrl_l.c @@ -0,0 +1,36 @@ +/* +FUNCTION + <>---control wide character test + +INDEX + iswcntrl_l + +ANSI_SYNOPSIS + #include + int iswcntrl_l(wint_t <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a function which classifies wide-character values that +are categorized as control characters. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +RETURNS +<> returns non-zero if <[c]> is a control wide character. + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ +#include <_ansi.h> +#include + +int +iswcntrl_l (wint_t c, struct __locale_t *locale) +{ + /* We're using a locale-independent representation of upper/lower case + based on Unicode data. Thus, the locale doesn't matter. */ + return iswcntrl (c); +} diff --git a/newlib/libc/ctype/iswctype_l.c b/newlib/libc/ctype/iswctype_l.c new file mode 100644 index 000000000..bdf3895c4 --- /dev/null +++ b/newlib/libc/ctype/iswctype_l.c @@ -0,0 +1,37 @@ +/* +FUNCTION + <>---extensible wide-character test + +INDEX + iswctype_l + +ANSI_SYNOPSIS + #include + int iswctype_l(wint_t <[c]>, wctype_t <[desc]>, locale_t <[locale]>); + +DESCRIPTION +<> is a function which classifies wide-character values using the +wide-character test specified by <[desc]>. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +RETURNS +<> returns non-zero if and only if <[c]> matches the test specified by <[desc]>. +If <[desc]> is unknown, zero is returned. + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ +#include <_ansi.h> +#include + +int +iswctype_l (wint_t c, wctype_t desc, struct __locale_t *locale) +{ + /* We're using a locale-independent representation of upper/lower case + based on Unicode data. Thus, the locale doesn't matter. */ + return iswctype (c, desc); +} diff --git a/newlib/libc/ctype/iswdigit_l.c b/newlib/libc/ctype/iswdigit_l.c new file mode 100644 index 000000000..e368f00fa --- /dev/null +++ b/newlib/libc/ctype/iswdigit_l.c @@ -0,0 +1,34 @@ +/* +FUNCTION + <>---decimal digit wide character test + +INDEX + iswdigit_l + +ANSI_SYNOPSIS + #include + int iswdigit_l(wint_t <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a function which classifies wide-character values that +are decimal digits. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +RETURNS +<> returns non-zero if <[c]> is a decimal digit wide character. + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ +#include <_ansi.h> +#include + +int +iswdigit_l (wint_t c, struct __locale_t *locale) +{ + return (c >= (wint_t)'0' && c <= (wint_t)'9'); +} diff --git a/newlib/libc/ctype/iswgraph_l.c b/newlib/libc/ctype/iswgraph_l.c new file mode 100644 index 000000000..8b5e823a1 --- /dev/null +++ b/newlib/libc/ctype/iswgraph_l.c @@ -0,0 +1,36 @@ +/* +FUNCTION + <>---graphic wide character test + +INDEX + iswgraph_l + +ANSI_SYNOPSIS + #include + int iswgraph_l(wint_t <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a function which classifies wide-character values that +are graphic. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +RETURNS +<> returns non-zero if <[c]> is a graphic wide character. + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ +#include <_ansi.h> +#include + +int +iswgraph_l (wint_t c, struct __locale_t *locale) +{ + /* We're using a locale-independent representation of upper/lower case + based on Unicode data. Thus, the locale doesn't matter. */ + return iswprint (c) && !iswspace (c); +} diff --git a/newlib/libc/ctype/iswlower_l.c b/newlib/libc/ctype/iswlower_l.c new file mode 100644 index 000000000..a818faa31 --- /dev/null +++ b/newlib/libc/ctype/iswlower_l.c @@ -0,0 +1,37 @@ + +/* +FUNCTION + <>---lowercase wide character test + +INDEX + iswlower_l + +ANSI_SYNOPSIS + #include + int iswlower_l(wint_t <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a function which classifies wide-character values that +have uppercase translations. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +RETURNS +<> returns non-zero if <[c]> is a lowercase wide character. + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ +#include <_ansi.h> +#include + +int +iswlower_l (wint_t c, struct __locale_t *locale) +{ + /* We're using a locale-independent representation of upper/lower case + based on Unicode data. Thus, the locale doesn't matter. */ + return (towupper (c) != c); +} diff --git a/newlib/libc/ctype/iswprint_l.c b/newlib/libc/ctype/iswprint_l.c new file mode 100644 index 000000000..03988fbde --- /dev/null +++ b/newlib/libc/ctype/iswprint_l.c @@ -0,0 +1,36 @@ +/* +FUNCTION + <>---printable wide character test + +INDEX + iswprint_l + +ANSI_SYNOPSIS + #include + int iswprint_l(wint_t <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a function which classifies wide-character values that +are printable. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +RETURNS +<> returns non-zero if <[c]> is a printable wide character. + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ +#include <_ansi.h> +#include + +int +iswprint_l (wint_t c, struct __locale_t *locale) +{ + /* We're using a locale-independent representation of upper/lower case + based on Unicode data. Thus, the locale doesn't matter. */ + return iswprint (c); +} diff --git a/newlib/libc/ctype/iswpunct_l.c b/newlib/libc/ctype/iswpunct_l.c new file mode 100644 index 000000000..567f3f1a3 --- /dev/null +++ b/newlib/libc/ctype/iswpunct_l.c @@ -0,0 +1,36 @@ +/* +FUNCTION + <>---punctuation wide character test + +INDEX + iswpunct_l + +ANSI_SYNOPSIS + #include + int iswpunct_l(wint_t <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a function which classifies wide-character values that +are punctuation. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +RETURNS +<> returns non-zero if <[c]> is a punctuation wide character. + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ +#include <_ansi.h> +#include + +int +iswpunct_l (wint_t c, struct __locale_t *locale) +{ + /* We're using a locale-independent representation of upper/lower case + based on Unicode data. Thus, the locale doesn't matter. */ + return !iswalnum (c) && iswgraph (c); +} diff --git a/newlib/libc/ctype/iswspace_l.c b/newlib/libc/ctype/iswspace_l.c new file mode 100644 index 000000000..c6bdba4b7 --- /dev/null +++ b/newlib/libc/ctype/iswspace_l.c @@ -0,0 +1,36 @@ +/* +FUNCTION + <>---whitespace wide character test + +INDEX + iswspace_l + +ANSI_SYNOPSIS + #include + int iswspace_l(wint_t <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a function which classifies wide-character values that +are categorized as whitespace. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +RETURNS +<> returns non-zero if <[c]> is a whitespace wide character. + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ +#include <_ansi.h> +#include + +int +iswspace_l (wint_t c, struct __locale_t *locale) +{ + /* We're using a locale-independent representation of upper/lower case + based on Unicode data. Thus, the locale doesn't matter. */ + return iswspace (c); +} diff --git a/newlib/libc/ctype/iswupper_l.c b/newlib/libc/ctype/iswupper_l.c new file mode 100644 index 000000000..52572de96 --- /dev/null +++ b/newlib/libc/ctype/iswupper_l.c @@ -0,0 +1,36 @@ +/* +FUNCTION + <>---uppercase wide character test + +INDEX + iswupper_l + +ANSI_SYNOPSIS + #include + int iswupper_l(wint_t <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a function which classifies wide-character values that +have uppercase translations. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +RETURNS +<> returns non-zero if <[c]> is a uppercase wide character. + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ +#include <_ansi.h> +#include + +int +iswupper_l (wint_t c, struct __locale_t *locale) +{ + /* We're using a locale-independent representation of upper/lower case + based on Unicode data. Thus, the locale doesn't matter. */ + return towlower (c) != c; +} diff --git a/newlib/libc/ctype/iswxdigit_l.c b/newlib/libc/ctype/iswxdigit_l.c new file mode 100644 index 000000000..39596dbc8 --- /dev/null +++ b/newlib/libc/ctype/iswxdigit_l.c @@ -0,0 +1,37 @@ +/* +FUNCTION + <>---hexadecimal digit wide character test + +INDEX + iswxdigit_l + +ANSI_SYNOPSIS + #include + int iswxdigit_l(wint_t <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a function which classifies wide character values that +are hexadecimal digits. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +RETURNS +<> returns non-zero if <[c]> is a hexadecimal digit wide character. + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ +#include <_ansi.h> +#include + +int +iswxdigit_l (wint_t c, struct __locale_t *locale) +{ + return ((c >= (wint_t)'0' && c <= (wint_t)'9') || + (c >= (wint_t)'a' && c <= (wint_t)'f') || + (c >= (wint_t)'A' && c <= (wint_t)'F')); +} + diff --git a/newlib/libc/ctype/isxdigit_l.c b/newlib/libc/ctype/isxdigit_l.c new file mode 100644 index 000000000..37e489ee6 --- /dev/null +++ b/newlib/libc/ctype/isxdigit_l.c @@ -0,0 +1,43 @@ +/* +FUNCTION +<>---hexadecimal digit predicate + +INDEX +isxdigit_l + +ANSI_SYNOPSIS +#include +int isxdigit_l(int <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a macro which classifies ASCII integer values by table +lookup in locale <[locale]>. It is a predicate returning non-zero for +hexadecimal digits, and <<0>> for other characters. It is defined only +if <[c]> is representable as an unsigned char or if <[c]> is EOF. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining the macro using `<<#undef isxdigit_l>>'. + +RETURNS +<> returns non-zero if <[c]> is a hexadecimal digit +(<<0>>--<<9>>, <>--<>, or <>--<>). + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ +#include <_ansi.h> +#include + + +#undef isxdigit_l +int +isxdigit_l (int c, struct __locale_t *locale) +{ + return __locale_ctype_ptr_l (locale)[c+1] & ((_X)|(_N)); +} + diff --git a/newlib/libc/ctype/toascii_l.c b/newlib/libc/ctype/toascii_l.c new file mode 100644 index 000000000..fd58195fc --- /dev/null +++ b/newlib/libc/ctype/toascii_l.c @@ -0,0 +1,39 @@ +/* +FUNCTION + <>---force integers to ASCII range + +INDEX + toascii_l + +ANSI_SYNOPSIS + #include + int toascii_l(int <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a macro which coerces integers to the ASCII range (0--127) by zeroing any higher-order bits. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +You can use a compiled subroutine instead of the macro definition by +undefining this macro using `<<#undef toascii_l>>'. + +RETURNS +<> returns integers between 0 and 127. + +PORTABILITY +<> is a GNU extension. + +No supporting OS subroutines are required. +*/ + +#include <_ansi.h> +#include + +#undef toascii_l + +int +toascii_l (int c, struct __locale_t *locale) +{ + return c & 0177; +} diff --git a/newlib/libc/ctype/tolower_l.c b/newlib/libc/ctype/tolower_l.c new file mode 100644 index 000000000..cbb388d0e --- /dev/null +++ b/newlib/libc/ctype/tolower_l.c @@ -0,0 +1,66 @@ +/* +FUNCTION + <>---translate characters to lowercase + +INDEX + tolower_l + +ANSI_SYNOPSIS + #include + int tolower_l(int <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a macro which converts uppercase characters to lowercase, +leaving all other characters unchanged. It is only defined when +<[c]> is an integer in the range <> to <<255>>. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +RETURNS +<> returns the lowercase equivalent of <[c]> when it is a +character between <> and <>, and <[c]> otherwise. + +PORTABILITY +<> is POSIX-1.2008. +programs. + +No supporting OS subroutines are required. +*/ + +#include <_ansi.h> +#include +#if defined (_MB_EXTENDED_CHARSETS_ISO) || defined (_MB_EXTENDED_CHARSETS_WINDOWS) +#include +#include +#include +#include +#include +#include "../locale/setlocale.h" +#endif + +int +tolower_l (int c, struct __locale_t *locale) +{ +#if defined (_MB_EXTENDED_CHARSETS_ISO) || defined (_MB_EXTENDED_CHARSETS_WINDOWS) + if ((unsigned char) c <= 0x7f) + return isupper_l (c, locale) ? c - 'A' + 'a' : c; + else if (c != EOF && __locale_mb_cur_max_l (locale) == 1 + && isupper_l (c, locale)) + { + char s[MB_LEN_MAX] = { c, '\0' }; + wchar_t wc; + mbstate_t state; + + memset (&state, 0, sizeof state); + if (locale->mbtowc (_REENT, &wc, s, 1, &state) >= 0 + && locale->wctomb (_REENT, s, + (wchar_t) towlower_l ((wint_t) wc, locale), + &state) == 1) + c = (unsigned char) s[0]; + } + return c; +#else + return isupper_l (c, locale) ? (c) - 'A' + 'a' : c; +#endif +} diff --git a/newlib/libc/ctype/toupper_l.c b/newlib/libc/ctype/toupper_l.c new file mode 100644 index 000000000..2eb6dbd06 --- /dev/null +++ b/newlib/libc/ctype/toupper_l.c @@ -0,0 +1,67 @@ +/* +FUNCTION + <>---translate characters to uppercase + +INDEX + toupper_l + +ANSI_SYNOPSIS + #include + int toupper_l(int <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a macro which converts lowercase characters to uppercase, +leaving all other characters unchanged. It is only defined when +<[c]> is an integer in the range <> to <<255>>. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +RETURNS +<> returns the uppercase equivalent of <[c]> when it is a +character between <> and <>, and <[c]> otherwise. + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ + +#include <_ansi.h> +#include +#if defined (_MB_EXTENDED_CHARSETS_ISO) \ + || defined (_MB_EXTENDED_CHARSETS_WINDOWS) +#include +#include +#include +#include +#include +#include <../locale/setlocale.h> +#endif + +int +toupper_l (int c, struct __locale_t *locale) +{ +#if defined (_MB_EXTENDED_CHARSETS_ISO) \ + || defined (_MB_EXTENDED_CHARSETS_WINDOWS) + if ((unsigned char) c <= 0x7f) + return islower_l (c, locale) ? c - 'a' + 'A' : c; + else if (c != EOF && __locale_mb_cur_max_l (locale) == 1 + && islower_l (c, locale)) + { + char s[MB_LEN_MAX] = { c, '\0' }; + wchar_t wc; + mbstate_t state; + + memset (&state, 0, sizeof state); + if (locale->mbtowc (_REENT, &wc, s, 1, &state) >= 0 + && locale->wctomb (_REENT, s, + (wchar_t) towupper_l ((wint_t) wc, locale), + &state) == 1) + c = (unsigned char) s[0]; + } + return c; +#else + return islower_l (c, locale) ? c - 'a' + 'A' : c; +#endif +} diff --git a/newlib/libc/ctype/towctrans_l.c b/newlib/libc/ctype/towctrans_l.c new file mode 100644 index 000000000..d74cc7923 --- /dev/null +++ b/newlib/libc/ctype/towctrans_l.c @@ -0,0 +1,40 @@ +/* +FUNCTION + <>---extensible wide-character translation + +INDEX + towctrans_l + +ANSI_SYNOPSIS + #include + wint_t towctrans_l(wint_t <[c]>, wctrans_t <[w]>, locale_t <[locale]>); + +DESCRIPTION +<> is a function which converts wide characters based on +a specified translation type <[w]>. If the translation type is +invalid or cannot be applied to the current character, no change +to the character is made. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +RETURNS +<> returns the translated equivalent of <[c]> when it is a +valid for the given translation, otherwise, it returns the input character. +When the translation type is invalid, <> is set <>. + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ +#include <_ansi.h> +#include + +wint_t +towctrans_l (wint_t c, wctrans_t w, struct __locale_t *locale) +{ + /* We're using a locale-independent representation of upper/lower case + based on Unicode data. Thus, the locale doesn't matter. */ + return towctrans (c, w); +} diff --git a/newlib/libc/ctype/towlower_l.c b/newlib/libc/ctype/towlower_l.c new file mode 100644 index 000000000..5b398f1dc --- /dev/null +++ b/newlib/libc/ctype/towlower_l.c @@ -0,0 +1,40 @@ +/* +FUNCTION + <>---translate wide characters to lowercase + +INDEX + towlower_l + +ANSI_SYNOPSIS + #include + wint_t towlower_l(wint_t <[c]>, local_t <[locale]>); + +DESCRIPTION +<> is a function which converts uppercase wide characters to +lowercase, leaving all other characters unchanged. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +RETURNS +<> returns the lowercase equivalent of <[c]> when it is a +uppercase wide character; otherwise, it returns the input character. + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ + +#include <_ansi.h> +#include +#include +#include "local.h" + +wint_t +towlower_l (wint_t c, struct __locale_t *locale) +{ + /* We're using a locale-independent representation of upper/lower case + based on Unicode data. Thus, the locale doesn't matter. */ + return towlower (c); +} diff --git a/newlib/libc/ctype/towupper_l.c b/newlib/libc/ctype/towupper_l.c new file mode 100644 index 000000000..973fdc0ab --- /dev/null +++ b/newlib/libc/ctype/towupper_l.c @@ -0,0 +1,38 @@ +/* +FUNCTION + <>---translate wide characters to uppercase + +INDEX + towupper_l + +ANSI_SYNOPSIS + #include + wint_t towupper_l(wint_t <[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a function which converts lowercase wide characters to +uppercase, leaving all other characters unchanged. + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +RETURNS +<> returns the uppercase equivalent of <[c]> when it is a +lowercase wide character, otherwise, it returns the input character. + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ + +#include <_ansi.h> +#include + +wint_t +towupper_l (wint_t c, struct __locale_t *locale) +{ + /* We're using a locale-independent representation of upper/lower case + based on Unicode data. Thus, the locale doesn't matter. */ + return towupper (c); +} diff --git a/newlib/libc/ctype/wctrans_l.c b/newlib/libc/ctype/wctrans_l.c new file mode 100644 index 000000000..2109711b1 --- /dev/null +++ b/newlib/libc/ctype/wctrans_l.c @@ -0,0 +1,40 @@ +/* +FUNCTION + <>---get wide-character translation type + +INDEX + wctrans_l + +ANSI_SYNOPSIS + #include + wctrans_t wctrans_l(const char *<[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a function which takes a string <[c]> and gives back +the appropriate wctrans_t type value associated with the string, +if one exists. The following values are guaranteed to be recognized: +"tolower" and "toupper". + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +RETURNS +<> returns 0 and sets <> to <> if the +given name is invalid. Otherwise, it returns a valid non-zero wctrans_t +value. + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ +#include <_ansi.h> +#include + +wctrans_t +wctrans_l (const char *c, struct __locale_t *locale) +{ + /* We're using a locale-independent representation of upper/lower case + based on Unicode data. Thus, the locale doesn't matter. */ + return wctrans (c); +} diff --git a/newlib/libc/ctype/wctype_l.c b/newlib/libc/ctype/wctype_l.c new file mode 100644 index 000000000..8b8d59d0f --- /dev/null +++ b/newlib/libc/ctype/wctype_l.c @@ -0,0 +1,39 @@ +/* +FUNCTION + <>---get wide-character classification type + +INDEX + wctype_l + +ANSI_SYNOPSIS + #include + wctype_t wctype_l(const char *<[c]>, locale_t <[locale]>); + +DESCRIPTION +<> is a function which takes a string <[c]> and gives back +the appropriate wctype_t type value associated with the string, +if one exists. The following values are guaranteed to be recognized: +"alnum", "alpha", "blank", "cntrl", "digit", "graph", "lower", "print", +"punct", "space", "upper", and "xdigit". + +if <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour +is undefined. + +RETURNS +<> returns 0 and sets <> to <> if the +given name is invalid. Otherwise, it returns a valid non-zero wctype_t +value. + +PORTABILITY +<> is POSIX-1.2008. + +No supporting OS subroutines are required. +*/ +#include <_ansi.h> +#include + +wctype_t +wctype_l (const char *c, struct __locale_t *locale) +{ + return wctype (c); +} diff --git a/newlib/libc/include/ctype.h b/newlib/libc/include/ctype.h index 7e6ddb66e..332869128 100644 --- a/newlib/libc/include/ctype.h +++ b/newlib/libc/include/ctype.h @@ -4,6 +4,11 @@ #include "_ansi.h" #include +#if __MISC_VISIBLE || __POSIX_VISIBLE >= 200809 || defined (_COMPILING_NEWLIB) +struct __locale_t; +typedef struct __locale_t *locale_t; +#endif + _BEGIN_STD_C int _EXFUN(isalnum, (int __c)); @@ -31,6 +36,28 @@ int _EXFUN(toascii, (int __c)); #define _toupper(__c) ((unsigned char)(__c) - 'a' + 'A') #endif +#if __POSIX_VISIBLE >= 200809 +extern int isalnum_l (int __c, locale_t __l); +extern int isalpha_l (int __c, locale_t __l); +extern int isblank_l (int __c, locale_t __l); +extern int iscntrl_l (int __c, locale_t __l); +extern int isdigit_l (int __c, locale_t __l); +extern int isgraph_l (int __c, locale_t __l); +extern int islower_l (int __c, locale_t __l); +extern int isprint_l (int __c, locale_t __l); +extern int ispunct_l (int __c, locale_t __l); +extern int isspace_l (int __c, locale_t __l); +extern int isupper_l (int __c, locale_t __l); +extern int isxdigit_l(int __c, locale_t __l); +extern int tolower_l (int __c, locale_t __l); +extern int toupper_l (int __c, locale_t __l); +#endif + +#if __MISC_VISIBLE +extern int isascii_l (int __c, locale_t __l); +extern int toascii_l (int __c, locale_t __l); +#endif + #define _U 01 #define _L 02 #define _N 04 @@ -43,11 +70,11 @@ int _EXFUN(toascii, (int __c)); #ifndef _MB_CAPABLE _CONST #endif -extern __IMPORT char *__ctype_ptr__; #ifdef __HAVE_LOCALE_INFO__ -char *_EXFUN(__locale_ctype_ptr, (void)); +char *__locale_ctype_ptr (void); # define __CTYPE_PTR (__locale_ctype_ptr ()) #else +extern __IMPORT char *__ctype_ptr__; # define __CTYPE_PTR (__ctype_ptr__) #endif @@ -81,6 +108,39 @@ char *_EXFUN(__locale_ctype_ptr, (void)); (__ctype_lookup(__x)&_B) || (int) (__x) == '\t';}) #endif +#if __POSIX_VISIBLE >= 200809 +char *__locale_ctype_ptr_l (locale_t); +#define __ctype_lookup_l(__c,__l) ((__locale_ctype_ptr_l(__l)+sizeof(""[__c]))[(int)(__c)]) + +#define isalpha_l(__c,__l) (__ctype_lookup_l(__c,__l)&(_U|_L)) +#define isupper_l(__c,__l) ((__ctype_lookup_l(__c,__l)&(_U|_L))==_U) +#define islower_l(__c,__l) ((__ctype_lookup_l(__c,__l)&(_U|_L))==_L) +#define isdigit_l(__c,__l) (__ctype_lookup_l(__c,__l)&_N) +#define isxdigit_l(__c,__l) (__ctype_lookup_l(__c,__l)&(_X|_N)) +#define isspace_l(__c,__l) (__ctype_lookup_l(__c,__l)&_S) +#define ispunct_l(__c,__l) (__ctype_lookup_l(__c,__l)&_P) +#define isalnum_l(__c,__l) (__ctype_lookup_l(__c,__l)&(_U|_L|_N)) +#define isprint_l(__c,__l) (__ctype_lookup_l(__c,__l)&(_P|_U|_L|_N|_B)) +#define isgraph_l(__c,__l) (__ctype_lookup_l(__c,__l)&(_P|_U|_L|_N)) +#define iscntrl_l(__c,__l) (__ctype_lookup_l(__c,__l)&_C) + +#if defined(__GNUC__) +#define isblank_l(__c, __l) \ + __extension__ ({ __typeof__ (__c) __x = (__c); \ + (__ctype_lookup_l(__x,__l)&_B) || (int) (__x) == '\t';}) +#endif + +#endif /* __POSIX_VISIBLE >= 200809 */ + +#if __MISC_VISIBLE || __XSI_VISIBLE +#define isascii(__c) ((unsigned)(__c)<=0177) +#define toascii(__c) ((__c)&0177) +#endif + +#if __MISC_VISIBLE +#define isascii_l(__c,__l) ((__l),(unsigned)(__c)<=0177) +#define toascii_l(__c,__l) ((__l),(__c)&0177) +#endif /* Non-gcc versions will get the library versions, and will be slightly slower. These macros are not NLS-aware so they are @@ -105,10 +165,8 @@ char *_EXFUN(__locale_ctype_ptr, (void)); # endif /* _MB_EXTENDED_CHARSETS* */ # endif /* __GNUC__ */ -#if __MISC_VISIBLE || __XSI_VISIBLE -#define isascii(__c) ((unsigned)(__c)<=0177) -#define toascii(__c) ((__c)&0177) -#endif +#if __POSIX_VISIBLE >= 200809 +#endif /* __POSIX_VISIBLE >= 200809 */ #endif /* !__cplusplus */ diff --git a/newlib/libc/include/wctype.h b/newlib/libc/include/wctype.h index 0e335ec8d..6c2505ddf 100644 --- a/newlib/libc/include/wctype.h +++ b/newlib/libc/include/wctype.h @@ -44,6 +44,32 @@ wint_t _EXFUN(towlower, (wint_t)); wctrans_t _EXFUN(wctrans, (const char *)); wctype_t _EXFUN(wctype, (const char *)); +#if __POSIX_VISIBLE >= 200809 || defined (_COMPILING_NEWLIB) +struct __locale_t; +typedef struct __locale_t *locale_t; +#endif + +#if __POSIX_VISIBLE >= 200809 +extern int iswalpha_l (wint_t, locale_t); +extern int iswalnum_l (wint_t, locale_t); +extern int iswblank_l (wint_t, locale_t); +extern int iswcntrl_l (wint_t, locale_t); +extern int iswctype_l (wint_t, wctype_t, locale_t); +extern int iswdigit_l (wint_t, locale_t); +extern int iswgraph_l (wint_t, locale_t); +extern int iswlower_l (wint_t, locale_t); +extern int iswprint_l (wint_t, locale_t); +extern int iswpunct_l (wint_t, locale_t); +extern int iswspace_l (wint_t, locale_t); +extern int iswupper_l (wint_t, locale_t); +extern int iswxdigit_l (wint_t, locale_t); +extern wint_t towctrans_l (wint_t, wctrans_t, locale_t); +extern wint_t towupper_l (wint_t, locale_t); +extern wint_t towlower_l (wint_t, locale_t); +extern wctrans_t wctrans_l (const char *, locale_t); +extern wctype_t wctype_l (const char *, locale_t); +#endif + _END_STD_C #endif /* _WCTYPE_H_ */ diff --git a/newlib/libc/locale/setlocale.h b/newlib/libc/locale/setlocale.h index 4f52e7428..a73706316 100644 --- a/newlib/libc/locale/setlocale.h +++ b/newlib/libc/locale/setlocale.h @@ -220,6 +220,14 @@ __get_current_locale () return _REENT->_locale ?: &__global_locale; } +#define __get_locale_ctype(__l) \ + ((const struct lc_ctype_T *) (__l)->lc_cat[LC_CTYPE].ptr) +#ifdef __HAVE_LOCALE_INFO__ +#define __locale_mb_cur_max_l(__l) (__get_locale_ctype (__l)->mb_cur_max) +#else +#define __locale_mb_cur_max_l(__l) ((__l)->mb_cur_max) +#endif + #ifdef __CYGWIN__ _ELIDABLE_INLINE const struct lc_collate_T * __get_current_collate_locale (void) diff --git a/winsup/cygwin/common.din b/winsup/cygwin/common.din index 0660a38e7..7d80c3d97 100644 --- a/winsup/cygwin/common.din +++ b/winsup/cygwin/common.din @@ -69,6 +69,7 @@ __isinff = isinff NOSIGFE __isnand = isnan NOSIGFE __isnanf = isnanf NOSIGFE __locale_ctype_ptr NOSIGFE +__locale_ctype_ptr_l NOSIGFE __locale_mb_cur_max NOSIGFE __main NOSIGFE __mempcpy = mempcpy NOSIGFE @@ -722,39 +723,65 @@ iprintf SIGFE iruserok SIGFE iruserok_sa SIGFE isalnum NOSIGFE +isalnum_l NOSIGFE isalpha NOSIGFE +isalpha_l NOSIGFE isascii NOSIGFE +isascii_l NOSIGFE isatty SIGFE isblank NOSIGFE +isblank_l NOSIGFE iscntrl NOSIGFE +iscntrl_l NOSIGFE isdigit NOSIGFE +isdigit_l NOSIGFE isgraph NOSIGFE +isgraph_l NOSIGFE isinf NOSIGFE isinff NOSIGFE isinfl NOSIGFE islower NOSIGFE +islower_l NOSIGFE isnan NOSIGFE isnanf NOSIGFE isnanl NOSIGFE isprint NOSIGFE +isprint_l NOSIGFE ispunct NOSIGFE +ispunct_l NOSIGFE issetugid NOSIGFE isspace NOSIGFE +isspace_l NOSIGFE isupper NOSIGFE +isupper_l NOSIGFE iswalnum NOSIGFE +iswalnum_l NOSIGFE iswalpha NOSIGFE +iswalpha_l NOSIGFE iswblank NOSIGFE +iswblank_l NOSIGFE iswcntrl NOSIGFE +iswcntrl_l NOSIGFE iswctype NOSIGFE +iswctype_l NOSIGFE iswdigit NOSIGFE +iswdigit_l NOSIGFE iswgraph NOSIGFE +iswgraph_l NOSIGFE iswlower NOSIGFE +iswlower_l NOSIGFE iswprint NOSIGFE +iswprint_l NOSIGFE iswpunct NOSIGFE +iswpunct_l NOSIGFE iswspace NOSIGFE +iswspace_l NOSIGFE iswupper NOSIGFE +iswupper_l NOSIGFE iswxdigit NOSIGFE +iswxdigit_l NOSIGFE isxdigit NOSIGFE +isxdigit_l NOSIGFE j0 NOSIGFE j0f NOSIGFE j1 NOSIGFE @@ -1393,11 +1420,17 @@ timezone SIGFE tmpfile SIGFE tmpnam SIGFE toascii NOSIGFE +toascii_l NOSIGFE tolower NOSIGFE +tolower_l NOSIGFE toupper NOSIGFE +toupper_l NOSIGFE towctrans NOSIGFE +towctrans_l NOSIGFE towlower NOSIGFE +towlower_l NOSIGFE towupper NOSIGFE +towupper_l NOSIGFE trunc NOSIGFE truncate SIGFE truncf NOSIGFE @@ -1500,7 +1533,9 @@ wcsxfrm NOSIGFE wctob NOSIGFE wctomb NOSIGFE wctrans NOSIGFE +wctrans_l NOSIGFE wctype NOSIGFE +wctype_l NOSIGFE wcwidth NOSIGFE wmemchr NOSIGFE wmemcmp NOSIGFE diff --git a/winsup/cygwin/ctype.cc b/winsup/cygwin/ctype.cc index a7dc18a5d..3eb6b34b7 100644 --- a/winsup/cygwin/ctype.cc +++ b/winsup/cygwin/ctype.cc @@ -5,6 +5,7 @@ extern "C" { #include #include +extern char *__ctype_ptr__; extern char _ctype_b[128 + 256]; /* Called from newlib's setlocale(). What we do here is to copy the diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index 9ae5983f8..d912cba16 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -455,12 +455,18 @@ details. */ scalbl, scalblnl, scalbnl, sincosl, sinhl, sinl, tanhl, tanl, tgammal, truncl. 298: newlocale, freelocale, duplocale, uselocale. + 299: __locale_ctype_ptr_l, isalnum_l, isalpha_l, isascii_l, isblank_l, + iscntrl_l, isdigit_l, isgraph_l, islower_l, isprint_l, ispunct_l, + isspace_l, isupper_l, iswalnum_l, iswalpha_l, iswblank_l, iswcntrl_l, + iswctype_l, iswdigit_l, iswgraph_l, iswlower_l, iswprint_l, iswpunct_l, + iswspace_l, iswupper_l, iswxdigit_l, isxdigit_l, toascii_l, tolower_l, + toupper_l, towctrans_l, towlower_l, towupper_l, wctrans_l, wctype_l. Note that we forgot to bump the api for ualarm, strtoll, strtoull, sigaltstack, sethostname. */ #define CYGWIN_VERSION_API_MAJOR 0 -#define CYGWIN_VERSION_API_MINOR 298 +#define CYGWIN_VERSION_API_MINOR 299 /* There is also a compatibity version number associated with the shared memory regions. It is incremented when incompatible changes are made to the shared diff --git a/winsup/doc/posix.xml b/winsup/doc/posix.xml index 31ec8e005..38a5bbc89 100644 --- a/winsup/doc/posix.xml +++ b/winsup/doc/posix.xml @@ -410,14 +410,20 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008). insque ioctl isalnum + isalnum_l isalpha + isalpha_l isascii isatty isblank + isblank_l iscntrl + iscntrl_l isdigit + isdigit_l isfinite (see chapter "Implementation Notes") isgraph + isgraph_l isgreater (see chapter "Implementation Notes") isgreaterequal (see chapter "Implementation Notes") isinf (see chapter "Implementation Notes") @@ -425,27 +431,46 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008). islessequal (see chapter "Implementation Notes") islessgreater (see chapter "Implementation Notes") islower + islower_l isnan (see chapter "Implementation Notes") isnormal (see chapter "Implementation Notes") isprint + isprint_l ispunct + ispunct_l isspace + isspace_l isunordered (see chapter "Implementation Notes") isupper + isupper_l iswalnum + iswalnum_l iswalpha + iswalpha_l iswblank + iswblank_l iswcntrl + iswcntrl_l iswctype + iswctype_l iswdigit + iswdigit_l iswgraph + iswgraph_l iswlower + iswlower_l iswprint + iswprint_l iswpunct + iswpunct_l iswspace + iswspace_l iswupper + iswupper_l iswxdigit + iswxdigit_l isxdigit + isxdigit_l j0 j1 jn @@ -964,12 +989,16 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008). timezone tmpfile tmpnam - toascii tolower + tolower_l toupper + toupper_l towctrans + towctrans_l towlower + towlower_l towupper + towupper_l trunc truncate truncf @@ -1052,7 +1081,9 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008). wctob wctomb wctrans + wctrans_l wctype + wctype_l wcwidth wmemchr wmemcmp @@ -1313,6 +1344,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008). tdestroy timegm timelocal + toascii_l updwtmpx utmpxname vasnprintf @@ -1460,6 +1492,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008). sys_errlist (BSD) sys_nerr (BSD) sys_siglist (BSD) + toascii (SUSv3) ttyslot (SUSv2) ualarm (SUSv3) usleep (SUSv3) @@ -1490,32 +1523,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008). getnetbyname getnetent getpmsg - isalnum_l - isalpha_l isastream - isblank_l - iscntrl_l - isdigit_l - isgraph_l - islower_l - isprint_l - ispunct_l - isspace_l - isupper_l - iswalnum_l - iswalpha_l - iswblank_l - iswcntrl_l - iswctype_l - iswdigit_l - iswgraph_l - iswlower_l - iswprint_l - iswpunct_l - iswspace_l - iswupper_l - iswxdigit_l - isxdigit_l lio_listio mlockall munlockall @@ -1537,19 +1545,12 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008). strncasecmp_l strxfrm_l timer_getoverrun - tolower_l - toupper_l - towctrans_l - towlower_l - towupper_l ulimit waitid wcscasecmp_l wcscoll_l wcsncasecmp_l wcsxfrm_l - wctrans_l - wctype_l