mirror of
https://github.com/lua/lua
synced 2025-02-12 03:04:03 +03:00
new property 'lisupper' (needed to compute values for hexa digits)
This commit is contained in:
parent
e67dc3a227
commit
92479f1a8b
12
lctype.c
12
lctype.c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lctype.c,v 1.4 2009/03/11 13:27:32 roberto Exp roberto $
|
||||
** $Id: lctype.c,v 1.5 2009/03/26 18:53:52 roberto Exp roberto $
|
||||
** 'ctype' functions for Lua
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -18,10 +18,10 @@ const char luai_ctype_[UCHAR_MAX + 2] = {
|
||||
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
|
||||
0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16,
|
||||
0x16, 0x16, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
|
||||
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, 0x04, 0x04, 0x04, 0x04, 0x05,
|
||||
0x04, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x25,
|
||||
0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25,
|
||||
0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25,
|
||||
0x25, 0x25, 0x25, 0x04, 0x04, 0x04, 0x04, 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,
|
||||
@ -41,5 +41,5 @@ const char luai_ctype_[UCHAR_MAX + 2] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
4
lctype.h
4
lctype.h
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lctype.h,v 1.4 2009/03/11 13:27:32 roberto Exp roberto $
|
||||
** $Id: lctype.h,v 1.5 2009/03/26 18:53:52 roberto Exp roberto $
|
||||
** 'ctype' functions for Lua
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -18,6 +18,7 @@
|
||||
#define PRINTBIT 2
|
||||
#define SPACEBIT 3
|
||||
#define XDIGITBIT 4
|
||||
#define UPPERBIT 5
|
||||
|
||||
|
||||
#define MASK(B) (1 << (B))
|
||||
@ -33,6 +34,7 @@
|
||||
*/
|
||||
#define lislalpha(c) testprop(c, MASK(ALPHABIT))
|
||||
#define lislalnum(c) testprop(c, (MASK(ALPHABIT) | MASK(DIGITBIT)))
|
||||
#define lisupper(c) testprop(c, MASK(UPPERBIT))
|
||||
#define lisdigit(c) testprop(c, MASK(DIGITBIT))
|
||||
#define lisspace(c) testprop(c, MASK(SPACEBIT))
|
||||
#define lisprint(c) testprop(c, MASK(PRINTBIT))
|
||||
|
Loading…
x
Reference in New Issue
Block a user