summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/cwebdir/ctwill-mini.ch
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/cwebdir/ctwill-mini.ch')
-rw-r--r--Build/source/texk/web2c/cwebdir/ctwill-mini.ch90
1 files changed, 52 insertions, 38 deletions
diff --git a/Build/source/texk/web2c/cwebdir/ctwill-mini.ch b/Build/source/texk/web2c/cwebdir/ctwill-mini.ch
index ec0aec95ed8..4448b1a3d59 100644
--- a/Build/source/texk/web2c/cwebdir/ctwill-mini.ch
+++ b/Build/source/texk/web2c/cwebdir/ctwill-mini.ch
@@ -354,16 +354,16 @@ Section 52.
id_first=--loc;
do
++loc;
- while (isalpha((eight_bits)*loc) || isdigit((eight_bits)*loc) @|
- || isxalpha((eight_bits)*loc) || ishigh((eight_bits)*loc));
+ while (isalpha((int)*loc) || isdigit((int)*loc) @|
+ || isxalpha(*loc) || ishigh(*loc));
id_loc=loc; return identifier;
}
@y
id_first=--loc;@/
do
++loc;
- while (isalpha((eight_bits)*loc) || isdigit((eight_bits)*loc) @|
- || isxalpha((eight_bits)*loc) || ishigh((eight_bits)*loc));@/
+ while (isalpha((int)*loc) || isdigit((int)*loc) @|
+ || isxalpha(*loc) || ishigh(*loc));@/
id_loc=loc;@/
return identifier;
}
@@ -1529,17 +1529,21 @@ Section 234--235.
case end_translation: return;
case identifier: case res_word: @<Output an identifier@>@; break;
case section_code: @<Output a section name@>@; break;
- case math_rel: out_str("\\MRL{"@q}@>);
+ case math_rel: out_str("\\MRL{"@q}@>); /* fall through */
@.\\MRL@>
case noop: case inserted: break;
case cancel: case big_cancel: c=0; b=a;
while (true) {
a=get_output();
if (a==inserted) continue;
- if ((a<indent && !(b==big_cancel&&a==' ')) || a>big_force) break;
- if (a==indent) c++;
- else if (a==outdent) c--;
- else if (a==opt) a=get_output();
+ if ((a<indent && !(b==big_cancel&&a==' ')) @|
+ || (a>big_force && a!=dindent)) break;
+ switch (a) {
+ case indent: c++; break;
+ case outdent: c--; break;
+ case dindent: c+=2; break;
+ case opt: a=get_output();
+ }
}
@<Output saved |indent| or |outdent| tokens@>@;
goto reswitch;
@@ -1551,7 +1555,7 @@ Section 234--235.
case indent: case outdent: case opt: case backup: case break_space:
case force: case big_force: case preproc_line: @<Output a control,
look ahead in case of line breaks, possibly |goto reswitch|@>@; break;
- case quoted_char: out(*(cur_tok++));
+ case quoted_char: out(*(cur_tok++)); /* fall through */
case qualifier: break;
default: out(a); /* otherwise |a| is an ordinary character */
}
@@ -1567,17 +1571,21 @@ Section 234--235.
case end_translation: return;
case identifier: case res_word: @<Output an identifier@>@; break;
case section_code: @<Output a section name@>@; break;
- case math_rel: out_str("\\MRL{"@q}@>);
+ case math_rel: out_str("\\MRL{"@q}@>); /* fall through */
@.\\MRL@>
case noop: case inserted: break;
case cancel: case big_cancel: c=0; b=a;
while (true) {
a=get_output();
if (a==inserted) continue;
- if ((a<indent && !(b==big_cancel&&a==' ')) || a>big_force) break;
- if (a==indent) c++;
- else if (a==outdent) c--;
- else if (a==opt) a=get_output();
+ if ((a<indent && !(b==big_cancel&&a==' ')) @|
+ || (a>big_force && a!=dindent)) break;
+ switch (a) {
+ case indent: c++; break;
+ case outdent: c--; break;
+ case dindent: c+=2; break;
+ case opt: a=get_output();
+ }
}
@<Output saved |indent| or |outdent| tokens@>@;
goto reswitch;
@@ -1589,7 +1597,7 @@ Section 234--235.
case indent: case outdent: case opt: case backup: case break_space:
case force: case big_force: case preproc_line: @<Output a control,
look ahead in case of line breaks, possibly |goto reswitch|@>@; break;
- case quoted_char: out(*(cur_tok++));
+ case quoted_char: out(*(cur_tok++)); /* fall through */
case qualifier: break;
default: out(a); /* otherwise |a| is an ordinary character */
}
@@ -1765,6 +1773,12 @@ Section 269.
Section 271.
@x
+@ During the sorting phase we shall use the |cat| and |trans| arrays from
+@y
+@r @ During the sorting phase we shall use the |cat| and |trans| arrays from
+@z
+
+@x
@<Rest of |trans_plus| union@>=
@y
@<Rest of |trans_plus| union@>=
@@ -1819,11 +1833,11 @@ Section 279.
@x
@ @<Split the list...@>= {
- eight_bits c;
+ int c;
next_name=sort_ptr->head;
@y
@ @<Split the list...@>= {@+
- eight_bits c;
+ int c;
next_name=sort_ptr->head;@/
@z
@@ -1849,61 +1863,61 @@ Section 288.
@x
puts(_("\nMemory usage statistics:"));
@.Memory usage statistics:@>
- printf(_("%ld names (out of %ld)\n"),
+ printf(_("%td names (out of %ld)\n"),
(ptrdiff_t)(name_ptr-name_dir),(long)max_names);
- printf(_("%ld cross-references (out of %ld)\n"),
+ printf(_("%td cross-references (out of %ld)\n"),
(ptrdiff_t)(xref_ptr-xmem),(long)max_refs);
- printf(_("%ld bytes (out of %ld)\n"),
+ printf(_("%td bytes (out of %ld)\n"),
(ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes);
- printf(_("%ld temp meanings (out of %ld)\n"),
+ printf(_("%td temp meanings (out of %ld)\n"),
(ptrdiff_t)(max_temp_meaning_ptr-temp_meaning_stack),
(long)max_meanings);
- printf(_("%ld titles (out of %ld)\n"),
+ printf(_("%td titles (out of %ld)\n"),
(ptrdiff_t)(title_code_ptr-title_code),(long)max_titles);
puts(_("Parsing:"));
- printf(_("%ld scraps (out of %ld)\n"),
+ printf(_("%td scraps (out of %ld)\n"),
(ptrdiff_t)(max_scr_ptr-scrap_info),(long)max_scraps);
- printf(_("%ld texts (out of %ld)\n"),
+ printf(_("%td texts (out of %ld)\n"),
(ptrdiff_t)(max_text_ptr-tok_start),(long)max_texts);
- printf(_("%ld tokens (out of %ld)\n"),
+ printf(_("%td tokens (out of %ld)\n"),
(ptrdiff_t)(max_tok_ptr-tok_mem),(long)max_toks);
- printf(_("%ld levels (out of %ld)\n"),
+ printf(_("%td levels (out of %ld)\n"),
(ptrdiff_t)(max_stack_ptr-stack),(long)stack_size);
puts(_("Sorting:"));
- printf(_("%ld levels (out of %ld)\n"),
+ printf(_("%td levels (out of %ld)\n"),
(ptrdiff_t)(max_sort_ptr-scrap_info),(long)max_scraps);
@y
puts(_("\nMemory usage statistics:"));@/
@.Memory usage statistics:@>
- printf(_("%ld names (out of %ld)\n"),
+ printf(_("%td names (out of %ld)\n"),
(ptrdiff_t)(name_ptr-name_dir),@/
@t\5\5\5\5@>(long)max_names);@/
- printf(_("%ld cross-references (out of %ld)\n"),
+ printf(_("%td cross-references (out of %ld)\n"),
(ptrdiff_t)(xref_ptr-xmem),(long)max_refs);@/
- printf(_("%ld bytes (out of %ld)\n"),
+ printf(_("%td bytes (out of %ld)\n"),
(ptrdiff_t)(byte_ptr-byte_mem),@/
@t\5\5\5\5@>(long)max_bytes);@/
- printf(_("%ld temp meanings (out of %ld)\n"),
+ printf(_("%td temp meanings (out of %ld)\n"),
(ptrdiff_t)(max_temp_meaning_ptr-temp_meaning_stack),@/
@t\5\5\5\5@>(long)max_meanings);@/
- printf(_("%ld titles (out of %ld)\n"),
+ printf(_("%td titles (out of %ld)\n"),
(ptrdiff_t)(title_code_ptr-title_code),@/
@t\5\5\5\5@>(long)max_titles);@/
puts(_("Parsing:"));@/
- printf(_("%ld scraps (out of %ld)\n"),
+ printf(_("%td scraps (out of %ld)\n"),
(ptrdiff_t)(max_scr_ptr-scrap_info),@/
@t\5\5\5\5@>(long)max_scraps);@/
- printf(_("%ld texts (out of %ld)\n"),
+ printf(_("%td texts (out of %ld)\n"),
(ptrdiff_t)(max_text_ptr-tok_start),@/
@t\5\5\5\5@>(long)max_texts);@/
- printf(_("%ld tokens (out of %ld)\n"),
+ printf(_("%td tokens (out of %ld)\n"),
(ptrdiff_t)(max_tok_ptr-tok_mem),@/
@t\5\5\5\5@>(long)max_toks);@/
- printf(_("%ld levels (out of %ld)\n"),
+ printf(_("%td levels (out of %ld)\n"),
(ptrdiff_t)(max_stack_ptr-stack),@/
@t\5\5\5\5@>(long)stack_size);@/
puts(_("Sorting:"));@/
- printf(_("%ld levels (out of %ld)\n"),
+ printf(_("%td levels (out of %ld)\n"),
(ptrdiff_t)(max_sort_ptr-scrap_info),@/
@t\5\5\5\5@>(long)max_scraps);
@z