2005-04-01 11:53:28 +02:00
|
|
|
/* Copyright (C) 1996-2000,2002,2005 Free Software Foundation, Inc.
|
1997-01-26 06:33:35 +01:00
|
|
|
This file is part of the GNU C Library.
|
1999-01-07 10:55:57 +01:00
|
|
|
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
|
Mon Apr 1 13:34:55 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* stdio-common/tst-printf.c (main): Add new test case.
* sysdeps/generic/setenv.c (unsetenv): Use old-style definition.
Mon Apr 1 11:39:10 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* stdlib/strtod.c (STRTOD): Fix handling of American style FP
numbers.
* stdio-common/vfprintf.c (vfprintf): Don't increment format
string pointer twice after seeing `*'.
Sun Mar 31 17:31:54 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* MakeTAGS (po/SYS_libc.pot): Prepend header processed from
po/header.pot.
Sun Mar 31 18:07:32 1996 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* locale/Makefile (others, install-bin): Compiling locale works
again.
(locale-modules): locale has no --dump option anymore. Remove
ctypedump.
* locale/programs/config.h: Don't declare euidaccess.
Use #include_next to get libc's config.h.
* locale/programs/ctypedump.c: Not needed anymore. Dump option
of locale is removed.
* locale/programs/locale.c: Adapt for new locale implementation.
* stdio-common/_itoa.h (_itoa_word): Define as inline function.
* stdio-common/_itoa.c (_itoa_lower_digits, _itoa_upper_digits):
Don't declare static because used in _itoa_word inline function.
* stdio-common/printf-parse.h: Prepare for use in wide-char
stdio implementation.
(find_spec): Take additional argument to work with mbrlen instead
of mblen.
(parse_one_spec): Ditto.
* stdio-common/printf-prs.c: Prepare for use in wide-char
stdio implementation.
* stdio-common/printf.h: Mark change for wide-char handling.
Changing it now would result in incompatibilities.
* stdio-common/vfprintf.c: New and fast implementation.
* wcsmbs/Makefile (routines): Remove pre-ISO C multibyte functions
mbsadvance, mbscat, mbschr, mbscmp, mbscpy, mbsdup, mbslen,
mbsncat, mbsncmp, mbsncpy, mbsrchr, mbstomb.
Change wcswcs to wcsstr.
Add wmemchr, wmemcmp, wmemcpy, wmemmove, wmemset, btowc, wctob,
mbsinit, mbrlen, mbrtowc, wcrtomb, mbsrtowcs, wcsrtombs.
* wcsmbs/btowc.c, wcsmbs/mbrlen.c, wcsmbs/mbrtowc.c,
wcsmbs/mbsinit.c, wcsmbs/mbsrtowcs.c, wcsmbs/wchar.h,
wcsmbs/wcrtomb.c, wcsmbs/wcsrtombs.c, wcsmbs/wcsstr.c,
wcsmbs/wctob.c, wcsmbs/wmemchr.c, wcsmbs/wmemcmp.c,
wcsmbs/wmemcpy.c, wcsmbs/wmemmove.c, wcsmbs/wmemset.c: New
function according to ISO C amendment 1.
* wchar.h: Wrapper around "wcsmbs/wchar.h".
* wcsmbs/wcscat.c, wcsmbs/wcschr.c, wcsmbs/wcscmp.c,
wcsmbs/wcscpy.c, wcsmbs/wcscspn.c, wcsmbs/wcsdup.c,
wcsmbs/wcslen.c, wcsmbs/wcsncat.c, wcsmbs/wcsncmp.c,
wcsmbs/wcsncpy.c, wcsmbs/wcspbrk.c, wcsmbs/wcsrchr.c,
wcsmbs/wcsspn.c, wcsmbs/wcstok.c: Changed to conform with ISO C
amendment 1.
* wcsmbs/mbsadvance.c, wcsmbs/mbscat.c, wcsmbs/mbschr.c,
wcsmbs/mbscmp.c, wcsmbs/mbscpy.c, wcsmbs/mbsdup.c,
wcsmbs/mbslen.c, wcsmbs/mbsncat.c, wcsmbs/mbsncmp.c,
wcsmbs/mbsncpy.c, wcsmbs/mbsrchr.c, wcsmbs/mbstomb.c,
wcsmbs/mbstr.h, wcsmbs/wcstr.h, wcsmbs/wcswcs.c: Removed.
Implement functions from early drafts, not part of final standard.
Sun Mar 31 16:50:41 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* setjmp/setjmp.h (jmp_buf): Change gratuitous struct tag name to
__jmp_bug_tag so its C++ implicit typedef does not conflict with the
__jmp_buf typedef.
* Makerules (BUILD_CFLAGS) [! objdir]: Use $(..)config.h when
compiling in the source directories.
Fri Mar 29 16:26:35 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* sysdeps/libm-ieee754/w_gamma.c: Use signgam instead of __signgam.
* sysdeps/libm-ieee754/s_signgam.c: Undo last change.
1996-04-02 15:27:17 +02:00
|
|
|
|
1997-01-26 06:33:35 +01:00
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
2001-07-06 06:58:11 +02:00
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
Mon Apr 1 13:34:55 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* stdio-common/tst-printf.c (main): Add new test case.
* sysdeps/generic/setenv.c (unsetenv): Use old-style definition.
Mon Apr 1 11:39:10 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* stdlib/strtod.c (STRTOD): Fix handling of American style FP
numbers.
* stdio-common/vfprintf.c (vfprintf): Don't increment format
string pointer twice after seeing `*'.
Sun Mar 31 17:31:54 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* MakeTAGS (po/SYS_libc.pot): Prepend header processed from
po/header.pot.
Sun Mar 31 18:07:32 1996 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* locale/Makefile (others, install-bin): Compiling locale works
again.
(locale-modules): locale has no --dump option anymore. Remove
ctypedump.
* locale/programs/config.h: Don't declare euidaccess.
Use #include_next to get libc's config.h.
* locale/programs/ctypedump.c: Not needed anymore. Dump option
of locale is removed.
* locale/programs/locale.c: Adapt for new locale implementation.
* stdio-common/_itoa.h (_itoa_word): Define as inline function.
* stdio-common/_itoa.c (_itoa_lower_digits, _itoa_upper_digits):
Don't declare static because used in _itoa_word inline function.
* stdio-common/printf-parse.h: Prepare for use in wide-char
stdio implementation.
(find_spec): Take additional argument to work with mbrlen instead
of mblen.
(parse_one_spec): Ditto.
* stdio-common/printf-prs.c: Prepare for use in wide-char
stdio implementation.
* stdio-common/printf.h: Mark change for wide-char handling.
Changing it now would result in incompatibilities.
* stdio-common/vfprintf.c: New and fast implementation.
* wcsmbs/Makefile (routines): Remove pre-ISO C multibyte functions
mbsadvance, mbscat, mbschr, mbscmp, mbscpy, mbsdup, mbslen,
mbsncat, mbsncmp, mbsncpy, mbsrchr, mbstomb.
Change wcswcs to wcsstr.
Add wmemchr, wmemcmp, wmemcpy, wmemmove, wmemset, btowc, wctob,
mbsinit, mbrlen, mbrtowc, wcrtomb, mbsrtowcs, wcsrtombs.
* wcsmbs/btowc.c, wcsmbs/mbrlen.c, wcsmbs/mbrtowc.c,
wcsmbs/mbsinit.c, wcsmbs/mbsrtowcs.c, wcsmbs/wchar.h,
wcsmbs/wcrtomb.c, wcsmbs/wcsrtombs.c, wcsmbs/wcsstr.c,
wcsmbs/wctob.c, wcsmbs/wmemchr.c, wcsmbs/wmemcmp.c,
wcsmbs/wmemcpy.c, wcsmbs/wmemmove.c, wcsmbs/wmemset.c: New
function according to ISO C amendment 1.
* wchar.h: Wrapper around "wcsmbs/wchar.h".
* wcsmbs/wcscat.c, wcsmbs/wcschr.c, wcsmbs/wcscmp.c,
wcsmbs/wcscpy.c, wcsmbs/wcscspn.c, wcsmbs/wcsdup.c,
wcsmbs/wcslen.c, wcsmbs/wcsncat.c, wcsmbs/wcsncmp.c,
wcsmbs/wcsncpy.c, wcsmbs/wcspbrk.c, wcsmbs/wcsrchr.c,
wcsmbs/wcsspn.c, wcsmbs/wcstok.c: Changed to conform with ISO C
amendment 1.
* wcsmbs/mbsadvance.c, wcsmbs/mbscat.c, wcsmbs/mbschr.c,
wcsmbs/mbscmp.c, wcsmbs/mbscpy.c, wcsmbs/mbsdup.c,
wcsmbs/mbslen.c, wcsmbs/mbsncat.c, wcsmbs/mbsncmp.c,
wcsmbs/mbsncpy.c, wcsmbs/mbsrchr.c, wcsmbs/mbstomb.c,
wcsmbs/mbstr.h, wcsmbs/wcstr.h, wcsmbs/wcswcs.c: Removed.
Implement functions from early drafts, not part of final standard.
Sun Mar 31 16:50:41 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* setjmp/setjmp.h (jmp_buf): Change gratuitous struct tag name to
__jmp_bug_tag so its C++ implicit typedef does not conflict with the
__jmp_buf typedef.
* Makerules (BUILD_CFLAGS) [! objdir]: Use $(..)config.h when
compiling in the source directories.
Fri Mar 29 16:26:35 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* sysdeps/libm-ieee754/w_gamma.c: Use signgam instead of __signgam.
* sysdeps/libm-ieee754/s_signgam.c: Undo last change.
1996-04-02 15:27:17 +02:00
|
|
|
|
1997-01-26 06:33:35 +01:00
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2001-07-06 06:58:11 +02:00
|
|
|
Lesser General Public License for more details.
|
Mon Apr 1 13:34:55 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* stdio-common/tst-printf.c (main): Add new test case.
* sysdeps/generic/setenv.c (unsetenv): Use old-style definition.
Mon Apr 1 11:39:10 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* stdlib/strtod.c (STRTOD): Fix handling of American style FP
numbers.
* stdio-common/vfprintf.c (vfprintf): Don't increment format
string pointer twice after seeing `*'.
Sun Mar 31 17:31:54 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* MakeTAGS (po/SYS_libc.pot): Prepend header processed from
po/header.pot.
Sun Mar 31 18:07:32 1996 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* locale/Makefile (others, install-bin): Compiling locale works
again.
(locale-modules): locale has no --dump option anymore. Remove
ctypedump.
* locale/programs/config.h: Don't declare euidaccess.
Use #include_next to get libc's config.h.
* locale/programs/ctypedump.c: Not needed anymore. Dump option
of locale is removed.
* locale/programs/locale.c: Adapt for new locale implementation.
* stdio-common/_itoa.h (_itoa_word): Define as inline function.
* stdio-common/_itoa.c (_itoa_lower_digits, _itoa_upper_digits):
Don't declare static because used in _itoa_word inline function.
* stdio-common/printf-parse.h: Prepare for use in wide-char
stdio implementation.
(find_spec): Take additional argument to work with mbrlen instead
of mblen.
(parse_one_spec): Ditto.
* stdio-common/printf-prs.c: Prepare for use in wide-char
stdio implementation.
* stdio-common/printf.h: Mark change for wide-char handling.
Changing it now would result in incompatibilities.
* stdio-common/vfprintf.c: New and fast implementation.
* wcsmbs/Makefile (routines): Remove pre-ISO C multibyte functions
mbsadvance, mbscat, mbschr, mbscmp, mbscpy, mbsdup, mbslen,
mbsncat, mbsncmp, mbsncpy, mbsrchr, mbstomb.
Change wcswcs to wcsstr.
Add wmemchr, wmemcmp, wmemcpy, wmemmove, wmemset, btowc, wctob,
mbsinit, mbrlen, mbrtowc, wcrtomb, mbsrtowcs, wcsrtombs.
* wcsmbs/btowc.c, wcsmbs/mbrlen.c, wcsmbs/mbrtowc.c,
wcsmbs/mbsinit.c, wcsmbs/mbsrtowcs.c, wcsmbs/wchar.h,
wcsmbs/wcrtomb.c, wcsmbs/wcsrtombs.c, wcsmbs/wcsstr.c,
wcsmbs/wctob.c, wcsmbs/wmemchr.c, wcsmbs/wmemcmp.c,
wcsmbs/wmemcpy.c, wcsmbs/wmemmove.c, wcsmbs/wmemset.c: New
function according to ISO C amendment 1.
* wchar.h: Wrapper around "wcsmbs/wchar.h".
* wcsmbs/wcscat.c, wcsmbs/wcschr.c, wcsmbs/wcscmp.c,
wcsmbs/wcscpy.c, wcsmbs/wcscspn.c, wcsmbs/wcsdup.c,
wcsmbs/wcslen.c, wcsmbs/wcsncat.c, wcsmbs/wcsncmp.c,
wcsmbs/wcsncpy.c, wcsmbs/wcspbrk.c, wcsmbs/wcsrchr.c,
wcsmbs/wcsspn.c, wcsmbs/wcstok.c: Changed to conform with ISO C
amendment 1.
* wcsmbs/mbsadvance.c, wcsmbs/mbscat.c, wcsmbs/mbschr.c,
wcsmbs/mbscmp.c, wcsmbs/mbscpy.c, wcsmbs/mbsdup.c,
wcsmbs/mbslen.c, wcsmbs/mbsncat.c, wcsmbs/mbsncmp.c,
wcsmbs/mbsncpy.c, wcsmbs/mbsrchr.c, wcsmbs/mbstomb.c,
wcsmbs/mbstr.h, wcsmbs/wcstr.h, wcsmbs/wcswcs.c: Removed.
Implement functions from early drafts, not part of final standard.
Sun Mar 31 16:50:41 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* setjmp/setjmp.h (jmp_buf): Change gratuitous struct tag name to
__jmp_bug_tag so its C++ implicit typedef does not conflict with the
__jmp_buf typedef.
* Makerules (BUILD_CFLAGS) [! objdir]: Use $(..)config.h when
compiling in the source directories.
Fri Mar 29 16:26:35 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* sysdeps/libm-ieee754/w_gamma.c: Use signgam instead of __signgam.
* sysdeps/libm-ieee754/s_signgam.c: Undo last change.
1996-04-02 15:27:17 +02:00
|
|
|
|
2001-07-06 06:58:11 +02:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with the GNU C Library; if not, write to the Free
|
|
|
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
|
|
02111-1307 USA. */
|
Mon Apr 1 13:34:55 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* stdio-common/tst-printf.c (main): Add new test case.
* sysdeps/generic/setenv.c (unsetenv): Use old-style definition.
Mon Apr 1 11:39:10 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* stdlib/strtod.c (STRTOD): Fix handling of American style FP
numbers.
* stdio-common/vfprintf.c (vfprintf): Don't increment format
string pointer twice after seeing `*'.
Sun Mar 31 17:31:54 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* MakeTAGS (po/SYS_libc.pot): Prepend header processed from
po/header.pot.
Sun Mar 31 18:07:32 1996 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* locale/Makefile (others, install-bin): Compiling locale works
again.
(locale-modules): locale has no --dump option anymore. Remove
ctypedump.
* locale/programs/config.h: Don't declare euidaccess.
Use #include_next to get libc's config.h.
* locale/programs/ctypedump.c: Not needed anymore. Dump option
of locale is removed.
* locale/programs/locale.c: Adapt for new locale implementation.
* stdio-common/_itoa.h (_itoa_word): Define as inline function.
* stdio-common/_itoa.c (_itoa_lower_digits, _itoa_upper_digits):
Don't declare static because used in _itoa_word inline function.
* stdio-common/printf-parse.h: Prepare for use in wide-char
stdio implementation.
(find_spec): Take additional argument to work with mbrlen instead
of mblen.
(parse_one_spec): Ditto.
* stdio-common/printf-prs.c: Prepare for use in wide-char
stdio implementation.
* stdio-common/printf.h: Mark change for wide-char handling.
Changing it now would result in incompatibilities.
* stdio-common/vfprintf.c: New and fast implementation.
* wcsmbs/Makefile (routines): Remove pre-ISO C multibyte functions
mbsadvance, mbscat, mbschr, mbscmp, mbscpy, mbsdup, mbslen,
mbsncat, mbsncmp, mbsncpy, mbsrchr, mbstomb.
Change wcswcs to wcsstr.
Add wmemchr, wmemcmp, wmemcpy, wmemmove, wmemset, btowc, wctob,
mbsinit, mbrlen, mbrtowc, wcrtomb, mbsrtowcs, wcsrtombs.
* wcsmbs/btowc.c, wcsmbs/mbrlen.c, wcsmbs/mbrtowc.c,
wcsmbs/mbsinit.c, wcsmbs/mbsrtowcs.c, wcsmbs/wchar.h,
wcsmbs/wcrtomb.c, wcsmbs/wcsrtombs.c, wcsmbs/wcsstr.c,
wcsmbs/wctob.c, wcsmbs/wmemchr.c, wcsmbs/wmemcmp.c,
wcsmbs/wmemcpy.c, wcsmbs/wmemmove.c, wcsmbs/wmemset.c: New
function according to ISO C amendment 1.
* wchar.h: Wrapper around "wcsmbs/wchar.h".
* wcsmbs/wcscat.c, wcsmbs/wcschr.c, wcsmbs/wcscmp.c,
wcsmbs/wcscpy.c, wcsmbs/wcscspn.c, wcsmbs/wcsdup.c,
wcsmbs/wcslen.c, wcsmbs/wcsncat.c, wcsmbs/wcsncmp.c,
wcsmbs/wcsncpy.c, wcsmbs/wcspbrk.c, wcsmbs/wcsrchr.c,
wcsmbs/wcsspn.c, wcsmbs/wcstok.c: Changed to conform with ISO C
amendment 1.
* wcsmbs/mbsadvance.c, wcsmbs/mbscat.c, wcsmbs/mbschr.c,
wcsmbs/mbscmp.c, wcsmbs/mbscpy.c, wcsmbs/mbsdup.c,
wcsmbs/mbslen.c, wcsmbs/mbsncat.c, wcsmbs/mbsncmp.c,
wcsmbs/mbsncpy.c, wcsmbs/mbsrchr.c, wcsmbs/mbstomb.c,
wcsmbs/mbstr.h, wcsmbs/wcstr.h, wcsmbs/wcswcs.c: Removed.
Implement functions from early drafts, not part of final standard.
Sun Mar 31 16:50:41 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* setjmp/setjmp.h (jmp_buf): Change gratuitous struct tag name to
__jmp_bug_tag so its C++ implicit typedef does not conflict with the
__jmp_buf typedef.
* Makerules (BUILD_CFLAGS) [! objdir]: Use $(..)config.h when
compiling in the source directories.
Fri Mar 29 16:26:35 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* sysdeps/libm-ieee754/w_gamma.c: Use signgam instead of __signgam.
* sysdeps/libm-ieee754/s_signgam.c: Undo last change.
1996-04-02 15:27:17 +02:00
|
|
|
|
2005-04-01 11:53:28 +02:00
|
|
|
#include <ctype.h>
|
2000-06-12 21:47:50 +02:00
|
|
|
#include <dlfcn.h>
|
1998-04-07 11:21:28 +02:00
|
|
|
#include <gconv.h>
|
Mon Apr 1 13:34:55 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* stdio-common/tst-printf.c (main): Add new test case.
* sysdeps/generic/setenv.c (unsetenv): Use old-style definition.
Mon Apr 1 11:39:10 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* stdlib/strtod.c (STRTOD): Fix handling of American style FP
numbers.
* stdio-common/vfprintf.c (vfprintf): Don't increment format
string pointer twice after seeing `*'.
Sun Mar 31 17:31:54 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* MakeTAGS (po/SYS_libc.pot): Prepend header processed from
po/header.pot.
Sun Mar 31 18:07:32 1996 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* locale/Makefile (others, install-bin): Compiling locale works
again.
(locale-modules): locale has no --dump option anymore. Remove
ctypedump.
* locale/programs/config.h: Don't declare euidaccess.
Use #include_next to get libc's config.h.
* locale/programs/ctypedump.c: Not needed anymore. Dump option
of locale is removed.
* locale/programs/locale.c: Adapt for new locale implementation.
* stdio-common/_itoa.h (_itoa_word): Define as inline function.
* stdio-common/_itoa.c (_itoa_lower_digits, _itoa_upper_digits):
Don't declare static because used in _itoa_word inline function.
* stdio-common/printf-parse.h: Prepare for use in wide-char
stdio implementation.
(find_spec): Take additional argument to work with mbrlen instead
of mblen.
(parse_one_spec): Ditto.
* stdio-common/printf-prs.c: Prepare for use in wide-char
stdio implementation.
* stdio-common/printf.h: Mark change for wide-char handling.
Changing it now would result in incompatibilities.
* stdio-common/vfprintf.c: New and fast implementation.
* wcsmbs/Makefile (routines): Remove pre-ISO C multibyte functions
mbsadvance, mbscat, mbschr, mbscmp, mbscpy, mbsdup, mbslen,
mbsncat, mbsncmp, mbsncpy, mbsrchr, mbstomb.
Change wcswcs to wcsstr.
Add wmemchr, wmemcmp, wmemcpy, wmemmove, wmemset, btowc, wctob,
mbsinit, mbrlen, mbrtowc, wcrtomb, mbsrtowcs, wcsrtombs.
* wcsmbs/btowc.c, wcsmbs/mbrlen.c, wcsmbs/mbrtowc.c,
wcsmbs/mbsinit.c, wcsmbs/mbsrtowcs.c, wcsmbs/wchar.h,
wcsmbs/wcrtomb.c, wcsmbs/wcsrtombs.c, wcsmbs/wcsstr.c,
wcsmbs/wctob.c, wcsmbs/wmemchr.c, wcsmbs/wmemcmp.c,
wcsmbs/wmemcpy.c, wcsmbs/wmemmove.c, wcsmbs/wmemset.c: New
function according to ISO C amendment 1.
* wchar.h: Wrapper around "wcsmbs/wchar.h".
* wcsmbs/wcscat.c, wcsmbs/wcschr.c, wcsmbs/wcscmp.c,
wcsmbs/wcscpy.c, wcsmbs/wcscspn.c, wcsmbs/wcsdup.c,
wcsmbs/wcslen.c, wcsmbs/wcsncat.c, wcsmbs/wcsncmp.c,
wcsmbs/wcsncpy.c, wcsmbs/wcspbrk.c, wcsmbs/wcsrchr.c,
wcsmbs/wcsspn.c, wcsmbs/wcstok.c: Changed to conform with ISO C
amendment 1.
* wcsmbs/mbsadvance.c, wcsmbs/mbscat.c, wcsmbs/mbschr.c,
wcsmbs/mbscmp.c, wcsmbs/mbscpy.c, wcsmbs/mbsdup.c,
wcsmbs/mbslen.c, wcsmbs/mbsncat.c, wcsmbs/mbsncmp.c,
wcsmbs/mbsncpy.c, wcsmbs/mbsrchr.c, wcsmbs/mbstomb.c,
wcsmbs/mbstr.h, wcsmbs/wcstr.h, wcsmbs/wcswcs.c: Removed.
Implement functions from early drafts, not part of final standard.
Sun Mar 31 16:50:41 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* setjmp/setjmp.h (jmp_buf): Change gratuitous struct tag name to
__jmp_bug_tag so its C++ implicit typedef does not conflict with the
__jmp_buf typedef.
* Makerules (BUILD_CFLAGS) [! objdir]: Use $(..)config.h when
compiling in the source directories.
Fri Mar 29 16:26:35 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* sysdeps/libm-ieee754/w_gamma.c: Use signgam instead of __signgam.
* sysdeps/libm-ieee754/s_signgam.c: Undo last change.
1996-04-02 15:27:17 +02:00
|
|
|
#include <stdio.h>
|
1998-04-07 11:21:28 +02:00
|
|
|
#include <string.h>
|
Mon Apr 1 13:34:55 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* stdio-common/tst-printf.c (main): Add new test case.
* sysdeps/generic/setenv.c (unsetenv): Use old-style definition.
Mon Apr 1 11:39:10 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* stdlib/strtod.c (STRTOD): Fix handling of American style FP
numbers.
* stdio-common/vfprintf.c (vfprintf): Don't increment format
string pointer twice after seeing `*'.
Sun Mar 31 17:31:54 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* MakeTAGS (po/SYS_libc.pot): Prepend header processed from
po/header.pot.
Sun Mar 31 18:07:32 1996 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* locale/Makefile (others, install-bin): Compiling locale works
again.
(locale-modules): locale has no --dump option anymore. Remove
ctypedump.
* locale/programs/config.h: Don't declare euidaccess.
Use #include_next to get libc's config.h.
* locale/programs/ctypedump.c: Not needed anymore. Dump option
of locale is removed.
* locale/programs/locale.c: Adapt for new locale implementation.
* stdio-common/_itoa.h (_itoa_word): Define as inline function.
* stdio-common/_itoa.c (_itoa_lower_digits, _itoa_upper_digits):
Don't declare static because used in _itoa_word inline function.
* stdio-common/printf-parse.h: Prepare for use in wide-char
stdio implementation.
(find_spec): Take additional argument to work with mbrlen instead
of mblen.
(parse_one_spec): Ditto.
* stdio-common/printf-prs.c: Prepare for use in wide-char
stdio implementation.
* stdio-common/printf.h: Mark change for wide-char handling.
Changing it now would result in incompatibilities.
* stdio-common/vfprintf.c: New and fast implementation.
* wcsmbs/Makefile (routines): Remove pre-ISO C multibyte functions
mbsadvance, mbscat, mbschr, mbscmp, mbscpy, mbsdup, mbslen,
mbsncat, mbsncmp, mbsncpy, mbsrchr, mbstomb.
Change wcswcs to wcsstr.
Add wmemchr, wmemcmp, wmemcpy, wmemmove, wmemset, btowc, wctob,
mbsinit, mbrlen, mbrtowc, wcrtomb, mbsrtowcs, wcsrtombs.
* wcsmbs/btowc.c, wcsmbs/mbrlen.c, wcsmbs/mbrtowc.c,
wcsmbs/mbsinit.c, wcsmbs/mbsrtowcs.c, wcsmbs/wchar.h,
wcsmbs/wcrtomb.c, wcsmbs/wcsrtombs.c, wcsmbs/wcsstr.c,
wcsmbs/wctob.c, wcsmbs/wmemchr.c, wcsmbs/wmemcmp.c,
wcsmbs/wmemcpy.c, wcsmbs/wmemmove.c, wcsmbs/wmemset.c: New
function according to ISO C amendment 1.
* wchar.h: Wrapper around "wcsmbs/wchar.h".
* wcsmbs/wcscat.c, wcsmbs/wcschr.c, wcsmbs/wcscmp.c,
wcsmbs/wcscpy.c, wcsmbs/wcscspn.c, wcsmbs/wcsdup.c,
wcsmbs/wcslen.c, wcsmbs/wcsncat.c, wcsmbs/wcsncmp.c,
wcsmbs/wcsncpy.c, wcsmbs/wcspbrk.c, wcsmbs/wcsrchr.c,
wcsmbs/wcsspn.c, wcsmbs/wcstok.c: Changed to conform with ISO C
amendment 1.
* wcsmbs/mbsadvance.c, wcsmbs/mbscat.c, wcsmbs/mbschr.c,
wcsmbs/mbscmp.c, wcsmbs/mbscpy.c, wcsmbs/mbsdup.c,
wcsmbs/mbslen.c, wcsmbs/mbsncat.c, wcsmbs/mbsncmp.c,
wcsmbs/mbsncpy.c, wcsmbs/mbsrchr.c, wcsmbs/mbstomb.c,
wcsmbs/mbstr.h, wcsmbs/wcstr.h, wcsmbs/wcswcs.c: Removed.
Implement functions from early drafts, not part of final standard.
Sun Mar 31 16:50:41 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* setjmp/setjmp.h (jmp_buf): Change gratuitous struct tag name to
__jmp_bug_tag so its C++ implicit typedef does not conflict with the
__jmp_buf typedef.
* Makerules (BUILD_CFLAGS) [! objdir]: Use $(..)config.h when
compiling in the source directories.
Fri Mar 29 16:26:35 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* sysdeps/libm-ieee754/w_gamma.c: Use signgam instead of __signgam.
* sysdeps/libm-ieee754/s_signgam.c: Undo last change.
1996-04-02 15:27:17 +02:00
|
|
|
#include <wchar.h>
|
1998-04-07 11:21:28 +02:00
|
|
|
#include <wcsmbsload.h>
|
1999-01-07 10:55:57 +01:00
|
|
|
#include <limits.h>
|
Mon Apr 1 13:34:55 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* stdio-common/tst-printf.c (main): Add new test case.
* sysdeps/generic/setenv.c (unsetenv): Use old-style definition.
Mon Apr 1 11:39:10 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* stdlib/strtod.c (STRTOD): Fix handling of American style FP
numbers.
* stdio-common/vfprintf.c (vfprintf): Don't increment format
string pointer twice after seeing `*'.
Sun Mar 31 17:31:54 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* MakeTAGS (po/SYS_libc.pot): Prepend header processed from
po/header.pot.
Sun Mar 31 18:07:32 1996 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* locale/Makefile (others, install-bin): Compiling locale works
again.
(locale-modules): locale has no --dump option anymore. Remove
ctypedump.
* locale/programs/config.h: Don't declare euidaccess.
Use #include_next to get libc's config.h.
* locale/programs/ctypedump.c: Not needed anymore. Dump option
of locale is removed.
* locale/programs/locale.c: Adapt for new locale implementation.
* stdio-common/_itoa.h (_itoa_word): Define as inline function.
* stdio-common/_itoa.c (_itoa_lower_digits, _itoa_upper_digits):
Don't declare static because used in _itoa_word inline function.
* stdio-common/printf-parse.h: Prepare for use in wide-char
stdio implementation.
(find_spec): Take additional argument to work with mbrlen instead
of mblen.
(parse_one_spec): Ditto.
* stdio-common/printf-prs.c: Prepare for use in wide-char
stdio implementation.
* stdio-common/printf.h: Mark change for wide-char handling.
Changing it now would result in incompatibilities.
* stdio-common/vfprintf.c: New and fast implementation.
* wcsmbs/Makefile (routines): Remove pre-ISO C multibyte functions
mbsadvance, mbscat, mbschr, mbscmp, mbscpy, mbsdup, mbslen,
mbsncat, mbsncmp, mbsncpy, mbsrchr, mbstomb.
Change wcswcs to wcsstr.
Add wmemchr, wmemcmp, wmemcpy, wmemmove, wmemset, btowc, wctob,
mbsinit, mbrlen, mbrtowc, wcrtomb, mbsrtowcs, wcsrtombs.
* wcsmbs/btowc.c, wcsmbs/mbrlen.c, wcsmbs/mbrtowc.c,
wcsmbs/mbsinit.c, wcsmbs/mbsrtowcs.c, wcsmbs/wchar.h,
wcsmbs/wcrtomb.c, wcsmbs/wcsrtombs.c, wcsmbs/wcsstr.c,
wcsmbs/wctob.c, wcsmbs/wmemchr.c, wcsmbs/wmemcmp.c,
wcsmbs/wmemcpy.c, wcsmbs/wmemmove.c, wcsmbs/wmemset.c: New
function according to ISO C amendment 1.
* wchar.h: Wrapper around "wcsmbs/wchar.h".
* wcsmbs/wcscat.c, wcsmbs/wcschr.c, wcsmbs/wcscmp.c,
wcsmbs/wcscpy.c, wcsmbs/wcscspn.c, wcsmbs/wcsdup.c,
wcsmbs/wcslen.c, wcsmbs/wcsncat.c, wcsmbs/wcsncmp.c,
wcsmbs/wcsncpy.c, wcsmbs/wcspbrk.c, wcsmbs/wcsrchr.c,
wcsmbs/wcsspn.c, wcsmbs/wcstok.c: Changed to conform with ISO C
amendment 1.
* wcsmbs/mbsadvance.c, wcsmbs/mbscat.c, wcsmbs/mbschr.c,
wcsmbs/mbscmp.c, wcsmbs/mbscpy.c, wcsmbs/mbsdup.c,
wcsmbs/mbslen.c, wcsmbs/mbsncat.c, wcsmbs/mbsncmp.c,
wcsmbs/mbsncpy.c, wcsmbs/mbsrchr.c, wcsmbs/mbstomb.c,
wcsmbs/mbstr.h, wcsmbs/wcstr.h, wcsmbs/wcswcs.c: Removed.
Implement functions from early drafts, not part of final standard.
Sun Mar 31 16:50:41 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* setjmp/setjmp.h (jmp_buf): Change gratuitous struct tag name to
__jmp_bug_tag so its C++ implicit typedef does not conflict with the
__jmp_buf typedef.
* Makerules (BUILD_CFLAGS) [! objdir]: Use $(..)config.h when
compiling in the source directories.
Fri Mar 29 16:26:35 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* sysdeps/libm-ieee754/w_gamma.c: Use signgam instead of __signgam.
* sysdeps/libm-ieee754/s_signgam.c: Undo last change.
1996-04-02 15:27:17 +02:00
|
|
|
|
2005-12-19 08:26:29 +01:00
|
|
|
#include <sysdep.h>
|
|
|
|
|
Mon Apr 1 13:34:55 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* stdio-common/tst-printf.c (main): Add new test case.
* sysdeps/generic/setenv.c (unsetenv): Use old-style definition.
Mon Apr 1 11:39:10 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* stdlib/strtod.c (STRTOD): Fix handling of American style FP
numbers.
* stdio-common/vfprintf.c (vfprintf): Don't increment format
string pointer twice after seeing `*'.
Sun Mar 31 17:31:54 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* MakeTAGS (po/SYS_libc.pot): Prepend header processed from
po/header.pot.
Sun Mar 31 18:07:32 1996 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* locale/Makefile (others, install-bin): Compiling locale works
again.
(locale-modules): locale has no --dump option anymore. Remove
ctypedump.
* locale/programs/config.h: Don't declare euidaccess.
Use #include_next to get libc's config.h.
* locale/programs/ctypedump.c: Not needed anymore. Dump option
of locale is removed.
* locale/programs/locale.c: Adapt for new locale implementation.
* stdio-common/_itoa.h (_itoa_word): Define as inline function.
* stdio-common/_itoa.c (_itoa_lower_digits, _itoa_upper_digits):
Don't declare static because used in _itoa_word inline function.
* stdio-common/printf-parse.h: Prepare for use in wide-char
stdio implementation.
(find_spec): Take additional argument to work with mbrlen instead
of mblen.
(parse_one_spec): Ditto.
* stdio-common/printf-prs.c: Prepare for use in wide-char
stdio implementation.
* stdio-common/printf.h: Mark change for wide-char handling.
Changing it now would result in incompatibilities.
* stdio-common/vfprintf.c: New and fast implementation.
* wcsmbs/Makefile (routines): Remove pre-ISO C multibyte functions
mbsadvance, mbscat, mbschr, mbscmp, mbscpy, mbsdup, mbslen,
mbsncat, mbsncmp, mbsncpy, mbsrchr, mbstomb.
Change wcswcs to wcsstr.
Add wmemchr, wmemcmp, wmemcpy, wmemmove, wmemset, btowc, wctob,
mbsinit, mbrlen, mbrtowc, wcrtomb, mbsrtowcs, wcsrtombs.
* wcsmbs/btowc.c, wcsmbs/mbrlen.c, wcsmbs/mbrtowc.c,
wcsmbs/mbsinit.c, wcsmbs/mbsrtowcs.c, wcsmbs/wchar.h,
wcsmbs/wcrtomb.c, wcsmbs/wcsrtombs.c, wcsmbs/wcsstr.c,
wcsmbs/wctob.c, wcsmbs/wmemchr.c, wcsmbs/wmemcmp.c,
wcsmbs/wmemcpy.c, wcsmbs/wmemmove.c, wcsmbs/wmemset.c: New
function according to ISO C amendment 1.
* wchar.h: Wrapper around "wcsmbs/wchar.h".
* wcsmbs/wcscat.c, wcsmbs/wcschr.c, wcsmbs/wcscmp.c,
wcsmbs/wcscpy.c, wcsmbs/wcscspn.c, wcsmbs/wcsdup.c,
wcsmbs/wcslen.c, wcsmbs/wcsncat.c, wcsmbs/wcsncmp.c,
wcsmbs/wcsncpy.c, wcsmbs/wcspbrk.c, wcsmbs/wcsrchr.c,
wcsmbs/wcsspn.c, wcsmbs/wcstok.c: Changed to conform with ISO C
amendment 1.
* wcsmbs/mbsadvance.c, wcsmbs/mbscat.c, wcsmbs/mbschr.c,
wcsmbs/mbscmp.c, wcsmbs/mbscpy.c, wcsmbs/mbsdup.c,
wcsmbs/mbslen.c, wcsmbs/mbsncat.c, wcsmbs/mbsncmp.c,
wcsmbs/mbsncpy.c, wcsmbs/mbsrchr.c, wcsmbs/mbstomb.c,
wcsmbs/mbstr.h, wcsmbs/wcstr.h, wcsmbs/wcswcs.c: Removed.
Implement functions from early drafts, not part of final standard.
Sun Mar 31 16:50:41 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* setjmp/setjmp.h (jmp_buf): Change gratuitous struct tag name to
__jmp_bug_tag so its C++ implicit typedef does not conflict with the
__jmp_buf typedef.
* Makerules (BUILD_CFLAGS) [! objdir]: Use $(..)config.h when
compiling in the source directories.
Fri Mar 29 16:26:35 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* sysdeps/libm-ieee754/w_gamma.c: Use signgam instead of __signgam.
* sysdeps/libm-ieee754/s_signgam.c: Undo last change.
1996-04-02 15:27:17 +02:00
|
|
|
|
|
|
|
wint_t
|
1998-04-08 22:27:31 +02:00
|
|
|
__btowc (c)
|
Mon Apr 1 13:34:55 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* stdio-common/tst-printf.c (main): Add new test case.
* sysdeps/generic/setenv.c (unsetenv): Use old-style definition.
Mon Apr 1 11:39:10 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* stdlib/strtod.c (STRTOD): Fix handling of American style FP
numbers.
* stdio-common/vfprintf.c (vfprintf): Don't increment format
string pointer twice after seeing `*'.
Sun Mar 31 17:31:54 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* MakeTAGS (po/SYS_libc.pot): Prepend header processed from
po/header.pot.
Sun Mar 31 18:07:32 1996 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* locale/Makefile (others, install-bin): Compiling locale works
again.
(locale-modules): locale has no --dump option anymore. Remove
ctypedump.
* locale/programs/config.h: Don't declare euidaccess.
Use #include_next to get libc's config.h.
* locale/programs/ctypedump.c: Not needed anymore. Dump option
of locale is removed.
* locale/programs/locale.c: Adapt for new locale implementation.
* stdio-common/_itoa.h (_itoa_word): Define as inline function.
* stdio-common/_itoa.c (_itoa_lower_digits, _itoa_upper_digits):
Don't declare static because used in _itoa_word inline function.
* stdio-common/printf-parse.h: Prepare for use in wide-char
stdio implementation.
(find_spec): Take additional argument to work with mbrlen instead
of mblen.
(parse_one_spec): Ditto.
* stdio-common/printf-prs.c: Prepare for use in wide-char
stdio implementation.
* stdio-common/printf.h: Mark change for wide-char handling.
Changing it now would result in incompatibilities.
* stdio-common/vfprintf.c: New and fast implementation.
* wcsmbs/Makefile (routines): Remove pre-ISO C multibyte functions
mbsadvance, mbscat, mbschr, mbscmp, mbscpy, mbsdup, mbslen,
mbsncat, mbsncmp, mbsncpy, mbsrchr, mbstomb.
Change wcswcs to wcsstr.
Add wmemchr, wmemcmp, wmemcpy, wmemmove, wmemset, btowc, wctob,
mbsinit, mbrlen, mbrtowc, wcrtomb, mbsrtowcs, wcsrtombs.
* wcsmbs/btowc.c, wcsmbs/mbrlen.c, wcsmbs/mbrtowc.c,
wcsmbs/mbsinit.c, wcsmbs/mbsrtowcs.c, wcsmbs/wchar.h,
wcsmbs/wcrtomb.c, wcsmbs/wcsrtombs.c, wcsmbs/wcsstr.c,
wcsmbs/wctob.c, wcsmbs/wmemchr.c, wcsmbs/wmemcmp.c,
wcsmbs/wmemcpy.c, wcsmbs/wmemmove.c, wcsmbs/wmemset.c: New
function according to ISO C amendment 1.
* wchar.h: Wrapper around "wcsmbs/wchar.h".
* wcsmbs/wcscat.c, wcsmbs/wcschr.c, wcsmbs/wcscmp.c,
wcsmbs/wcscpy.c, wcsmbs/wcscspn.c, wcsmbs/wcsdup.c,
wcsmbs/wcslen.c, wcsmbs/wcsncat.c, wcsmbs/wcsncmp.c,
wcsmbs/wcsncpy.c, wcsmbs/wcspbrk.c, wcsmbs/wcsrchr.c,
wcsmbs/wcsspn.c, wcsmbs/wcstok.c: Changed to conform with ISO C
amendment 1.
* wcsmbs/mbsadvance.c, wcsmbs/mbscat.c, wcsmbs/mbschr.c,
wcsmbs/mbscmp.c, wcsmbs/mbscpy.c, wcsmbs/mbsdup.c,
wcsmbs/mbslen.c, wcsmbs/mbsncat.c, wcsmbs/mbsncmp.c,
wcsmbs/mbsncpy.c, wcsmbs/mbsrchr.c, wcsmbs/mbstomb.c,
wcsmbs/mbstr.h, wcsmbs/wcstr.h, wcsmbs/wcswcs.c: Removed.
Implement functions from early drafts, not part of final standard.
Sun Mar 31 16:50:41 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* setjmp/setjmp.h (jmp_buf): Change gratuitous struct tag name to
__jmp_bug_tag so its C++ implicit typedef does not conflict with the
__jmp_buf typedef.
* Makerules (BUILD_CFLAGS) [! objdir]: Use $(..)config.h when
compiling in the source directories.
Fri Mar 29 16:26:35 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* sysdeps/libm-ieee754/w_gamma.c: Use signgam instead of __signgam.
* sysdeps/libm-ieee754/s_signgam.c: Undo last change.
1996-04-02 15:27:17 +02:00
|
|
|
int c;
|
|
|
|
{
|
2002-09-02 21:34:39 +02:00
|
|
|
const struct gconv_fcts *fcts;
|
1998-04-07 11:21:28 +02:00
|
|
|
|
|
|
|
/* If the parameter does not fit into one byte or it is the EOF value
|
|
|
|
we can give the answer now. */
|
1999-01-07 10:55:57 +01:00
|
|
|
if (c < SCHAR_MIN || c > UCHAR_MAX || c == EOF)
|
1998-04-07 11:21:28 +02:00
|
|
|
return WEOF;
|
|
|
|
|
2005-04-01 11:53:28 +02:00
|
|
|
/* We know that only ASCII compatible encodings are used for the
|
|
|
|
locale and that the wide character encoding is ISO 10646. */
|
|
|
|
if (isascii (c))
|
|
|
|
return (wint_t) c;
|
|
|
|
|
2002-09-02 21:34:39 +02:00
|
|
|
/* Get the conversion functions. */
|
|
|
|
fcts = get_gconv_fcts (_NL_CURRENT_DATA (LC_CTYPE));
|
2005-12-19 08:26:29 +01:00
|
|
|
__gconv_btowc_fct btowc_fct = fcts->towc->__btowc_fct;
|
1998-04-07 11:21:28 +02:00
|
|
|
|
2002-12-02 23:39:58 +01:00
|
|
|
if (__builtin_expect (fcts->towc_nsteps == 1, 1)
|
2005-12-19 08:26:29 +01:00
|
|
|
&& __builtin_expect (btowc_fct != NULL, 1))
|
2002-12-02 23:39:58 +01:00
|
|
|
{
|
|
|
|
/* Use the shortcut function. */
|
2005-12-19 08:26:29 +01:00
|
|
|
#ifdef PTR_DEMANGLE
|
|
|
|
if (fcts->towc->__shlib_handle != NULL)
|
|
|
|
PTR_DEMANGLE (btowc_fct);
|
|
|
|
#endif
|
|
|
|
return DL_CALL_FCT (btowc_fct, (fcts->towc, (unsigned char) c));
|
2002-12-02 23:39:58 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* Fall back to the slow but generic method. */
|
|
|
|
wchar_t result;
|
|
|
|
struct __gconv_step_data data;
|
|
|
|
unsigned char inbuf[1];
|
|
|
|
const unsigned char *inptr = inbuf;
|
|
|
|
size_t dummy;
|
|
|
|
int status;
|
|
|
|
|
|
|
|
/* Tell where we want the result. */
|
|
|
|
data.__outbuf = (unsigned char *) &result;
|
|
|
|
data.__outbufend = data.__outbuf + sizeof (wchar_t);
|
|
|
|
data.__invocation_counter = 0;
|
|
|
|
data.__internal_use = 1;
|
|
|
|
data.__flags = __GCONV_IS_LAST;
|
|
|
|
data.__statep = &data.__state;
|
|
|
|
data.__trans = NULL;
|
|
|
|
|
|
|
|
/* Make sure we start in the initial state. */
|
|
|
|
memset (&data.__state, '\0', sizeof (mbstate_t));
|
|
|
|
|
|
|
|
/* Create the input string. */
|
|
|
|
inbuf[0] = c;
|
|
|
|
|
2005-12-19 08:26:29 +01:00
|
|
|
__gconv_fct fct = fcts->towc->__fct;
|
|
|
|
#ifdef PTR_DEMANGLE
|
|
|
|
if (fcts->towc->__shlib_handle != NULL)
|
|
|
|
PTR_DEMANGLE (fct);
|
|
|
|
#endif
|
|
|
|
status = DL_CALL_FCT (fct, (fcts->towc, &data, &inptr, inptr + 1,
|
|
|
|
NULL, &dummy, 0, 1));
|
1998-04-07 11:21:28 +02:00
|
|
|
|
2002-12-02 23:39:58 +01:00
|
|
|
if (status != __GCONV_OK && status != __GCONV_FULL_OUTPUT
|
|
|
|
&& status != __GCONV_EMPTY_INPUT)
|
|
|
|
/* The conversion failed. */
|
|
|
|
result = WEOF;
|
1998-04-07 11:21:28 +02:00
|
|
|
|
2002-12-02 23:39:58 +01:00
|
|
|
return result;
|
|
|
|
}
|
Mon Apr 1 13:34:55 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* stdio-common/tst-printf.c (main): Add new test case.
* sysdeps/generic/setenv.c (unsetenv): Use old-style definition.
Mon Apr 1 11:39:10 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* stdlib/strtod.c (STRTOD): Fix handling of American style FP
numbers.
* stdio-common/vfprintf.c (vfprintf): Don't increment format
string pointer twice after seeing `*'.
Sun Mar 31 17:31:54 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* MakeTAGS (po/SYS_libc.pot): Prepend header processed from
po/header.pot.
Sun Mar 31 18:07:32 1996 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* locale/Makefile (others, install-bin): Compiling locale works
again.
(locale-modules): locale has no --dump option anymore. Remove
ctypedump.
* locale/programs/config.h: Don't declare euidaccess.
Use #include_next to get libc's config.h.
* locale/programs/ctypedump.c: Not needed anymore. Dump option
of locale is removed.
* locale/programs/locale.c: Adapt for new locale implementation.
* stdio-common/_itoa.h (_itoa_word): Define as inline function.
* stdio-common/_itoa.c (_itoa_lower_digits, _itoa_upper_digits):
Don't declare static because used in _itoa_word inline function.
* stdio-common/printf-parse.h: Prepare for use in wide-char
stdio implementation.
(find_spec): Take additional argument to work with mbrlen instead
of mblen.
(parse_one_spec): Ditto.
* stdio-common/printf-prs.c: Prepare for use in wide-char
stdio implementation.
* stdio-common/printf.h: Mark change for wide-char handling.
Changing it now would result in incompatibilities.
* stdio-common/vfprintf.c: New and fast implementation.
* wcsmbs/Makefile (routines): Remove pre-ISO C multibyte functions
mbsadvance, mbscat, mbschr, mbscmp, mbscpy, mbsdup, mbslen,
mbsncat, mbsncmp, mbsncpy, mbsrchr, mbstomb.
Change wcswcs to wcsstr.
Add wmemchr, wmemcmp, wmemcpy, wmemmove, wmemset, btowc, wctob,
mbsinit, mbrlen, mbrtowc, wcrtomb, mbsrtowcs, wcsrtombs.
* wcsmbs/btowc.c, wcsmbs/mbrlen.c, wcsmbs/mbrtowc.c,
wcsmbs/mbsinit.c, wcsmbs/mbsrtowcs.c, wcsmbs/wchar.h,
wcsmbs/wcrtomb.c, wcsmbs/wcsrtombs.c, wcsmbs/wcsstr.c,
wcsmbs/wctob.c, wcsmbs/wmemchr.c, wcsmbs/wmemcmp.c,
wcsmbs/wmemcpy.c, wcsmbs/wmemmove.c, wcsmbs/wmemset.c: New
function according to ISO C amendment 1.
* wchar.h: Wrapper around "wcsmbs/wchar.h".
* wcsmbs/wcscat.c, wcsmbs/wcschr.c, wcsmbs/wcscmp.c,
wcsmbs/wcscpy.c, wcsmbs/wcscspn.c, wcsmbs/wcsdup.c,
wcsmbs/wcslen.c, wcsmbs/wcsncat.c, wcsmbs/wcsncmp.c,
wcsmbs/wcsncpy.c, wcsmbs/wcspbrk.c, wcsmbs/wcsrchr.c,
wcsmbs/wcsspn.c, wcsmbs/wcstok.c: Changed to conform with ISO C
amendment 1.
* wcsmbs/mbsadvance.c, wcsmbs/mbscat.c, wcsmbs/mbschr.c,
wcsmbs/mbscmp.c, wcsmbs/mbscpy.c, wcsmbs/mbsdup.c,
wcsmbs/mbslen.c, wcsmbs/mbsncat.c, wcsmbs/mbsncmp.c,
wcsmbs/mbsncpy.c, wcsmbs/mbsrchr.c, wcsmbs/mbstomb.c,
wcsmbs/mbstr.h, wcsmbs/wcstr.h, wcsmbs/wcswcs.c: Removed.
Implement functions from early drafts, not part of final standard.
Sun Mar 31 16:50:41 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* setjmp/setjmp.h (jmp_buf): Change gratuitous struct tag name to
__jmp_bug_tag so its C++ implicit typedef does not conflict with the
__jmp_buf typedef.
* Makerules (BUILD_CFLAGS) [! objdir]: Use $(..)config.h when
compiling in the source directories.
Fri Mar 29 16:26:35 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* sysdeps/libm-ieee754/w_gamma.c: Use signgam instead of __signgam.
* sysdeps/libm-ieee754/s_signgam.c: Undo last change.
1996-04-02 15:27:17 +02:00
|
|
|
}
|
1998-04-08 22:27:31 +02:00
|
|
|
weak_alias (__btowc, btowc)
|