| 1 |
Formatting changes for CTWILL by Andreas Scherer |
| 2 |
This file is in the Public Domain. |
| 3 |
|
| 4 |
This extensive set of changes is my first attempt to format CTWILL with |
| 5 |
itself in HINT format, i.e., with the 'pdfctproofmac.tex' macros. This |
| 6 |
produces output with 'mini-indexes' for every section. |
| 7 |
|
| 8 |
Apply these additional changes in the following two-step procedure: |
| 9 |
First create 'ctwill-w2c.ch' that mogrifies CWEAVE into CTWILL: |
| 10 |
$ tie -c ctwill-w2c.ch \ |
| 11 |
> cweave.w cweav-{patch,extensions,output,i18n,twill}.ch \ |
| 12 |
> cwtw-texlive.ch ctwill-texlive.ch |
| 13 |
Then create 'ctwill.w' that gets processed with HiTeX: |
| 14 |
$ ctie -m ctwill.w \ |
| 15 |
> cweave.w ctwill-w2c.ch ctwill-hint.ch |
| 16 |
|
| 17 |
Section 1. |
| 18 |
|
| 19 |
@x |
| 20 |
The ``banner line'' defined here should be changed whenever \.{CTWILL} is |
| 21 |
@y |
| 22 |
The ``banner line'' defined here should be changed whenever \.{CTWILL} is |
| 23 |
@-banner@> |
| 24 |
@$banner {CTWILL}1 =\.{"This\ is\ CTWILL"}@> |
| 25 |
|
| 26 |
@$ctangle {CTWILL}3 \&{enum} \&{cweb}@> |
| 27 |
@$ctwill {CTWILL}3 \&{enum} \&{cweb}@> |
| 28 |
@$cweave {CTWILL}3 \&{enum} \&{cweb}@> |
| 29 |
|
| 30 |
@$inner {CTWILL}207 \&{enum} \&{mode}@> |
| 31 |
@$outer {CTWILL}207 \&{enum} \&{mode}@> |
| 32 |
@z |
| 33 |
|
| 34 |
Section 2. |
| 35 |
|
| 36 |
@x |
| 37 |
@ \.{CWEAVE} has a fairly straightforward outline. It operates in |
| 38 |
@y |
| 39 |
@ \.{CWEAVE} has a fairly straightforward outline. It operates in |
| 40 |
@% |
| 41 |
@$show_banner {CTWILL}15 =\\{flags}[\.{'b'}]@> |
| 42 |
@$show_progress {CTWILL}15 =\\{flags}[\.{'p'}]@> |
| 43 |
@z |
| 44 |
|
| 45 |
Section 5. |
| 46 |
|
| 47 |
@x |
| 48 |
@d _(s) gettext(s) |
| 49 |
@y |
| 50 |
@d _(s) gettext(s) |
| 51 |
@-s@> |
| 52 |
@-a@> |
| 53 |
@-HAVE_GETTEXT@> |
| 54 |
@z |
| 55 |
|
| 56 |
Section 6. |
| 57 |
|
| 58 |
@x |
| 59 |
@d compress(c) if (loc++<=limit) return c |
| 60 |
@y |
| 61 |
@d compress(c) if (loc++<=limit) return c |
| 62 |
@-c@> |
| 63 |
@z |
| 64 |
|
| 65 |
Section 7. |
| 66 |
|
| 67 |
@x |
| 68 |
@ Code related to input routines: |
| 69 |
@y |
| 70 |
@ Code related to input routines: |
| 71 |
@-c@> |
| 72 |
@z |
| 73 |
|
| 74 |
Section 8. |
| 75 |
|
| 76 |
@x |
| 77 |
@d cur_line line[include_depth] /* number of current line in current file */ |
| 78 |
@y |
| 79 |
@d cur_line line[include_depth] /* number of current line in current file */ |
| 80 |
@-cur_file@> |
| 81 |
@-cur_file_name@> |
| 82 |
@-cur_line@> |
| 83 |
@$cur_file {CTWILL}8 =\\{file}[\\{include\_depth}]@> |
| 84 |
@$cur_file_name {CTWILL}8 =\hfil\break\\{file\_name}[\\{include\_depth}]@> |
| 85 |
@$cur_line {CTWILL}8 =\\{line}[\\{include\_depth}]@> |
| 86 |
@z |
| 87 |
|
| 88 |
Section 11. |
| 89 |
|
| 90 |
@x |
| 91 |
@ Code related to identifier and section name storage: |
| 92 |
@y |
| 93 |
@ Code related to identifier and section name storage: |
| 94 |
@-c@> |
| 95 |
@-llink@> |
| 96 |
@-rlink@> |
| 97 |
@-root@> |
| 98 |
@-ilk@> |
| 99 |
@$llink {CTWILL}11 =\\{link}@> |
| 100 |
@$rlink {CTWILL}11 =\\{dummy}.\\{Rlink}@> |
| 101 |
@$root {CTWILL}11 =\\{name\_dir}$\MG$\\{rlink}@> |
| 102 |
@$ilk {CTWILL}11 =\\{dummy}.\\{Ilk}@> |
| 103 |
@z |
| 104 |
|
| 105 |
Section 13. |
| 106 |
|
| 107 |
@x |
| 108 |
@ Code related to error handling: |
| 109 |
@y |
| 110 |
@ Code related to error handling: |
| 111 |
@-s@> |
| 112 |
@z |
| 113 |
|
| 114 |
Section 15. |
| 115 |
|
| 116 |
@x |
| 117 |
extern const char *use_language; /* prefix to \.{cwebmac.tex} in \TEX/ output */ |
| 118 |
@y |
| 119 |
extern const char *use_language; /* prefix to \.{ctwimac.tex} in \TEX/ output */ |
| 120 |
@-show_banner@> |
| 121 |
@-show_progress@> |
| 122 |
@-show_happiness@> |
| 123 |
@-show_stats@> |
| 124 |
@-make_xrefs@> |
| 125 |
@-check_for_change@> |
| 126 |
@$show_banner {CTWILL}15 =\\{flags}[\.{'b'}]@> |
| 127 |
@$show_progress {CTWILL}15 =\\{flags}[\.{'p'}]@> |
| 128 |
@$show_happiness {CTWILL}15 =\\{flags}[\.{'h'}]@> |
| 129 |
@$show_stats {CTWILL}15 =\\{flags}[\.{'s'}]@> |
| 130 |
@$make_xrefs {CTWILL}15 =\\{flags}[\.{'x'}]@> |
| 131 |
@$check_for_change {CTWILL}15 =\\{flags}[\.{'c'}]@> |
| 132 |
@z |
| 133 |
|
| 134 |
Section 16. |
| 135 |
|
| 136 |
@x |
| 137 |
@ Code related to output: |
| 138 |
@y |
| 139 |
@ Code related to output: |
| 140 |
@-a@> |
| 141 |
@-b@> |
| 142 |
@-c@> |
| 143 |
@-update_terminal@> |
| 144 |
@-new_line@> |
| 145 |
@$update_terminal {CTWILL}16 =\\{fflush}(\\{stdout})@> |
| 146 |
@$new_line {CTWILL}16 =\\{putchar}(\.{'\\n'})@> |
| 147 |
@z |
| 148 |
|
| 149 |
Section 17. |
| 150 |
|
| 151 |
@x |
| 152 |
@d long_buf_size (buf_size+longest_name) /* for \.{CWEAVE} */ |
| 153 |
@y |
| 154 |
@d long_buf_size (buf_size+longest_name) /* for \.{CWEAVE} */ |
| 155 |
@-long_buf_size@> |
| 156 |
@$long_buf_size {CTWILL}17 =$\\{buf\_size}+\\{longest\_name}$@> |
| 157 |
@z |
| 158 |
|
| 159 |
Section 20. |
| 160 |
|
| 161 |
@x |
| 162 |
@* Data structures exclusive to {\tt CWEAVE}. |
| 163 |
@y |
| 164 |
@* Data structures exclusive to {\tt CWEAVE}. |
| 165 |
@-a@> |
| 166 |
@z |
| 167 |
|
| 168 |
Section 22. |
| 169 |
|
| 170 |
@x |
| 171 |
@ The other large memory area in \.{CWEAVE} keeps the cross-reference data. |
| 172 |
@y |
| 173 |
@ The other large memory area in \.{CWEAVE} keeps the cross-reference data. |
| 174 |
@-p@> |
| 175 |
@-x@> |
| 176 |
@z |
| 177 |
|
| 178 |
Section 24. |
| 179 |
|
| 180 |
@x |
| 181 |
@d file_flag (3*cite_flag) |
| 182 |
@y |
| 183 |
@-file_flag@> |
| 184 |
@-def_flag@> |
| 185 |
@-xref@> |
| 186 |
@$file_flag {CTWILL}24 =$\T{3}*\\{cite\_flag}{}$@> |
| 187 |
@$def_flag {CTWILL}24 =$\T{2}*\\{cite\_flag}{}$@> |
| 188 |
@$xref {CTWILL}24 =\\{equiv\_or\_xref}@> |
| 189 |
@d file_flag (3*cite_flag) |
| 190 |
@z |
| 191 |
|
| 192 |
Section 25. |
| 193 |
|
| 194 |
@x |
| 195 |
@ A new cross-reference for an identifier is formed by calling |new_xref|, |
| 196 |
@y |
| 197 |
@ A new cross-reference for an identifier is formed by calling |new_xref|, |
| 198 |
@-a@> |
| 199 |
@-c@> |
| 200 |
@-p@> |
| 201 |
@-no_xref@> |
| 202 |
@$no_xref {CTWILL}25 =$\R\\{make\_xrefs}$@> |
| 203 |
@z |
| 204 |
|
| 205 |
Section 36. |
| 206 |
|
| 207 |
@x |
| 208 |
@d underline '\n' /* this code will be intercepted without confusion */ |
| 209 |
@y |
| 210 |
@d underline '\n' /* this code will be intercepted without confusion */ |
| 211 |
@-begin_comment@> |
| 212 |
@-underline@> |
| 213 |
@$begin_comment {CTWILL}36 =\.{'\\t'}@> |
| 214 |
@$underline {CTWILL}36 =\.{'\\n'}@> |
| 215 |
@z |
| 216 |
|
| 217 |
Section 42. |
| 218 |
|
| 219 |
CTWILL hickups on comment and produces unmatched '$' in mini-index. |
| 220 |
|
| 221 |
@x l.646 |
| 222 |
skip_TeX(void) /* skip past pure \TEX/ code */ |
| 223 |
@y |
| 224 |
skip_TeX(void) |
| 225 |
@z |
| 226 |
|
| 227 |
Section 44. |
| 228 |
|
| 229 |
@x |
| 230 |
@ As one might expect, |get_next| consists mostly of a big switch |
| 231 |
@y |
| 232 |
@ As one might expect, |get_next| consists mostly of a big switch |
| 233 |
@-c@> |
| 234 |
@$c {CTWILL}44 \&{eight\_bits}@> |
| 235 |
@z |
| 236 |
|
| 237 |
Section 45. |
| 238 |
|
| 239 |
@x |
| 240 |
@ @<Predecl...@>=@+static eight_bits get_next(void); |
| 241 |
@y |
| 242 |
@ @<Predecl...@>=@+static eight_bits get_next(void); |
| 243 |
@-get_next@> |
| 244 |
@z |
| 245 |
|
| 246 |
Section 46. |
| 247 |
|
| 248 |
@x |
| 249 |
@d left_preproc ord /* begins a preprocessor command */ |
| 250 |
@y |
| 251 |
@-left_preproc@> |
| 252 |
@$left_preproc {CTWILL}46 =\\{ord}@> |
| 253 |
@d left_preproc ord /* begins a preprocessor command */ |
| 254 |
@z |
| 255 |
|
| 256 |
Section 52. |
| 257 |
|
| 258 |
@x |
| 259 |
id_first=--loc; |
| 260 |
do |
| 261 |
++loc; |
| 262 |
while (isalpha((int)*loc) || isdigit((int)*loc) @| |
| 263 |
|| isxalpha(*loc) || ishigh(*loc)); |
| 264 |
id_loc=loc; return identifier; |
| 265 |
@y |
| 266 |
id_first=--loc;@/ |
| 267 |
do |
| 268 |
++loc; |
| 269 |
while (isalpha((int)*loc) || isdigit((int)*loc) @| |
| 270 |
|| isxalpha(*loc) || ishigh(*loc));@/ |
| 271 |
id_loc=loc;@/ |
| 272 |
return identifier; |
| 273 |
@z |
| 274 |
|
| 275 |
Section 53. |
| 276 |
|
| 277 |
@x |
| 278 |
@d gather_digits_while(t) while ((t) || *loc=='\'') |
| 279 |
@y |
| 280 |
@d gather_digits_while(t) while ((t) || *loc=='\'') |
| 281 |
@-t@> |
| 282 |
@z |
| 283 |
|
| 284 |
Section 65. |
| 285 |
|
| 286 |
@x |
| 287 |
@ @<Predecl...@>=@+static void skip_restricted(void); |
| 288 |
@y |
| 289 |
@ @<Predecl...@>=@+static void skip_restricted(void); |
| 290 |
@-skip_restricted@> |
| 291 |
@z |
| 292 |
|
| 293 |
Section 69. |
| 294 |
|
| 295 |
@x |
| 296 |
@ @<Predecl...@>=@+static void phase_one(void); |
| 297 |
@y |
| 298 |
@ @<Predecl...@>=@+static void phase_one(void); |
| 299 |
@-phase_one@> |
| 300 |
@z |
| 301 |
|
| 302 |
Section 72. |
| 303 |
|
| 304 |
@x |
| 305 |
C_xref( /* makes cross-references for \CEE/ identifiers */ |
| 306 |
eight_bits spec_ctrl) |
| 307 |
@y |
| 308 |
C_xref( /* makes cross-references for \CEE/ identifiers */ |
| 309 |
eight_bits spec_ctrl) |
| 310 |
@-C_xref@> |
| 311 |
@$C_xref {CTWILL}72 \&{static} \&{void} (\,)@> |
| 312 |
@z |
| 313 |
|
| 314 |
Section 86. |
| 315 |
|
| 316 |
@x |
| 317 |
@ The |flush_buffer| routine empties the buffer up to a given breakpoint, |
| 318 |
@y |
| 319 |
@ The |flush_buffer| routine empties the buffer up to a given breakpoint, |
| 320 |
@-b@> |
| 321 |
@-c@> |
| 322 |
@-tex_new_line@> |
| 323 |
@$tex_new_line {CTWILL}86 =$\\{putc}(\.{'\\n'},\39\\{active\_file})$@> |
| 324 |
@z |
| 325 |
|
| 326 |
Section 89. |
| 327 |
|
| 328 |
@x |
| 329 |
@d proofing flags['P'] |
| 330 |
@y |
| 331 |
@d proofing flags['P'] |
| 332 |
@-proofing@> |
| 333 |
@$proofing {CTWILL}89 =\\{flags}[\.{'P'}]@> |
| 334 |
@z |
| 335 |
|
| 336 |
Section 90. |
| 337 |
|
| 338 |
@x |
| 339 |
@ When we wish to append one character |c| to the output buffer, we write |
| 340 |
@y |
| 341 |
@ When we wish to append one character |c| to the output buffer, we write |
| 342 |
@-c@> |
| 343 |
@-s@> |
| 344 |
@z |
| 345 |
|
| 346 |
Section 91. |
| 347 |
|
| 348 |
@x |
| 349 |
out_str( /* output characters from |s| to end of string */ |
| 350 |
const char*s) |
| 351 |
@y |
| 352 |
out_str( /* output characters from |s| to end of string */ |
| 353 |
const char*s) |
| 354 |
@-out_str@> |
| 355 |
@$out_str {CTWILL}91 \&{static} \&{void} (\,)@> |
| 356 |
@z |
| 357 |
|
| 358 |
Section 101. |
| 359 |
|
| 360 |
@x |
| 361 |
@ The |copy_comment| function issues a warning if more braces are opened than |
| 362 |
@y |
| 363 |
@ The |copy_comment| function issues a warning if more braces are opened than |
| 364 |
@-c@> |
| 365 |
@-t@> |
| 366 |
@-copy_comment@> |
| 367 |
@$copy_comment {CTWILL}101 \&{static} \&{int} (\,)@> |
| 368 |
@z |
| 369 |
|
| 370 |
Section 108. |
| 371 |
|
| 372 |
@x |
| 373 |
@d print_cat(c) fputs(cat_name[c],stdout) /* symbolic printout of a category */ |
| 374 |
@y |
| 375 |
@d print_cat(c) fputs(cat_name[c],stdout) /* symbolic printout of a category */ |
| 376 |
@-c@> |
| 377 |
@z |
| 378 |
|
| 379 |
Section 109. |
| 380 |
|
| 381 |
@x |
| 382 |
@ The token lists for translated \TEX/ output contain some special control |
| 383 |
@y |
| 384 |
@ The token lists for translated \TEX/ output contain some special control |
| 385 |
@-n@> |
| 386 |
@z |
| 387 |
|
| 388 |
Section 110. |
| 389 |
|
| 390 |
@x |
| 391 |
@ The raw input is converted into scraps according to the following table, |
| 392 |
@y |
| 393 |
@* From raw input to scraps. |
| 394 |
@-c@> |
| 395 |
The raw input is converted into scraps according to the following table, |
| 396 |
@z |
| 397 |
|
| 398 |
Sections 111. |
| 399 |
|
| 400 |
@x l.7 line numbers refer to 'prod.w' |
| 401 |
@ Here is a table of all the productions. Each production that |
| 402 |
@y |
| 403 |
@* Table of all productions. Each production that |
| 404 |
@-time@> |
| 405 |
@-in@>@-f@>@-x@>@-y@> |
| 406 |
@-any@>@-z@>@-g@>@-a@> |
| 407 |
@-any_other@>@-p@> |
| 408 |
@-deprecated@> |
| 409 |
@-fallthrough@> |
| 410 |
@-likely@> |
| 411 |
@-nodiscard@> |
| 412 |
@-unlikely@> |
| 413 |
@-s@> |
| 414 |
@z |
| 415 |
|
| 416 |
Section 112. |
| 417 |
|
| 418 |
@x |
| 419 |
@d trans trans_plus.Trans /* translation texts of scraps */ |
| 420 |
@y |
| 421 |
@d trans trans_plus.Trans /* translation texts of scraps */ |
| 422 |
@-trans@> |
| 423 |
@$trans {CTWILL}112 =\\{trans\_plus}.\\{Trans}@> |
| 424 |
@z |
| 425 |
|
| 426 |
Section 115. |
| 427 |
|
| 428 |
@x |
| 429 |
@ Token lists in |@!tok_mem| are composed of the following kinds of |
| 430 |
@y |
| 431 |
@ Token lists in |@!tok_mem| are composed of the following kinds of |
| 432 |
@-DEBUG@> |
| 433 |
@-p@> |
| 434 |
@-res_flag@> |
| 435 |
@-section_flag@> |
| 436 |
@-tok_flag@> |
| 437 |
@-inner_tok_flag@> |
| 438 |
@$res_flag {CTWILL}115 =$\T{2}*\\{id\_flag}$@> |
| 439 |
@$section_flag {CTWILL}115 =$\T{3}*\\{id\_flag}$@> |
| 440 |
@$tok_flag {CTWILL}115 =$\T{3}*\\{id\_flag}$@> |
| 441 |
@$inner_tok_flag {CTWILL}115 =$\T{4}*\\{id\_flag}$@> |
| 442 |
@z |
| 443 |
|
| 444 |
Section 116. |
| 445 |
|
| 446 |
@x l.2221 |
| 447 |
@c |
| 448 |
@y |
| 449 |
@c |
| 450 |
@-DEBUG@> |
| 451 |
@z |
| 452 |
|
| 453 |
Section 118. |
| 454 |
|
| 455 |
@x |
| 456 |
@ The production rules listed above are embedded directly into \.{CWEAVE}, |
| 457 |
@y |
| 458 |
@ The production rules listed above are embedded directly into \.{CWEAVE}, |
| 459 |
@-a@> |
| 460 |
@-c@> |
| 461 |
@-d@> |
| 462 |
@-j@> |
| 463 |
@-k@> |
| 464 |
@-n@> |
| 465 |
@-pp@> |
| 466 |
@z |
| 467 |
|
| 468 |
Section 121. |
| 469 |
|
| 470 |
@x |
| 471 |
@ Let us consider the big switch for productions now, before looking |
| 472 |
@y |
| 473 |
@ Let us consider the big switch for productions now, before looking |
| 474 |
@-cat1@> |
| 475 |
@-cat2@> |
| 476 |
@-cat3@> |
| 477 |
@$cat1 {CTWILL}121 =$(\\{pp}+\T{1})\MG\\{cat}$@> |
| 478 |
@$cat2 {CTWILL}121 =$(\\{pp}+\T{2})\MG\\{cat}$@> |
| 479 |
@$cat3 {CTWILL}121 =$(\\{pp}+\T{3})\MG\\{cat}$@> |
| 480 |
@z |
| 481 |
|
| 482 |
Section 122. |
| 483 |
|
| 484 |
@x |
| 485 |
`\.{@@!@@:operator+=\}\{\\\&\{operator\} \$+\{=\}\$@@>}'). |
| 486 |
@y |
| 487 |
`\.{@@!@@:operator+=\}\{\\\&\{operator\} \$+\{=\}\$@@>}'). |
| 488 |
@-find_first_ident@> |
| 489 |
@-make_reserved@> |
| 490 |
@-make_underlined@> |
| 491 |
@-underline_xref@> |
| 492 |
@-no_ident_found@> |
| 493 |
@-case_found@> |
| 494 |
@-operator_found@> |
| 495 |
@$no_ident_found {CTWILL}122 =\hfil\break(\&{token\_pointer}) 0@> |
| 496 |
@$case_found {CTWILL}122 =\hfil\break(\&{token\_pointer}) 1@> |
| 497 |
@$operator_found {CTWILL}122 =\hfil\break(\&{token\_pointer}) 2@> |
| 498 |
@z |
| 499 |
|
| 500 |
Section 124. |
| 501 |
|
| 502 |
@x |
| 503 |
make_reserved( /* make the first identifier in |p->trans| like |int| */ |
| 504 |
scrap_pointer p) |
| 505 |
@y |
| 506 |
make_reserved( /* make the first identifier in |p->trans| like |int| */ |
| 507 |
scrap_pointer p) |
| 508 |
@-make_reserved@> |
| 509 |
@$make_reserved {CTWILL}124 \&{static} \&{void} (\,)@> |
| 510 |
@z |
| 511 |
|
| 512 |
Section 125. |
| 513 |
|
| 514 |
@x |
| 515 |
make_underlined( |
| 516 |
/* underline the entry for the first identifier in |p->trans| */ |
| 517 |
scrap_pointer p) |
| 518 |
@y |
| 519 |
make_underlined( |
| 520 |
/* underline the entry for the first identifier in |p->trans| */ |
| 521 |
scrap_pointer p) |
| 522 |
@-make_underlined@> |
| 523 |
@$make_underlined {CTWILL}125 \&{static} \&{void} (\,)@> |
| 524 |
@z |
| 525 |
|
| 526 |
@x |
| 527 |
return; /* this happens, for example, in |case found:| */ |
| 528 |
@y |
| 529 |
return; /* this happens, for example, in \&{case} \\{found}: */ |
| 530 |
@z |
| 531 |
|
| 532 |
Section 155. |
| 533 |
|
| 534 |
@x |
| 535 |
@d force_lines flags['f'] /* should each statement be on its own line? */ |
| 536 |
@d force_first flags['F'] /* should compound statement start on new line? */ |
| 537 |
@y |
| 538 |
@d force_lines flags['f'] /* should each statement be on its own line? */ |
| 539 |
@-force_lines@> @$force_lines {CTWILL}155 =\\{flags}[\.{'f'}]@> |
| 540 |
@d force_first flags['F'] /* should compound statement start on new line? */ |
| 541 |
@-force_first@> @$force_first {CTWILL}155 =\\{flags}[\.{'F'}]@> |
| 542 |
@z |
| 543 |
|
| 544 |
Section 185. |
| 545 |
|
| 546 |
@x |
| 547 |
@ @<Print a snapsh...@>= |
| 548 |
@y |
| 549 |
@ @<Print a snapsh...@>= |
| 550 |
@-n@> |
| 551 |
@% |
| 552 |
@$n {CTWILL}182 \&{short}@> |
| 553 |
@z |
| 554 |
|
| 555 |
Section 187. |
| 556 |
|
| 557 |
@x |
| 558 |
@ If we get to the end of the scrap list, category codes equal to zero are |
| 559 |
@y |
| 560 |
@ If we get to the end of the scrap list, category codes equal to zero are |
| 561 |
@-j@> |
| 562 |
@% |
| 563 |
@$j {CTWILL}188 \&{scrap\_pointer}@> |
| 564 |
@z |
| 565 |
|
| 566 |
Section 189. |
| 567 |
|
| 568 |
@x |
| 569 |
@ @<Predecl...@>=@+static text_pointer translate(void); |
| 570 |
@y |
| 571 |
@ @<Predecl...@>=@+static text_pointer translate(void); |
| 572 |
@-translate@> |
| 573 |
@z |
| 574 |
|
| 575 |
Section 193. |
| 576 |
|
| 577 |
@x |
| 578 |
if (next_control=='|' || next_control==begin_comment || |
| 579 |
next_control==begin_short_comment) return; |
| 580 |
@y |
| 581 |
@-C_parse@> |
| 582 |
@$C_parse {CTWILL}193 \&{static} \&{void} (\,)@> |
| 583 |
if (next_control=='|' || next_control==begin_comment @| || |
| 584 |
next_control==begin_short_comment) return; |
| 585 |
@z |
| 586 |
|
| 587 |
Section 194. |
| 588 |
|
| 589 |
@x |
| 590 |
@ @<Predecl...@>=@+static void C_parse(eight_bits); |
| 591 |
@y |
| 592 |
@ @<Predecl...@>=@+static void C_parse(eight_bits); |
| 593 |
@-C_parse@> |
| 594 |
@z |
| 595 |
|
| 596 |
Section 195. |
| 597 |
|
| 598 |
@x |
| 599 |
@ The following macro is used to append a scrap whose tokens have just |
| 600 |
@y |
| 601 |
@ The following macro is used to append a scrap whose tokens have just |
| 602 |
@-b@> |
| 603 |
@-c@> |
| 604 |
@z |
| 605 |
|
| 606 |
Section 204. |
| 607 |
|
| 608 |
@x |
| 609 |
@d make_pb flags['e'] |
| 610 |
@y |
| 611 |
@d make_pb flags['e'] |
| 612 |
@-make_pb@> |
| 613 |
@$make_pb {CTWILL}204 =\\{flags}[\.{'e'}]@> |
| 614 |
@z |
| 615 |
|
| 616 |
Section 208. |
| 617 |
|
| 618 |
@x |
| 619 |
@d cur_mode cur_state.mode_field /* current mode of interpretation */ |
| 620 |
@y |
| 621 |
@d cur_mode cur_state.mode_field /* current mode of interpretation */ |
| 622 |
@-cur_end@> |
| 623 |
@-cur_tok@> |
| 624 |
@-cur_mode@> |
| 625 |
@$cur_end {CTWILL}208 =\\{cur\_state}.\\{end\_field}@> |
| 626 |
@$cur_tok {CTWILL}208 =\\{cur\_state}.\\{tok\_field}@> |
| 627 |
@$cur_mode {CTWILL}208 =\\{cur\_state}.\\{mode\_field}@> |
| 628 |
@z |
| 629 |
|
| 630 |
Section 211. |
| 631 |
|
| 632 |
@x |
| 633 |
push_level( /* suspends the current level */ |
| 634 |
text_pointer p) |
| 635 |
@y |
| 636 |
push_level( /* suspends the current level */ |
| 637 |
text_pointer p) |
| 638 |
@-push_level@> |
| 639 |
@$push_level {CTWILL}211 \&{static} \&{void} (\,)@> |
| 640 |
@z |
| 641 |
|
| 642 |
Section 228. |
| 643 |
|
| 644 |
@x |
| 645 |
@ @<Predecl...@>=@+static void phase_two(void); |
| 646 |
@y |
| 647 |
@ @<Predecl...@>=@+static void phase_two(void); |
| 648 |
@-phase_two@> |
| 649 |
@z |
| 650 |
|
| 651 |
Section 230. |
| 652 |
|
| 653 |
@x |
| 654 |
@ @d usage_sentinel (struct perm_meaning *)1 |
| 655 |
@y |
| 656 |
@ @d usage_sentinel (struct perm_meaning *)1 |
| 657 |
@-usage_sentinel@> |
| 658 |
@$usage_sentinel {CTWILL}230 =(\&{struct} \&{perm\_meaning} ${}{*}{}$) \T{1}@> |
| 659 |
@z |
| 660 |
|
| 661 |
Section 234. |
| 662 |
|
| 663 |
@x |
| 664 |
finish_C( /* finishes a definition or a \CEE/ part */ |
| 665 |
bool visible) /* |true| if we should produce \TeX\ output */ |
| 666 |
@y |
| 667 |
finish_C( /* finishes a definition or a \CEE/ part */ |
| 668 |
bool visible) /* |true| if we should produce \TeX\ output */ |
| 669 |
@-finish_C@> |
| 670 |
@$finish_C {CTWILL}234 \&{static} \&{void} (\,)@> |
| 671 |
@z |
| 672 |
|
| 673 |
Section 235. |
| 674 |
|
| 675 |
@x |
| 676 |
@ @<Predecl...@>=@+static void finish_C(bool); |
| 677 |
@y |
| 678 |
@ @<Predecl...@>=@+static void finish_C(bool); |
| 679 |
@-finish_C@> |
| 680 |
@z |
| 681 |
|
| 682 |
Section 243. |
| 683 |
|
| 684 |
@x |
| 685 |
footnote( /* outputs section cross-references */ |
| 686 |
sixteen_bits flag) |
| 687 |
@y |
| 688 |
footnote( /* outputs section cross-references */ |
| 689 |
sixteen_bits flag) |
| 690 |
@-footnote@> |
| 691 |
@$footnote {CTWILL}243 \&{static} \&{void} (\,)@> |
| 692 |
@z |
| 693 |
|
| 694 |
Section 244. |
| 695 |
|
| 696 |
@x |
| 697 |
@ @<Predecl...@>=@+static void footnote(sixteen_bits); |
| 698 |
@y |
| 699 |
@ @<Predecl...@>=@+static void footnote(sixteen_bits); |
| 700 |
@-footnote@> |
| 701 |
@z |
| 702 |
|
| 703 |
Section 248. |
| 704 |
|
| 705 |
@x |
| 706 |
@ @<Predecl...@>=@+static void phase_three(void); |
| 707 |
@y |
| 708 |
@ @<Predecl...@>=@+static void phase_three(void); |
| 709 |
@-phase_three@> |
| 710 |
@z |
| 711 |
|
| 712 |
Section 250. |
| 713 |
|
| 714 |
@x |
| 715 |
@ A left-to-right radix sorting method is used, since this makes it easy to |
| 716 |
@y |
| 717 |
@ A left-to-right radix sorting method is used, since this makes it easy to |
| 718 |
@-c@> |
| 719 |
@z |
| 720 |
|
| 721 |
Section 252. |
| 722 |
|
| 723 |
@x |
| 724 |
@<Rest of |trans_plus| union@>= |
| 725 |
@y |
| 726 |
@<Rest of |trans_plus| union@>= |
| 727 |
@-j@> |
| 728 |
@-k@> |
| 729 |
@z |
| 730 |
|
| 731 |
Section 253. |
| 732 |
|
| 733 |
@x |
| 734 |
@ @d depth cat /* reclaims memory that is no longer needed for parsing */ |
| 735 |
@y |
| 736 |
@ @d depth cat /* reclaims memory that is no longer needed for parsing */ |
| 737 |
@-depth@> |
| 738 |
@-head@> |
| 739 |
@-sort_ptr@> |
| 740 |
@-max_sorts@> |
| 741 |
@$depth {CTWILL}253 =\\{cat}@> |
| 742 |
@$head {CTWILL}253 =\\{trans\_plus}.\\{Head}@> |
| 743 |
@$sort_ptr {CTWILL}253 =\\{scrap\_ptr}@> |
| 744 |
@z |
| 745 |
|
| 746 |
Section 257. |
| 747 |
|
| 748 |
@x |
| 749 |
@ Procedure |unbucket| goes through the buckets and adds nonempty lists |
| 750 |
@y |
| 751 |
@ Procedure |unbucket| goes through the buckets and adds nonempty lists |
| 752 |
@-unbucket@> |
| 753 |
@$unbucket {CTWILL}257 \&{static} \&{void} (\,)@> |
| 754 |
@z |
| 755 |
|
| 756 |
Section 258. |
| 757 |
|
| 758 |
@x |
| 759 |
@ @<Predecl...@>=@+static void unbucket(eight_bits); |
| 760 |
@y |
| 761 |
@ @<Predecl...@>=@+static void unbucket(eight_bits); |
| 762 |
@-unbucket@> |
| 763 |
@z |
| 764 |
|
| 765 |
Section 260. |
| 766 |
|
| 767 |
@x |
| 768 |
next_name=sort_ptr->head; |
| 769 |
@y |
| 770 |
next_name=sort_ptr->head;@/ |
| 771 |
@z |
| 772 |
|
| 773 |
Section 261. |
| 774 |
|
| 775 |
@x |
| 776 |
cur_name=sort_ptr->head; |
| 777 |
@y |
| 778 |
cur_name=sort_ptr->head;@/ |
| 779 |
@z |
| 780 |
|
| 781 |
Section 267. |
| 782 |
|
| 783 |
@x |
| 784 |
@ @<Predecl...@>=@+static void section_print(name_pointer); |
| 785 |
@y |
| 786 |
@ @<Predecl...@>=@+static void section_print(name_pointer); |
| 787 |
@-section_print@> |
| 788 |
@z |
| 789 |
|
| 790 |
Section 269. |
| 791 |
|
| 792 |
@x |
| 793 |
puts(_("\nMemory usage statistics:")); |
| 794 |
@.Memory usage statistics:@> |
| 795 |
printf(_("%td names (out of %ld)\n"),@^system dependencies@> |
| 796 |
(ptrdiff_t)(name_ptr-name_dir),(long)max_names); |
| 797 |
printf(_("%td cross-references (out of %ld)\n"), |
| 798 |
(ptrdiff_t)(xref_ptr-xmem),(long)max_refs); |
| 799 |
printf(_("%td bytes (out of %ld)\n"), |
| 800 |
(ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes); |
| 801 |
printf(_("%td temp meanings (out of %ld)\n"), |
| 802 |
(ptrdiff_t)(max_temp_meaning_ptr-temp_meaning_stack), |
| 803 |
(long)max_meanings); |
| 804 |
printf(_("%td titles (out of %ld)\n"), |
| 805 |
(ptrdiff_t)(title_code_ptr-title_code),(long)max_titles); |
| 806 |
puts(_("Parsing:")); |
| 807 |
printf(_("%td scraps (out of %ld)\n"), |
| 808 |
(ptrdiff_t)(max_scr_ptr-scrap_info),(long)max_scraps); |
| 809 |
printf(_("%td texts (out of %ld)\n"), |
| 810 |
(ptrdiff_t)(max_text_ptr-tok_start),(long)max_texts); |
| 811 |
printf(_("%td tokens (out of %ld)\n"), |
| 812 |
(ptrdiff_t)(max_tok_ptr-tok_mem),(long)max_toks); |
| 813 |
printf(_("%td levels (out of %ld)\n"), |
| 814 |
(ptrdiff_t)(max_stack_ptr-stack),(long)stack_size); |
| 815 |
puts(_("Sorting:")); |
| 816 |
printf(_("%td levels (out of %ld)\n"), |
| 817 |
(ptrdiff_t)(max_sort_ptr-scrap_info),(long)max_scraps); |
| 818 |
@y |
| 819 |
puts(_("\nMemory usage statistics:"));@/ |
| 820 |
@.Memory usage statistics:@> |
| 821 |
printf(_("%td names (out of %ld)\n"),@^system dependencies@> |
| 822 |
(ptrdiff_t)(name_ptr-name_dir),@/ |
| 823 |
@t\5\5\5\5@>(long)max_names);@/ |
| 824 |
printf(_("%td cross-references (out of %ld)\n"), |
| 825 |
(ptrdiff_t)(xref_ptr-xmem),(long)max_refs);@/ |
| 826 |
printf(_("%td bytes (out of %ld)\n"), |
| 827 |
(ptrdiff_t)(byte_ptr-byte_mem),@/ |
| 828 |
@t\5\5\5\5@>(long)max_bytes);@/ |
| 829 |
printf(_("%td temp meanings (out of %ld)\n"), |
| 830 |
(ptrdiff_t)(max_temp_meaning_ptr-temp_meaning_stack),@/ |
| 831 |
@t\5\5\5\5@>(long)max_meanings);@/ |
| 832 |
printf(_("%td titles (out of %ld)\n"), |
| 833 |
(ptrdiff_t)(title_code_ptr-title_code),@/ |
| 834 |
@t\5\5\5\5@>(long)max_titles);@/ |
| 835 |
puts(_("Parsing:"));@/ |
| 836 |
printf(_("%td scraps (out of %ld)\n"), |
| 837 |
(ptrdiff_t)(max_scr_ptr-scrap_info),@/ |
| 838 |
@t\5\5\5\5@>(long)max_scraps);@/ |
| 839 |
printf(_("%td texts (out of %ld)\n"), |
| 840 |
(ptrdiff_t)(max_text_ptr-tok_start),@/ |
| 841 |
@t\5\5\5\5@>(long)max_texts);@/ |
| 842 |
printf(_("%td tokens (out of %ld)\n"), |
| 843 |
(ptrdiff_t)(max_tok_ptr-tok_mem),@/ |
| 844 |
@t\5\5\5\5@>(long)max_toks);@/ |
| 845 |
printf(_("%td levels (out of %ld)\n"), |
| 846 |
(ptrdiff_t)(max_stack_ptr-stack),@/ |
| 847 |
@t\5\5\5\5@>(long)stack_size);@/ |
| 848 |
puts(_("Sorting:"));@/ |
| 849 |
printf(_("%td levels (out of %ld)\n"), |
| 850 |
(ptrdiff_t)(max_sort_ptr-scrap_info),@/ |
| 851 |
@t\5\5\5\5@>(long)max_scraps); |
| 852 |
@z |
| 853 |
|
| 854 |
Section 271. |
| 855 |
|
| 856 |
@x |
| 857 |
@q Section 2->271. @> |
| 858 |
@* {\tentex CTWILL} user manual. |
| 859 |
@y |
| 860 |
@* {\tentex CTWILL} user manual. |
| 861 |
@-s@> |
| 862 |
@-f@> |
| 863 |
@-x@> |
| 864 |
@-printf@> |
| 865 |
@z |
| 866 |
|
| 867 |
Section 273. |
| 868 |
|
| 869 |
@x |
| 870 |
static struct perm_meaning { |
| 871 |
@y |
| 872 |
static struct perm_meaning { |
| 873 |
@-perm_meaning@> |
| 874 |
@$perm_meaning {CTWILL}273 \&{static} \&{struct}@> |
| 875 |
@z |
| 876 |
|
| 877 |
Section 282. |
| 878 |
|
| 879 |
@x |
| 880 |
@ @<Predec...@>=@+static bool app_supp(text_pointer); |
| 881 |
@y |
| 882 |
@ @<Predec...@>=@+static bool app_supp(text_pointer); |
| 883 |
@-app_supp@> |
| 884 |
@z |
| 885 |
|
| 886 |
Section 283. |
| 887 |
|
| 888 |
@x |
| 889 |
@ The trickiest part of \.{CTWILL} is the procedure |make_ministring(pp+l)|, |
| 890 |
@y |
| 891 |
@ The trickiest part of \.{CTWILL} is the procedure |make_ministring(pp+l)|, |
| 892 |
@-a@> |
| 893 |
@-b@> |
| 894 |
@-c@> |
| 895 |
@-l@> |
| 896 |
@-make_ministring@> |
| 897 |
@$make_ministring {CTWILL}283 \&{static} \&{void} (\,)@> |
| 898 |
@z |
| 899 |
|
| 900 |
Section 284. |
| 901 |
|
| 902 |
@x |
| 903 |
@ @<Predec...@>=@+static void make_ministring(scrap_pointer); |
| 904 |
@y |
| 905 |
@ @<Predec...@>=@+static void make_ministring(scrap_pointer); |
| 906 |
@-make_ministring@> |
| 907 |
@z |
| 908 |
|
| 909 |
Section 292. |
| 910 |
|
| 911 |
@x |
| 912 |
@ @<Write the new meaning to the \.{.aux} file@>= |
| 913 |
@y |
| 914 |
@ @<Write the new meaning to the \.{.aux} file@>= |
| 915 |
@% |
| 916 |
@$p {CTWILL}276 \&{name\_pointer}@> |
| 917 |
@$q {CTWILL}276 \&{struct perm\_meaning} ${}{*}{}$@> |
| 918 |
@z |
| 919 |
|
| 920 |
Section 293. |
| 921 |
|
| 922 |
@x |
| 923 |
@<Flag the usage of this identifier, for the mini-index@>= |
| 924 |
@y |
| 925 |
@<Flag the usage of this identifier, for the mini-index@>= |
| 926 |
@% |
| 927 |
@$p {CTWILL}202 \&{name\_pointer}@> |
| 928 |
@z |
| 929 |
|
| 930 |
Section 296. |
| 931 |
|
| 932 |
@x |
| 933 |
@ @<Predec...@>=@+static void out_mini(meaning_struct *); |
| 934 |
@y |
| 935 |
@ @<Predec...@>=@+static void out_mini(meaning_struct *); |
| 936 |
@-out_mini@> |
| 937 |
@z |
| 938 |
|
| 939 |
Section 299. |
| 940 |
|
| 941 |
@x |
| 942 |
@ @<Predec...@>=@+static sixteen_bits title_lookup(void); |
| 943 |
@y |
| 944 |
@ @<Predec...@>=@+static sixteen_bits title_lookup(void); |
| 945 |
@-title_lookup@> |
| 946 |
@z |
| 947 |
|
| 948 |
Section 302. |
| 949 |
|
| 950 |
@x |
| 951 |
@d indent_param_decl flags['i'] /* should formal parameter declarations be indented? */ |
| 952 |
@y |
| 953 |
@d indent_param_decl flags['i'] /* should formal parameter declarations be indented? */ |
| 954 |
@-indent_param_decl@> |
| 955 |
@$indent_param_decl {CTWILL}302 =\\{flags}[\.{'i'}]@> |
| 956 |
@z |
| 957 |
|
| 958 |
Section 303. |
| 959 |
|
| 960 |
@x |
| 961 |
@d order_decl_stmt flags['o'] /* should declarations and statements be separated? */ |
| 962 |
@y |
| 963 |
@d order_decl_stmt flags['o'] /* should declarations and statements be separated? */ |
| 964 |
@-order_decl_stmt@> |
| 965 |
@$order_decl_stmt {CTWILL}303 =\\{flags}[\.{'o'}]@> |
| 966 |
@z |
| 967 |
|
| 968 |
Section 309. |
| 969 |
|
| 970 |
@x l.102 of CTWILL-TEXLIVE.CH |
| 971 |
@d kpse_find_cweb(name) kpse_find_file(name,kpse_cweb_format,true) |
| 972 |
@y |
| 973 |
@d kpse_find_cweb(name) kpse_find_file(name,kpse_cweb_format,true) |
| 974 |
@-name@> |
| 975 |
@z |