Skip to content

Commit 0f649c5

Browse files
committed
Mark characters such as ◀ or ネ as printable and alphabetic.
1 parent d8455b8 commit 0f649c5

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

lctype.c

+16-16
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ LUAI_DDEF const lu_byte luai_ctype_[UCHAR_MAX + 2] = {
1717
0x00, /* EOZ */
1818
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0. */
1919
0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00,
20-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 1. */
21-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
20+
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* 1. */
21+
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
2222
0x0c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* 2. */
2323
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
2424
0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, /* 3. */
@@ -30,23 +30,23 @@ LUAI_DDEF const lu_byte luai_ctype_[UCHAR_MAX + 2] = {
3030
0x04, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x05, /* 6. */
3131
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
3232
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* 7. */
33-
0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x00,
33+
0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x05,
3434
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* 8. */
3535
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
3636
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* 9. */
37-
0x05, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
38-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* a. */
39-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
40-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* b. */
41-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
42-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* c. */
43-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
44-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* d. */
45-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
46-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* e. */
47-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
48-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* f. */
49-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
37+
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
38+
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* a. */
39+
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
40+
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* b. */
41+
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
42+
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* c. */
43+
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
44+
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* d. */
45+
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
46+
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* e. */
47+
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
48+
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* f. */
49+
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
5050
};
5151

5252
#endif /* } */

lctype.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ LUAI_DDEC const lu_byte luai_ctype_[UCHAR_MAX + 2];
8080
#include <ctype.h>
8181

8282

83-
#define lisspecial(c) ((int)(c) >= 0x80 && (int)(c) < 0x80 + 26)
83+
#define lisspecial(c) (((int)(c) >= 0x10 && (int)(c) < 0x20) || (int)(c) >= 0x7f)
8484
#define lislalpha(c) (isalpha(c) || (c) == '_' || lisspecial(c))
8585
#define lislalnum(c) (isalnum(c) || (c) == '_' || lisspecial(c))
8686
#define lisdigit(c) (isdigit(c))

0 commit comments

Comments
 (0)