From dce1a2a6ecd9971433b4ee24c9d36b124cc1280e Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 29 Dec 2021 03:01:06 +0000 Subject: CTAN sync 202112290301 --- web/c_cpp/cweb/ctang-bs.ch | 77 +++++++++++++++------------------------------- 1 file changed, 25 insertions(+), 52 deletions(-) (limited to 'web/c_cpp/cweb/ctang-bs.ch') diff --git a/web/c_cpp/cweb/ctang-bs.ch b/web/c_cpp/cweb/ctang-bs.ch index 55cc27cd00..ceaefa93e5 100644 --- a/web/c_cpp/cweb/ctang-bs.ch +++ b/web/c_cpp/cweb/ctang-bs.ch @@ -17,16 +17,16 @@ by using "huge" pointers. The ``banner line'' defined here should be changed whenever \.{CTANGLE} is modified. -@d banner "This is CTANGLE (Version 4.2)" +@d banner "This is CTANGLE (Version 4.6)" @y The ``banner line'' defined here should be changed whenever \.{CTANGLE} is modified. -@d banner "This is CTANGLE (Version 4.2pc/big)" +@d banner "This is CTANGLE (Version 4.6pc/big)" @z -@x Section 9. +@x Section 10. for section names */ @= @@ -84,50 +84,7 @@ extern hash_pointer h; /* index into hash-head array */ @z -@x Section 17. -@ The following parameters were sufficient in the original \.{WEB} to -handle \TEX/, so they should be sufficient for most applications of -\.{CWEB}. - -@d max_bytes 1000000 /* the number of bytes in identifiers, - index entries, and section names */ -@d max_toks 1000000 /* number of bytes in compressed \CEE/ code */ -@d max_names 10239 /* number of identifiers, strings, section names; - must be less than 10240 */ -@d max_sections 4000 /* greater than the total number of sections */ -@d max_texts 10239 /* number of replacement texts, must be less than 10240 */ -@d longest_name 10000 /* file and section names and section texts shouldn't be longer than this */ -@d stack_size 500 /* number of simultaneous levels of macro expansion */ -@d buf_size 1000 /* maximum length of input line, plus one */ -@y -@ The following parameters were sufficient in the original \.{WEB} to -handle \TEX/, so they should be sufficient for most applications of -\.{CWEB}. - -(This is a modified version of \.{CTANGLE}, and in fact one of the parameters -has been reduced in value. The parameter |max_toks| -has been reduced from 270000 [which -was sufficient to handle \TEX/] to -170000, so that \.{CTANGLE} -may be run on {\mc MSDOS} -systems that are tight on memory. Consider, for -instance, an 80286-based machine with several TSRs and drivers, trying -to run \.{CTANGLE} from a makefile.) - -@d max_bytes 90000 /* the number of bytes in identifiers, - index entries, and section names */ -@d max_toks 170000 /* number of bytes in compressed \CEE/ code */ -@d max_names 4000 /* number of identifiers, strings, section names; - must be less than 10240 */ -@d max_sections 4000 /* greater than the total number of sections */ -@d max_texts 2500 /* number of replacement texts, must be less than 10240 */ -@d longest_name 10000 /* file and section names and section texts shouldn't be longer than this */ -@d stack_size 50 /* number of simultaneous levels of macro expansion */ -@d buf_size 100 /* for \.{CWEAVE} */ -@z - - -@x Section 16. +@x Section 19. eight_bits *tok_start; /* pointer into |tok_mem| */ sixteen_bits text_link; /* relates replacement texts */ } text; @@ -140,7 +97,23 @@ typedef text *text_pointer; @z -@x Section 17. +@x Section 20. +@ @d max_texts 2500 /* number of replacement texts, must be less than 10240 */ +@d max_toks 270000 /* number of bytes in compressed \CEE/ code */ +@y +@ (This is a modified version of \.{CTANGLE}, and in fact one of the parameters +has been reduced in value. The parameter |max_toks| +has been reduced from 270000 [which +was sufficient to handle \TEX/] to +170000, so that \.{CTANGLE} +may be run on {\mc MSDOS} +systems that are tight on memory. Consider, for +instance, an 80286-based machine with several TSRs and drivers, trying +to run \.{CTANGLE} from a makefile.) +@d max_texts 2500 /* number of replacement texts, must be less than 10240 */ +@d max_toks 170000 /* number of bytes in compressed \CEE/ code */ +@z +@x static eight_bits tok_mem[max_toks]; static eight_bits *tok_mem_end=tok_mem+max_toks-1; static eight_bits *tok_ptr; /* first unused position in |tok_mem| */ @@ -151,7 +124,7 @@ static eight_bits huge* tok_ptr; /* first unused position in |tok_mem| */ @z -@x Section 18. +@x Section 21. text_info->tok_start=tok_ptr=tok_mem; text_ptr=text_info+1; text_ptr->tok_start=tok_mem; /* this makes replacement text 0 of length zero */ @@ -163,14 +136,14 @@ text_ptr=text_info+1; text_ptr->tok_start=tok_mem; @z -@x Section 19. +@x Section 22. @d equiv equiv_or_xref /* info corresponding to names */ @y @d equiv ptr_union.equiv_member /* info corresponding to names */ @z -@x Section 27. +@x Section 31. eight_bits *end_field; /* ending location of replacement text */ eight_bits *byte_field; /* present location within replacement text */ @y @@ -179,7 +152,7 @@ text_ptr=text_info+1; text_ptr->tok_start=tok_mem; @z -@x Section 49. +@x Section 55. out_char( eight_bits cur_char) { -- cgit v1.2.3