diff options
author | Jakob Kaivo <jkk@ung.org> | 2020-03-04 03:05:54 -0500 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2020-03-04 03:05:54 -0500 |
commit | f9035ffc60de8505522c8092f7d53269dd8a4738 (patch) | |
tree | 96c9edfee758f6d39e44c8d3fdabec6048c1673a | |
parent | 8b1380b63d62a1e1858a102fb36c2078697581ec (diff) |
remove nonstd/ctype.h
-rw-r--r-- | .deps/all.h | 1 | ||||
-rw-r--r-- | .headers.mk | 4 | ||||
-rw-r--r-- | src/ctype/_ctype.h | 20 | ||||
-rw-r--r-- | src/ctype/isblank.c | 2 | ||||
-rw-r--r-- | src/ctype/iscntrl.c | 2 | ||||
-rw-r--r-- | src/ctype/isgraph.c | 2 | ||||
-rw-r--r-- | src/ctype/islower.c | 2 | ||||
-rw-r--r-- | src/ctype/isprint.c | 2 | ||||
-rw-r--r-- | src/ctype/ispunct.c | 2 | ||||
-rw-r--r-- | src/ctype/isspace.c | 2 | ||||
-rw-r--r-- | src/ctype/isupper.c | 2 | ||||
-rw-r--r-- | src/ctype/isxdigit.c | 2 | ||||
-rw-r--r-- | src/ctype/tolower.c | 2 | ||||
-rw-r--r-- | src/ctype/toupper.c | 2 | ||||
-rw-r--r-- | src/nonstd/_locale.h | 4 | ||||
-rw-r--r-- | src/nonstd/ctype-internal.ref | 3 | ||||
-rw-r--r-- | src/nonstd/ctype_t.c | 14 | ||||
-rw-r--r-- | src/wctype/_wctype.h | 1 | ||||
-rw-r--r-- | src/wctype/wctrans.c | 2 | ||||
-rw-r--r-- | src/wctype/wctype.c | 2 |
20 files changed, 36 insertions, 37 deletions
diff --git a/.deps/all.h b/.deps/all.h index 22d1dd86..5aaacabb 100644 --- a/.deps/all.h +++ b/.deps/all.h @@ -27,7 +27,6 @@ mqueue.h ndbm.h nl_types.h nonstd/assert.h -nonstd/ctype.h nonstd/internal.h nonstd/lib.h nonstd/locale.h diff --git a/.headers.mk b/.headers.mk index 189fafaf..f29914d9 100644 --- a/.headers.mk +++ b/.headers.mk @@ -87,9 +87,6 @@ $(INCDIR)/nl_types.h: mkh.sh $(SRCDIR)/nl_types/nl_catd.c $(SRCDIR)/nl_types/NL_ $(INCDIR)/nonstd/assert.h: mkh.sh $(SRCDIR)/nonstd/ASSERT_REPRESENTABLE.c $(SRCDIR)/nonstd/ASSERT_NONNULL.c $(SRCDIR)/nonstd/ASSERT_NOOVERLAP.c $(SRCDIR)/nonstd/ASSERT_NONZERO.c INCDIR=$(INCDIR) sh mkh.sh $(INCDIR)/nonstd/assert.h -$(INCDIR)/nonstd/ctype.h: mkh.sh $(SRCDIR)/nonstd/ctype_t.c $(SRCDIR)/nonstd/ctype-internal.ref - INCDIR=$(INCDIR) sh mkh.sh $(INCDIR)/nonstd/ctype.h - $(INCDIR)/nonstd/internal.h: mkh.sh $(SRCDIR)/nonstd/__libc.c $(SRCDIR)/nonstd/struct_atexit.c $(SRCDIR)/nonstd/LIBC_INTERNAL.c INCDIR=$(INCDIR) sh mkh.sh $(INCDIR)/nonstd/internal.h @@ -279,7 +276,6 @@ headers: \ $(INCDIR)/ndbm.h \ $(INCDIR)/nl_types.h \ $(INCDIR)/nonstd/assert.h \ - $(INCDIR)/nonstd/ctype.h \ $(INCDIR)/nonstd/internal.h \ $(INCDIR)/nonstd/lib.h \ $(INCDIR)/nonstd/locale.h \ 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) |