mirror of https://github.com/rusefi/lua.git
added macro 'lisxdigit' (just in case :)
This commit is contained in:
parent
ba484b9eb1
commit
6427c61e7c
10
lctype.c
10
lctype.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lctype.c,v 1.1 2009/02/19 17:18:25 roberto Exp roberto $
|
** $Id: lctype.c,v 1.2 2009/02/20 13:11:15 roberto Exp roberto $
|
||||||
** 'ctype' functions for Lua
|
** 'ctype' functions for Lua
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -15,13 +15,13 @@ const char luai_ctype_[UCHAR_MAX + 1] = {
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x0c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
|
0x0c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
|
||||||
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
|
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
|
||||||
0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
|
0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16,
|
||||||
0x06, 0x06, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
|
0x16, 0x16, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
|
||||||
0x04, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
|
0x04, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x05,
|
||||||
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
|
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
|
||||||
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
|
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
|
||||||
0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x04,
|
0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x04,
|
||||||
0x04, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
|
0x04, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x05,
|
||||||
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
|
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
|
||||||
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
|
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
|
||||||
0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x00,
|
0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x00,
|
||||||
|
|
4
lctype.h
4
lctype.h
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lctype.h,v 1.1 2009/02/19 17:18:25 roberto Exp roberto $
|
** $Id: lctype.h,v 1.2 2009/02/20 13:11:15 roberto Exp roberto $
|
||||||
** 'ctype' functions for Lua
|
** 'ctype' functions for Lua
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -17,6 +17,7 @@
|
||||||
#define DIGITBIT 1
|
#define DIGITBIT 1
|
||||||
#define PRINTBIT 2
|
#define PRINTBIT 2
|
||||||
#define SPACEBIT 3
|
#define SPACEBIT 3
|
||||||
|
#define XDIGITBIT 4
|
||||||
|
|
||||||
|
|
||||||
#define MASK(B) (1 << (B))
|
#define MASK(B) (1 << (B))
|
||||||
|
@ -27,6 +28,7 @@
|
||||||
#define lisdigit(x) (luai_ctype_[x] & MASK(DIGITBIT))
|
#define lisdigit(x) (luai_ctype_[x] & MASK(DIGITBIT))
|
||||||
#define lisspace(x) (luai_ctype_[x] & MASK(SPACEBIT))
|
#define lisspace(x) (luai_ctype_[x] & MASK(SPACEBIT))
|
||||||
#define lisprint(x) (luai_ctype_[x] & MASK(PRINTBIT))
|
#define lisprint(x) (luai_ctype_[x] & MASK(PRINTBIT))
|
||||||
|
#define lisxdigit(x) (luai_ctype_[x] & MASK(XDIGITBIT))
|
||||||
|
|
||||||
LUAI_DATA const char luai_ctype_[UCHAR_MAX + 1];
|
LUAI_DATA const char luai_ctype_[UCHAR_MAX + 1];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue