summaryrefslogtreecommitdiff
path: root/lib/libc/locale/runetype.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 /lib/libc/locale/runetype.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 'lib/libc/locale/runetype.h')
-rw-r--r--lib/libc/locale/runetype.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/lib/libc/locale/runetype.h b/lib/libc/locale/runetype.h
index f47d6a03129..e170ff7d4a7 100644
--- a/lib/libc/locale/runetype.h
+++ b/lib/libc/locale/runetype.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: runetype.h,v 1.1 2005/04/14 20:59:10 espie Exp $ */
+/* $OpenBSD: runetype.h,v 1.2 2005/05/11 18:44:12 espie Exp $ */
#ifndef _NB_RUNETYPE_H_
#define _NB_RUNETYPE_H_
@@ -8,4 +8,27 @@
typedef uint32_t __nbrune_t;
+typedef uint32_t _RuneType;
+
+/*
+ * wctype stuffs.
+ */
+typedef struct _WCTypeEntry {
+ char *te_name;
+ _RuneType te_mask;
+} _WCTypeEntry;
+#define _WCTYPE_INDEX_ALNUM 0
+#define _WCTYPE_INDEX_ALPHA 1
+#define _WCTYPE_INDEX_BLANK 2
+#define _WCTYPE_INDEX_CNTRL 3
+#define _WCTYPE_INDEX_DIGIT 4
+#define _WCTYPE_INDEX_GRAPH 5
+#define _WCTYPE_INDEX_LOWER 6
+#define _WCTYPE_INDEX_PRINT 7
+#define _WCTYPE_INDEX_PUNCT 8
+#define _WCTYPE_INDEX_SPACE 9
+#define _WCTYPE_INDEX_UPPER 10
+#define _WCTYPE_INDEX_XDIGIT 11
+#define _WCTYPE_NINDEXES 12
+
#endif