summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ctype/_ctype.h20
-rw-r--r--src/ctype/isblank.c2
-rw-r--r--src/ctype/iscntrl.c2
-rw-r--r--src/ctype/isgraph.c2
-rw-r--r--src/ctype/islower.c2
-rw-r--r--src/ctype/isprint.c2
-rw-r--r--src/ctype/ispunct.c2
-rw-r--r--src/ctype/isspace.c2
-rw-r--r--src/ctype/isupper.c2
-rw-r--r--src/ctype/isxdigit.c2
-rw-r--r--src/ctype/tolower.c2
-rw-r--r--src/ctype/toupper.c2
-rw-r--r--src/nonstd/_locale.h4
-rw-r--r--src/nonstd/ctype-internal.ref3
-rw-r--r--src/nonstd/ctype_t.c14
-rw-r--r--src/wctype/_wctype.h1
-rw-r--r--src/wctype/wctrans.c2
-rw-r--r--src/wctype/wctype.c2
18 files changed, 36 insertions, 32 deletions
diff --git a/src/ctype/_ctype.h b/src/ctype/_ctype.h
new file mode 100644
index 00000000..fa584da6
--- /dev/null
+++ b/src/ctype/_ctype.h
@@ -0,0 +1,20 @@
+#ifndef ___CTYPE_H__
+#define ___CTYPE_H__
+
+#include "nonstd/internal.h"
+
+typedef enum {
+ CT_ALPHA = (1 << 0),
+ CT_CNTRL = (1 << 1),
+ CT_DIGIT = (1 << 2),
+ CT_GRAPH = (1 << 3),
+ CT_LOWER = (1 << 4),
+ CT_PRINT = (1 << 5),
+ CT_PUNCT = (1 << 6),
+ CT_SPACE = (1 << 7),
+ CT_UPPER = (1 << 8),
+ CT_XDIGIT = (1 << 9),
+ CT_BLANK = (1 << 10),
+} ctype_t;
+
+#endif
diff --git a/src/ctype/isblank.c b/src/ctype/isblank.c
index 3693bc97..38d42ff9 100644
--- a/src/ctype/isblank.c
+++ b/src/ctype/isblank.c
@@ -1,7 +1,7 @@
#include <ctype.h>
#include "limits.h"
#include "locale.h"
-#include "nonstd/ctype.h"
+#include "../_ctype.h"
#include "nonstd/assert.h"
/** test whether a character is blank **/
diff --git a/src/ctype/iscntrl.c b/src/ctype/iscntrl.c
index 1508f318..679d3d24 100644
--- a/src/ctype/iscntrl.c
+++ b/src/ctype/iscntrl.c
@@ -1,7 +1,7 @@
#include <ctype.h>
#include "limits.h"
#include "nonstd/assert.h"
-#include "nonstd/ctype.h"
+#include "_ctype.h"
/** test whether a character is a control character */
diff --git a/src/ctype/isgraph.c b/src/ctype/isgraph.c
index 7f3f0bad..d041e840 100644
--- a/src/ctype/isgraph.c
+++ b/src/ctype/isgraph.c
@@ -1,7 +1,7 @@
#include <ctype.h>
#include "limits.h"
#include "nonstd/assert.h"
-#include "nonstd/ctype.h"
+#include "_ctype.h"
/** test whether a character is graphic **/
diff --git a/src/ctype/islower.c b/src/ctype/islower.c
index c08522a1..b2e0b678 100644
--- a/src/ctype/islower.c
+++ b/src/ctype/islower.c
@@ -1,7 +1,7 @@
#include <ctype.h>
#include "limits.h"
#include "nonstd/assert.h"
-#include "nonstd/ctype.h"
+#include "_ctype.h"
/** test whether a character is a lowercase letter **/
diff --git a/src/ctype/isprint.c b/src/ctype/isprint.c
index a71c6173..4a426fe1 100644
--- a/src/ctype/isprint.c
+++ b/src/ctype/isprint.c
@@ -1,7 +1,7 @@
#include <ctype.h>
#include "limits.h"
#include "nonstd/assert.h"
-#include "nonstd/ctype.h"
+#include "_ctype.h"
/** test whether a character is printable **/
diff --git a/src/ctype/ispunct.c b/src/ctype/ispunct.c
index f092682f..e55dac2e 100644
--- a/src/ctype/ispunct.c
+++ b/src/ctype/ispunct.c
@@ -1,7 +1,7 @@
#include <ctype.h>
#include "limits.h"
#include "nonstd/assert.h"
-#include "nonstd/ctype.h"
+#include "_ctype.h"
/** test whether a character is punctuation **/
diff --git a/src/ctype/isspace.c b/src/ctype/isspace.c
index 8b8d6d09..16cb0c24 100644
--- a/src/ctype/isspace.c
+++ b/src/ctype/isspace.c
@@ -1,7 +1,7 @@
#include <ctype.h>
#include "limits.h"
#include "nonstd/assert.h"
-#include "nonstd/ctype.h"
+#include "_ctype.h"
/** test whether a character is white-space **/
diff --git a/src/ctype/isupper.c b/src/ctype/isupper.c
index 9e9910e8..d0d58eaa 100644
--- a/src/ctype/isupper.c
+++ b/src/ctype/isupper.c
@@ -1,7 +1,7 @@
#include <ctype.h>
#include "limits.h"
#include "nonstd/assert.h"
-#include "nonstd/ctype.h"
+#include "_ctype.h"
/** test whether a character is an uppercase letter **/
diff --git a/src/ctype/isxdigit.c b/src/ctype/isxdigit.c
index a17657fa..543774a3 100644
--- a/src/ctype/isxdigit.c
+++ b/src/ctype/isxdigit.c
@@ -1,7 +1,7 @@
#include <ctype.h>
#include "limits.h"
#include "nonstd/assert.h"
-#include "nonstd/ctype.h"
+#include "_ctype.h"
/** test whether a character is a hexadecimal digit **/
diff --git a/src/ctype/tolower.c b/src/ctype/tolower.c
index 3464d655..0994071b 100644
--- a/src/ctype/tolower.c
+++ b/src/ctype/tolower.c
@@ -2,7 +2,7 @@
#include "stdio.h"
#include "limits.h"
#include "nonstd/assert.h"
-#include "nonstd/ctype.h"
+#include "_ctype.h"
/** convert an uppercase letter to lowercase **/
diff --git a/src/ctype/toupper.c b/src/ctype/toupper.c
index dc9660ec..e40e4a73 100644
--- a/src/ctype/toupper.c
+++ b/src/ctype/toupper.c
@@ -2,7 +2,7 @@
#include "stdio.h"
#include "limits.h"
#include "nonstd/assert.h"
-#include "nonstd/ctype.h"
+#include "_ctype.h"
/** convert a lowercase letter to uppercase **/
diff --git a/src/nonstd/_locale.h b/src/nonstd/_locale.h
index 79904e1f..be692e87 100644
--- a/src/nonstd/_locale.h
+++ b/src/nonstd/_locale.h
@@ -4,9 +4,8 @@
#include <string.h>
#include "nonstd/locale.h"
-#include "nonstd/ctype.h"
+#include "../ctype/_ctype.h"
-/*
#define LC_COLLATE_MASK (1<<0)
#define LC_CTYPE_MASK (1<<1)
#define LC_MONETARY_MASK (1<<2)
@@ -14,7 +13,6 @@
#define LC_TIME_MASK (1<<4)
#define LC_MESSAGES_MASK (1<<5)
#define LC_ALL_MASK (0xff)
-*/
#define setall(_map, _input, _mask) do { \
size_t _i; \
diff --git a/src/nonstd/ctype-internal.ref b/src/nonstd/ctype-internal.ref
index 3412e61c..8b137891 100644
--- a/src/nonstd/ctype-internal.ref
+++ b/src/nonstd/ctype-internal.ref
@@ -1,2 +1 @@
-#include <nonstd/ctype.h>
-REFERENCE(<nonstd/internal.h>)
+
diff --git a/src/nonstd/ctype_t.c b/src/nonstd/ctype_t.c
index dad5568f..8b137891 100644
--- a/src/nonstd/ctype_t.c
+++ b/src/nonstd/ctype_t.c
@@ -1,15 +1 @@
-#include <nonstd/ctype.h>
-typedef enum {
- CT_ALPHA = (1 << 0),
- CT_CNTRL = (1 << 1),
- CT_DIGIT = (1 << 2),
- CT_GRAPH = (1 << 3),
- CT_LOWER = (1 << 4),
- CT_PRINT = (1 << 5),
- CT_PUNCT = (1 << 6),
- CT_SPACE = (1 << 7),
- CT_UPPER = (1 << 8),
- CT_XDIGIT = (1 << 9),
- CT_BLANK = (1 << 10),
-} ctype_t;
diff --git a/src/wctype/_wctype.h b/src/wctype/_wctype.h
new file mode 100644
index 00000000..feb23dc0
--- /dev/null
+++ b/src/wctype/_wctype.h
@@ -0,0 +1 @@
+#include "../ctype/_ctype.h"
diff --git a/src/wctype/wctrans.c b/src/wctype/wctrans.c
index eb51e112..fac15545 100644
--- a/src/wctype/wctrans.c
+++ b/src/wctype/wctrans.c
@@ -1,7 +1,7 @@
#include <wctype.h>
#include "string.h"
#include "nonstd/assert.h"
-#include "nonstd/ctype.h"
+#include "_wctype.h"
/** lookup character translation **/
wctrans_t wctrans(const char * property)
diff --git a/src/wctype/wctype.c b/src/wctype/wctype.c
index 82a6ac5b..96e5dd1b 100644
--- a/src/wctype/wctype.c
+++ b/src/wctype/wctype.c
@@ -1,7 +1,7 @@
#include <wctype.h>
#include "string.h"
#include "nonstd/assert.h"
-#include "nonstd/ctype.h"
+#include "_wctype.h"
/** lookup character class **/
wctype_t wctype(const char * property)