File: patch-01-utf-8

package info (click to toggle)
texlive-bin 2018.20181218.49446-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 186,920 kB
  • sloc: ansic: 873,264; cpp: 311,278; perl: 82,918; sh: 23,243; makefile: 8,590; lex: 4,939; python: 4,462; pascal: 3,813; java: 3,569; yacc: 2,901; tcl: 2,379; exp: 2,031; xml: 844; ruby: 678; lisp: 398; sed: 331; asm: 140; csh: 46; awk: 30
file content (17 lines) | stat: -rw-r--r-- 729 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff -ur lua-5.3.4.orig/src/lctype.h lua-5.3.4/src/lctype.h
--- lctype.h.orig	2017-10-24 15:14:50.724139638 +0200
+++ lctype.h	2017-10-24 15:15:51.704137138 +0200
@@ -53,9 +53,11 @@
 
 /*
 ** 'lalpha' (Lua alphabetic) and 'lalnum' (Lua alphanumeric) both include '_'
+**
+** all utf-8 chars (greater than 0x7f) are always alphabetic
 */
-#define lislalpha(c)	testprop(c, MASK(ALPHABIT))
-#define lislalnum(c)	testprop(c, (MASK(ALPHABIT) | MASK(DIGITBIT)))
+#define lislalpha(c)	(isalpha(c) || (c) == '_' || (c) > 0x7f)
+#define lislalnum(c)	(isalnum(c) || (c) == '_' || (c) > 0x7f)
 #define lisdigit(c)	testprop(c, MASK(DIGITBIT))
 #define lisspace(c)	testprop(c, MASK(SPACEBIT))
 #define lisprint(c)	testprop(c, MASK(PRINTBIT))