diff options
author | Hans Hagen <pragma@wxs.nl> | 2022-11-14 23:18:10 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2022-11-14 23:18:10 +0100 |
commit | 08473f11287cb263079c0435068312cbc6d736e8 (patch) | |
tree | 2548fb8b58e18a507e54fa8426a79c6956c3ef2e /source/luametatex/source/tex/textoken.c | |
parent | dd0a80e5ec42f60832e7d5dc47210e6f3545c400 (diff) | |
download | context-08473f11287cb263079c0435068312cbc6d736e8.tar.gz |
2022-11-14 22:56:00
Diffstat (limited to 'source/luametatex/source/tex/textoken.c')
-rw-r--r-- | source/luametatex/source/tex/textoken.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/source/luametatex/source/tex/textoken.c b/source/luametatex/source/tex/textoken.c index 93bf3913a..7dd9c888b 100644 --- a/source/luametatex/source/tex/textoken.c +++ b/source/luametatex/source/tex/textoken.c @@ -161,13 +161,12 @@ void tex_compact_tokens(void) { int nc = 0; // memoryword *target = allocate_array(sizeof(memoryword), (size_t) token_memory_state.tokens_data.allocated, 0); - memoryword *target = aux_allocate_clear_array(sizeof(memoryword), (size_t) lmt_token_memory_state.tokens_data.allocated, 0); - halfword *mapper = aux_allocate_array(sizeof(halfword), (size_t) lmt_token_memory_state.tokens_data.allocated, 0); + memoryword *target = aux_allocate_clear_array(sizeof(memoryword), lmt_token_memory_state.tokens_data.allocated, 0); + halfword *mapper = aux_allocate_array(sizeof(halfword), lmt_token_memory_state.tokens_data.allocated, 0); int nofluacmds = 0; if (target && mapper) { - // memset((void *) target, 0, ((size_t) token_memory_state.tokens_data.allocated) * sizeof(memoryword)); - memset((void *) mapper, -1, ((size_t) lmt_token_memory_state.tokens_data.allocated) * sizeof(halfword)); memoryword *tokens = lmt_token_memory_state.tokens; + memset((void *) mapper, -1, ((size_t) lmt_token_memory_state.tokens_data.allocated) * sizeof(halfword)); /* also reset available */ for (int cs = 0; cs < (eqtb_size + lmt_hash_state.hash_data.ptr + 1); cs++) { switch (eq_type(cs)) { @@ -579,8 +578,6 @@ static const char *tex_aux_special_cmd_string(halfword cmd, halfword chr, const } } -halfword nn = 0; - halfword tex_show_token_list(halfword p, halfword q, int l, int asis) { if (p) { @@ -794,7 +791,6 @@ halfword tex_scan_character(const char *s, int left_brace, int skip_space, int s } else { goto DONE; } - break; case relax_cmd: if (skip_relax) { break; @@ -3082,6 +3078,13 @@ char *tex_tokenlist_to_tstring(int pp, int inhibit_par, int *siz, int skippreamb /*tex We need to go beyond the reference. */ int p = token_link(pp); if (p) { + int e = escape_char_par; /*tex The serialization of the escape, normally a backlash. */ + int n = '0'; /*tex The character after |#|, so |#0| upto |#9| */ + int min = 0; + int max = lmt_token_memory_state.tokens_data.top; + int skip = 0; + int tail = p; + int count = 0; if (lmt_token_state.bufmax > default_buffer_size) { /* Let's start fresh and small. */ aux_deallocate_array(lmt_token_state.buffer); @@ -3093,13 +3096,6 @@ char *tex_tokenlist_to_tstring(int pp, int inhibit_par, int *siz, int skippreamb lmt_token_state.bufmax = default_buffer_size; } lmt_token_state.bufloc = 0; - int e = escape_char_par; /*tex The serialization of the escape, normally a backlash. */ - int n = '0'; /*tex The character after |#|, so |#0| upto |#9| */ - int min = 0; - int max = lmt_token_memory_state.tokens_data.top; - int skip = 0; - int tail = p; - int count = 0; if (skippreamble) { skip = get_token_parameters(pp); } |