History log of /netbsd-current/include/wchar.h
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.45 31-Jul-2023 christos

new gdb needs wmempcpy, give it to it.


Revision tags: netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
# 1.44 20-Mar-2020 joerg

Fix visibility of various C99 features, esp. for C++11.


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE is-mlppp-base netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118
# 1.43 28-Dec-2018 maya

Limit wcslcat, wcslcpy visibility to _NETBSD_SOURCE
wcswidth, wcwidth to POSIX.1-2001 or _NETBSD_SOURCE

Updated patch from kretschm in PR standards/39422


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.42 15-Oct-2016 kamil

branches: 1.42.8; 1.42.12; 1.42.14;
Import wcsnlen(3) to libc

The wcsnlen(3) function conforms to POSIX.1-2008 and is an addition to the
ISO C standard.

size_t wcsnlen(const wchar_t *s, size_t maxlen);

The wcsnlen(3) function computes the number of wide-characters in a wide-
-string to which s points, not including NULL terminating wide-character
code and checking no more than maxlen wide-characters. This function never
examines wide-characters beyond a wide-string of maxlen size.


This function is a safer version of wcslen(3):

size_t wcslen(const wchar_t *s);


Update STANDARDS section of wmemchr(3) describing wide-character functions.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.41 13-Oct-2014 christos

branches: 1.41.2;
add open_{,w}memstream


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.40 21-Nov-2013 degroote

Expose properly vfwscanf and friends for POSIX_SOURCE >= 200112L


# 1.39 19-Aug-2013 joerg

Add nl_langinfo_l, catopen_l and wcsftime_l.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.38 28-May-2013 joerg

Add mbsnrtowcs and wcsnrtombs. Approved by core.


# 1.37 19-Apr-2013 joerg

More __BEGIN_DECLS / __END_DECLS wrappers.


# 1.36 19-Apr-2013 joerg

Add scanf_l and wscanf_l families.


# 1.35 19-Apr-2013 joerg

Add explicit locale versions for the printf family. Replace asprintf,
snprintf and sprintf with simple wrappers around the corresponding
va_list functions to reduce code duplication.


# 1.34 18-Apr-2013 joerg

Add wcscoll_l, wcsxfrm_l, wcsncasecmp_l, wcscasecmp_l, btowc_l,
mbrlen_l, mbsinit_l, mbsrtowcs_l, wcrtomb_l, wcsrtombs_l and wctob_l.


# 1.33 18-Apr-2013 joerg

Add wcstof_l, wcstod_l and wcstold_l.


# 1.32 16-Apr-2013 joerg

Add support for wcstoimax_l and friends.


# 1.31 16-Apr-2013 joerg

Also add prototypes for wcwidth_l and wcswidth_l.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.30 17-Jul-2011 joerg

branches: 1.30.2; 1.30.4; 1.30.8;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.


Revision tags: cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 uebayasi-xip-base2 uebayasi-xip-base1
# 1.29 27-Mar-2010 tnozaki

1. {wctype,wctrans,mbstate}_t: switch MD to MI like other
libc implementation (such as *BSD and glibc2).

2. don't typedef void * wc{type,trans}_t, suggested by soda@-san.
it may pass through compiler type check, it's harmful.
so i introduce dummy struct __tag_wc{type,trans}_t(iconv_t already does).

no ABI change was made.


Revision tags: uebayasi-xip-base matt-premerge-20091211
# 1.28 15-Nov-2009 christos

branches: 1.28.2;
Don't define wchar_t for c++; it is native in the language. From Alexander
Nasonov


Revision tags: matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 christos-time_t-nbase christos-time_t-base netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 wrstuden-revivesa-base
# 1.27 28-Apr-2008 martin

branches: 1.27.8; 1.27.10; 1.27.18;
Remove clause 3 and 4 from TNF licenses


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase yamt-pf42-baseX yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base netbsd-4-base
# 1.26 22-Aug-2006 christos

branches: 1.26.16;
PR/34238: Aleksey Cheusov: add wcsdup, wcscasecmp and wcsncasecmp functions


Revision tags: abandoned-netbsd-4-base
# 1.25 15-Apr-2006 tnozaki

branches: 1.25.2;
add c99 wcstof(3) and wcstold(3).
requested by skrll AT netbsd DOT org, thanks.

bump libc minor 138 -> 139.


# 1.24 15-May-2005 christos

add t_putws


# 1.23 14-May-2005 christos

Wide stdio functions.


# 1.22 30-Mar-2005 christos

PR/29826: J. T. Conklin: Add wcsftime(3) (from FreeBSD)


Revision tags: netbsd-3-base
# 1.21 03-Feb-2005 perry

branches: 1.21.2;
de-__P -- the hack is long since useless. Discussed with christos,
matt, kleink, others. Approved by christos.


# 1.20 08-May-2004 kleink

C99: Provide WCHAR_{MAX,MIN} via <machine/wchar_limits.h> (we'll also
provide WINT_{MAX,MIN} along with it).
Fixes PR standards/24040 from Masao Uebayashi.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.19 08-Jul-2003 itojun

prototype must not have variable name


# 1.18 28-Apr-2003 bjh21

Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
!defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them. In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.


# 1.17 11-Mar-2003 tshiozak

add wcstoll, wcstoimax, wcstoull and wcstoumax. (lib/20656)
- these are defined in C99 (wcsto[ui]max) and SUSv3.
- these implementations are written by sigsegv@s25.xrea.com,
derived from NetBSD's wcstol/wcstoul.
- I just added some comments.


# 1.16 07-Mar-2003 tshiozak

add fgetws() and fputws() (lib/20576).

Note: fgetws.c, fgetws.3, fputws.c and fputws.3 are obtained from FreeBSD,
and fitted by sigsegv@infoseek.jp and me.


# 1.15 05-Mar-2003 tshiozak

changes related to lib/20576 and lib/20577.
- add wcstok() and wcswcs(),
- add wcstok(3),
- move btowc() and wctob() into each ctype modules,
- bump ctype interface ABI version,
- bump i18n modules' minor and
- update sets.
and fix a stupid bug in _RUNE_ISCACHED macro.


# 1.14 03-Mar-2003 tshiozak

- add wctob() function. (I forgot it at the last commit.)
- fix btowc(); I quite misunderstood about it.


# 1.13 02-Mar-2003 tshiozak

add some ISO C 1995 I18N functions and types:
btowc, wctrans, towctrans, wcscoll, wcsxfrm, wctype_t and wctrans_t.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.12 14-Mar-2002 yamt

fix prototype of fputwc, putwc and putwchar.


# 1.11 07-Dec-2001 yamt

- make FILE structure extensible without breaking binary-compatibility.
- add fputwc, fgetwc, fwide and related functions.
- add hooks needed to maintain the orientation of file stream.


# 1.10 27-Sep-2001 yamt

add wcstod/wcstol/wcstoul.


# 1.9 29-Dec-2000 kleink

branches: 1.9.2;
Sprinkle some __restrict into <wchar.h>.


# 1.8 22-Dec-2000 itojun

wcwidth is outside of standard


# 1.7 22-Dec-2000 itojun

add wcsl{cat,cpy}


# 1.6 21-Dec-2000 itojun

first import of citrus LC_CTYPE locale. singlebyte only at this moment.
shot-term TODO:
- enable multibyte locales. this includes loadable locale modules
(#ifdef DLRUNE).
- populate LC_CTYPE definition files.
- other functions such as iconv()
- make libc functions more friendly with multibyte.
- multilingualize other LC_xx
- torture tests

XXX don't forget to "make depend" when you rebuild libc, multibyte.c is
moved from lib/libc/stdlib to lib/libc/locale.


# 1.5 21-Dec-2000 itojun

add dummy wcwidth() and wcswidth(). wcwidth() will be updated later.


# 1.4 21-Dec-2000 itojun

add wcs* functions. consier it as part of libc minor crank 68 -> 69.
add decl of WEOF into wchar.h. ISO/IEC 9899:1999(E)..


# 1.3 20-Dec-2000 itojun

ISO 9899-1990: #include <wchar.h> should pull definition for "NULL" in.
checked with Norihiro Kumagai <kuma@oasis.sharplabs.com>


# 1.2 20-Dec-2000 itojun

add wmem* functions, from citrus. bump libc shlib minor.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.1 20-Apr-2000 kleink

branches: 1.1.2;
* Move <wchar.h> from libcurses to include (for the missing functionality
is to be provided by libc).
* Define wint_t and size_t in <wchar.h> as well.


# 1.44 20-Mar-2020 joerg

Fix visibility of various C99 features, esp. for C++11.


Revision tags: netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118
# 1.43 28-Dec-2018 maya

Limit wcslcat, wcslcpy visibility to _NETBSD_SOURCE
wcswidth, wcwidth to POSIX.1-2001 or _NETBSD_SOURCE

Updated patch from kretschm in PR standards/39422


Revision tags: netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.42 15-Oct-2016 kamil

branches: 1.42.8; 1.42.12; 1.42.14;
Import wcsnlen(3) to libc

The wcsnlen(3) function conforms to POSIX.1-2008 and is an addition to the
ISO C standard.

size_t wcsnlen(const wchar_t *s, size_t maxlen);

The wcsnlen(3) function computes the number of wide-characters in a wide-
-string to which s points, not including NULL terminating wide-character
code and checking no more than maxlen wide-characters. This function never
examines wide-characters beyond a wide-string of maxlen size.


This function is a safer version of wcslen(3):

size_t wcslen(const wchar_t *s);


Update STANDARDS section of wmemchr(3) describing wide-character functions.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.41 13-Oct-2014 christos

branches: 1.41.2;
add open_{,w}memstream


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.40 21-Nov-2013 degroote

Expose properly vfwscanf and friends for POSIX_SOURCE >= 200112L


# 1.39 19-Aug-2013 joerg

Add nl_langinfo_l, catopen_l and wcsftime_l.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.38 28-May-2013 joerg

Add mbsnrtowcs and wcsnrtombs. Approved by core.


# 1.37 19-Apr-2013 joerg

More __BEGIN_DECLS / __END_DECLS wrappers.


# 1.36 19-Apr-2013 joerg

Add scanf_l and wscanf_l families.


# 1.35 19-Apr-2013 joerg

Add explicit locale versions for the printf family. Replace asprintf,
snprintf and sprintf with simple wrappers around the corresponding
va_list functions to reduce code duplication.


# 1.34 18-Apr-2013 joerg

Add wcscoll_l, wcsxfrm_l, wcsncasecmp_l, wcscasecmp_l, btowc_l,
mbrlen_l, mbsinit_l, mbsrtowcs_l, wcrtomb_l, wcsrtombs_l and wctob_l.


# 1.33 18-Apr-2013 joerg

Add wcstof_l, wcstod_l and wcstold_l.


# 1.32 16-Apr-2013 joerg

Add support for wcstoimax_l and friends.


# 1.31 16-Apr-2013 joerg

Also add prototypes for wcwidth_l and wcswidth_l.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.30 17-Jul-2011 joerg

branches: 1.30.2; 1.30.4; 1.30.8;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.


Revision tags: cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 uebayasi-xip-base2 uebayasi-xip-base1
# 1.29 27-Mar-2010 tnozaki

1. {wctype,wctrans,mbstate}_t: switch MD to MI like other
libc implementation (such as *BSD and glibc2).

2. don't typedef void * wc{type,trans}_t, suggested by soda@-san.
it may pass through compiler type check, it's harmful.
so i introduce dummy struct __tag_wc{type,trans}_t(iconv_t already does).

no ABI change was made.


Revision tags: uebayasi-xip-base matt-premerge-20091211
# 1.28 15-Nov-2009 christos

branches: 1.28.2;
Don't define wchar_t for c++; it is native in the language. From Alexander
Nasonov


Revision tags: matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 christos-time_t-nbase christos-time_t-base netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 wrstuden-revivesa-base
# 1.27 28-Apr-2008 martin

branches: 1.27.8; 1.27.10; 1.27.18;
Remove clause 3 and 4 from TNF licenses


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase yamt-pf42-baseX yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base netbsd-4-base
# 1.26 22-Aug-2006 christos

branches: 1.26.16;
PR/34238: Aleksey Cheusov: add wcsdup, wcscasecmp and wcsncasecmp functions


Revision tags: abandoned-netbsd-4-base
# 1.25 15-Apr-2006 tnozaki

branches: 1.25.2;
add c99 wcstof(3) and wcstold(3).
requested by skrll AT netbsd DOT org, thanks.

bump libc minor 138 -> 139.


# 1.24 15-May-2005 christos

add t_putws


# 1.23 14-May-2005 christos

Wide stdio functions.


# 1.22 30-Mar-2005 christos

PR/29826: J. T. Conklin: Add wcsftime(3) (from FreeBSD)


Revision tags: netbsd-3-base
# 1.21 03-Feb-2005 perry

branches: 1.21.2;
de-__P -- the hack is long since useless. Discussed with christos,
matt, kleink, others. Approved by christos.


# 1.20 08-May-2004 kleink

C99: Provide WCHAR_{MAX,MIN} via <machine/wchar_limits.h> (we'll also
provide WINT_{MAX,MIN} along with it).
Fixes PR standards/24040 from Masao Uebayashi.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.19 08-Jul-2003 itojun

prototype must not have variable name


# 1.18 28-Apr-2003 bjh21

Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
!defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them. In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.


# 1.17 11-Mar-2003 tshiozak

add wcstoll, wcstoimax, wcstoull and wcstoumax. (lib/20656)
- these are defined in C99 (wcsto[ui]max) and SUSv3.
- these implementations are written by sigsegv@s25.xrea.com,
derived from NetBSD's wcstol/wcstoul.
- I just added some comments.


# 1.16 07-Mar-2003 tshiozak

add fgetws() and fputws() (lib/20576).

Note: fgetws.c, fgetws.3, fputws.c and fputws.3 are obtained from FreeBSD,
and fitted by sigsegv@infoseek.jp and me.


# 1.15 05-Mar-2003 tshiozak

changes related to lib/20576 and lib/20577.
- add wcstok() and wcswcs(),
- add wcstok(3),
- move btowc() and wctob() into each ctype modules,
- bump ctype interface ABI version,
- bump i18n modules' minor and
- update sets.
and fix a stupid bug in _RUNE_ISCACHED macro.


# 1.14 03-Mar-2003 tshiozak

- add wctob() function. (I forgot it at the last commit.)
- fix btowc(); I quite misunderstood about it.


# 1.13 02-Mar-2003 tshiozak

add some ISO C 1995 I18N functions and types:
btowc, wctrans, towctrans, wcscoll, wcsxfrm, wctype_t and wctrans_t.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.12 14-Mar-2002 yamt

fix prototype of fputwc, putwc and putwchar.


# 1.11 07-Dec-2001 yamt

- make FILE structure extensible without breaking binary-compatibility.
- add fputwc, fgetwc, fwide and related functions.
- add hooks needed to maintain the orientation of file stream.


# 1.10 27-Sep-2001 yamt

add wcstod/wcstol/wcstoul.


# 1.9 29-Dec-2000 kleink

branches: 1.9.2;
Sprinkle some __restrict into <wchar.h>.


# 1.8 22-Dec-2000 itojun

wcwidth is outside of standard


# 1.7 22-Dec-2000 itojun

add wcsl{cat,cpy}


# 1.6 21-Dec-2000 itojun

first import of citrus LC_CTYPE locale. singlebyte only at this moment.
shot-term TODO:
- enable multibyte locales. this includes loadable locale modules
(#ifdef DLRUNE).
- populate LC_CTYPE definition files.
- other functions such as iconv()
- make libc functions more friendly with multibyte.
- multilingualize other LC_xx
- torture tests

XXX don't forget to "make depend" when you rebuild libc, multibyte.c is
moved from lib/libc/stdlib to lib/libc/locale.


# 1.5 21-Dec-2000 itojun

add dummy wcwidth() and wcswidth(). wcwidth() will be updated later.


# 1.4 21-Dec-2000 itojun

add wcs* functions. consier it as part of libc minor crank 68 -> 69.
add decl of WEOF into wchar.h. ISO/IEC 9899:1999(E)..


# 1.3 20-Dec-2000 itojun

ISO 9899-1990: #include <wchar.h> should pull definition for "NULL" in.
checked with Norihiro Kumagai <kuma@oasis.sharplabs.com>


# 1.2 20-Dec-2000 itojun

add wmem* functions, from citrus. bump libc shlib minor.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.1 20-Apr-2000 kleink

branches: 1.1.2;
* Move <wchar.h> from libcurses to include (for the missing functionality
is to be provided by libc).
* Define wint_t and size_t in <wchar.h> as well.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118
# 1.43 28-Dec-2018 maya

Limit wcslcat, wcslcpy visibility to _NETBSD_SOURCE
wcswidth, wcwidth to POSIX.1-2001 or _NETBSD_SOURCE

Updated patch from kretschm in PR standards/39422


Revision tags: pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104
# 1.42 15-Oct-2016 kamil

branches: 1.42.8; 1.42.12;
Import wcsnlen(3) to libc

The wcsnlen(3) function conforms to POSIX.1-2008 and is an addition to the
ISO C standard.

size_t wcsnlen(const wchar_t *s, size_t maxlen);

The wcsnlen(3) function computes the number of wide-characters in a wide-
-string to which s points, not including NULL terminating wide-character
code and checking no more than maxlen wide-characters. This function never
examines wide-characters beyond a wide-string of maxlen size.


This function is a safer version of wcslen(3):

size_t wcslen(const wchar_t *s);


Update STANDARDS section of wmemchr(3) describing wide-character functions.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.41 13-Oct-2014 christos

branches: 1.41.2;
add open_{,w}memstream


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.40 21-Nov-2013 degroote

Expose properly vfwscanf and friends for POSIX_SOURCE >= 200112L


# 1.39 19-Aug-2013 joerg

Add nl_langinfo_l, catopen_l and wcsftime_l.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.38 28-May-2013 joerg

Add mbsnrtowcs and wcsnrtombs. Approved by core.


# 1.37 19-Apr-2013 joerg

More __BEGIN_DECLS / __END_DECLS wrappers.


# 1.36 19-Apr-2013 joerg

Add scanf_l and wscanf_l families.


# 1.35 19-Apr-2013 joerg

Add explicit locale versions for the printf family. Replace asprintf,
snprintf and sprintf with simple wrappers around the corresponding
va_list functions to reduce code duplication.


# 1.34 18-Apr-2013 joerg

Add wcscoll_l, wcsxfrm_l, wcsncasecmp_l, wcscasecmp_l, btowc_l,
mbrlen_l, mbsinit_l, mbsrtowcs_l, wcrtomb_l, wcsrtombs_l and wctob_l.


# 1.33 18-Apr-2013 joerg

Add wcstof_l, wcstod_l and wcstold_l.


# 1.32 16-Apr-2013 joerg

Add support for wcstoimax_l and friends.


# 1.31 16-Apr-2013 joerg

Also add prototypes for wcwidth_l and wcswidth_l.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.30 17-Jul-2011 joerg

branches: 1.30.2; 1.30.4; 1.30.8;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.


Revision tags: cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 uebayasi-xip-base2 uebayasi-xip-base1
# 1.29 27-Mar-2010 tnozaki

1. {wctype,wctrans,mbstate}_t: switch MD to MI like other
libc implementation (such as *BSD and glibc2).

2. don't typedef void * wc{type,trans}_t, suggested by soda@-san.
it may pass through compiler type check, it's harmful.
so i introduce dummy struct __tag_wc{type,trans}_t(iconv_t already does).

no ABI change was made.


Revision tags: uebayasi-xip-base matt-premerge-20091211
# 1.28 15-Nov-2009 christos

branches: 1.28.2;
Don't define wchar_t for c++; it is native in the language. From Alexander
Nasonov


Revision tags: matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 christos-time_t-nbase christos-time_t-base netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 wrstuden-revivesa-base
# 1.27 28-Apr-2008 martin

branches: 1.27.8; 1.27.10; 1.27.18;
Remove clause 3 and 4 from TNF licenses


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase yamt-pf42-baseX yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base netbsd-4-base
# 1.26 22-Aug-2006 christos

branches: 1.26.16;
PR/34238: Aleksey Cheusov: add wcsdup, wcscasecmp and wcsncasecmp functions


Revision tags: abandoned-netbsd-4-base
# 1.25 15-Apr-2006 tnozaki

branches: 1.25.2;
add c99 wcstof(3) and wcstold(3).
requested by skrll AT netbsd DOT org, thanks.

bump libc minor 138 -> 139.


# 1.24 15-May-2005 christos

add t_putws


# 1.23 14-May-2005 christos

Wide stdio functions.


# 1.22 30-Mar-2005 christos

PR/29826: J. T. Conklin: Add wcsftime(3) (from FreeBSD)


Revision tags: netbsd-3-base
# 1.21 03-Feb-2005 perry

branches: 1.21.2;
de-__P -- the hack is long since useless. Discussed with christos,
matt, kleink, others. Approved by christos.


# 1.20 08-May-2004 kleink

C99: Provide WCHAR_{MAX,MIN} via <machine/wchar_limits.h> (we'll also
provide WINT_{MAX,MIN} along with it).
Fixes PR standards/24040 from Masao Uebayashi.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.19 08-Jul-2003 itojun

prototype must not have variable name


# 1.18 28-Apr-2003 bjh21

Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
!defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them. In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.


# 1.17 11-Mar-2003 tshiozak

add wcstoll, wcstoimax, wcstoull and wcstoumax. (lib/20656)
- these are defined in C99 (wcsto[ui]max) and SUSv3.
- these implementations are written by sigsegv@s25.xrea.com,
derived from NetBSD's wcstol/wcstoul.
- I just added some comments.


# 1.16 07-Mar-2003 tshiozak

add fgetws() and fputws() (lib/20576).

Note: fgetws.c, fgetws.3, fputws.c and fputws.3 are obtained from FreeBSD,
and fitted by sigsegv@infoseek.jp and me.


# 1.15 05-Mar-2003 tshiozak

changes related to lib/20576 and lib/20577.
- add wcstok() and wcswcs(),
- add wcstok(3),
- move btowc() and wctob() into each ctype modules,
- bump ctype interface ABI version,
- bump i18n modules' minor and
- update sets.
and fix a stupid bug in _RUNE_ISCACHED macro.


# 1.14 03-Mar-2003 tshiozak

- add wctob() function. (I forgot it at the last commit.)
- fix btowc(); I quite misunderstood about it.


# 1.13 02-Mar-2003 tshiozak

add some ISO C 1995 I18N functions and types:
btowc, wctrans, towctrans, wcscoll, wcsxfrm, wctype_t and wctrans_t.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.12 14-Mar-2002 yamt

fix prototype of fputwc, putwc and putwchar.


# 1.11 07-Dec-2001 yamt

- make FILE structure extensible without breaking binary-compatibility.
- add fputwc, fgetwc, fwide and related functions.
- add hooks needed to maintain the orientation of file stream.


# 1.10 27-Sep-2001 yamt

add wcstod/wcstol/wcstoul.


# 1.9 29-Dec-2000 kleink

branches: 1.9.2;
Sprinkle some __restrict into <wchar.h>.


# 1.8 22-Dec-2000 itojun

wcwidth is outside of standard


# 1.7 22-Dec-2000 itojun

add wcsl{cat,cpy}


# 1.6 21-Dec-2000 itojun

first import of citrus LC_CTYPE locale. singlebyte only at this moment.
shot-term TODO:
- enable multibyte locales. this includes loadable locale modules
(#ifdef DLRUNE).
- populate LC_CTYPE definition files.
- other functions such as iconv()
- make libc functions more friendly with multibyte.
- multilingualize other LC_xx
- torture tests

XXX don't forget to "make depend" when you rebuild libc, multibyte.c is
moved from lib/libc/stdlib to lib/libc/locale.


# 1.5 21-Dec-2000 itojun

add dummy wcwidth() and wcswidth(). wcwidth() will be updated later.


# 1.4 21-Dec-2000 itojun

add wcs* functions. consier it as part of libc minor crank 68 -> 69.
add decl of WEOF into wchar.h. ISO/IEC 9899:1999(E)..


# 1.3 20-Dec-2000 itojun

ISO 9899-1990: #include <wchar.h> should pull definition for "NULL" in.
checked with Norihiro Kumagai <kuma@oasis.sharplabs.com>


# 1.2 20-Dec-2000 itojun

add wmem* functions, from citrus. bump libc shlib minor.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.1 20-Apr-2000 kleink

branches: 1.1.2;
* Move <wchar.h> from libcurses to include (for the missing functionality
is to be provided by libc).
* Define wint_t and size_t in <wchar.h> as well.


Revision tags: pgoyette-localcount-20161104
# 1.42 15-Oct-2016 kamil

Import wcsnlen(3) to libc

The wcsnlen(3) function conforms to POSIX.1-2008 and is an addition to the
ISO C standard.

size_t wcsnlen(const wchar_t *s, size_t maxlen);

The wcsnlen(3) function computes the number of wide-characters in a wide-
-string to which s points, not including NULL terminating wide-character
code and checking no more than maxlen wide-characters. This function never
examines wide-characters beyond a wide-string of maxlen size.


This function is a safer version of wcslen(3):

size_t wcslen(const wchar_t *s);


Update STANDARDS section of wmemchr(3) describing wide-character functions.


Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.41 13-Oct-2014 christos

branches: 1.41.2;
add open_{,w}memstream


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.40 21-Nov-2013 degroote

Expose properly vfwscanf and friends for POSIX_SOURCE >= 200112L


# 1.39 19-Aug-2013 joerg

Add nl_langinfo_l, catopen_l and wcsftime_l.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.38 28-May-2013 joerg

Add mbsnrtowcs and wcsnrtombs. Approved by core.


# 1.37 19-Apr-2013 joerg

More __BEGIN_DECLS / __END_DECLS wrappers.


# 1.36 19-Apr-2013 joerg

Add scanf_l and wscanf_l families.


# 1.35 19-Apr-2013 joerg

Add explicit locale versions for the printf family. Replace asprintf,
snprintf and sprintf with simple wrappers around the corresponding
va_list functions to reduce code duplication.


# 1.34 18-Apr-2013 joerg

Add wcscoll_l, wcsxfrm_l, wcsncasecmp_l, wcscasecmp_l, btowc_l,
mbrlen_l, mbsinit_l, mbsrtowcs_l, wcrtomb_l, wcsrtombs_l and wctob_l.


# 1.33 18-Apr-2013 joerg

Add wcstof_l, wcstod_l and wcstold_l.


# 1.32 16-Apr-2013 joerg

Add support for wcstoimax_l and friends.


# 1.31 16-Apr-2013 joerg

Also add prototypes for wcwidth_l and wcswidth_l.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.30 17-Jul-2011 joerg

branches: 1.30.2; 1.30.4; 1.30.8;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.


Revision tags: cherry-xenmp-base uebayasi-xip-base7 bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 uebayasi-xip-base6 uebayasi-xip-base5 uebayasi-xip-base4 uebayasi-xip-base3 uebayasi-xip-base2 uebayasi-xip-base1
# 1.29 27-Mar-2010 tnozaki

1. {wctype,wctrans,mbstate}_t: switch MD to MI like other
libc implementation (such as *BSD and glibc2).

2. don't typedef void * wc{type,trans}_t, suggested by soda@-san.
it may pass through compiler type check, it's harmful.
so i introduce dummy struct __tag_wc{type,trans}_t(iconv_t already does).

no ABI change was made.


Revision tags: uebayasi-xip-base matt-premerge-20091211
# 1.28 15-Nov-2009 christos

branches: 1.28.2;
Don't define wchar_t for c++; it is native in the language. From Alexander
Nasonov


Revision tags: matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 christos-time_t-nbase christos-time_t-base netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 wrstuden-revivesa-base
# 1.27 28-Apr-2008 martin

branches: 1.27.8; 1.27.10; 1.27.18;
Remove clause 3 and 4 from TNF licenses


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase yamt-pf42-baseX yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base netbsd-4-base
# 1.26 22-Aug-2006 christos

branches: 1.26.16;
PR/34238: Aleksey Cheusov: add wcsdup, wcscasecmp and wcsncasecmp functions


Revision tags: abandoned-netbsd-4-base
# 1.25 15-Apr-2006 tnozaki

branches: 1.25.2;
add c99 wcstof(3) and wcstold(3).
requested by skrll AT netbsd DOT org, thanks.

bump libc minor 138 -> 139.


# 1.24 15-May-2005 christos

add t_putws


# 1.23 14-May-2005 christos

Wide stdio functions.


# 1.22 30-Mar-2005 christos

PR/29826: J. T. Conklin: Add wcsftime(3) (from FreeBSD)


Revision tags: netbsd-3-base
# 1.21 03-Feb-2005 perry

branches: 1.21.2;
de-__P -- the hack is long since useless. Discussed with christos,
matt, kleink, others. Approved by christos.


# 1.20 08-May-2004 kleink

C99: Provide WCHAR_{MAX,MIN} via <machine/wchar_limits.h> (we'll also
provide WINT_{MAX,MIN} along with it).
Fixes PR standards/24040 from Masao Uebayashi.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.19 08-Jul-2003 itojun

prototype must not have variable name


# 1.18 28-Apr-2003 bjh21

Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
!defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them. In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.


# 1.17 11-Mar-2003 tshiozak

add wcstoll, wcstoimax, wcstoull and wcstoumax. (lib/20656)
- these are defined in C99 (wcsto[ui]max) and SUSv3.
- these implementations are written by sigsegv@s25.xrea.com,
derived from NetBSD's wcstol/wcstoul.
- I just added some comments.


# 1.16 07-Mar-2003 tshiozak

add fgetws() and fputws() (lib/20576).

Note: fgetws.c, fgetws.3, fputws.c and fputws.3 are obtained from FreeBSD,
and fitted by sigsegv@infoseek.jp and me.


# 1.15 05-Mar-2003 tshiozak

changes related to lib/20576 and lib/20577.
- add wcstok() and wcswcs(),
- add wcstok(3),
- move btowc() and wctob() into each ctype modules,
- bump ctype interface ABI version,
- bump i18n modules' minor and
- update sets.
and fix a stupid bug in _RUNE_ISCACHED macro.


# 1.14 03-Mar-2003 tshiozak

- add wctob() function. (I forgot it at the last commit.)
- fix btowc(); I quite misunderstood about it.


# 1.13 02-Mar-2003 tshiozak

add some ISO C 1995 I18N functions and types:
btowc, wctrans, towctrans, wcscoll, wcsxfrm, wctype_t and wctrans_t.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.12 14-Mar-2002 yamt

fix prototype of fputwc, putwc and putwchar.


# 1.11 07-Dec-2001 yamt

- make FILE structure extensible without breaking binary-compatibility.
- add fputwc, fgetwc, fwide and related functions.
- add hooks needed to maintain the orientation of file stream.


# 1.10 27-Sep-2001 yamt

add wcstod/wcstol/wcstoul.


# 1.9 29-Dec-2000 kleink

branches: 1.9.2;
Sprinkle some __restrict into <wchar.h>.


# 1.8 22-Dec-2000 itojun

wcwidth is outside of standard


# 1.7 22-Dec-2000 itojun

add wcsl{cat,cpy}


# 1.6 21-Dec-2000 itojun

first import of citrus LC_CTYPE locale. singlebyte only at this moment.
shot-term TODO:
- enable multibyte locales. this includes loadable locale modules
(#ifdef DLRUNE).
- populate LC_CTYPE definition files.
- other functions such as iconv()
- make libc functions more friendly with multibyte.
- multilingualize other LC_xx
- torture tests

XXX don't forget to "make depend" when you rebuild libc, multibyte.c is
moved from lib/libc/stdlib to lib/libc/locale.


# 1.5 21-Dec-2000 itojun

add dummy wcwidth() and wcswidth(). wcwidth() will be updated later.


# 1.4 21-Dec-2000 itojun

add wcs* functions. consier it as part of libc minor crank 68 -> 69.
add decl of WEOF into wchar.h. ISO/IEC 9899:1999(E)..


# 1.3 20-Dec-2000 itojun

ISO 9899-1990: #include <wchar.h> should pull definition for "NULL" in.
checked with Norihiro Kumagai <kuma@oasis.sharplabs.com>


# 1.2 20-Dec-2000 itojun

add wmem* functions, from citrus. bump libc shlib minor.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.1 20-Apr-2000 kleink

branches: 1.1.2;
* Move <wchar.h> from libcurses to include (for the missing functionality
is to be provided by libc).
* Define wint_t and size_t in <wchar.h> as well.