aboutsummaryrefslogtreecommitdiffstats
path: root/include/runetype.h
diff options
context:
space:
mode:
authorMike Barcroft <mike@FreeBSD.org>2002-09-06 04:22:54 +0000
committerMike Barcroft <mike@FreeBSD.org>2002-09-06 04:22:54 +0000
commit423eb945c0482f912a50d706ed500eb50029132d (patch)
tree90db8c742daf9a123853305efdf6dba6606ab4b9 /include/runetype.h
parentf915be3badec51d1b2ca4b3b0cb3b9532c4c9f59 (diff)
downloadsrc-423eb945c0482f912a50d706ed500eb50029132d.tar.gz
src-423eb945c0482f912a50d706ed500eb50029132d.zip
o Fix namespace scope issues in <ctype.h> by using the relatively new
visibility primitives. o Implement _tolower() and _toupper() POSIX.1-2001 (XSI) macros in <ctype.h>. o Reduce pollution in <runetype.h> by removing typedefs and using implementation namespaced types. o Add a typedef in <rune.h> to compensate for <runetype.h> losing its typedefs. Reviewed by: bde
Notes
Notes: svn path=/head/; revision=102998
Diffstat (limited to 'include/runetype.h')
-rw-r--r--include/runetype.h33
1 files changed, 8 insertions, 25 deletions
diff --git a/include/runetype.h b/include/runetype.h
index 522206df410d..b6435ef0e79f 100644
--- a/include/runetype.h
+++ b/include/runetype.h
@@ -43,23 +43,6 @@
#include <sys/cdefs.h>
#include <sys/_types.h>
-#ifndef _RUNE_T_DECLARED
-typedef __rune_t rune_t;
-#define _RUNE_T_DECLARED
-#endif
-
-#ifndef _SIZE_T_DECLARED
-typedef __size_t size_t;
-#define _SIZE_T_DECLARED
-#endif
-
-#ifndef __cplusplus
-#ifndef _WCHAR_T_DECLARED
-typedef __wchar_t wchar_t;
-#define _WCHAR_T_DECLARED
-#endif
-#endif
-
#define _CACHED_RUNES (1 <<8 ) /* Must be a power of 2 */
#define _CRMASK (~(_CACHED_RUNES - 1))
@@ -67,9 +50,9 @@ typedef __wchar_t wchar_t;
* The lower 8 bits of runetype[] contain the digit value of the rune.
*/
typedef struct {
- rune_t min; /* First rune of the range */
- rune_t max; /* Last rune (inclusive) of the range */
- rune_t map; /* What first maps to in maps */
+ __rune_t min; /* First rune of the range */
+ __rune_t max; /* Last rune (inclusive) of the range */
+ __rune_t map; /* What first maps to in maps */
unsigned long *types; /* Array of types in range */
} _RuneEntry;
@@ -82,13 +65,13 @@ typedef struct {
char magic[8]; /* Magic saying what version we are */
char encoding[32]; /* ASCII name of this encoding */
- rune_t (*sgetrune)(const char *, size_t, char const **);
- int (*sputrune)(rune_t, char *, size_t, char **);
- rune_t invalid_rune;
+ __rune_t (*sgetrune)(const char *, __size_t, char const **);
+ int (*sputrune)(__rune_t, char *, __size_t, char **);
+ __rune_t invalid_rune;
unsigned long runetype[_CACHED_RUNES];
- rune_t maplower[_CACHED_RUNES];
- rune_t mapupper[_CACHED_RUNES];
+ __rune_t maplower[_CACHED_RUNES];
+ __rune_t mapupper[_CACHED_RUNES];
/*
* The following are to deal with Runes larger than _CACHED_RUNES - 1.