aboutsummaryrefslogtreecommitdiff
path: root/lctype.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-03-10 14:42:33 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-03-10 14:42:33 -0300
commit6427c61e7c3e6acd467b488c573ac37b0f46d0a2 (patch)
treef0471d4313741f31d813894f01ef4ce72b1df5d0 /lctype.h
parentba484b9eb16dd62a7c3a5400a66eb952b654d3f0 (diff)
downloadlua-6427c61e7c3e6acd467b488c573ac37b0f46d0a2.tar.gz
lua-6427c61e7c3e6acd467b488c573ac37b0f46d0a2.tar.bz2
lua-6427c61e7c3e6acd467b488c573ac37b0f46d0a2.zip
added macro 'lisxdigit' (just in case :)
Diffstat (limited to 'lctype.h')
-rw-r--r--lctype.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lctype.h b/lctype.h
index 89dbbd8d..13e3d88d 100644
--- a/lctype.h
+++ b/lctype.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lctype.h,v 1.1 2009/02/19 17:18:25 roberto Exp roberto $ 2** $Id: lctype.h,v 1.2 2009/02/20 13:11:15 roberto Exp roberto $
3** 'ctype' functions for Lua 3** 'ctype' functions for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -17,6 +17,7 @@
17#define DIGITBIT 1 17#define DIGITBIT 1
18#define PRINTBIT 2 18#define PRINTBIT 2
19#define SPACEBIT 3 19#define SPACEBIT 3
20#define XDIGITBIT 4
20 21
21 22
22#define MASK(B) (1 << (B)) 23#define MASK(B) (1 << (B))
@@ -27,6 +28,7 @@
27#define lisdigit(x) (luai_ctype_[x] & MASK(DIGITBIT)) 28#define lisdigit(x) (luai_ctype_[x] & MASK(DIGITBIT))
28#define lisspace(x) (luai_ctype_[x] & MASK(SPACEBIT)) 29#define lisspace(x) (luai_ctype_[x] & MASK(SPACEBIT))
29#define lisprint(x) (luai_ctype_[x] & MASK(PRINTBIT)) 30#define lisprint(x) (luai_ctype_[x] & MASK(PRINTBIT))
31#define lisxdigit(x) (luai_ctype_[x] & MASK(XDIGITBIT))
30 32
31LUAI_DATA const char luai_ctype_[UCHAR_MAX + 1]; 33LUAI_DATA const char luai_ctype_[UCHAR_MAX + 1];
32 34