diff options
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/tex')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/mathcodes.w | 25 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/scanning.w | 34 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/texmath.w | 3 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/textcodes.w | 12 |
4 files changed, 63 insertions, 11 deletions
diff --git a/Build/source/texk/web2c/luatexdir/tex/mathcodes.w b/Build/source/texk/web2c/luatexdir/tex/mathcodes.w index b9ac4905f7d..062e271055a 100644 --- a/Build/source/texk/web2c/luatexdir/tex/mathcodes.w +++ b/Build/source/texk/web2c/luatexdir/tex/mathcodes.w @@ -27,8 +27,10 @@ static sa_tree mathcode_head = NULL; /* the 0xFFFFFFFF is a flag value */ + #define MATHCODESTACK 8 #define MATHCODEDEFAULT 0xFFFFFFFF +#define MATHCODEACTIVE 0xFFFFFFFE @ delcodes @c @@ -127,9 +129,13 @@ static void unsavemathcode(quarterword gl) void set_math_code(int n, int mathclass, int mathfamily, int mathcharacter, quarterword level) { sa_tree_item v; - v.math_code_value.class_value = mathclass; - v.math_code_value.family_value = mathfamily; - v.math_code_value.character_value = mathcharacter; + if (mathclass == 8 && mathfamily == 0 && mathcharacter == 0) { + v.uint_value = MATHCODEACTIVE; + } else { + v.math_code_value.class_value = mathclass; + v.math_code_value.family_value = mathfamily; + v.math_code_value.character_value = mathcharacter; + } set_sa_item(mathcode_head, n, v, level); if (int_par(tracing_assigns_code) > 1) { begin_diagnostic(); @@ -153,10 +159,19 @@ mathcodeval get_math_code(int n) d.class_value = 0; d.family_value = 0; d.character_value = n; + } else if (v.uint_value == MATHCODEACTIVE) { + d.class_value = 8; + d.family_value = 0; + d.character_value = 0; } else { d.class_value = v.math_code_value.class_value; - d.family_value = v.math_code_value.family_value; - d.character_value = v.math_code_value.character_value; + if (d.class_value == 8) { + d.family_value = 0; + d.character_value = n; + } else { + d.family_value = v.math_code_value.family_value; + d.character_value = v.math_code_value.character_value; + } } return d; } diff --git a/Build/source/texk/web2c/luatexdir/tex/scanning.w b/Build/source/texk/web2c/luatexdir/tex/scanning.w index 635ea03e2e2..0a9276c7db7 100644 --- a/Build/source/texk/web2c/luatexdir/tex/scanning.w +++ b/Build/source/texk/web2c/luatexdir/tex/scanning.w @@ -795,7 +795,41 @@ void scan_something_internal(int level, boolean negative) goto RESTART; } break; + case hyph_data_cmd: + switch (cur_chr) { + case 0: + case 1: + goto DEFAULT; + break; + case 2: + cur_val = get_pre_hyphen_char(int_par(language_code)); + cur_val_level = int_val_level; + break; + case 3: + cur_val = get_post_hyphen_char(int_par(language_code)); + cur_val_level = int_val_level; + break; + case 4: + cur_val = get_pre_exhyphen_char(int_par(language_code)); + cur_val_level = int_val_level; + break; + case 5: + cur_val = get_post_exhyphen_char(int_par(language_code)); + cur_val_level = int_val_level; + break; + case 6: + cur_val = get_hyphenation_min(int_par(language_code)); + cur_val_level = int_val_level; + break; + case 7: + scan_int(); + cur_val = get_hj_code(int_par(language_code),cur_val); + cur_val_level = int_val_level; + break; + } + break; default: + DEFAULT: /* Complain that \.{\\the} can not do this; give zero result */ print_err("You can't use `"); print_cmd_chr((quarterword) cur_cmd, cur_chr); diff --git a/Build/source/texk/web2c/luatexdir/tex/texmath.w b/Build/source/texk/web2c/luatexdir/tex/texmath.w index 676f4262b21..16224f09ff0 100644 --- a/Build/source/texk/web2c/luatexdir/tex/texmath.w +++ b/Build/source/texk/web2c/luatexdir/tex/texmath.w @@ -1100,8 +1100,7 @@ static delcodeval do_scan_extdef_del_code(int extcode, boolean doclass) NULL }; delcodeval d; - int mcls, msfam = 0, mschr = 0, mlfam = 0, mlchr = 0; - mcls = 0; + int mcls = 0, msfam = 0, mschr = 0, mlfam = 0, mlchr = 0; if (extcode == tex_mathcode) { /* \.{\\delcode}, this is the easiest */ scan_int(); /* "MFCCFCC or "FCCFCC */ diff --git a/Build/source/texk/web2c/luatexdir/tex/textcodes.w b/Build/source/texk/web2c/luatexdir/tex/textcodes.w index 8a4fbb949c5..5868716201b 100644 --- a/Build/source/texk/web2c/luatexdir/tex/textcodes.w +++ b/Build/source/texk/web2c/luatexdir/tex/textcodes.w @@ -362,15 +362,19 @@ but management is then upto the used, so no: static void initializehjcodes(void) { - sa_tree_item sa_value = { 0 }; + /* + sa_tree_item sa_value = { 0 }; + */ hjcode_max = 0; hjcode_heads = Mxmalloc_array(sa_tree, (HJCODE_MAX + 1)); hjcode_valid = Mxmalloc_array(unsigned char, (HJCODE_MAX + 1)); memset(hjcode_heads, 0, sizeof(sa_tree) * (HJCODE_MAX + 1)); memset(hjcode_valid, 0, sizeof(unsigned char) * (HJCODE_MAX + 1)); - hjcode_valid[0] = 1; - sa_value.int_value = HJCODEDEFAULT; - hjcode_heads[0] = new_sa_tree(HJCODESTACK, 1, sa_value); + /* + hjcode_valid[0] = 1; + sa_value.int_value = HJCODEDEFAULT; + hjcode_heads[0] = new_sa_tree(HJCODESTACK, 1, sa_value); + */ } void hj_codes_from_lc_codes(int h) |