From 14a721a9a327a1a27f3228c65989fbcc9728b97b Mon Sep 17 00:00:00 2001 From: espie <> Date: Fri, 1 Jul 2005 08:59:27 +0000 Subject: [PATCH] Add a few missing functions so that wctype.h/wchar.h are more or less uptodate, namely, wcsto(u)l(l) family, wcstod, stubs from wctrans/towctrans crank minor. okay millert@, jmc@. --- src/include/wchar.h | 21 +++++++++++++++++++-- src/include/wctype.h | 8 +++++--- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/include/wchar.h b/src/include/wchar.h index 82db7449..161d1b2f 100644 --- a/src/include/wchar.h +++ b/src/include/wchar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wchar.h,v 1.5 2005/06/20 10:46:34 espie Exp $ */ +/* $OpenBSD: wchar.h,v 1.6 2005/07/01 08:59:27 espie Exp $ */ /* $NetBSD: wchar.h,v 1.16 2003/03/07 07:11:35 tshiozak Exp $ */ /*- @@ -134,6 +134,7 @@ size_t wcsspn(const wchar_t *, const wchar_t *); wchar_t *wcsstr(const wchar_t *, const wchar_t *); wchar_t *wcstok(wchar_t * __restrict, const wchar_t * __restrict, wchar_t ** __restrict); +size_t wcsxfrm(wchar_t *, const wchar_t *, size_t); wchar_t *wcswcs(const wchar_t *, const wchar_t *); wchar_t *wmemchr(const wchar_t *, wchar_t, size_t); int wmemcmp(const wchar_t *, const wchar_t *, size_t); @@ -144,9 +145,25 @@ wchar_t *wmemset(wchar_t *, wchar_t, size_t); size_t wcslcat(wchar_t *, const wchar_t *, size_t); size_t wcslcpy(wchar_t *, const wchar_t *, size_t); +int wcswidth(const wchar_t *, size_t); int wctob(wint_t); int wcscoll(const wchar_t *, const wchar_t *); -size_t wcsxfrm(wchar_t *, const wchar_t *, size_t); +int wcwidth(wchar_t); + +double wcstod(const wchar_t * __restrict, wchar_t ** __restrict); +long int wcstol(const wchar_t * __restrict, wchar_t ** __restrict, int base); +unsigned long int wcstoul(const wchar_t * __restrict, wchar_t ** __restrict, + int base); + +#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \ + defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) > 199901L +/* LONGLONG */ +long long int wcstoll(const wchar_t * __restrict, + wchar_t ** __restrict, int base); +/* LONGLONG */ +unsigned long long int wcstoull(const wchar_t * __restrict, + wchar_t ** __restrict, int base); +#endif wint_t ungetwc(wint_t, FILE *); wint_t fgetwc(FILE *); diff --git a/src/include/wctype.h b/src/include/wctype.h index e8058e62..051c2730 100644 --- a/src/include/wctype.h +++ b/src/include/wctype.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wctype.h,v 1.3 2005/05/11 18:44:12 espie Exp $ */ +/* $OpenBSD: wctype.h,v 1.4 2005/07/01 08:59:27 espie Exp $ */ /* $NetBSD: wctype.h,v 1.5 2003/03/02 22:18:11 tshiozak Exp $ */ /*- @@ -67,10 +67,12 @@ int iswpunct(wint_t); int iswspace(wint_t); int iswupper(wint_t); int iswxdigit(wint_t); +int iswctype(wint_t, wctype_t); +wint_t towctrans(wint_t, wctrans_t); wint_t towlower(wint_t); wint_t towupper(wint_t); -int iswctype(wint_t, wctype_t); -wctype_t wctype(const char *); +wctrans_t wctrans(const char *); +wctype_t wctype(const char *); __END_DECLS #endif /* _WCTYPE_H_ */