summaryrefslogtreecommitdiff
path: root/include/wchar.h
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2005-05-11 18:44:14 +0000
committerMarc Espie <espie@cvs.openbsd.org>2005-05-11 18:44:14 +0000
commit7847cf8cac3ace56d062c6d1962f2df02d25d329 (patch)
treec860a1a863e5b2697b9daf1ea627279ec05d3ced /include/wchar.h
parent8d8d7a1eeeb3509c69bb27b3d97c04a887175599 (diff)
major abi changes:
* introduce the mbstate_t typedef. impacts gnu libiconv, which has already been taken care of. * Prepare for mb stuff to really exist, replace macro MB_CUR_MAX with an external variable __mb_cur_max (impacts libX11 and various ports). * use mbstate in all the mb <-> wchar functions with state. * add a stub iswctype function allowing some ports to compile. bash and gdiff are missing wcscoll, and need to be told there's no i18n until this is fixed. Discussed and matthieu, otto, millert, kettenis, deraadt. Major libc bump
Diffstat (limited to 'include/wchar.h')
-rw-r--r--include/wchar.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/wchar.h b/include/wchar.h
index a6703cd8d90..c7bd964d01e 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: wchar.h,v 1.1 2005/04/14 20:59:10 espie Exp $ */
+/* $OpenBSD: wchar.h,v 1.2 2005/05/11 18:44:12 espie Exp $ */
/* $NetBSD: wchar.h,v 1.16 2003/03/07 07:11:35 tshiozak Exp $ */
/*-
@@ -84,6 +84,11 @@ typedef _BSD_WCHAR_T_ wchar_t;
#undef _BSD_WCHAR_T_
#endif
+#ifdef _BSD_MBSTATE_T_
+typedef _BSD_MBSTATE_T_ mbstate_t;
+#undef _BSD_MBSTATE_T_
+#endif
+
#ifdef _BSD_WINT_T_
typedef _BSD_WINT_T_ wint_t;
#undef _BSD_WINT_T_
@@ -99,6 +104,14 @@ typedef _BSD_SIZE_T_ size_t;
#endif
__BEGIN_DECLS
+wint_t btowc(int);
+size_t mbrlen(const char * __restrict, size_t, mbstate_t * __restrict);
+size_t mbrtowc(wchar_t * __restrict, const char * __restrict, size_t,
+ mbstate_t * __restrict);
+int mbsinit(const mbstate_t *);
+size_t mbsrtowcs(wchar_t * __restrict, const char ** __restrict, size_t,
+ mbstate_t * __restrict);
+size_t wcrtomb(char * __restrict, wchar_t, mbstate_t * __restrict);
wchar_t *wcscat(wchar_t * __restrict, const wchar_t * __restrict);
wchar_t *wcschr(const wchar_t *, wchar_t);
int wcscmp(const wchar_t *, const wchar_t *);
@@ -113,6 +126,8 @@ wchar_t *wcsncpy(wchar_t * __restrict , const wchar_t * __restrict,
size_t);
wchar_t *wcspbrk(const wchar_t *, const wchar_t *);
wchar_t *wcsrchr(const wchar_t *, wchar_t);
+size_t wcsrtombs(char * __restrict, const wchar_t ** __restrict, size_t,
+ mbstate_t * __restrict);
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,
@@ -128,6 +143,7 @@ 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 wctob(wint_t);
__END_DECLS
#endif /* !_WCHAR_H_ */