summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2004-06-23 07:01:44 +0000
committertjr <tjr@FreeBSD.org>2004-06-23 07:01:44 +0000
commitd04fd4700f3a09552b35dfa53c683d0404754383 (patch)
treed89ed2a150bbb4fcdbff69b2c14d5d87b5dfbdfe /include
parent663370f9413d6ac8d722e85a009c71e6c321fdc0 (diff)
downloadFreeBSD-src-d04fd4700f3a09552b35dfa53c683d0404754383.zip
FreeBSD-src-d04fd4700f3a09552b35dfa53c683d0404754383.tar.gz
Prefix the names of members of _RuneLocale and its sub-structures
with ``__'' to avoid polluting the namespace. This doesn't change the documented rune interface at all, but breaks applications that accessed _RuneLocale directly.
Diffstat (limited to 'include')
-rw-r--r--include/_ctype.h8
-rw-r--r--include/ctype.h8
-rw-r--r--include/rune.h10
-rw-r--r--include/runetype.h38
4 files changed, 31 insertions, 33 deletions
diff --git a/include/_ctype.h b/include/_ctype.h
index 6985410..7ab3bbf 100644
--- a/include/_ctype.h
+++ b/include/_ctype.h
@@ -190,7 +190,7 @@ static __inline int
__maskrune(__ct_rune_t _c, unsigned long _f)
{
return ((_c < 0 || _c >= _CACHED_RUNES) ? ___runetype(_c) :
- _CurrentRuneLocale->runetype[_c]) & _f;
+ _CurrentRuneLocale->__runetype[_c]) & _f;
}
static __inline int
@@ -203,21 +203,21 @@ static __inline int
__isctype(__ct_rune_t _c, unsigned long _f)
{
return (_c < 0 || _c >= _CACHED_RUNES) ? 0 :
- !!(_DefaultRuneLocale.runetype[_c] & _f);
+ !!(_DefaultRuneLocale.__runetype[_c] & _f);
}
static __inline __ct_rune_t
__toupper(__ct_rune_t _c)
{
return (_c < 0 || _c >= _CACHED_RUNES) ? ___toupper(_c) :
- _CurrentRuneLocale->mapupper[_c];
+ _CurrentRuneLocale->__mapupper[_c];
}
static __inline __ct_rune_t
__tolower(__ct_rune_t _c)
{
return (_c < 0 || _c >= _CACHED_RUNES) ? ___tolower(_c) :
- _CurrentRuneLocale->maplower[_c];
+ _CurrentRuneLocale->__maplower[_c];
}
#else /* not using inlines */
diff --git a/include/ctype.h b/include/ctype.h
index 6985410..7ab3bbf 100644
--- a/include/ctype.h
+++ b/include/ctype.h
@@ -190,7 +190,7 @@ static __inline int
__maskrune(__ct_rune_t _c, unsigned long _f)
{
return ((_c < 0 || _c >= _CACHED_RUNES) ? ___runetype(_c) :
- _CurrentRuneLocale->runetype[_c]) & _f;
+ _CurrentRuneLocale->__runetype[_c]) & _f;
}
static __inline int
@@ -203,21 +203,21 @@ static __inline int
__isctype(__ct_rune_t _c, unsigned long _f)
{
return (_c < 0 || _c >= _CACHED_RUNES) ? 0 :
- !!(_DefaultRuneLocale.runetype[_c] & _f);
+ !!(_DefaultRuneLocale.__runetype[_c] & _f);
}
static __inline __ct_rune_t
__toupper(__ct_rune_t _c)
{
return (_c < 0 || _c >= _CACHED_RUNES) ? ___toupper(_c) :
- _CurrentRuneLocale->mapupper[_c];
+ _CurrentRuneLocale->__mapupper[_c];
}
static __inline __ct_rune_t
__tolower(__ct_rune_t _c)
{
return (_c < 0 || _c >= _CACHED_RUNES) ? ___tolower(_c) :
- _CurrentRuneLocale->maplower[_c];
+ _CurrentRuneLocale->__maplower[_c];
}
#else /* not using inlines */
diff --git a/include/rune.h b/include/rune.h
index cc1e13e..0bb6f43 100644
--- a/include/rune.h
+++ b/include/rune.h
@@ -48,13 +48,11 @@
typedef __rune_t rune_t;
#endif
-#define _INVALID_RUNE _CurrentRuneLocale->invalid_rune
+#define _INVALID_RUNE _CurrentRuneLocale->__invalid_rune
-#define __sgetrune _CurrentRuneLocale->sgetrune
-#define __sputrune _CurrentRuneLocale->sputrune
-
-#define sgetrune(s, n, r) (*__sgetrune)((s), (n), (r))
-#define sputrune(c, s, n, r) (*__sputrune)((c), (s), (n), (r))
+#define sgetrune(s, n, r) (_CurrentRuneLocale->__sgetrune)((s), (n), (r))
+#define sputrune(c, s, n, r) (_CurrentRuneLocale->__sputrune)((c), (s), \
+ (n), (r))
__BEGIN_DECLS
char *mbrune(const char *, rune_t);
diff --git a/include/runetype.h b/include/runetype.h
index b6435ef..1625ef8 100644
--- a/include/runetype.h
+++ b/include/runetype.h
@@ -50,40 +50,40 @@
* 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 */
- unsigned long *types; /* Array of types in range */
+ __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;
typedef struct {
- int nranges; /* Number of ranges stored */
- _RuneEntry *ranges; /* Pointer to the ranges */
+ int __nranges; /* Number of ranges stored */
+ _RuneEntry *__ranges; /* Pointer to the ranges */
} _RuneRange;
typedef struct {
- char magic[8]; /* Magic saying what version we are */
- char encoding[32]; /* ASCII name of this encoding */
+ 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];
+ unsigned long __runetype[_CACHED_RUNES];
+ __rune_t __maplower[_CACHED_RUNES];
+ __rune_t __mapupper[_CACHED_RUNES];
/*
* The following are to deal with Runes larger than _CACHED_RUNES - 1.
* Their data is actually contiguous with this structure so as to make
* it easier to read/write from/to disk.
*/
- _RuneRange runetype_ext;
- _RuneRange maplower_ext;
- _RuneRange mapupper_ext;
+ _RuneRange __runetype_ext;
+ _RuneRange __maplower_ext;
+ _RuneRange __mapupper_ext;
- void *variable; /* Data which depends on the encoding */
- int variable_len; /* how long that data is */
+ void *__variable; /* Data which depends on the encoding */
+ int __variable_len; /* how long that data is */
} _RuneLocale;
#define _RUNE_MAGIC_1 "RuneMagi" /* Indicates version 0 of RuneLocale */
OpenPOWER on IntegriCloud