aboutsummaryrefslogtreecommitdiffstats
path: root/myctype.h
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2003-09-22 21:02:15 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2003-09-22 21:02:15 +0000
commit604c11affe988bab23c87598c02248fff1d73f43 (patch)
tree6252cbbfd3cf703691a8ddbf1fdee5c1246b5faa /myctype.h
parent* version.c.in: cvs version (diff)
downloadw3m-604c11affe988bab23c87598c02248fff1d73f43.tar.gz
w3m-604c11affe988bab23c87598c02248fff1d73f43.zip
merge m17n patch
add libwc
Diffstat (limited to 'myctype.h')
-rw-r--r--myctype.h27
1 files changed, 5 insertions, 22 deletions
diff --git a/myctype.h b/myctype.h
index f01d89b..97e2105 100644
--- a/myctype.h
+++ b/myctype.h
@@ -1,4 +1,4 @@
-/* $Id: myctype.h,v 1.5 2002/12/24 17:20:47 ukai Exp $ */
+/* $Id: myctype.h,v 1.6 2003/09/22 21:02:20 ukai Exp $ */
#ifndef _MYCTYPE_H
#define _MYCTYPE_H
@@ -8,6 +8,8 @@
#define MYCTYPE_DIGIT 8
#define MYCTYPE_PRINT 16
#define MYCTYPE_HEX 32
+#define MYCTYPE_INTSPACE 64
+#define MYCTYPE_ASCII (MYCTYPE_CNTRL|MYCTYPE_PRINT)
#define MYCTYPE_ALNUM (MYCTYPE_ALPHA|MYCTYPE_DIGIT)
#define MYCTYPE_XDIGIT (MYCTYPE_HEX|MYCTYPE_DIGIT)
@@ -19,34 +21,15 @@
#define IS_ALPHA(x) (GET_MYCTYPE(x) & MYCTYPE_ALPHA)
#define IS_DIGIT(x) (GET_MYCTYPE(x) & MYCTYPE_DIGIT)
#define IS_PRINT(x) (GET_MYCTYPE(x) & MYCTYPE_PRINT)
+#define IS_ASCII(x) (GET_MYCTYPE(x) & MYCTYPE_ASCII)
#define IS_ALNUM(x) (GET_MYCTYPE(x) & MYCTYPE_ALNUM)
#define IS_XDIGIT(x) (GET_MYCTYPE(x) & MYCTYPE_XDIGIT)
+#define IS_INTSPACE(x) (MYCTYPE_MAP[(unsigned char)(x)] & MYCTYPE_INTSPACE)
extern unsigned char MYCTYPE_MAP[];
extern unsigned char MYCTYPE_DIGITMAP[];
-
-#define INTCTYPE_ASCII 1
-#define INTCTYPE_ISPACE 2
-#define INTCTYPE_LATIN1 4
-#define INTCTYPE_KANJI1 8
-#define INTCTYPE_KANJI2 16
-#define INTCTYPE_KANJI (INTCTYPE_KANJI1|INTCTYPE_KANJI2)
-#define INTCTYPE_INTRL INTCTYPE_ISPACE
-
-#define GET_INTCTYPE(x) (INTCTYPE_MAP[(int)(unsigned char)(x)])
-
-#define IS_ASCII(x) (GET_INTCTYPE(x) & INTCTYPE_ASCII)
-#define IS_INTSPACE(x) (GET_INTCTYPE(x) & INTCTYPE_ISPACE)
-#define IS_INTERNAL(x) (GET_INTCTYPE(x) & INTCTYPE_INTRL)
-#define IS_KANJI1(x) (GET_INTCTYPE(x) & INTCTYPE_KANJI1)
-#define IS_KANJI2(x) (GET_INTCTYPE(x) & INTCTYPE_KANJI2)
-#define IS_KANJI(x) (GET_INTCTYPE(x) & INTCTYPE_KANJI)
-#define IS_LATIN1(x) (GET_INTCTYPE(x) & INTCTYPE_LATIN1)
-
#define TOLOWER(x) (IS_ALPHA(x) ? ((x)|0x20) : (x))
#define TOUPPER(x) (IS_ALPHA(x) ? ((x)&~0x20) : (x))
-extern unsigned char INTCTYPE_MAP[];
-
#endif