summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk')
-rw-r--r--Build/source/texk/web2c/ChangeLog5
-rw-r--r--Build/source/texk/web2c/ctangleboot.cin355
-rw-r--r--Build/source/texk/web2c/cwebboot.cin302
-rw-r--r--Build/source/texk/web2c/cwebdir/ChangeLog13
-rw-r--r--Build/source/texk/web2c/cwebdir/comm-w2c.h4
-rw-r--r--Build/source/texk/web2c/cwebdir/common.c226
-rw-r--r--Build/source/texk/web2c/cwebdir/common.h4
-rw-r--r--Build/source/texk/web2c/cwebdir/common.w44
-rw-r--r--Build/source/texk/web2c/cwebdir/ctangle.c285
-rw-r--r--Build/source/texk/web2c/cwebdir/ctangle.w85
-rw-r--r--Build/source/texk/web2c/cwebdir/ctwill-mini.ch38
-rw-r--r--Build/source/texk/web2c/cwebdir/ctwill-w2c.ch32
-rw-r--r--Build/source/texk/web2c/cwebdir/cweav-w2c.ch21
-rw-r--r--Build/source/texk/web2c/cwebdir/cweave.w130
14 files changed, 764 insertions, 780 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog
index 2f64551f44c..7145449e4d4 100644
--- a/Build/source/texk/web2c/ChangeLog
+++ b/Build/source/texk/web2c/ChangeLog
@@ -1,3 +1,8 @@
+2021-02-24 Andreas Scherer <https://ascherer.github.io>
+
+ * ctangleboot.cin,
+ * cwebboot.cin: Code review.
+
2021-02-22 Andreas Scherer <https://ascherer.github.io>
* ctangleboot.cin,
diff --git a/Build/source/texk/web2c/ctangleboot.cin b/Build/source/texk/web2c/ctangleboot.cin
index b117786bc79..c82beeabe0b 100644
--- a/Build/source/texk/web2c/ctangleboot.cin
+++ b/Build/source/texk/web2c/ctangleboot.cin
@@ -281,7 +281,7 @@ sixteen_bits text_link;
typedef text*text_pointer;
/*:19*//*31:*/
-#line 270 "cwebdir/ctangle.w"
+#line 269 "cwebdir/ctangle.w"
typedef struct{
eight_bits*end_field;
@@ -311,7 +311,7 @@ static eight_bits*tok_ptr;
static text_pointer last_unnamed;
/*:26*//*32:*/
-#line 286 "cwebdir/ctangle.w"
+#line 285 "cwebdir/ctangle.w"
static output_state cur_state;
@@ -320,18 +320,18 @@ static stack_pointer stack_end= stack+stack_size;
static stack_pointer stack_ptr;
/*:32*//*37:*/
-#line 362 "cwebdir/ctangle.w"
+#line 361 "cwebdir/ctangle.w"
static int cur_val;
/*:37*//*42:*/
-#line 454 "cwebdir/ctangle.w"
+#line 452 "cwebdir/ctangle.w"
static eight_bits out_state;
static boolean protect;
/*:42*//*45:*/
-#line 486 "cwebdir/ctangle.w"
+#line 483 "cwebdir/ctangle.w"
static name_pointer output_files[max_files];
static name_pointer*cur_out_file,*end_output_files,*an_output_file;
@@ -339,33 +339,33 @@ static char cur_section_name_char;
static char output_file_name[longest_name+1];
/*:45*//*52:*/
-#line 586 "cwebdir/ctangle.w"
+#line 582 "cwebdir/ctangle.w"
static boolean output_defs_seen= false;
/*:52*//*57:*/
-#line 695 "cwebdir/ctangle.w"
+#line 691 "cwebdir/ctangle.w"
static char translit[128][translit_length];
/*:57*//*62:*/
-#line 774 "cwebdir/ctangle.w"
+#line 770 "cwebdir/ctangle.w"
static eight_bits ccode[256];
/*:62*//*66:*/
-#line 834 "cwebdir/ctangle.w"
+#line 830 "cwebdir/ctangle.w"
static boolean comment_continues= false;
/*:66*//*68:*/
-#line 873 "cwebdir/ctangle.w"
+#line 869 "cwebdir/ctangle.w"
static name_pointer cur_section_name;
static boolean no_where;
/*:68*//*82:*/
-#line 1187 "cwebdir/ctangle.w"
+#line 1182 "cwebdir/ctangle.w"
static text_pointer cur_text;
static eight_bits next_control;
@@ -408,70 +408,61 @@ extern void common_init(void);
extern void print_stats(void);
extern void cb_show_banner(void);
-/*:16*//*29:*/
-#line 231 "cwebdir/ctangle.w"
-
+/*:16*//*30:*/
+#line 241 "cwebdir/ctangle.w"
static void store_two_bytes(sixteen_bits);
-/*:29*//*34:*/
-#line 310 "cwebdir/ctangle.w"
+/*:30*//*35:*/
+#line 324 "cwebdir/ctangle.w"
static void push_level(name_pointer);
static void pop_level(boolean);
-/*:34*//*38:*/
-#line 369 "cwebdir/ctangle.w"
-
+/*:35*//*39:*/
+#line 397 "cwebdir/ctangle.w"
static void get_output(void);
-/*:38*//*43:*/
-#line 462 "cwebdir/ctangle.w"
-
+/*:39*//*44:*/
+#line 473 "cwebdir/ctangle.w"
static void flush_buffer(void);
-/*:43*//*48:*/
-#line 517 "cwebdir/ctangle.w"
-
+/*:44*//*49:*/
+#line 549 "cwebdir/ctangle.w"
static void phase_two(void);
-/*:48*//*53:*/
-#line 589 "cwebdir/ctangle.w"
+/*:49*//*53:*/
+#line 585 "cwebdir/ctangle.w"
static void output_defs(void);
static void out_char(eight_bits);
-/*:53*//*64:*/
-#line 798 "cwebdir/ctangle.w"
+/*:53*//*65:*/
+#line 810 "cwebdir/ctangle.w"
static eight_bits skip_ahead(void);
static boolean skip_comment(boolean);
-/*:64*//*69:*/
-#line 885 "cwebdir/ctangle.w"
-
+/*:65*//*70:*/
+#line 924 "cwebdir/ctangle.w"
static eight_bits get_next(void);
-/*:69*//*83:*/
-#line 1191 "cwebdir/ctangle.w"
-
+/*:70*//*84:*/
+#line 1208 "cwebdir/ctangle.w"
static void scan_repl(eight_bits);
-/*:83*//*90:*/
-#line 1348 "cwebdir/ctangle.w"
-
+/*:84*//*91:*/
+#line 1379 "cwebdir/ctangle.w"
static void scan_section(void);
-/*:90*//*98:*/
-#line 1455 "cwebdir/ctangle.w"
-
+/*:91*//*99:*/
+#line 1460 "cwebdir/ctangle.w"
static void phase_one(void);
-/*:98*//*100:*/
-#line 1473 "cwebdir/ctangle.w"
-
+/*:99*//*101:*/
+#line 1494 "cwebdir/ctangle.w"
static void skip_limbo(void);
-/*:100*/
+/*:101*/
#line 72 "cwebdir/ctangle.w"
@@ -501,12 +492,12 @@ init_node(name_dir);
last_unnamed= text_info;text_info->text_link= 0;
/*:27*//*46:*/
-#line 496 "cwebdir/ctangle.w"
+#line 493 "cwebdir/ctangle.w"
cur_out_file= end_output_files= output_files+max_files;
/*:46*//*58:*/
-#line 698 "cwebdir/ctangle.w"
+#line 694 "cwebdir/ctangle.w"
{
int i;
@@ -514,7 +505,7 @@ for(i= 0;i<128;i++)sprintf(translit[i],"X%02X",(unsigned int)(128+i));
}
/*:58*//*63:*/
-#line 777 "cwebdir/ctangle.w"
+#line 773 "cwebdir/ctangle.w"
{
int c;
for(c= 0;c<256;c++)ccode[c]= ignore;
@@ -534,7 +525,7 @@ ccode['\'']= ord;
}
/*:63*//*78:*/
-#line 1108 "cwebdir/ctangle.w"
+#line 1103 "cwebdir/ctangle.w"
section_text[0]= ' ';
/*:78*//*116:*/
@@ -579,22 +570,22 @@ node->equiv= (void*)text_info;
void
init_p(name_pointer p,eight_bits t){(void)p;(void)t;}
-/*:25*//*30:*/
-#line 234 "cwebdir/ctangle.w"
+/*:25*//*29:*/
+#line 231 "cwebdir/ctangle.w"
-void
+static void
store_two_bytes(
sixteen_bits x)
{
#line 65 "cwebdir/ctang-w2c.ch"
if(tok_ptr+2> tok_mem_end)overflow(_("token"));
-#line 240 "cwebdir/ctangle.w"
+#line 237 "cwebdir/ctangle.w"
*tok_ptr++= x>>8;
*tok_ptr++= x&0377;
}
-/*:30*//*35:*/
-#line 314 "cwebdir/ctangle.w"
+/*:29*//*34:*/
+#line 309 "cwebdir/ctangle.w"
static void
push_level(
@@ -602,7 +593,7 @@ name_pointer p)
{
#line 71 "cwebdir/ctang-w2c.ch"
if(stack_ptr==stack_end)overflow(_("stack"));
-#line 320 "cwebdir/ctangle.w"
+#line 315 "cwebdir/ctangle.w"
*stack_ptr= cur_state;
stack_ptr++;
if(p!=NULL){
@@ -612,8 +603,8 @@ cur_section= 0;
}
}
-/*:35*//*36:*/
-#line 333 "cwebdir/ctangle.w"
+/*:34*//*36:*/
+#line 332 "cwebdir/ctangle.w"
static void
pop_level(
@@ -628,8 +619,8 @@ stack_ptr--;
if(stack_ptr> stack)cur_state= *stack_ptr;
}
-/*:36*//*39:*/
-#line 372 "cwebdir/ctangle.w"
+/*:36*//*38:*/
+#line 368 "cwebdir/ctangle.w"
static void
get_output(void)
@@ -652,7 +643,7 @@ switch(a/024000){
case 0:cur_val= a;out_char(identifier);break;
case 1:if(a==output_defs_flag)output_defs();
else/*40:*/
-#line 404 "cwebdir/ctangle.w"
+#line 402 "cwebdir/ctangle.w"
{
a-= 024000;
@@ -660,7 +651,7 @@ if((a+name_dir)->equiv!=(void*)text_info)push_level(a+name_dir);
else if(a!=0){
#line 77 "cwebdir/ctang-w2c.ch"
fputs(_("\n! Not present: <"),stdout);
-#line 410 "cwebdir/ctangle.w"
+#line 408 "cwebdir/ctangle.w"
print_section_name(a+name_dir);err_print(">");
}
@@ -668,7 +659,7 @@ goto restart;
}
/*:40*/
-#line 393 "cwebdir/ctangle.w"
+#line 389 "cwebdir/ctangle.w"
break;
default:cur_val= a-050000;if(cur_val> 0)cur_section= cur_val;
@@ -677,8 +668,8 @@ out_char(section_number);
}
}
-/*:39*//*44:*/
-#line 465 "cwebdir/ctangle.w"
+/*:38*//*43:*/
+#line 460 "cwebdir/ctangle.w"
static void
flush_buffer(void)
@@ -692,35 +683,35 @@ update_terminal;
cur_line++;
}
-/*:44*//*49:*/
-#line 520 "cwebdir/ctangle.w"
+/*:43*//*48:*/
+#line 514 "cwebdir/ctangle.w"
static void
phase_two(void){
web_file_open= false;
cur_line= 1;
/*33:*/
-#line 299 "cwebdir/ctangle.w"
+#line 298 "cwebdir/ctangle.w"
stack_ptr= stack+1;cur_name= name_dir;cur_repl= text_info->text_link+text_info;
cur_byte= cur_repl->tok_start;cur_end= (cur_repl+1)->tok_start;cur_section= 0;
/*:33*/
-#line 525 "cwebdir/ctangle.w"
+#line 519 "cwebdir/ctangle.w"
/*51:*/
-#line 582 "cwebdir/ctangle.w"
+#line 578 "cwebdir/ctangle.w"
if(!output_defs_seen)
output_defs();
/*:51*/
-#line 526 "cwebdir/ctangle.w"
+#line 520 "cwebdir/ctangle.w"
if(text_info->text_link==0&&cur_out_file==end_output_files){
#line 89 "cwebdir/ctang-w2c.ch"
fputs(_("\n! No program text was specified."),stdout);mark_harmless;
-#line 529 "cwebdir/ctangle.w"
+#line 523 "cwebdir/ctangle.w"
}
else{
@@ -728,13 +719,13 @@ if(cur_out_file==end_output_files){
if(show_progress)
#line 95 "cwebdir/ctang-w2c.ch"
printf(_("\nWriting the output file (%s):"),C_file_name);
-#line 535 "cwebdir/ctangle.w"
+#line 529 "cwebdir/ctangle.w"
}
else{
if(show_progress){
#line 101 "cwebdir/ctang-w2c.ch"
fputs(_("\nWriting the output files:"),stdout);
-#line 539 "cwebdir/ctangle.w"
+#line 533 "cwebdir/ctangle.w"
printf(" (%s)",C_file_name);
update_terminal;
@@ -978,22 +969,22 @@ rename(check_file_name,output_file_name);
}
strcpy(check_file_name,"");
-#line 577 "cwebdir/ctangle.w"
+#line 573 "cwebdir/ctangle.w"
/*:50*/
-#line 547 "cwebdir/ctangle.w"
+#line 541 "cwebdir/ctangle.w"
if(show_happiness){
if(show_progress)new_line;
#line 107 "cwebdir/ctang-w2c.ch"
fputs(_("Done."),stdout);
-#line 551 "cwebdir/ctangle.w"
+#line 545 "cwebdir/ctangle.w"
}
}
}
-/*:49*//*54:*/
-#line 593 "cwebdir/ctangle.w"
+/*:48*//*54:*/
+#line 589 "cwebdir/ctangle.w"
static void
output_defs(void)
@@ -1021,7 +1012,7 @@ cur_val= a;out_char(identifier);
}
#line 159 "cwebdir/ctang-w2c.ch"
else if(a<050000){confusion(_("macro defs have strange char"));}
-#line 619 "cwebdir/ctangle.w"
+#line 615 "cwebdir/ctangle.w"
else{
cur_val= a-050000;cur_section= cur_val;out_char(section_number);
}
@@ -1035,7 +1026,7 @@ pop_level(false);
}
/*:54*//*55:*/
-#line 636 "cwebdir/ctangle.w"
+#line 632 "cwebdir/ctangle.w"
static void
out_char(
@@ -1048,7 +1039,7 @@ case'\n':if(protect&&out_state!=verbatim)C_putc(' ');
if(protect||out_state==verbatim)C_putc('\\');
flush_buffer();if(out_state!=verbatim)out_state= normal;break;
/*59:*/
-#line 704 "cwebdir/ctangle.w"
+#line 700 "cwebdir/ctangle.w"
case identifier:
if(out_state==num_or_id)C_putc(' ');
@@ -1063,10 +1054,10 @@ j++;
out_state= num_or_id;break;
/*:59*/
-#line 647 "cwebdir/ctangle.w"
+#line 643 "cwebdir/ctangle.w"
/*60:*/
-#line 717 "cwebdir/ctangle.w"
+#line 713 "cwebdir/ctangle.w"
case section_number:
if(cur_val> 0)C_printf("/*%d:*/",cur_val);
@@ -1093,10 +1084,10 @@ C_printf("%s","\"\n");
break;
/*:60*/
-#line 648 "cwebdir/ctangle.w"
+#line 644 "cwebdir/ctangle.w"
/*56:*/
-#line 666 "cwebdir/ctangle.w"
+#line 662 "cwebdir/ctangle.w"
case plus_plus:C_putc('+');C_putc('+');out_state= normal;break;
case minus_minus:C_putc('-');C_putc('-');out_state= normal;break;
@@ -1117,7 +1108,7 @@ case minus_gt_ast:C_putc('-');C_putc('>');C_putc('*');out_state= normal;
break;
/*:56*/
-#line 649 "cwebdir/ctangle.w"
+#line 645 "cwebdir/ctangle.w"
case'=':case'>':C_putc(cur_char);C_putc(' ');
out_state= normal;break;
@@ -1135,8 +1126,8 @@ default:C_putc(cur_char);out_state= normal;break;
}
}
-/*:55*//*65:*/
-#line 802 "cwebdir/ctangle.w"
+/*:55*//*64:*/
+#line 794 "cwebdir/ctangle.w"
static eight_bits
skip_ahead(void)
@@ -1153,8 +1144,8 @@ if(c!=ignore||*(loc-1)=='>')return c;
}
}
-/*:65*//*67:*/
-#line 837 "cwebdir/ctangle.w"
+/*:64*//*67:*/
+#line 833 "cwebdir/ctangle.w"
static boolean skip_comment(
boolean is_long_comment)
@@ -1167,7 +1158,7 @@ if(get_line())return comment_continues= true;
else{
#line 165 "cwebdir/ctang-w2c.ch"
err_print(_("! Input ended in mid-comment"));
-#line 848 "cwebdir/ctangle.w"
+#line 844 "cwebdir/ctangle.w"
return comment_continues= false;
}
@@ -1182,7 +1173,7 @@ if(c=='@'){
if(ccode[(eight_bits)*loc]==new_section){
#line 171 "cwebdir/ctang-w2c.ch"
err_print(_("! Section name ended in mid-comment"));loc--;
-#line 861 "cwebdir/ctangle.w"
+#line 857 "cwebdir/ctangle.w"
return comment_continues= false;
}
@@ -1191,8 +1182,8 @@ else loc++;
}
}
-/*:67*//*70:*/
-#line 888 "cwebdir/ctangle.w"
+/*:67*//*69:*/
+#line 881 "cwebdir/ctangle.w"
static eight_bits
get_next(void)
@@ -1206,7 +1197,7 @@ if(get_line()==false)return new_section;
else if(print_where&&!no_where){
print_where= false;
/*85:*/
-#line 1220 "cwebdir/ctangle.w"
+#line 1214 "cwebdir/ctangle.w"
store_two_bytes(0150000);
if(changing&&include_depth==change_depth){
@@ -1221,7 +1212,7 @@ id_loc= id_first+strlen(id_first);
app_repl(a_l%0400);}
/*:85*/
-#line 900 "cwebdir/ctangle.w"
+#line 893 "cwebdir/ctangle.w"
}
else return'\n';
@@ -1235,7 +1226,7 @@ else continue;
}
loc++;
if(xisdigit(c)||c=='.')/*73:*/
-#line 969 "cwebdir/ctangle.w"
+#line 964 "cwebdir/ctangle.w"
{
id_first= loc-1;
if(*id_first=='.'&&!xisdigit(*loc))goto mistake;
@@ -1260,13 +1251,13 @@ return constant;
}
/*:73*/
-#line 912 "cwebdir/ctangle.w"
+#line 905 "cwebdir/ctangle.w"
else if(c=='\''||c=='"'
||((c=='L'||c=='u'||c=='U')&&(*loc=='\''||*loc=='"'))
||((c=='u'&&*loc=='8')&&(*(loc+1)=='\''||*(loc+1)=='"')))
/*74:*/
-#line 997 "cwebdir/ctangle.w"
+#line 992 "cwebdir/ctangle.w"
{
char delim= c;
id_first= section_text+1;
@@ -1280,13 +1271,13 @@ if(loc>=limit){
if(*(limit-1)!='\\'){
#line 177 "cwebdir/ctang-w2c.ch"
err_print(_("! String didn't end"));loc= limit;break;
-#line 1009 "cwebdir/ctangle.w"
+#line 1004 "cwebdir/ctangle.w"
}
if(get_line()==false){
#line 183 "cwebdir/ctang-w2c.ch"
err_print(_("! Input ended in middle of string"));loc= buffer;break;
-#line 1013 "cwebdir/ctangle.w"
+#line 1008 "cwebdir/ctangle.w"
}
else if(++id_loc<=section_text_end)*id_loc= '\n';
@@ -1306,7 +1297,7 @@ if(++id_loc<=section_text_end)*id_loc= c;
if(id_loc>=section_text_end){
#line 189 "cwebdir/ctang-w2c.ch"
fputs(_("\n! String too long: "),stdout);
-#line 1031 "cwebdir/ctangle.w"
+#line 1026 "cwebdir/ctangle.w"
term_write(section_text+1,25);
err_print("...");
@@ -1316,11 +1307,11 @@ return string;
}
/*:74*/
-#line 916 "cwebdir/ctangle.w"
+#line 909 "cwebdir/ctangle.w"
else if(isalpha(c)||isxalpha(c)||ishigh(c))
/*72:*/
-#line 962 "cwebdir/ctangle.w"
+#line 957 "cwebdir/ctangle.w"
{
id_first= --loc;
while(isalpha((eight_bits)*++loc)||isdigit((eight_bits)*loc)
@@ -1329,47 +1320,47 @@ id_loc= loc;return identifier;
}
/*:72*/
-#line 918 "cwebdir/ctangle.w"
+#line 911 "cwebdir/ctangle.w"
else if(c=='@')/*75:*/
-#line 1042 "cwebdir/ctangle.w"
+#line 1037 "cwebdir/ctangle.w"
{
c= ccode[(eight_bits)*loc++];
switch(c){
case ignore:continue;
#line 195 "cwebdir/ctang-w2c.ch"
case translit_code:err_print(_("! Use @l in limbo only"));continue;
-#line 1047 "cwebdir/ctangle.w"
+#line 1042 "cwebdir/ctangle.w"
case control_text:while((c= skip_ahead())=='@');
if(*(loc-1)!='>')
#line 201 "cwebdir/ctang-w2c.ch"
err_print(_("! Double @ should be used in control text"));
-#line 1052 "cwebdir/ctangle.w"
+#line 1047 "cwebdir/ctangle.w"
continue;
case section_name:
cur_section_name_char= *(loc-1);
/*77:*/
-#line 1090 "cwebdir/ctangle.w"
+#line 1085 "cwebdir/ctangle.w"
{
char*k;
/*79:*/
-#line 1110 "cwebdir/ctangle.w"
+#line 1105 "cwebdir/ctangle.w"
k= section_text;
while(true){
if(loc> limit&&get_line()==false){
#line 219 "cwebdir/ctang-w2c.ch"
err_print(_("! Input ended in section name"));
-#line 1115 "cwebdir/ctangle.w"
+#line 1110 "cwebdir/ctangle.w"
loc= buffer+1;break;
}
c= *loc;
/*80:*/
-#line 1134 "cwebdir/ctangle.w"
+#line 1129 "cwebdir/ctangle.w"
if(c=='@'){
c= *(loc+1);
@@ -1379,20 +1370,20 @@ loc+= 2;break;
if(ccode[(eight_bits)c]==new_section){
#line 231 "cwebdir/ctang-w2c.ch"
err_print(_("! Section name didn't end"));break;
-#line 1142 "cwebdir/ctangle.w"
+#line 1137 "cwebdir/ctangle.w"
}
if(ccode[(eight_bits)c]==section_name){
#line 237 "cwebdir/ctang-w2c.ch"
err_print(_("! Nesting of section names not allowed"));break;
-#line 1146 "cwebdir/ctangle.w"
+#line 1141 "cwebdir/ctangle.w"
}
*(++k)= '@';loc++;
}
/*:80*/
-#line 1119 "cwebdir/ctangle.w"
+#line 1114 "cwebdir/ctangle.w"
loc++;if(k<section_text_end)k++;
if(xisspace(c)){
@@ -1403,7 +1394,7 @@ c= ' ';if(*(k-1)==' ')k--;
if(k>=section_text_end){
#line 225 "cwebdir/ctang-w2c.ch"
fputs(_("\n! Section name too long: "),stdout);
-#line 1128 "cwebdir/ctangle.w"
+#line 1123 "cwebdir/ctangle.w"
term_write(section_text+1,25);
printf("...");mark_harmless;
@@ -1411,14 +1402,14 @@ printf("...");mark_harmless;
if(*k==' '&&k> section_text)k--;
/*:79*/
-#line 1092 "cwebdir/ctangle.w"
+#line 1087 "cwebdir/ctangle.w"
if(k-section_text> 3&&strncmp(k-2,"...",3)==0)
cur_section_name= section_lookup(section_text+1,k-3,1);
else cur_section_name= section_lookup(section_text+1,k,0);
if(cur_section_name_char=='(')
/*47:*/
-#line 500 "cwebdir/ctangle.w"
+#line 497 "cwebdir/ctangle.w"
{
for(an_output_file= cur_out_file;
@@ -1430,38 +1421,38 @@ if(cur_out_file> output_files)
else{
#line 83 "cwebdir/ctang-w2c.ch"
overflow(_("output files"));
-#line 510 "cwebdir/ctangle.w"
+#line 507 "cwebdir/ctangle.w"
}
}
}
/*:47*/
-#line 1098 "cwebdir/ctangle.w"
+#line 1093 "cwebdir/ctangle.w"
return section_name;
}
/*:77*/
-#line 1056 "cwebdir/ctangle.w"
+#line 1051 "cwebdir/ctangle.w"
case string:/*81:*/
-#line 1156 "cwebdir/ctangle.w"
+#line 1151 "cwebdir/ctangle.w"
{
id_first= loc++;*(limit+1)= '@';*(limit+2)= '>';
while(*loc!='@'||*(loc+1)!='>')loc++;
#line 243 "cwebdir/ctang-w2c.ch"
if(loc>=limit)err_print(_("! Verbatim string didn't end"));
-#line 1160 "cwebdir/ctangle.w"
+#line 1155 "cwebdir/ctangle.w"
id_loc= loc;loc+= 2;
return string;
}
/*:81*/
-#line 1057 "cwebdir/ctangle.w"
+#line 1052 "cwebdir/ctangle.w"
case ord:/*76:*/
-#line 1069 "cwebdir/ctangle.w"
+#line 1064 "cwebdir/ctangle.w"
id_first= loc;
if(*loc=='\\'){
@@ -1472,7 +1463,7 @@ if(*loc=='@'){
if(*(loc+1)!='@')
#line 207 "cwebdir/ctang-w2c.ch"
err_print(_("! Double @ should be used in ASCII constant"));
-#line 1078 "cwebdir/ctangle.w"
+#line 1073 "cwebdir/ctangle.w"
else loc++;
}
@@ -1480,7 +1471,7 @@ loc++;
if(loc> limit){
#line 213 "cwebdir/ctang-w2c.ch"
err_print(_("! String didn't end"));loc= limit-1;break;
-#line 1084 "cwebdir/ctangle.w"
+#line 1079 "cwebdir/ctangle.w"
}
}
@@ -1488,14 +1479,14 @@ loc++;
return ord;
/*:76*/
-#line 1058 "cwebdir/ctangle.w"
+#line 1053 "cwebdir/ctangle.w"
default:return c;
}
}
/*:75*/
-#line 919 "cwebdir/ctangle.w"
+#line 912 "cwebdir/ctangle.w"
else if(xisspace(c)){
if(!preprocessing||loc> limit)continue;
@@ -1504,7 +1495,7 @@ else return' ';
}
else if(c=='#'&&loc==buffer+1)preprocessing= 1;
mistake:/*71:*/
-#line 940 "cwebdir/ctangle.w"
+#line 935 "cwebdir/ctangle.w"
switch(c){
case'+':if(*loc=='+')compress(plus_plus);break;
@@ -1528,14 +1519,14 @@ case'!':if(*loc=='=')compress(non_eq);break;
}
/*:71*/
-#line 926 "cwebdir/ctangle.w"
+#line 919 "cwebdir/ctangle.w"
return c;
}
}
-/*:70*//*84:*/
-#line 1194 "cwebdir/ctangle.w"
+/*:69*//*83:*/
+#line 1186 "cwebdir/ctangle.w"
static void
scan_repl(
@@ -1543,7 +1534,7 @@ eight_bits t)
{
sixteen_bits a;
if(t==section_name){/*85:*/
-#line 1220 "cwebdir/ctangle.w"
+#line 1214 "cwebdir/ctangle.w"
store_two_bytes(0150000);
if(changing&&include_depth==change_depth){
@@ -1558,11 +1549,11 @@ id_loc= id_first+strlen(id_first);
app_repl(a_l%0400);}
/*:85*/
-#line 1200 "cwebdir/ctangle.w"
+#line 1192 "cwebdir/ctangle.w"
}
while(true)switch(a= get_next()){
/*86:*/
-#line 1233 "cwebdir/ctangle.w"
+#line 1227 "cwebdir/ctangle.w"
case identifier:a= id_lookup(id_first,id_loc,0)-name_dir;
app_repl((a/0400)+0200);
@@ -1570,7 +1561,7 @@ app_repl(a%0400);break;
case section_name:if(t!=section_name)goto done;
else{
/*87:*/
-#line 1266 "cwebdir/ctangle.w"
+#line 1260 "cwebdir/ctangle.w"
{
char*try_loc= loc;
while(*try_loc==' '&&try_loc<limit)try_loc++;
@@ -1578,20 +1569,20 @@ if(*try_loc=='+'&&try_loc<limit)try_loc++;
while(*try_loc==' '&&try_loc<limit)try_loc++;
#line 273 "cwebdir/ctang-w2c.ch"
if(*try_loc=='=')err_print(_("! Missing `@ ' before a named section"));
-#line 1272 "cwebdir/ctangle.w"
+#line 1266 "cwebdir/ctangle.w"
}
/*:87*/
-#line 1239 "cwebdir/ctangle.w"
+#line 1233 "cwebdir/ctangle.w"
a= cur_section_name-name_dir;
app_repl((a/0400)+0250);
app_repl(a%0400);
/*85:*/
-#line 1220 "cwebdir/ctangle.w"
+#line 1214 "cwebdir/ctangle.w"
store_two_bytes(0150000);
if(changing&&include_depth==change_depth){
@@ -1606,12 +1597,12 @@ id_loc= id_first+strlen(id_first);
app_repl(a_l%0400);}
/*:85*/
-#line 1243 "cwebdir/ctangle.w"
+#line 1237 "cwebdir/ctangle.w"
break;
}
#line 261 "cwebdir/ctang-w2c.ch"
case output_defs_code:if(t!=section_name)err_print(_("! Misplaced @h"));
-#line 1246 "cwebdir/ctangle.w"
+#line 1240 "cwebdir/ctangle.w"
else{
output_defs_seen= true;
@@ -1619,7 +1610,7 @@ a= output_defs_flag;
app_repl((a/0400)+0200);
app_repl(a%0400);
/*85:*/
-#line 1220 "cwebdir/ctangle.w"
+#line 1214 "cwebdir/ctangle.w"
store_two_bytes(0150000);
if(changing&&include_depth==change_depth){
@@ -1634,13 +1625,13 @@ id_loc= id_first+strlen(id_first);
app_repl(a_l%0400);}
/*:85*/
-#line 1252 "cwebdir/ctangle.w"
+#line 1246 "cwebdir/ctangle.w"
}
break;
case constant:case string:
/*88:*/
-#line 1277 "cwebdir/ctangle.w"
+#line 1271 "cwebdir/ctangle.w"
app_repl(a);
while(id_first<id_loc){
@@ -1648,7 +1639,7 @@ if(*id_first=='@'){
if(*(id_first+1)=='@')id_first++;
#line 279 "cwebdir/ctang-w2c.ch"
else err_print(_("! Double @ should be used in string"));
-#line 1283 "cwebdir/ctangle.w"
+#line 1277 "cwebdir/ctangle.w"
}
app_repl(*id_first++);
@@ -1656,11 +1647,11 @@ app_repl(*id_first++);
app_repl(a);break;
/*:88*/
-#line 1256 "cwebdir/ctangle.w"
+#line 1250 "cwebdir/ctangle.w"
case ord:
/*89:*/
-#line 1293 "cwebdir/ctangle.w"
+#line 1287 "cwebdir/ctangle.w"
{
int c= (eight_bits)*id_first;
if(c=='\\'){
@@ -1699,7 +1690,7 @@ case'\'':c= '\'';break;
case'\"':c= '\"';break;
#line 285 "cwebdir/ctang-w2c.ch"
default:err_print(_("! Unrecognized escape sequence"));
-#line 1330 "cwebdir/ctangle.w"
+#line 1324 "cwebdir/ctangle.w"
}
}
@@ -1713,19 +1704,19 @@ app_repl(constant);
break;
/*:89*/
-#line 1258 "cwebdir/ctangle.w"
+#line 1252 "cwebdir/ctangle.w"
case definition:case format_code:case begin_C:if(t!=section_name)goto done;
else{
#line 267 "cwebdir/ctang-w2c.ch"
err_print(_("! @d, @f and @c are ignored in C text"));continue;
-#line 1262 "cwebdir/ctangle.w"
+#line 1256 "cwebdir/ctangle.w"
}
case new_section:goto done;
/*:86*/
-#line 1205 "cwebdir/ctangle.w"
+#line 1197 "cwebdir/ctangle.w"
case')':app_repl(a);
if(t==macro)app_repl(' ');
@@ -1735,12 +1726,12 @@ default:app_repl(a);
done:next_control= (eight_bits)a;
#line 255 "cwebdir/ctang-w2c.ch"
if(text_ptr> text_info_end)overflow(_("text"));
-#line 1213 "cwebdir/ctangle.w"
+#line 1205 "cwebdir/ctangle.w"
cur_text= text_ptr;(++text_ptr)->tok_start= tok_ptr;
}
-/*:84*//*91:*/
-#line 1355 "cwebdir/ctangle.w"
+/*:83*//*90:*/
+#line 1346 "cwebdir/ctangle.w"
static void
scan_section(void)
@@ -1755,7 +1746,7 @@ printf("*%d",section_count);update_terminal;
next_control= 0;
while(true){
/*92:*/
-#line 1394 "cwebdir/ctangle.w"
+#line 1387 "cwebdir/ctangle.w"
while(next_control<definition)
@@ -1764,17 +1755,17 @@ loc-= 2;next_control= get_next();
}
/*:92*/
-#line 1369 "cwebdir/ctangle.w"
+#line 1360 "cwebdir/ctangle.w"
if(next_control==definition){
/*93:*/
-#line 1401 "cwebdir/ctangle.w"
+#line 1394 "cwebdir/ctangle.w"
{
while((next_control= get_next())=='\n');
if(next_control!=identifier){
#line 291 "cwebdir/ctang-w2c.ch"
err_print(_("! Definition flushed, must start with identifier"));
-#line 1405 "cwebdir/ctangle.w"
+#line 1398 "cwebdir/ctangle.w"
continue;
}
@@ -1789,7 +1780,7 @@ cur_text->text_link= macro;
}
/*:93*/
-#line 1371 "cwebdir/ctangle.w"
+#line 1362 "cwebdir/ctangle.w"
continue;
}
@@ -1799,14 +1790,14 @@ p= name_dir;break;
if(next_control==section_name){
p= cur_section_name;
/*94:*/
-#line 1426 "cwebdir/ctangle.w"
+#line 1419 "cwebdir/ctangle.w"
while((next_control= get_next())=='+');
if(next_control!='='&&next_control!=eq_eq)
continue;
/*:94*/
-#line 1379 "cwebdir/ctangle.w"
+#line 1370 "cwebdir/ctangle.w"
break;
}
@@ -1814,20 +1805,20 @@ return;
}
no_where= print_where= false;
/*95:*/
-#line 1431 "cwebdir/ctangle.w"
+#line 1424 "cwebdir/ctangle.w"
/*96:*/
-#line 1436 "cwebdir/ctangle.w"
+#line 1429 "cwebdir/ctangle.w"
store_two_bytes((sixteen_bits)(0150000+section_count));
/*:96*/
-#line 1432 "cwebdir/ctangle.w"
+#line 1425 "cwebdir/ctangle.w"
scan_repl(section_name);
/*97:*/
-#line 1440 "cwebdir/ctangle.w"
+#line 1433 "cwebdir/ctangle.w"
if(p==name_dir||p==0){
(last_unnamed)->text_link= cur_text-text_info;last_unnamed= cur_text;
@@ -1844,16 +1835,16 @@ cur_text->text_link= section_flag;
/*:97*/
-#line 1434 "cwebdir/ctangle.w"
+#line 1427 "cwebdir/ctangle.w"
/*:95*/
-#line 1385 "cwebdir/ctangle.w"
+#line 1376 "cwebdir/ctangle.w"
}
-/*:91*//*99:*/
-#line 1458 "cwebdir/ctangle.w"
+/*:90*//*98:*/
+#line 1448 "cwebdir/ctangle.w"
static void
phase_one(void){
@@ -1866,8 +1857,8 @@ check_complete();
phase= 2;
}
-/*:99*//*101:*/
-#line 1476 "cwebdir/ctangle.w"
+/*:98*//*100:*/
+#line 1465 "cwebdir/ctangle.w"
static void
skip_limbo(void)
@@ -1882,7 +1873,7 @@ c= *loc++;
if(ccode[(eight_bits)c]==new_section)break;
switch(ccode[(eight_bits)c]){
case translit_code:/*102:*/
-#line 1505 "cwebdir/ctangle.w"
+#line 1496 "cwebdir/ctangle.w"
while(xisspace(*loc)&&loc<limit)loc++;
loc+= 3;
@@ -1890,7 +1881,7 @@ if(loc> limit||!xisxdigit(*(loc-3))||!xisxdigit(*(loc-2))
||(*(loc-3)>='0'&&*(loc-3)<='7')||!xisspace(*(loc-1)))
#line 309 "cwebdir/ctang-w2c.ch"
err_print(_("! Improper hex number following @l"));
-#line 1511 "cwebdir/ctangle.w"
+#line 1502 "cwebdir/ctangle.w"
else{
unsigned int i;
@@ -1902,7 +1893,7 @@ while(loc<limit&&(xisalpha(*loc)||xisdigit(*loc)||*loc=='_'))loc++;
if(loc-beg>=translit_length)
#line 315 "cwebdir/ctang-w2c.ch"
err_print(_("! Replacement string in @l too long"));
-#line 1521 "cwebdir/ctangle.w"
+#line 1512 "cwebdir/ctangle.w"
else{
strncpy(translit[i-0200],beg,(size_t)(loc-beg));
@@ -1911,7 +1902,7 @@ translit[i-0200][loc-beg]= '\0';
}
/*:102*/
-#line 1489 "cwebdir/ctangle.w"
+#line 1478 "cwebdir/ctangle.w"
break;
case format_code:case'@':break;
case control_text:if(c=='q'||c=='Q'){
@@ -1919,21 +1910,21 @@ while((c= skip_ahead())=='@');
if(*(loc-1)!='>')
#line 297 "cwebdir/ctang-w2c.ch"
err_print(_("! Double @ should be used in control text"));
-#line 1495 "cwebdir/ctangle.w"
+#line 1484 "cwebdir/ctangle.w"
break;
}
#line 303 "cwebdir/ctang-w2c.ch"
default:err_print(_("! Double @ should be used in limbo"));
-#line 1499 "cwebdir/ctangle.w"
+#line 1488 "cwebdir/ctangle.w"
}
}
}
}
-/*:101*//*103:*/
-#line 1531 "cwebdir/ctangle.w"
+/*:100*//*103:*/
+#line 1522 "cwebdir/ctangle.w"
void
print_stats(void){
@@ -1946,7 +1937,7 @@ printf(_("%ld replacement texts (out of %ld)\n"),
printf(_("%ld bytes (out of %ld)\n"),
(ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes);
printf(_("%ld tokens (out of %ld)\n"),
-#line 1542 "cwebdir/ctangle.w"
+#line 1533 "cwebdir/ctangle.w"
(ptrdiff_t)(tok_ptr-tok_mem),(long)max_toks);
}
diff --git a/Build/source/texk/web2c/cwebboot.cin b/Build/source/texk/web2c/cwebboot.cin
index f455693f118..150c303a346 100644
--- a/Build/source/texk/web2c/cwebboot.cin
+++ b/Build/source/texk/web2c/cwebboot.cin
@@ -290,10 +290,11 @@ cweb program;
/*:18*//*19:*/
#line 92 "cwebdir/common.w"
+
int phase;
/*:19*//*21:*/
-#line 129 "cwebdir/common.w"
+#line 130 "cwebdir/common.w"
char section_text[longest_name+1];
char*section_text_end= section_text+longest_name;
@@ -301,7 +302,7 @@ char*id_first;
char*id_loc;
/*:21*//*22:*/
-#line 149 "cwebdir/common.w"
+#line 150 "cwebdir/common.w"
char buffer[long_buf_size];
char*buffer_end= buffer+buf_size-2;
@@ -332,7 +333,7 @@ static char change_buffer[buf_size];
static char*change_limit;
/*:26*//*37:*/
-#line 401 "cwebdir/common.w"
+#line 399 "cwebdir/common.w"
sixteen_bits section_count;
boolean changed_section[max_sections];
@@ -341,7 +342,7 @@ boolean change_pending;
boolean print_where= false;
/*:37*//*43:*/
-#line 598 "cwebdir/common.w"
+#line 596 "cwebdir/common.w"
char byte_mem[max_bytes];
char*byte_mem_end= byte_mem+max_bytes-1;
@@ -349,25 +350,25 @@ name_info name_dir[max_names];
name_pointer name_dir_end= name_dir+max_names-1;
/*:43*//*44:*/
-#line 609 "cwebdir/common.w"
+#line 607 "cwebdir/common.w"
char*byte_ptr;
name_pointer name_ptr;
/*:44*//*46:*/
-#line 629 "cwebdir/common.w"
+#line 627 "cwebdir/common.w"
name_pointer hash[hash_size];
hash_pointer hash_end= hash+hash_size-1;
hash_pointer h;
/*:46*//*65:*/
-#line 1017 "cwebdir/common.w"
+#line 1014 "cwebdir/common.w"
int history= spotless;
/*:65*//*73:*/
-#line 1138 "cwebdir/common.w"
+#line 1135 "cwebdir/common.w"
int argc;
char**argv;
@@ -377,11 +378,11 @@ char idx_file_name[max_file_name_length];
#line 431 "cwebdir/comm-w2c.ch"
char scn_file_name[max_file_name_length];
char check_file_name[max_file_name_length];
-#line 1145 "cwebdir/common.w"
+#line 1142 "cwebdir/common.w"
boolean flags[128];
/*:73*//*83:*/
-#line 1286 "cwebdir/common.w"
+#line 1282 "cwebdir/common.w"
FILE*C_file;
FILE*tex_file;
@@ -392,7 +393,7 @@ FILE*check_file;
#line 576 "cwebdir/comm-w2c.ch"
FILE*active_file;
char*found_filename;
-#line 1292 "cwebdir/common.w"
+#line 1288 "cwebdir/common.w"
#line 593 "cwebdir/comm-w2c.ch"
/*:83*//*86:*/
@@ -449,39 +450,35 @@ extern void common_init(void);
extern void print_stats(void);
extern void cb_show_banner(void);
-/*:15*//*23:*/
-#line 159 "cwebdir/common.w"
-
+/*:15*//*24:*/
+#line 180 "cwebdir/common.w"
static boolean input_ln(FILE*);
-/*:23*//*27:*/
-#line 231 "cwebdir/common.w"
-
+/*:24*//*28:*/
+#line 241 "cwebdir/common.w"
static void prime_the_change_buffer(void);
-/*:27*//*32:*/
-#line 303 "cwebdir/common.w"
-
+/*:28*//*33:*/
+#line 340 "cwebdir/common.w"
static void check_change(void);
-/*:32*//*55:*/
-#line 776 "cwebdir/common.w"
+/*:33*//*55:*/
+#line 774 "cwebdir/common.w"
static int web_strcmp(char*,int,char*,int);
static name_pointer add_section_name(name_pointer,int,char*,char*,int);
static void extend_section_name(name_pointer,char*,char*,int);
-/*:55*//*63:*/
-#line 972 "cwebdir/common.w"
-
+/*:55*//*64:*/
+#line 1002 "cwebdir/common.w"
static int section_name_cmp(char**,int,name_pointer);
-/*:63*//*75:*/
-#line 1170 "cwebdir/common.w"
-
+/*:64*//*76:*/
+#line 1197 "cwebdir/common.w"
static void scan_args(void);
-/*:75*//*96:*/
+#line 496 "cwebdir/comm-w2c.ch"
+/*:76*//*96:*/
#line 808 "cwebdir/comm-w2c.ch"
static void cb_usage(const_string str);
@@ -492,14 +489,14 @@ static void cb_usagehelp(const_string*message,const_string bug_email);
/*:1*//*20:*/
-#line 98 "cwebdir/common.w"
+#line 99 "cwebdir/common.w"
void
common_init(void)
{
#line 78 "cwebdir/comm-w2c.ch"
/*45:*/
-#line 613 "cwebdir/common.w"
+#line 611 "cwebdir/common.w"
name_dir->byte_start= byte_ptr= byte_mem;
name_ptr= name_dir+1;
@@ -507,7 +504,7 @@ name_ptr->byte_start= byte_mem;
root= NULL;
/*:45*//*47:*/
-#line 636 "cwebdir/common.w"
+#line 634 "cwebdir/common.w"
for(h= hash;h<=hash_end;*h++= NULL);
@@ -543,18 +540,18 @@ textdomain("cweb");
#line 85 "cwebdir/comm-w2c.ch"
/*74:*/
-#line 1151 "cwebdir/common.w"
+#line 1148 "cwebdir/common.w"
#line 438 "cwebdir/comm-w2c.ch"
make_xrefs= true;
temporary_output= true;
-#line 1153 "cwebdir/common.w"
+#line 1150 "cwebdir/common.w"
show_stats= false;
/*:74*/
#line 86 "cwebdir/comm-w2c.ch"
-#line 104 "cwebdir/common.w"
+#line 105 "cwebdir/common.w"
/*84:*/
#line 593 "cwebdir/comm-w2c.ch"
@@ -587,16 +584,16 @@ else strcpy(dot_pos,".wtp");
if((tex_file= fopen(check_file_name,"wb"))==NULL)
fatal(_("! Cannot open output file "),check_file_name);
}
-#line 1304 "cwebdir/common.w"
+#line 1300 "cwebdir/common.w"
#line 628 "cwebdir/comm-w2c.ch"
/*:84*/
-#line 104 "cwebdir/common.w"
+#line 105 "cwebdir/common.w"
}
-/*:20*//*24:*/
-#line 162 "cwebdir/common.w"
+/*:20*//*23:*/
+#line 160 "cwebdir/common.w"
static boolean input_ln(
FILE*fp)
@@ -608,12 +605,12 @@ limit= k= buffer;
while(k<=buffer_end&&(c= getc(fp))!=EOF&&c!='\n')
#line 92 "cwebdir/comm-w2c.ch"
if((*(k++)= c)!=' '&&c!='\r')limit= k;
-#line 172 "cwebdir/common.w"
+#line 170 "cwebdir/common.w"
if(k> buffer_end)
if((c= getc(fp))!=EOF&&c!='\n'){
#line 98 "cwebdir/comm-w2c.ch"
ungetc(c,fp);loc= buffer;err_print(_("! Input line too long"));
-#line 175 "cwebdir/common.w"
+#line 173 "cwebdir/common.w"
}
if(c==EOF&&limit==buffer)return false;
@@ -621,15 +618,15 @@ if(c==EOF&&limit==buffer)return false;
return true;
}
-/*:24*//*28:*/
-#line 234 "cwebdir/common.w"
+/*:23*//*27:*/
+#line 231 "cwebdir/common.w"
static void
prime_the_change_buffer(void)
{
change_limit= change_buffer;
/*29:*/
-#line 248 "cwebdir/common.w"
+#line 247 "cwebdir/common.w"
while(true){
change_line++;
@@ -642,33 +639,33 @@ if(buffer[1]=='y'||buffer[1]=='z'||buffer[1]=='i'){
loc= buffer+2;
#line 109 "cwebdir/comm-w2c.ch"
err_print(_("! Missing @x in change file"));
-#line 259 "cwebdir/common.w"
+#line 258 "cwebdir/common.w"
}
}
/*:29*/
-#line 239 "cwebdir/common.w"
+#line 236 "cwebdir/common.w"
/*30:*/
-#line 265 "cwebdir/common.w"
+#line 264 "cwebdir/common.w"
do{
change_line++;
if(!input_ln(change_file)){
#line 115 "cwebdir/comm-w2c.ch"
err_print(_("! Change file ended after @x"));
-#line 270 "cwebdir/common.w"
+#line 269 "cwebdir/common.w"
return;
}
}while(limit==buffer);
/*:30*/
-#line 240 "cwebdir/common.w"
+#line 237 "cwebdir/common.w"
/*31:*/
-#line 275 "cwebdir/common.w"
+#line 274 "cwebdir/common.w"
{
change_limit= change_buffer+(ptrdiff_t)(limit-buffer);
@@ -676,12 +673,12 @@ strncpy(change_buffer,buffer,(size_t)(limit-buffer+1));
}
/*:31*/
-#line 241 "cwebdir/common.w"
+#line 238 "cwebdir/common.w"
}
-/*:28*//*33:*/
-#line 306 "cwebdir/common.w"
+/*:27*//*32:*/
+#line 302 "cwebdir/common.w"
static void
check_change(void)
@@ -698,7 +695,7 @@ changing= true;print_where= true;change_line++;
if(!input_ln(change_file)){
#line 121 "cwebdir/comm-w2c.ch"
err_print(_("! Change file ended before @y"));
-#line 321 "cwebdir/common.w"
+#line 317 "cwebdir/common.w"
change_limit= change_buffer;changing= false;
return;
@@ -706,12 +703,12 @@ return;
if(limit> buffer+1&&buffer[0]=='@'){
char xyz_code= xisupper(buffer[1])?tolower((eight_bits)buffer[1]):buffer[1];
/*34:*/
-#line 344 "cwebdir/common.w"
+#line 342 "cwebdir/common.w"
if(xyz_code=='x'||xyz_code=='z'){
#line 133 "cwebdir/comm-w2c.ch"
loc= buffer+2;err_print(_("! Where is the matching @y?"));
-#line 347 "cwebdir/common.w"
+#line 345 "cwebdir/common.w"
}
else if(xyz_code=='y'){
@@ -720,7 +717,7 @@ loc= buffer+2;
printf("\n! Hmm... %d ",n);
#line 139 "cwebdir/comm-w2c.ch"
err_print(_("of the preceding lines failed to match"));
-#line 354 "cwebdir/common.w"
+#line 352 "cwebdir/common.w"
}
change_depth= include_depth;
@@ -728,11 +725,11 @@ return;
}
/*:34*/
-#line 328 "cwebdir/common.w"
+#line 324 "cwebdir/common.w"
}
/*31:*/
-#line 275 "cwebdir/common.w"
+#line 274 "cwebdir/common.w"
{
change_limit= change_buffer+(ptrdiff_t)(limit-buffer);
@@ -740,14 +737,14 @@ strncpy(change_buffer,buffer,(size_t)(limit-buffer+1));
}
/*:31*/
-#line 330 "cwebdir/common.w"
+#line 326 "cwebdir/common.w"
changing= false;cur_line++;
while(!input_ln(cur_file)){
if(include_depth==0){
#line 127 "cwebdir/comm-w2c.ch"
err_print(_("! CWEB file ended during a change"));
-#line 335 "cwebdir/common.w"
+#line 331 "cwebdir/common.w"
input_has_ended= true;return;
}
@@ -757,15 +754,15 @@ if(lines_dont_match)n++;
}
}
-/*:33*//*35:*/
-#line 364 "cwebdir/common.w"
+/*:32*//*35:*/
+#line 362 "cwebdir/common.w"
void
reset_input(void)
{
limit= buffer;loc= buffer+1;buffer[0]= ' ';
/*36:*/
-#line 379 "cwebdir/common.w"
+#line 377 "cwebdir/common.w"
#line 149 "cwebdir/comm-w2c.ch"
if((found_filename= kpse_find_cweb(web_file_name))==NULL||
@@ -778,7 +775,7 @@ strcpy(web_file_name,found_filename+
((strncmp(found_filename,"./",2)==0)?2:0));
free(found_filename);
}else fatal(_("! Filename too long\n"),found_filename);
-#line 385 "cwebdir/common.w"
+#line 383 "cwebdir/common.w"
web_file_open= true;
@@ -793,10 +790,10 @@ strcpy(change_file_name,found_filename+
((strncmp(found_filename,"./",2)==0)?2:0));
free(found_filename);
}else fatal(_("! Filename too long\n"),found_filename);
-#line 390 "cwebdir/common.w"
+#line 388 "cwebdir/common.w"
/*:36*/
-#line 369 "cwebdir/common.w"
+#line 367 "cwebdir/common.w"
include_depth= 0;cur_line= 0;change_line= 0;
change_depth= include_depth;
@@ -805,20 +802,20 @@ limit= buffer;loc= buffer+1;buffer[0]= ' ';input_has_ended= false;
}
/*:35*//*38:*/
-#line 408 "cwebdir/common.w"
+#line 406 "cwebdir/common.w"
boolean get_line(void)
{
restart:
if(changing&&include_depth==change_depth)
/*41:*/
-#line 516 "cwebdir/common.w"
+#line 514 "cwebdir/common.w"
{
change_line++;
if(!input_ln(change_file)){
#line 274 "cwebdir/comm-w2c.ch"
err_print(_("! Change file ended without @z"));
-#line 520 "cwebdir/common.w"
+#line 518 "cwebdir/common.w"
buffer[0]= '@';buffer[1]= 'z';limit= buffer+2;
}
@@ -836,7 +833,7 @@ if(buffer[1]=='x'||buffer[1]=='y'){
loc= buffer+2;
#line 280 "cwebdir/comm-w2c.ch"
err_print(_("! Where is the matching @z?"));
-#line 536 "cwebdir/common.w"
+#line 534 "cwebdir/common.w"
}
else if(buffer[1]=='z'){
@@ -847,11 +844,11 @@ prime_the_change_buffer();changing= !changing;print_where= true;
}
/*:41*/
-#line 413 "cwebdir/common.w"
+#line 411 "cwebdir/common.w"
if(!changing||include_depth> change_depth){
/*40:*/
-#line 499 "cwebdir/common.w"
+#line 497 "cwebdir/common.w"
{
cur_line++;
while(!input_ln(cur_file)){
@@ -870,7 +867,7 @@ if(change_limit> change_buffer)check_change();
}
/*:40*/
-#line 415 "cwebdir/common.w"
+#line 413 "cwebdir/common.w"
if(changing&&include_depth==change_depth)goto restart;
}
@@ -882,25 +879,25 @@ while(*loc==' '||*loc=='\t')loc++;
if(loc>=limit){
#line 180 "cwebdir/comm-w2c.ch"
err_print(_("! Include file name not given"));
-#line 425 "cwebdir/common.w"
+#line 423 "cwebdir/common.w"
goto restart;
}
if(include_depth>=max_include_depth-1){
#line 186 "cwebdir/comm-w2c.ch"
err_print(_("! Too many nested includes"));
-#line 430 "cwebdir/common.w"
+#line 428 "cwebdir/common.w"
goto restart;
}
include_depth++;
/*39:*/
-#line 453 "cwebdir/common.w"
+#line 451 "cwebdir/common.w"
{
#line 223 "cwebdir/comm-w2c.ch"
char*cur_file_name_end= cur_file_name+max_file_name_length-1;
char*k= cur_file_name;
-#line 458 "cwebdir/common.w"
+#line 456 "cwebdir/common.w"
if(*loc=='"'){
loc++;
@@ -921,17 +918,17 @@ strcpy(cur_file_name,found_filename+
((strncmp(found_filename,"./",2)==0)?2:0));
free(found_filename);
}else fatal(_("! Filename too long\n"),found_filename);
-#line 469 "cwebdir/common.w"
+#line 467 "cwebdir/common.w"
cur_line= 0;print_where= true;
goto restart;
}
#line 268 "cwebdir/comm-w2c.ch"
include_depth--;err_print(_("! Cannot open include file"));goto restart;
-#line 497 "cwebdir/common.w"
+#line 495 "cwebdir/common.w"
}
/*:39*/
-#line 434 "cwebdir/common.w"
+#line 432 "cwebdir/common.w"
}
return true;
@@ -939,7 +936,7 @@ return true;
#line 201 "cwebdir/comm-w2c.ch"
/*:38*//*42:*/
-#line 548 "cwebdir/common.w"
+#line 546 "cwebdir/common.w"
void
check_complete(void){
@@ -949,13 +946,13 @@ limit= buffer+(ptrdiff_t)(change_limit-change_buffer);
changing= true;change_depth= include_depth;loc= buffer;
#line 286 "cwebdir/comm-w2c.ch"
err_print(_("! Change file entry did not match"));
-#line 556 "cwebdir/common.w"
+#line 554 "cwebdir/common.w"
}
}
/*:42*//*48:*/
-#line 641 "cwebdir/common.w"
+#line 639 "cwebdir/common.w"
name_pointer
id_lookup(
@@ -970,17 +967,17 @@ name_pointer p;
if(last==NULL)for(last= first;*last!='\0';last++);
l= (int)(last-first);
/*49:*/
-#line 664 "cwebdir/common.w"
+#line 662 "cwebdir/common.w"
h= (eight_bits)*i;
while(++i<last)h= (h+h+(int)((eight_bits)*i))%hash_size;
/*:49*/
-#line 654 "cwebdir/common.w"
+#line 652 "cwebdir/common.w"
/*50:*/
-#line 672 "cwebdir/common.w"
+#line 670 "cwebdir/common.w"
p= hash[h];
while(p&&!names_match(p,first,l,t))p= p->link;
@@ -990,28 +987,28 @@ p->link= hash[h];hash[h]= p;
}
/*:50*/
-#line 655 "cwebdir/common.w"
+#line 653 "cwebdir/common.w"
if(p==name_ptr)/*51:*/
-#line 683 "cwebdir/common.w"
+#line 681 "cwebdir/common.w"
{
#line 293 "cwebdir/comm-w2c.ch"
if(byte_ptr+l> byte_mem_end)overflow(_("byte memory"));
if(name_ptr>=name_dir_end)overflow(_("name"));
-#line 686 "cwebdir/common.w"
+#line 684 "cwebdir/common.w"
strncpy(byte_ptr,first,l);
(++name_ptr)->byte_start= byte_ptr+= l;
init_p(p,t);
}
/*:51*/
-#line 656 "cwebdir/common.w"
+#line 654 "cwebdir/common.w"
return p;
}
/*:48*//*52:*/
-#line 715 "cwebdir/common.w"
+#line 713 "cwebdir/common.w"
void
print_section_name(
@@ -1032,7 +1029,7 @@ if(q)term_write("...",3);
}
/*:52*//*53:*/
-#line 734 "cwebdir/common.w"
+#line 732 "cwebdir/common.w"
void
sprint_section_name(
@@ -1055,7 +1052,7 @@ s= p->byte_start;
}
/*:53*//*54:*/
-#line 755 "cwebdir/common.w"
+#line 753 "cwebdir/common.w"
void
print_prefix_name(
@@ -1068,7 +1065,7 @@ if(s+l<(p+1)->byte_start)term_write("...",3);
}
/*:54*//*56:*/
-#line 781 "cwebdir/common.w"
+#line 779 "cwebdir/common.w"
static int web_strcmp(
char*j,
@@ -1086,7 +1083,7 @@ else return greater;
}
/*:56*//*57:*/
-#line 810 "cwebdir/common.w"
+#line 808 "cwebdir/common.w"
static name_pointer
add_section_name(
@@ -1102,7 +1099,7 @@ int name_len= (int)(last-first)+ispref;
#line 301 "cwebdir/comm-w2c.ch"
if(s+name_len> byte_mem_end)overflow(_("byte memory"));
if(name_ptr+1>=name_dir_end)overflow(_("name"));
-#line 824 "cwebdir/common.w"
+#line 822 "cwebdir/common.w"
(++name_ptr)->byte_start= byte_ptr= s+name_len;
if(ispref){
*(byte_ptr-1)= ' ';
@@ -1119,7 +1116,7 @@ return par==NULL?(root= p):c==less?(par->llink= p):(par->rlink= p);
}
/*:57*//*58:*/
-#line 839 "cwebdir/common.w"
+#line 837 "cwebdir/common.w"
static void
extend_section_name(
@@ -1133,21 +1130,21 @@ name_pointer q= p+1;
int name_len= (int)(last-first)+ispref;
#line 308 "cwebdir/comm-w2c.ch"
if(name_ptr>=name_dir_end)overflow(_("name"));
-#line 851 "cwebdir/common.w"
+#line 849 "cwebdir/common.w"
while(q->link!=name_dir)q= q->link;
q->link= name_ptr;
s= name_ptr->byte_start;
name_ptr->link= name_dir;
#line 314 "cwebdir/comm-w2c.ch"
if(s+name_len> byte_mem_end)overflow(_("byte memory"));
-#line 856 "cwebdir/common.w"
+#line 854 "cwebdir/common.w"
(++name_ptr)->byte_start= byte_ptr= s+name_len;
strncpy(s,first,name_len);
if(ispref)*(byte_ptr-1)= ' ';
}
/*:58*//*59:*/
-#line 867 "cwebdir/common.w"
+#line 865 "cwebdir/common.w"
name_pointer
section_lookup(
@@ -1162,7 +1159,7 @@ name_pointer par= NULL;
int name_len= (int)(last-first)+1;
/*60:*/
-#line 891 "cwebdir/common.w"
+#line 889 "cwebdir/common.w"
while(p){
c= web_strcmp(first,name_len,first_chunk(p),prefix_length(p));
@@ -1174,12 +1171,12 @@ p= (c==less?p->llink:p->rlink);
if(r!=NULL){
#line 320 "cwebdir/comm-w2c.ch"
fputs(_("\n! Ambiguous prefix: matches <"),stdout);
-#line 901 "cwebdir/common.w"
+#line 899 "cwebdir/common.w"
print_prefix_name(p);
#line 326 "cwebdir/comm-w2c.ch"
fputs(_(">\n and <"),stdout);
-#line 904 "cwebdir/common.w"
+#line 902 "cwebdir/common.w"
print_prefix_name(r);
err_print(">");
return name_dir;
@@ -1193,19 +1190,19 @@ p= q,q= NULL;
}
/*:60*/
-#line 881 "cwebdir/common.w"
+#line 879 "cwebdir/common.w"
/*61:*/
-#line 916 "cwebdir/common.w"
+#line 914 "cwebdir/common.w"
if(r==NULL)
return add_section_name(par,c,first,last+1,ispref);
/*:61*/
-#line 882 "cwebdir/common.w"
+#line 880 "cwebdir/common.w"
/*62:*/
-#line 924 "cwebdir/common.w"
+#line 922 "cwebdir/common.w"
switch(section_name_cmp(&first,name_len,r)){
@@ -1213,7 +1210,7 @@ case prefix:
if(!ispref){
#line 332 "cwebdir/comm-w2c.ch"
fputs(_("\n! New name is a prefix of <"),stdout);
-#line 930 "cwebdir/common.w"
+#line 928 "cwebdir/common.w"
print_section_name(r);
err_print(">");
@@ -1227,7 +1224,7 @@ return r;
case bad_extension:
#line 338 "cwebdir/comm-w2c.ch"
fputs(_("\n! New name extends <"),stdout);
-#line 942 "cwebdir/common.w"
+#line 940 "cwebdir/common.w"
print_section_name(r);
err_print(">");
@@ -1235,24 +1232,24 @@ return r;
default:
#line 344 "cwebdir/comm-w2c.ch"
fputs(_("\n! Section name incompatible with <"),stdout);
-#line 948 "cwebdir/common.w"
+#line 946 "cwebdir/common.w"
print_prefix_name(r);
#line 350 "cwebdir/comm-w2c.ch"
fputs(_(">,\n which abbreviates <"),stdout);
-#line 951 "cwebdir/common.w"
+#line 949 "cwebdir/common.w"
print_section_name(r);
err_print(">");
return r;
}
/*:62*/
-#line 883 "cwebdir/common.w"
+#line 881 "cwebdir/common.w"
}
-/*:59*//*64:*/
-#line 975 "cwebdir/common.w"
+/*:59*//*63:*/
+#line 970 "cwebdir/common.w"
static int section_name_cmp(
char**pfirst,
@@ -1285,8 +1282,8 @@ default:return c;
}
}
-/*:64*//*66:*/
-#line 1027 "cwebdir/common.w"
+/*:63*//*66:*/
+#line 1024 "cwebdir/common.w"
void
err_print(
@@ -1295,14 +1292,14 @@ const char*s)
char*k,*l;
printf(*s=='!'?"\n%s":"%s",s);
if(web_file_open)/*67:*/
-#line 1047 "cwebdir/common.w"
+#line 1044 "cwebdir/common.w"
{if(changing&&include_depth==change_depth)
#line 358 "cwebdir/comm-w2c.ch"
printf(_(". (l. %d of change file)\n"),change_line);
else if(include_depth==0)printf(_(". (l. %d)\n"),cur_line);
else printf(_(". (l. %d of include file %s)\n"),cur_line,cur_file_name);
-#line 1052 "cwebdir/common.w"
+#line 1049 "cwebdir/common.w"
l= (loc>=limit?limit:loc);
if(l> buffer){
for(k= buffer;k<l;k++)
@@ -1317,13 +1314,13 @@ putchar(' ');
}
/*:67*/
-#line 1034 "cwebdir/common.w"
+#line 1031 "cwebdir/common.w"
update_terminal;mark_error;
}
/*:66*//*68:*/
-#line 1079 "cwebdir/common.w"
+#line 1076 "cwebdir/common.w"
int wrap_up(void){
if(show_progress)new_line;
@@ -1331,7 +1328,7 @@ if(show_stats)
print_stats();
#line 388 "cwebdir/comm-w2c.ch"
/*69:*/
-#line 1089 "cwebdir/common.w"
+#line 1086 "cwebdir/common.w"
switch(history){
#line 412 "cwebdir/comm-w2c.ch"
@@ -1343,7 +1340,7 @@ case error_message:
puts(_("(Pardon me, but I think I spotted something wrong.)"));break;
case fatal_message:
puts(_("(That was a fatal error, my friend.)"));
-#line 1097 "cwebdir/common.w"
+#line 1094 "cwebdir/common.w"
}
/*:69*/
@@ -1368,11 +1365,11 @@ case error_message:return RETURN_ERROR;
case fatal_message:return RETURN_FAIL;
default:return RETURN_OK;
}
-#line 1087 "cwebdir/common.w"
+#line 1084 "cwebdir/common.w"
}
/*:68*//*70:*/
-#line 1105 "cwebdir/common.w"
+#line 1102 "cwebdir/common.w"
void
fatal(
const char*s,const char*t)
@@ -1383,19 +1380,19 @@ history= fatal_message;exit(wrap_up());
}
/*:70*//*71:*/
-#line 1116 "cwebdir/common.w"
+#line 1113 "cwebdir/common.w"
void
overflow(
const char*t)
{
#line 425 "cwebdir/comm-w2c.ch"
printf(_("\n! Sorry, %s capacity exceeded"),t);fatal("","");
-#line 1121 "cwebdir/common.w"
+#line 1118 "cwebdir/common.w"
}
-/*:71*//*76:*/
-#line 1173 "cwebdir/common.w"
+/*:71*//*75:*/
+#line 1167 "cwebdir/common.w"
static void
scan_args(void)
@@ -1418,7 +1415,7 @@ change_file_name[max_file_name_length-2]= '\0';
strcpy(change_file_name,"/dev/null");
#endif
-#line 1184 "cwebdir/common.w"
+#line 1178 "cwebdir/common.w"
while(--argc> 0){
if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*80:*/
#line 510 "cwebdir/comm-w2c.ch"
@@ -1468,7 +1465,7 @@ if(sscanf(++dot_pos,"%u",&kpathsea_debug)!=1)/*81:*/
cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill");
-#line 1279 "cwebdir/common.w"
+#line 1275 "cwebdir/common.w"
#line 563 "cwebdir/comm-w2c.ch"
/*:81*/
@@ -1481,13 +1478,13 @@ if(*dot_pos=='l'){
use_language= ++dot_pos;
break;
}else
-#line 1265 "cwebdir/common.w"
+#line 1261 "cwebdir/common.w"
flags[(eight_bits)*dot_pos]= flag_change;
}
#line 555 "cwebdir/comm-w2c.ch"
/*:80*/
-#line 1185 "cwebdir/common.w"
+#line 1179 "cwebdir/common.w"
else{
s= name_pos= *argv;dot_pos= NULL;
@@ -1499,20 +1496,20 @@ dot_pos= NULL,name_pos= ++s;
else s++;
}
-#line 1193 "cwebdir/common.w"
+#line 1187 "cwebdir/common.w"
if(!found_web)/*77:*/
-#line 1210 "cwebdir/common.w"
+#line 1206 "cwebdir/common.w"
{
if(s-*argv> max_file_name_length-5)
/*82:*/
#line 563 "cwebdir/comm-w2c.ch"
fatal(_("! Filename too long\n"),*argv);
-#line 1281 "cwebdir/common.w"
+#line 1277 "cwebdir/common.w"
/*:82*/
-#line 1213 "cwebdir/common.w"
+#line 1209 "cwebdir/common.w"
if(dot_pos==NULL)
sprintf(web_file_name,"%s.w",*argv);
@@ -1520,7 +1517,7 @@ else{
strcpy(web_file_name,*argv);
*dot_pos= 0;
}
-#line 1221 "cwebdir/common.w"
+#line 1217 "cwebdir/common.w"
sprintf(tex_file_name,"%s.tex",name_pos);
sprintf(idx_file_name,"%s.idx",name_pos);
sprintf(scn_file_name,"%s.scn",name_pos);
@@ -1529,10 +1526,10 @@ found_web= true;
}
/*:77*/
-#line 1194 "cwebdir/common.w"
+#line 1188 "cwebdir/common.w"
else if(!found_change)/*78:*/
-#line 1228 "cwebdir/common.w"
+#line 1224 "cwebdir/common.w"
{
if(strcmp(*argv,"-")!=0){
@@ -1540,11 +1537,11 @@ if(s-*argv> max_file_name_length-4)
/*82:*/
#line 563 "cwebdir/comm-w2c.ch"
fatal(_("! Filename too long\n"),*argv);
-#line 1281 "cwebdir/common.w"
+#line 1277 "cwebdir/common.w"
/*:82*/
-#line 1232 "cwebdir/common.w"
+#line 1228 "cwebdir/common.w"
if(dot_pos==NULL)
sprintf(change_file_name,"%s.ch",*argv);
@@ -1554,21 +1551,21 @@ found_change= true;
}
/*:78*/
-#line 1195 "cwebdir/common.w"
+#line 1189 "cwebdir/common.w"
else if(!found_out)/*79:*/
-#line 1240 "cwebdir/common.w"
+#line 1236 "cwebdir/common.w"
{
if(s-*argv> max_file_name_length-5)
/*82:*/
#line 563 "cwebdir/comm-w2c.ch"
fatal(_("! Filename too long\n"),*argv);
-#line 1281 "cwebdir/common.w"
+#line 1277 "cwebdir/common.w"
/*:82*/
-#line 1243 "cwebdir/common.w"
+#line 1239 "cwebdir/common.w"
if(dot_pos==NULL){
sprintf(tex_file_name,"%s.tex",*argv);
@@ -1588,18 +1585,18 @@ found_out= true;
}
/*:79*/
-#line 1196 "cwebdir/common.w"
+#line 1190 "cwebdir/common.w"
else/*81:*/
#line 555 "cwebdir/comm-w2c.ch"
cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill");
-#line 1279 "cwebdir/common.w"
+#line 1275 "cwebdir/common.w"
#line 563 "cwebdir/comm-w2c.ch"
/*:81*/
-#line 1197 "cwebdir/common.w"
+#line 1191 "cwebdir/common.w"
}
}
@@ -1608,16 +1605,15 @@ if(!found_web)/*81:*/
cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill");
-#line 1279 "cwebdir/common.w"
+#line 1275 "cwebdir/common.w"
#line 563 "cwebdir/comm-w2c.ch"
/*:81*/
-#line 1200 "cwebdir/common.w"
+#line 1194 "cwebdir/common.w"
}
-#line 496 "cwebdir/comm-w2c.ch"
-/*:76*//*97:*/
+/*:75*//*97:*/
#line 812 "cwebdir/comm-w2c.ch"
static void cb_usage(const_string str)
diff --git a/Build/source/texk/web2c/cwebdir/ChangeLog b/Build/source/texk/web2c/cwebdir/ChangeLog
index 37db3501d51..24c02b0db69 100644
--- a/Build/source/texk/web2c/cwebdir/ChangeLog
+++ b/Build/source/texk/web2c/cwebdir/ChangeLog
@@ -1,5 +1,18 @@
2021-02-24 Andreas Scherer <https://ascherer.github.io>
+ * comm-w2c.h,
+ * common.c,
+ * common.h
+ * common.w,
+ * ctangle.c,
+ * ctangle.w,
+ * ctwill-mini.ch,
+ * ctwill-w2c.ch,
+ * cweav-w2c.ch,
+ * cweave.w: Fix spacing for |#include| in TeX comment.
+
+2021-02-24 Andreas Scherer <https://ascherer.github.io>
+
* cweave.w: Fix spacing for |#include| in TeX comment.
2021-02-24 Andreas Scherer <https://ascherer.github.io>
diff --git a/Build/source/texk/web2c/cwebdir/comm-w2c.h b/Build/source/texk/web2c/cwebdir/comm-w2c.h
index 2a8e3e861a5..ca8b94a7f46 100644
--- a/Build/source/texk/web2c/cwebdir/comm-w2c.h
+++ b/Build/source/texk/web2c/cwebdir/comm-w2c.h
@@ -186,7 +186,7 @@ extern void init_node(name_pointer);@/
extern void init_p(name_pointer,eight_bits);@/
extern void print_prefix_name(name_pointer);@/
extern void print_section_name(name_pointer);@/
-extern void sprint_section_name(char *,name_pointer);@/
+extern void sprint_section_name(char *,name_pointer);
@ Code related to error handling:
@d spotless 0 /* |history| value for normal jobs */
@@ -244,7 +244,7 @@ extern FILE *check_file; /* temporary output file */
@<Predecl...@>=
extern void common_init(void);@/
extern void print_stats(void);@/
-extern void cb_show_banner(void);@/
+extern void cb_show_banner(void);
@ The following parameters were sufficient in the original \.{WEB} to
handle \TEX/, so they should be sufficient for most applications of
diff --git a/Build/source/texk/web2c/cwebdir/common.c b/Build/source/texk/web2c/cwebdir/common.c
index 7462a25d9d6..7dd0f0c0838 100644
--- a/Build/source/texk/web2c/cwebdir/common.c
+++ b/Build/source/texk/web2c/cwebdir/common.c
@@ -232,10 +232,11 @@ boolean program;
/*:18*//*19:*/
#line 92 "common.w"
+
int phase;
/*:19*//*21:*/
-#line 129 "common.w"
+#line 130 "common.w"
char section_text[longest_name+1];
char*section_text_end= section_text+longest_name;
@@ -243,7 +244,7 @@ char*id_first;
char*id_loc;
/*:21*//*22:*/
-#line 149 "common.w"
+#line 150 "common.w"
char buffer[long_buf_size];
char*buffer_end= buffer+buf_size-2;
@@ -274,7 +275,7 @@ static char change_buffer[buf_size];
static char*change_limit;
/*:26*//*37:*/
-#line 401 "common.w"
+#line 399 "common.w"
sixteen_bits section_count;
boolean changed_section[max_sections];
@@ -283,7 +284,7 @@ boolean change_pending;
boolean print_where= false;
/*:37*//*43:*/
-#line 598 "common.w"
+#line 596 "common.w"
char byte_mem[max_bytes];
char*byte_mem_end= byte_mem+max_bytes-1;
@@ -291,25 +292,25 @@ name_info name_dir[max_names];
name_pointer name_dir_end= name_dir+max_names-1;
/*:43*//*44:*/
-#line 609 "common.w"
+#line 607 "common.w"
char*byte_ptr;
name_pointer name_ptr;
/*:44*//*46:*/
-#line 629 "common.w"
+#line 627 "common.w"
name_pointer hash[hash_size];
hash_pointer hash_end= hash+hash_size-1;
hash_pointer h;
/*:46*//*65:*/
-#line 1017 "common.w"
+#line 1014 "common.w"
int history= spotless;
/*:65*//*73:*/
-#line 1138 "common.w"
+#line 1135 "common.w"
int argc;
char**argv;
@@ -320,7 +321,7 @@ char scn_file_name[max_file_name_length];
boolean flags[128];
/*:73*//*83:*/
-#line 1286 "common.w"
+#line 1282 "common.w"
FILE*C_file;
FILE*tex_file;
@@ -365,50 +366,45 @@ extern void overflow(const char*);
extern void common_init(void);
extern void print_stats(void);
-/*:15*//*23:*/
-#line 159 "common.w"
-
+/*:15*//*24:*/
+#line 180 "common.w"
static boolean input_ln(FILE*);
-/*:23*//*27:*/
-#line 231 "common.w"
-
+/*:24*//*28:*/
+#line 241 "common.w"
static void prime_the_change_buffer(void);
-/*:27*//*32:*/
-#line 303 "common.w"
-
+/*:28*//*33:*/
+#line 340 "common.w"
static void check_change(void);
-/*:32*//*55:*/
-#line 776 "common.w"
+/*:33*//*55:*/
+#line 774 "common.w"
static int web_strcmp(char*,int,char*,int);
static name_pointer add_section_name(name_pointer,int,char*,char*,int);
static void extend_section_name(name_pointer,char*,char*,int);
-/*:55*//*63:*/
-#line 972 "common.w"
-
+/*:55*//*64:*/
+#line 1002 "common.w"
static int section_name_cmp(char**,int,name_pointer);
-/*:63*//*75:*/
-#line 1170 "common.w"
-
+/*:64*//*76:*/
+#line 1197 "common.w"
static void scan_args(void);
-/*:75*/
+/*:76*/
#line 71 "common.w"
/*:1*//*20:*/
-#line 98 "common.w"
+#line 99 "common.w"
void
common_init(void)
{
/*45:*/
-#line 613 "common.w"
+#line 611 "common.w"
name_dir->byte_start= byte_ptr= byte_mem;
name_ptr= name_dir+1;
@@ -416,24 +412,24 @@ name_ptr->byte_start= byte_mem;
root= NULL;
/*:45*//*47:*/
-#line 636 "common.w"
+#line 634 "common.w"
for(h= hash;h<=hash_end;*h++= NULL);
/*:47*/
-#line 102 "common.w"
+#line 103 "common.w"
/*74:*/
-#line 1151 "common.w"
+#line 1148 "common.w"
show_banner= show_happiness= show_progress= make_xrefs= true;
show_stats= false;
/*:74*/
-#line 103 "common.w"
+#line 104 "common.w"
/*84:*/
-#line 1293 "common.w"
+#line 1289 "common.w"
scan_args();
if(program==ctangle){
@@ -447,12 +443,12 @@ fatal("! Cannot open output file ",tex_file_name);
}
/*:84*/
-#line 104 "common.w"
+#line 105 "common.w"
}
-/*:20*//*24:*/
-#line 162 "common.w"
+/*:20*//*23:*/
+#line 160 "common.w"
static boolean input_ln(
FILE*fp)
@@ -473,15 +469,15 @@ if(c==EOF&&limit==buffer)return false;
return true;
}
-/*:24*//*28:*/
-#line 234 "common.w"
+/*:23*//*27:*/
+#line 231 "common.w"
static void
prime_the_change_buffer(void)
{
change_limit= change_buffer;
/*29:*/
-#line 248 "common.w"
+#line 247 "common.w"
while(true){
change_line++;
@@ -498,10 +494,10 @@ err_print("! Missing @x in change file");
}
/*:29*/
-#line 239 "common.w"
+#line 236 "common.w"
/*30:*/
-#line 265 "common.w"
+#line 264 "common.w"
do{
change_line++;
@@ -513,10 +509,10 @@ return;
}while(limit==buffer);
/*:30*/
-#line 240 "common.w"
+#line 237 "common.w"
/*31:*/
-#line 275 "common.w"
+#line 274 "common.w"
{
change_limit= change_buffer+(ptrdiff_t)(limit-buffer);
@@ -524,12 +520,12 @@ strncpy(change_buffer,buffer,(size_t)(limit-buffer+1));
}
/*:31*/
-#line 241 "common.w"
+#line 238 "common.w"
}
-/*:28*//*33:*/
-#line 306 "common.w"
+/*:27*//*32:*/
+#line 302 "common.w"
static void
check_change(void)
@@ -552,7 +548,7 @@ return;
if(limit> buffer+1&&buffer[0]=='@'){
char xyz_code= xisupper(buffer[1])?tolower((eight_bits)buffer[1]):buffer[1];
/*34:*/
-#line 344 "common.w"
+#line 342 "common.w"
if(xyz_code=='x'||xyz_code=='z'){
loc= buffer+2;err_print("! Where is the matching @y?");
@@ -570,11 +566,11 @@ return;
}
/*:34*/
-#line 328 "common.w"
+#line 324 "common.w"
}
/*31:*/
-#line 275 "common.w"
+#line 274 "common.w"
{
change_limit= change_buffer+(ptrdiff_t)(limit-buffer);
@@ -582,7 +578,7 @@ strncpy(change_buffer,buffer,(size_t)(limit-buffer+1));
}
/*:31*/
-#line 330 "common.w"
+#line 326 "common.w"
changing= false;cur_line++;
while(!input_ln(cur_file)){
@@ -597,15 +593,15 @@ if(lines_dont_match)n++;
}
}
-/*:33*//*35:*/
-#line 364 "common.w"
+/*:32*//*35:*/
+#line 362 "common.w"
void
reset_input(void)
{
limit= buffer;loc= buffer+1;buffer[0]= ' ';
/*36:*/
-#line 379 "common.w"
+#line 377 "common.w"
if((web_file= fopen(web_file_name,"r"))==NULL){
strcpy(web_file_name,alt_web_file_name);
@@ -619,7 +615,7 @@ if((change_file= fopen(change_file_name,"r"))==NULL)
fatal("! Cannot open change file ",change_file_name);
/*:36*/
-#line 369 "common.w"
+#line 367 "common.w"
include_depth= 0;cur_line= 0;change_line= 0;
change_depth= include_depth;
@@ -628,14 +624,14 @@ limit= buffer;loc= buffer+1;buffer[0]= ' ';input_has_ended= false;
}
/*:35*//*38:*/
-#line 408 "common.w"
+#line 406 "common.w"
boolean get_line(void)
{
restart:
if(changing&&include_depth==change_depth)
/*41:*/
-#line 516 "common.w"
+#line 514 "common.w"
{
change_line++;
if(!input_ln(change_file)){
@@ -666,11 +662,11 @@ prime_the_change_buffer();changing= !changing;print_where= true;
}
/*:41*/
-#line 413 "common.w"
+#line 411 "common.w"
if(!changing||include_depth> change_depth){
/*40:*/
-#line 499 "common.w"
+#line 497 "common.w"
{
cur_line++;
while(!input_ln(cur_file)){
@@ -689,7 +685,7 @@ if(change_limit> change_buffer)check_change();
}
/*:40*/
-#line 415 "common.w"
+#line 413 "common.w"
if(changing&&include_depth==change_depth)goto restart;
}
@@ -710,7 +706,7 @@ goto restart;
}
include_depth++;
/*39:*/
-#line 453 "common.w"
+#line 451 "common.w"
{
char temp_file_name[max_file_name_length];
char*cur_file_name_end= cur_file_name+max_file_name_length-1;
@@ -758,14 +754,14 @@ include_depth--;err_print("! Cannot open include file");goto restart;
}
/*:39*/
-#line 434 "common.w"
+#line 432 "common.w"
}
return true;
}
/*:38*//*42:*/
-#line 548 "common.w"
+#line 546 "common.w"
void
check_complete(void){
@@ -779,7 +775,7 @@ err_print("! Change file entry did not match");
}
/*:42*//*48:*/
-#line 641 "common.w"
+#line 639 "common.w"
name_pointer
id_lookup(
@@ -794,17 +790,17 @@ name_pointer p;
if(last==NULL)for(last= first;*last!='\0';last++);
l= (int)(last-first);
/*49:*/
-#line 664 "common.w"
+#line 662 "common.w"
h= (eight_bits)*i;
while(++i<last)h= (h+h+(int)((eight_bits)*i))%hash_size;
/*:49*/
-#line 654 "common.w"
+#line 652 "common.w"
/*50:*/
-#line 672 "common.w"
+#line 670 "common.w"
p= hash[h];
while(p&&!names_match(p,first,l,t))p= p->link;
@@ -814,10 +810,10 @@ p->link= hash[h];hash[h]= p;
}
/*:50*/
-#line 655 "common.w"
+#line 653 "common.w"
if(p==name_ptr)/*51:*/
-#line 683 "common.w"
+#line 681 "common.w"
{
if(byte_ptr+l> byte_mem_end)overflow("byte memory");
if(name_ptr>=name_dir_end)overflow("name");
@@ -827,13 +823,13 @@ init_p(p,t);
}
/*:51*/
-#line 656 "common.w"
+#line 654 "common.w"
return p;
}
/*:48*//*52:*/
-#line 715 "common.w"
+#line 713 "common.w"
void
print_section_name(
@@ -854,7 +850,7 @@ if(q)term_write("...",3);
}
/*:52*//*53:*/
-#line 734 "common.w"
+#line 732 "common.w"
void
sprint_section_name(
@@ -877,7 +873,7 @@ s= p->byte_start;
}
/*:53*//*54:*/
-#line 755 "common.w"
+#line 753 "common.w"
void
print_prefix_name(
@@ -890,7 +886,7 @@ if(s+l<(p+1)->byte_start)term_write("...",3);
}
/*:54*//*56:*/
-#line 781 "common.w"
+#line 779 "common.w"
static int web_strcmp(
char*j,
@@ -908,7 +904,7 @@ else return greater;
}
/*:56*//*57:*/
-#line 810 "common.w"
+#line 808 "common.w"
static name_pointer
add_section_name(
@@ -939,7 +935,7 @@ return par==NULL?(root= p):c==less?(par->llink= p):(par->rlink= p);
}
/*:57*//*58:*/
-#line 839 "common.w"
+#line 837 "common.w"
static void
extend_section_name(
@@ -963,7 +959,7 @@ if(ispref)*(byte_ptr-1)= ' ';
}
/*:58*//*59:*/
-#line 867 "common.w"
+#line 865 "common.w"
name_pointer
section_lookup(
@@ -978,7 +974,7 @@ name_pointer par= NULL;
int name_len= (int)(last-first)+1;
/*60:*/
-#line 891 "common.w"
+#line 889 "common.w"
while(p){
c= web_strcmp(first,name_len,first_chunk(p),prefix_length(p));
@@ -1005,19 +1001,19 @@ p= q,q= NULL;
}
/*:60*/
-#line 881 "common.w"
+#line 879 "common.w"
/*61:*/
-#line 916 "common.w"
+#line 914 "common.w"
if(r==NULL)
return add_section_name(par,c,first,last+1,ispref);
/*:61*/
-#line 882 "common.w"
+#line 880 "common.w"
/*62:*/
-#line 924 "common.w"
+#line 922 "common.w"
switch(section_name_cmp(&first,name_len,r)){
@@ -1051,12 +1047,12 @@ return r;
}
/*:62*/
-#line 883 "common.w"
+#line 881 "common.w"
}
-/*:59*//*64:*/
-#line 975 "common.w"
+/*:59*//*63:*/
+#line 970 "common.w"
static int section_name_cmp(
char**pfirst,
@@ -1089,8 +1085,8 @@ default:return c;
}
}
-/*:64*//*66:*/
-#line 1027 "common.w"
+/*:63*//*66:*/
+#line 1024 "common.w"
void
err_print(
@@ -1099,7 +1095,7 @@ const char*s)
char*k,*l;
printf(*s=='!'?"\n%s":"%s",s);
if(web_file_open)/*67:*/
-#line 1047 "common.w"
+#line 1044 "common.w"
{if(changing&&include_depth==change_depth)
printf(". (l. %d of change file)\n",change_line);
@@ -1119,20 +1115,20 @@ putchar(' ');
}
/*:67*/
-#line 1034 "common.w"
+#line 1031 "common.w"
update_terminal;mark_error;
}
/*:66*//*68:*/
-#line 1079 "common.w"
+#line 1076 "common.w"
int wrap_up(void){
if(show_progress)new_line;
if(show_stats)
print_stats();
/*69:*/
-#line 1089 "common.w"
+#line 1086 "common.w"
switch(history){
case spotless:if(show_happiness)puts("(No errors were found.)");break;
@@ -1144,14 +1140,14 @@ case fatal_message:puts("(That was a fatal error, my friend.)");
}
/*:69*/
-#line 1084 "common.w"
+#line 1081 "common.w"
if(history> harmless_message)return EXIT_FAILURE;
else return EXIT_SUCCESS;
}
/*:68*//*70:*/
-#line 1105 "common.w"
+#line 1102 "common.w"
void
fatal(
const char*s,const char*t)
@@ -1162,7 +1158,7 @@ history= fatal_message;exit(wrap_up());
}
/*:70*//*71:*/
-#line 1116 "common.w"
+#line 1113 "common.w"
void
overflow(
const char*t)
@@ -1171,8 +1167,8 @@ printf("\n! Sorry, %s capacity exceeded",t);fatal("","");
}
-/*:71*//*76:*/
-#line 1173 "common.w"
+/*:71*//*75:*/
+#line 1167 "common.w"
static void
scan_args(void)
@@ -1186,7 +1182,7 @@ boolean found_web= false,found_change= false,found_out= false;
strcpy(change_file_name,"/dev/null");
while(--argc> 0){
if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*80:*/
-#line 1262 "common.w"
+#line 1258 "common.w"
{
for(dot_pos= *argv+1;*dot_pos> '\0';dot_pos++)
@@ -1194,7 +1190,7 @@ flags[(eight_bits)*dot_pos]= flag_change;
}
/*:80*/
-#line 1185 "common.w"
+#line 1179 "common.w"
else{
s= name_pos= *argv;dot_pos= NULL;
@@ -1204,17 +1200,17 @@ else if(*s=='/')dot_pos= NULL,name_pos= ++s;
else s++;
}
if(!found_web)/*77:*/
-#line 1210 "common.w"
+#line 1206 "common.w"
{
if(s-*argv> max_file_name_length-5)
/*82:*/
-#line 1280 "common.w"
+#line 1276 "common.w"
fatal("! Filename too long\n",*argv);
/*:82*/
-#line 1213 "common.w"
+#line 1209 "common.w"
if(dot_pos==NULL)
sprintf(web_file_name,"%s.w",*argv);
@@ -1231,21 +1227,21 @@ found_web= true;
}
/*:77*/
-#line 1194 "common.w"
+#line 1188 "common.w"
else if(!found_change)/*78:*/
-#line 1228 "common.w"
+#line 1224 "common.w"
{
if(strcmp(*argv,"-")!=0){
if(s-*argv> max_file_name_length-4)
/*82:*/
-#line 1280 "common.w"
+#line 1276 "common.w"
fatal("! Filename too long\n",*argv);
/*:82*/
-#line 1232 "common.w"
+#line 1228 "common.w"
if(dot_pos==NULL)
sprintf(change_file_name,"%s.ch",*argv);
@@ -1255,20 +1251,20 @@ found_change= true;
}
/*:78*/
-#line 1195 "common.w"
+#line 1189 "common.w"
else if(!found_out)/*79:*/
-#line 1240 "common.w"
+#line 1236 "common.w"
{
if(s-*argv> max_file_name_length-5)
/*82:*/
-#line 1280 "common.w"
+#line 1276 "common.w"
fatal("! Filename too long\n",*argv);
/*:82*/
-#line 1243 "common.w"
+#line 1239 "common.w"
if(dot_pos==NULL){
sprintf(tex_file_name,"%s.tex",*argv);
@@ -1288,10 +1284,10 @@ found_out= true;
}
/*:79*/
-#line 1196 "common.w"
+#line 1190 "common.w"
else/*81:*/
-#line 1268 "common.w"
+#line 1264 "common.w"
{
if(program==ctangle)
@@ -1305,12 +1301,12 @@ else fatal(
}
/*:81*/
-#line 1197 "common.w"
+#line 1191 "common.w"
}
}
if(!found_web)/*81:*/
-#line 1268 "common.w"
+#line 1264 "common.w"
{
if(program==ctangle)
@@ -1324,8 +1320,8 @@ else fatal(
}
/*:81*/
-#line 1200 "common.w"
+#line 1194 "common.w"
}
-/*:76*/
+/*:75*/
diff --git a/Build/source/texk/web2c/cwebdir/common.h b/Build/source/texk/web2c/cwebdir/common.h
index d79059621b7..dd9bbfdb347 100644
--- a/Build/source/texk/web2c/cwebdir/common.h
+++ b/Build/source/texk/web2c/cwebdir/common.h
@@ -168,7 +168,7 @@ extern void init_node(name_pointer);@/
extern void init_p(name_pointer,eight_bits);@/
extern void print_prefix_name(name_pointer);@/
extern void print_section_name(name_pointer);@/
-extern void sprint_section_name(char *,name_pointer);@/
+extern void sprint_section_name(char *,name_pointer);
@ Code related to error handling:
@d spotless 0 /* |history| value for normal jobs */
@@ -222,7 +222,7 @@ extern FILE *active_file; /* currently active file for \.{CWEAVE} output */
@ The procedure that gets everything rolling:
@<Predecl...@>=
extern void common_init(void);@/
-extern void print_stats(void);@/
+extern void print_stats(void);
@ The following parameters were sufficient in the original \.{WEB} to
handle \TEX/, so they should be sufficient for most applications of
diff --git a/Build/source/texk/web2c/cwebdir/common.w b/Build/source/texk/web2c/cwebdir/common.w
index 2b90275437d..d8ce0be34cd 100644
--- a/Build/source/texk/web2c/cwebdir/common.w
+++ b/Build/source/texk/web2c/cwebdir/common.w
@@ -68,7 +68,7 @@ The file begins with a few basic definitions.
@h
@<Common code for \.{CWEAVE} and \.{CTANGLE}@>@/
@<Global variables@>@/
-@<Predeclaration of procedures@>@/
+@<Predeclaration of procedures@>
@ The details will be filled in due course. The interface of this module
is included first. It is also used by the main programs.
@@ -89,7 +89,8 @@ produces the \TEX/ output file, and finally it sorts and outputs the index.
Similarly, \.{CTANGLE} operates in two phases.
The global variable |phase| tells which phase we are in.
-@<Global var...@>= int phase; /* which phase are we in? */
+@<Global var...@>=
+int phase; /* which phase are we in? */
@ There's an initialization procedure that gets both \.{CTANGLE} and
\.{CWEAVE} off to a good start. We will fill in the details of this
@@ -156,10 +157,7 @@ char *limit=buffer; /* points to the last character in the buffer */
support |feof|, |getc|, and |ungetc| you may have to change things here.
@^system dependencies@>
-@<Predecl...@>=
-static boolean input_ln(FILE *);@/
-
-@ @c
+@c
static boolean input_ln(@t\1\1@> /* copies a line into |buffer| or returns |false| */
FILE *fp@t\2\2@>) /* what file to read from */
{
@@ -179,6 +177,8 @@ FILE *fp@t\2\2@>) /* what file to read from */
return true;
}
+@ @<Predecl...@>=@+static boolean input_ln(FILE *);
+
@ Now comes the problem of deciding which file to read from next.
Recall that the actual text that \.{CWEB} should process comes from two
streams: a |web_file|, which can contain possibly nested include
@@ -228,10 +228,7 @@ Since blank lines in the change file are not used for matching, we have
the change file is exhausted. This procedure is called only when
|changing| is |true|; hence error messages will be reported correctly.
-@<Predecl...@>=
-static void prime_the_change_buffer(void);@/
-
-@ @c
+@c
static void
prime_the_change_buffer(void)
{
@@ -241,6 +238,8 @@ prime_the_change_buffer(void)
@<Move |buffer| and |limit| to |change_buffer| and |change_limit|@>@;
}
+@ @<Predecl...@>=@+static void prime_the_change_buffer(void);
+
@ While looking for a line that begins with \.{@@x} in the change file, we
allow lines that begin with \.{@@}, as long as they don't begin with \.{@@y},
\.{@@z}, or \.{@@i} (which would probably mean that the change file is fouled up).
@@ -300,10 +299,7 @@ current line is nonempty.
if (*loc=='@@' && (xisspace(*(loc+1)) || *(loc+1)=='*')) change_pending=b;
}
-@<Predecl...@>=
-static void check_change(void);@/
-
-@ @c
+@c
static void
check_change(void) /* switches to |change_file| if the buffers match */
{
@@ -341,6 +337,8 @@ check_change(void) /* switches to |change_file| if the buffers match */
}
}
+@ @<Predecl...@>=@+static void check_change(void);
+
@ @<If the current line starts with \.{@@y}...@>=
if (xyz_code=='x' || xyz_code=='z') {
loc=buffer+2; err_print("! Where is the matching @@y?");
@@ -776,7 +774,7 @@ are null-terminated, and we keep an eye open for prefixes and extensions.
@<Predecl...@>=
static int web_strcmp(char *,int,char *,int);@/
static name_pointer add_section_name(name_pointer,int,char *,char *,int);@/
-static void extend_section_name(name_pointer,char *,char *,int);@/
+static void extend_section_name(name_pointer,char *,char *,int);
@ @c
static int web_strcmp(@t\1\1@> /* fuller comparison than |strcmp| */
@@ -969,10 +967,7 @@ us to regard \.{@@<foo...@@>} as an ``extension'' of itself.
@d bad_extension 5
-@<Predec...@>=
-static int section_name_cmp(char **,int,name_pointer);@/
-
-@ @c
+@c
static int section_name_cmp(@t\1\1@>
char **pfirst, /* pointer to beginning of comparison string */
int len, /* length of string */
@@ -1004,6 +999,8 @@ name_pointer r@t\2\2@>) /* section name being compared */
}
}
+@ @<Predec...@>=@+static int section_name_cmp(char **,int,name_pointer);
+
@** Reporting errors to the user.
A global variable called |history| will contain one of four values
at the end of every run: |spotless| means that no unusual messages were
@@ -1150,7 +1147,7 @@ should be set before calling |common_init|.
@<Set the default options common to \.{CTANGLE} and \.{CWEAVE}@>=
show_banner=show_happiness=show_progress=make_xrefs=true;@/
-show_stats=false;@/
+show_stats=false;
@ We now must look at the command line arguments and set the file names
accordingly. At least one file name must be present: the \.{CWEB}
@@ -1167,10 +1164,7 @@ when no changes are desired.
If there's a third file name, it will be the output file.
-@<Pred...@>=
-static void scan_args(void);@/
-
-@ @c
+@c
static void
scan_args(void)
{
@@ -1200,6 +1194,8 @@ scan_args(void)
if (!found_web) @<Print usage error message and quit@>@;
}
+@ @<Pred...@>=@+static void scan_args(void);
+
@ We use all of |*argv| for the |web_file_name| if there is a |'.'| in it,
otherwise we add |".w"|. If this file can't be opened, we prepare an
|alt_web_file_name| by adding |"web"| after the dot.
diff --git a/Build/source/texk/web2c/cwebdir/ctangle.c b/Build/source/texk/web2c/cwebdir/ctangle.c
index 769dc071f7c..aead827388e 100644
--- a/Build/source/texk/web2c/cwebdir/ctangle.c
+++ b/Build/source/texk/web2c/cwebdir/ctangle.c
@@ -257,7 +257,7 @@ sixteen_bits text_link;
typedef text*text_pointer;
/*:19*//*31:*/
-#line 270 "ctangle.w"
+#line 269 "ctangle.w"
typedef struct{
eight_bits*end_field;
@@ -287,7 +287,7 @@ static eight_bits*tok_ptr;
static text_pointer last_unnamed;
/*:26*//*32:*/
-#line 286 "ctangle.w"
+#line 285 "ctangle.w"
static output_state cur_state;
@@ -296,18 +296,18 @@ static stack_pointer stack_end= stack+stack_size;
static stack_pointer stack_ptr;
/*:32*//*37:*/
-#line 362 "ctangle.w"
+#line 361 "ctangle.w"
static int cur_val;
/*:37*//*42:*/
-#line 454 "ctangle.w"
+#line 452 "ctangle.w"
static eight_bits out_state;
static boolean protect;
/*:42*//*45:*/
-#line 486 "ctangle.w"
+#line 483 "ctangle.w"
static name_pointer output_files[max_files];
static name_pointer*cur_out_file,*end_output_files,*an_output_file;
@@ -315,33 +315,33 @@ static char cur_section_name_char;
static char output_file_name[longest_name+1];
/*:45*//*52:*/
-#line 586 "ctangle.w"
+#line 582 "ctangle.w"
static boolean output_defs_seen= false;
/*:52*//*57:*/
-#line 695 "ctangle.w"
+#line 691 "ctangle.w"
static char translit[128][translit_length];
/*:57*//*62:*/
-#line 774 "ctangle.w"
+#line 770 "ctangle.w"
static eight_bits ccode[256];
/*:62*//*66:*/
-#line 834 "ctangle.w"
+#line 830 "ctangle.w"
static boolean comment_continues= false;
/*:66*//*68:*/
-#line 873 "ctangle.w"
+#line 869 "ctangle.w"
static name_pointer cur_section_name;
static boolean no_where;
/*:68*//*82:*/
-#line 1187 "ctangle.w"
+#line 1182 "ctangle.w"
static text_pointer cur_text;
static eight_bits next_control;
@@ -383,70 +383,61 @@ extern void overflow(const char*);
extern void common_init(void);
extern void print_stats(void);
-/*:16*//*29:*/
-#line 231 "ctangle.w"
-
+/*:16*//*30:*/
+#line 241 "ctangle.w"
static void store_two_bytes(sixteen_bits);
-/*:29*//*34:*/
-#line 310 "ctangle.w"
+/*:30*//*35:*/
+#line 324 "ctangle.w"
static void push_level(name_pointer);
static void pop_level(boolean);
-/*:34*//*38:*/
-#line 369 "ctangle.w"
-
+/*:35*//*39:*/
+#line 397 "ctangle.w"
static void get_output(void);
-/*:38*//*43:*/
-#line 462 "ctangle.w"
-
+/*:39*//*44:*/
+#line 473 "ctangle.w"
static void flush_buffer(void);
-/*:43*//*48:*/
-#line 517 "ctangle.w"
-
+/*:44*//*49:*/
+#line 549 "ctangle.w"
static void phase_two(void);
-/*:48*//*53:*/
-#line 589 "ctangle.w"
+/*:49*//*53:*/
+#line 585 "ctangle.w"
static void output_defs(void);
static void out_char(eight_bits);
-/*:53*//*64:*/
-#line 798 "ctangle.w"
+/*:53*//*65:*/
+#line 810 "ctangle.w"
static eight_bits skip_ahead(void);
static boolean skip_comment(boolean);
-/*:64*//*69:*/
-#line 885 "ctangle.w"
-
+/*:65*//*70:*/
+#line 924 "ctangle.w"
static eight_bits get_next(void);
-/*:69*//*83:*/
-#line 1191 "ctangle.w"
-
+/*:70*//*84:*/
+#line 1208 "ctangle.w"
static void scan_repl(eight_bits);
-/*:83*//*90:*/
-#line 1348 "ctangle.w"
-
+/*:84*//*91:*/
+#line 1379 "ctangle.w"
static void scan_section(void);
-/*:90*//*98:*/
-#line 1455 "ctangle.w"
-
+/*:91*//*99:*/
+#line 1460 "ctangle.w"
static void phase_one(void);
-/*:98*//*100:*/
-#line 1473 "ctangle.w"
-
+/*:99*//*101:*/
+#line 1494 "ctangle.w"
static void skip_limbo(void);
-/*:100*/
+/*:101*/
#line 72 "ctangle.w"
@@ -476,12 +467,12 @@ init_node(name_dir);
last_unnamed= text_info;text_info->text_link= 0;
/*:27*//*46:*/
-#line 496 "ctangle.w"
+#line 493 "ctangle.w"
cur_out_file= end_output_files= output_files+max_files;
/*:46*//*58:*/
-#line 698 "ctangle.w"
+#line 694 "ctangle.w"
{
int i;
@@ -489,7 +480,7 @@ for(i= 0;i<128;i++)sprintf(translit[i],"X%02X",(unsigned int)(128+i));
}
/*:58*//*63:*/
-#line 777 "ctangle.w"
+#line 773 "ctangle.w"
{
int c;
for(c= 0;c<256;c++)ccode[c]= ignore;
@@ -509,7 +500,7 @@ ccode['\'']= ord;
}
/*:63*//*78:*/
-#line 1108 "ctangle.w"
+#line 1103 "ctangle.w"
section_text[0]= ' ';
/*:78*/
@@ -547,10 +538,10 @@ node->equiv= (void*)text_info;
void
init_p(name_pointer p,eight_bits t){(void)p;(void)t;}
-/*:25*//*30:*/
-#line 234 "ctangle.w"
+/*:25*//*29:*/
+#line 231 "ctangle.w"
-void
+static void
store_two_bytes(
sixteen_bits x)
{
@@ -559,8 +550,8 @@ if(tok_ptr+2> tok_mem_end)overflow("token");
*tok_ptr++= x&0377;
}
-/*:30*//*35:*/
-#line 314 "ctangle.w"
+/*:29*//*34:*/
+#line 309 "ctangle.w"
static void
push_level(
@@ -576,8 +567,8 @@ cur_section= 0;
}
}
-/*:35*//*36:*/
-#line 333 "ctangle.w"
+/*:34*//*36:*/
+#line 332 "ctangle.w"
static void
pop_level(
@@ -592,8 +583,8 @@ stack_ptr--;
if(stack_ptr> stack)cur_state= *stack_ptr;
}
-/*:36*//*39:*/
-#line 372 "ctangle.w"
+/*:36*//*38:*/
+#line 368 "ctangle.w"
static void
get_output(void)
@@ -616,7 +607,7 @@ switch(a/024000){
case 0:cur_val= a;out_char(identifier);break;
case 1:if(a==output_defs_flag)output_defs();
else/*40:*/
-#line 404 "ctangle.w"
+#line 402 "ctangle.w"
{
a-= 024000;
@@ -630,7 +621,7 @@ goto restart;
}
/*:40*/
-#line 393 "ctangle.w"
+#line 389 "ctangle.w"
break;
default:cur_val= a-050000;if(cur_val> 0)cur_section= cur_val;
@@ -639,8 +630,8 @@ out_char(section_number);
}
}
-/*:39*//*44:*/
-#line 465 "ctangle.w"
+/*:38*//*43:*/
+#line 460 "ctangle.w"
static void
flush_buffer(void)
@@ -654,30 +645,30 @@ update_terminal;
cur_line++;
}
-/*:44*//*49:*/
-#line 520 "ctangle.w"
+/*:43*//*48:*/
+#line 514 "ctangle.w"
static void
phase_two(void){
web_file_open= false;
cur_line= 1;
/*33:*/
-#line 299 "ctangle.w"
+#line 298 "ctangle.w"
stack_ptr= stack+1;cur_name= name_dir;cur_repl= text_info->text_link+text_info;
cur_byte= cur_repl->tok_start;cur_end= (cur_repl+1)->tok_start;cur_section= 0;
/*:33*/
-#line 525 "ctangle.w"
+#line 519 "ctangle.w"
/*51:*/
-#line 582 "ctangle.w"
+#line 578 "ctangle.w"
if(!output_defs_seen)
output_defs();
/*:51*/
-#line 526 "ctangle.w"
+#line 520 "ctangle.w"
if(text_info->text_link==0&&cur_out_file==end_output_files){
fputs("\n! No program text was specified.",stdout);mark_harmless;
@@ -700,7 +691,7 @@ if(text_info->text_link==0)goto writeloop;
while(stack_ptr> stack)get_output();
flush_buffer();
writeloop:/*50:*/
-#line 559 "ctangle.w"
+#line 555 "ctangle.w"
for(an_output_file= end_output_files;an_output_file> cur_out_file;){
an_output_file--;
@@ -721,7 +712,7 @@ flush_buffer();
}
/*:50*/
-#line 547 "ctangle.w"
+#line 541 "ctangle.w"
if(show_happiness){
if(show_progress)new_line;
@@ -730,8 +721,8 @@ fputs("Done.",stdout);
}
}
-/*:49*//*54:*/
-#line 593 "ctangle.w"
+/*:48*//*54:*/
+#line 589 "ctangle.w"
static void
output_defs(void)
@@ -771,7 +762,7 @@ pop_level(false);
}
/*:54*//*55:*/
-#line 636 "ctangle.w"
+#line 632 "ctangle.w"
static void
out_char(
@@ -784,7 +775,7 @@ case'\n':if(protect&&out_state!=verbatim)C_putc(' ');
if(protect||out_state==verbatim)C_putc('\\');
flush_buffer();if(out_state!=verbatim)out_state= normal;break;
/*59:*/
-#line 704 "ctangle.w"
+#line 700 "ctangle.w"
case identifier:
if(out_state==num_or_id)C_putc(' ');
@@ -799,10 +790,10 @@ j++;
out_state= num_or_id;break;
/*:59*/
-#line 647 "ctangle.w"
+#line 643 "ctangle.w"
/*60:*/
-#line 717 "ctangle.w"
+#line 713 "ctangle.w"
case section_number:
if(cur_val> 0)C_printf("/*%d:*/",cur_val);
@@ -829,10 +820,10 @@ C_printf("%s","\"\n");
break;
/*:60*/
-#line 648 "ctangle.w"
+#line 644 "ctangle.w"
/*56:*/
-#line 666 "ctangle.w"
+#line 662 "ctangle.w"
case plus_plus:C_putc('+');C_putc('+');out_state= normal;break;
case minus_minus:C_putc('-');C_putc('-');out_state= normal;break;
@@ -853,7 +844,7 @@ case minus_gt_ast:C_putc('-');C_putc('>');C_putc('*');out_state= normal;
break;
/*:56*/
-#line 649 "ctangle.w"
+#line 645 "ctangle.w"
case'=':case'>':C_putc(cur_char);C_putc(' ');
out_state= normal;break;
@@ -871,8 +862,8 @@ default:C_putc(cur_char);out_state= normal;break;
}
}
-/*:55*//*65:*/
-#line 802 "ctangle.w"
+/*:55*//*64:*/
+#line 794 "ctangle.w"
static eight_bits
skip_ahead(void)
@@ -889,8 +880,8 @@ if(c!=ignore||*(loc-1)=='>')return c;
}
}
-/*:65*//*67:*/
-#line 837 "ctangle.w"
+/*:64*//*67:*/
+#line 833 "ctangle.w"
static boolean skip_comment(
boolean is_long_comment)
@@ -923,8 +914,8 @@ else loc++;
}
}
-/*:67*//*70:*/
-#line 888 "ctangle.w"
+/*:67*//*69:*/
+#line 881 "ctangle.w"
static eight_bits
get_next(void)
@@ -938,7 +929,7 @@ if(get_line()==false)return new_section;
else if(print_where&&!no_where){
print_where= false;
/*85:*/
-#line 1220 "ctangle.w"
+#line 1214 "ctangle.w"
store_two_bytes(0150000);
if(changing&&include_depth==change_depth){
@@ -953,7 +944,7 @@ id_loc= id_first+strlen(id_first);
app_repl(a_l%0400);}
/*:85*/
-#line 900 "ctangle.w"
+#line 893 "ctangle.w"
}
else return'\n';
@@ -967,7 +958,7 @@ else continue;
}
loc++;
if(xisdigit(c)||c=='.')/*73:*/
-#line 969 "ctangle.w"
+#line 964 "ctangle.w"
{
id_first= loc-1;
if(*id_first=='.'&&!xisdigit(*loc))goto mistake;
@@ -992,13 +983,13 @@ return constant;
}
/*:73*/
-#line 912 "ctangle.w"
+#line 905 "ctangle.w"
else if(c=='\''||c=='"'
||((c=='L'||c=='u'||c=='U')&&(*loc=='\''||*loc=='"'))
||((c=='u'&&*loc=='8')&&(*(loc+1)=='\''||*(loc+1)=='"')))
/*74:*/
-#line 997 "ctangle.w"
+#line 992 "ctangle.w"
{
char delim= c;
id_first= section_text+1;
@@ -1042,11 +1033,11 @@ return string;
}
/*:74*/
-#line 916 "ctangle.w"
+#line 909 "ctangle.w"
else if(isalpha(c)||isxalpha(c)||ishigh(c))
/*72:*/
-#line 962 "ctangle.w"
+#line 957 "ctangle.w"
{
id_first= --loc;
while(isalpha((eight_bits)*++loc)||isdigit((eight_bits)*loc)
@@ -1055,10 +1046,10 @@ id_loc= loc;return identifier;
}
/*:72*/
-#line 918 "ctangle.w"
+#line 911 "ctangle.w"
else if(c=='@')/*75:*/
-#line 1042 "ctangle.w"
+#line 1037 "ctangle.w"
{
c= ccode[(eight_bits)*loc++];
switch(c){
@@ -1074,11 +1065,11 @@ continue;
case section_name:
cur_section_name_char= *(loc-1);
/*77:*/
-#line 1090 "ctangle.w"
+#line 1085 "ctangle.w"
{
char*k;
/*79:*/
-#line 1110 "ctangle.w"
+#line 1105 "ctangle.w"
k= section_text;
while(true){
@@ -1089,7 +1080,7 @@ loc= buffer+1;break;
}
c= *loc;
/*80:*/
-#line 1134 "ctangle.w"
+#line 1129 "ctangle.w"
if(c=='@'){
c= *(loc+1);
@@ -1108,7 +1099,7 @@ err_print("! Nesting of section names not allowed");break;
}
/*:80*/
-#line 1119 "ctangle.w"
+#line 1114 "ctangle.w"
loc++;if(k<section_text_end)k++;
if(xisspace(c)){
@@ -1125,14 +1116,14 @@ printf("...");mark_harmless;
if(*k==' '&&k> section_text)k--;
/*:79*/
-#line 1092 "ctangle.w"
+#line 1087 "ctangle.w"
if(k-section_text> 3&&strncmp(k-2,"...",3)==0)
cur_section_name= section_lookup(section_text+1,k-3,1);
else cur_section_name= section_lookup(section_text+1,k,0);
if(cur_section_name_char=='(')
/*47:*/
-#line 500 "ctangle.w"
+#line 497 "ctangle.w"
{
for(an_output_file= cur_out_file;
@@ -1148,16 +1139,16 @@ overflow("output files");
}
/*:47*/
-#line 1098 "ctangle.w"
+#line 1093 "ctangle.w"
return section_name;
}
/*:77*/
-#line 1056 "ctangle.w"
+#line 1051 "ctangle.w"
case string:/*81:*/
-#line 1156 "ctangle.w"
+#line 1151 "ctangle.w"
{
id_first= loc++;*(limit+1)= '@';*(limit+2)= '>';
while(*loc!='@'||*(loc+1)!='>')loc++;
@@ -1168,10 +1159,10 @@ return string;
}
/*:81*/
-#line 1057 "ctangle.w"
+#line 1052 "ctangle.w"
case ord:/*76:*/
-#line 1069 "ctangle.w"
+#line 1064 "ctangle.w"
id_first= loc;
if(*loc=='\\'){
@@ -1194,14 +1185,14 @@ loc++;
return ord;
/*:76*/
-#line 1058 "ctangle.w"
+#line 1053 "ctangle.w"
default:return c;
}
}
/*:75*/
-#line 919 "ctangle.w"
+#line 912 "ctangle.w"
else if(xisspace(c)){
if(!preprocessing||loc> limit)continue;
@@ -1210,7 +1201,7 @@ else return' ';
}
else if(c=='#'&&loc==buffer+1)preprocessing= 1;
mistake:/*71:*/
-#line 940 "ctangle.w"
+#line 935 "ctangle.w"
switch(c){
case'+':if(*loc=='+')compress(plus_plus);break;
@@ -1234,14 +1225,14 @@ case'!':if(*loc=='=')compress(non_eq);break;
}
/*:71*/
-#line 926 "ctangle.w"
+#line 919 "ctangle.w"
return c;
}
}
-/*:70*//*84:*/
-#line 1194 "ctangle.w"
+/*:69*//*83:*/
+#line 1186 "ctangle.w"
static void
scan_repl(
@@ -1249,7 +1240,7 @@ eight_bits t)
{
sixteen_bits a;
if(t==section_name){/*85:*/
-#line 1220 "ctangle.w"
+#line 1214 "ctangle.w"
store_two_bytes(0150000);
if(changing&&include_depth==change_depth){
@@ -1264,11 +1255,11 @@ id_loc= id_first+strlen(id_first);
app_repl(a_l%0400);}
/*:85*/
-#line 1200 "ctangle.w"
+#line 1192 "ctangle.w"
}
while(true)switch(a= get_next()){
/*86:*/
-#line 1233 "ctangle.w"
+#line 1227 "ctangle.w"
case identifier:a= id_lookup(id_first,id_loc,0)-name_dir;
app_repl((a/0400)+0200);
@@ -1276,7 +1267,7 @@ app_repl(a%0400);break;
case section_name:if(t!=section_name)goto done;
else{
/*87:*/
-#line 1266 "ctangle.w"
+#line 1260 "ctangle.w"
{
char*try_loc= loc;
while(*try_loc==' '&&try_loc<limit)try_loc++;
@@ -1289,13 +1280,13 @@ if(*try_loc=='=')err_print("! Missing `@ ' before a named section");
}
/*:87*/
-#line 1239 "ctangle.w"
+#line 1233 "ctangle.w"
a= cur_section_name-name_dir;
app_repl((a/0400)+0250);
app_repl(a%0400);
/*85:*/
-#line 1220 "ctangle.w"
+#line 1214 "ctangle.w"
store_two_bytes(0150000);
if(changing&&include_depth==change_depth){
@@ -1310,7 +1301,7 @@ id_loc= id_first+strlen(id_first);
app_repl(a_l%0400);}
/*:85*/
-#line 1243 "ctangle.w"
+#line 1237 "ctangle.w"
break;
}
case output_defs_code:if(t!=section_name)err_print("! Misplaced @h");
@@ -1321,7 +1312,7 @@ a= output_defs_flag;
app_repl((a/0400)+0200);
app_repl(a%0400);
/*85:*/
-#line 1220 "ctangle.w"
+#line 1214 "ctangle.w"
store_two_bytes(0150000);
if(changing&&include_depth==change_depth){
@@ -1336,13 +1327,13 @@ id_loc= id_first+strlen(id_first);
app_repl(a_l%0400);}
/*:85*/
-#line 1252 "ctangle.w"
+#line 1246 "ctangle.w"
}
break;
case constant:case string:
/*88:*/
-#line 1277 "ctangle.w"
+#line 1271 "ctangle.w"
app_repl(a);
while(id_first<id_loc){
@@ -1356,11 +1347,11 @@ app_repl(*id_first++);
app_repl(a);break;
/*:88*/
-#line 1256 "ctangle.w"
+#line 1250 "ctangle.w"
case ord:
/*89:*/
-#line 1293 "ctangle.w"
+#line 1287 "ctangle.w"
{
int c= (eight_bits)*id_first;
if(c=='\\'){
@@ -1411,7 +1402,7 @@ app_repl(constant);
break;
/*:89*/
-#line 1258 "ctangle.w"
+#line 1252 "ctangle.w"
case definition:case format_code:case begin_C:if(t!=section_name)goto done;
else{
@@ -1421,7 +1412,7 @@ err_print("! @d, @f and @c are ignored in C text");continue;
case new_section:goto done;
/*:86*/
-#line 1205 "ctangle.w"
+#line 1197 "ctangle.w"
case')':app_repl(a);
if(t==macro)app_repl(' ');
@@ -1433,8 +1424,8 @@ if(text_ptr> text_info_end)overflow("text");
cur_text= text_ptr;(++text_ptr)->tok_start= tok_ptr;
}
-/*:84*//*91:*/
-#line 1355 "ctangle.w"
+/*:83*//*90:*/
+#line 1346 "ctangle.w"
static void
scan_section(void)
@@ -1449,7 +1440,7 @@ printf("*%d",section_count);update_terminal;
next_control= 0;
while(true){
/*92:*/
-#line 1394 "ctangle.w"
+#line 1387 "ctangle.w"
while(next_control<definition)
@@ -1458,11 +1449,11 @@ loc-= 2;next_control= get_next();
}
/*:92*/
-#line 1369 "ctangle.w"
+#line 1360 "ctangle.w"
if(next_control==definition){
/*93:*/
-#line 1401 "ctangle.w"
+#line 1394 "ctangle.w"
{
while((next_control= get_next())=='\n');
if(next_control!=identifier){
@@ -1481,7 +1472,7 @@ cur_text->text_link= macro;
}
/*:93*/
-#line 1371 "ctangle.w"
+#line 1362 "ctangle.w"
continue;
}
@@ -1491,14 +1482,14 @@ p= name_dir;break;
if(next_control==section_name){
p= cur_section_name;
/*94:*/
-#line 1426 "ctangle.w"
+#line 1419 "ctangle.w"
while((next_control= get_next())=='+');
if(next_control!='='&&next_control!=eq_eq)
continue;
/*:94*/
-#line 1379 "ctangle.w"
+#line 1370 "ctangle.w"
break;
}
@@ -1506,20 +1497,20 @@ return;
}
no_where= print_where= false;
/*95:*/
-#line 1431 "ctangle.w"
+#line 1424 "ctangle.w"
/*96:*/
-#line 1436 "ctangle.w"
+#line 1429 "ctangle.w"
store_two_bytes((sixteen_bits)(0150000+section_count));
/*:96*/
-#line 1432 "ctangle.w"
+#line 1425 "ctangle.w"
scan_repl(section_name);
/*97:*/
-#line 1440 "ctangle.w"
+#line 1433 "ctangle.w"
if(p==name_dir||p==0){
(last_unnamed)->text_link= cur_text-text_info;last_unnamed= cur_text;
@@ -1536,16 +1527,16 @@ cur_text->text_link= section_flag;
/*:97*/
-#line 1434 "ctangle.w"
+#line 1427 "ctangle.w"
/*:95*/
-#line 1385 "ctangle.w"
+#line 1376 "ctangle.w"
}
-/*:91*//*99:*/
-#line 1458 "ctangle.w"
+/*:90*//*98:*/
+#line 1448 "ctangle.w"
static void
phase_one(void){
@@ -1558,8 +1549,8 @@ check_complete();
phase= 2;
}
-/*:99*//*101:*/
-#line 1476 "ctangle.w"
+/*:98*//*100:*/
+#line 1465 "ctangle.w"
static void
skip_limbo(void)
@@ -1574,7 +1565,7 @@ c= *loc++;
if(ccode[(eight_bits)c]==new_section)break;
switch(ccode[(eight_bits)c]){
case translit_code:/*102:*/
-#line 1505 "ctangle.w"
+#line 1496 "ctangle.w"
while(xisspace(*loc)&&loc<limit)loc++;
loc+= 3;
@@ -1599,7 +1590,7 @@ translit[i-0200][loc-beg]= '\0';
}
/*:102*/
-#line 1489 "ctangle.w"
+#line 1478 "ctangle.w"
break;
case format_code:case'@':break;
case control_text:if(c=='q'||c=='Q'){
@@ -1616,8 +1607,8 @@ default:err_print("! Double @ should be used in limbo");
}
}
-/*:101*//*103:*/
-#line 1531 "ctangle.w"
+/*:100*//*103:*/
+#line 1522 "ctangle.w"
void
print_stats(void){
diff --git a/Build/source/texk/web2c/cwebdir/ctangle.w b/Build/source/texk/web2c/cwebdir/ctangle.w
index 0c5bd413282..4857e01203e 100644
--- a/Build/source/texk/web2c/cwebdir/ctangle.w
+++ b/Build/source/texk/web2c/cwebdir/ctangle.w
@@ -69,7 +69,7 @@ is modified.
@<Common code for \.{CWEAVE} and \.{CTANGLE}@>@/
@<Typedef declarations@>@/
@<Private variables@>@/
-@<Predeclaration of procedures@>@/
+@<Predeclaration of procedures@>
@ \.{CTANGLE} has a fairly straightforward outline. It operates in
two phases: First it reads the source file, saving the \CEE/ code in
@@ -228,11 +228,8 @@ construction or numerical constant.
@ The following procedure is used to enter a two-byte value into
|tok_mem| when a replacement text is being generated.
-@<Predecl...@>=
-static void store_two_bytes(sixteen_bits);@/
-
-@ @c
-void
+@c
+static void
store_two_bytes(
sixteen_bits x)
{
@@ -241,6 +238,8 @@ sixteen_bits x)
*tok_ptr++=x&0377; /* store low byte */
}
+@ @<Predecl...@>=@+static void store_two_bytes(sixteen_bits);
+
@** Stacks for output. The output process uses a stack to keep track
of what is going on at different ``levels'' as the sections are being
written out. Entries on this stack have five parts:
@@ -307,11 +306,7 @@ the new one going.
We assume that the \CEE/ compiler can copy structures.
@^system dependencies@>
-@<Predecl...@>=
-static void push_level(name_pointer);@/
-static void pop_level(boolean);@/
-
-@ @c
+@c
static void
push_level(@t\1\1@> /* suspends the current level */
name_pointer p@t\2\2@>)
@@ -326,6 +321,10 @@ name_pointer p@t\2\2@>)
}
}
+@ @<Predecl...@>=
+static void push_level(name_pointer);@/
+static void pop_level(boolean);
+
@ When we come to the end of a replacement text, the |pop_level| subroutine
does the right thing: It either moves to the continuation of this replacement
text or returns the state to the most recently stacked level.
@@ -366,10 +365,7 @@ static int cur_val; /* additional information corresponding to output token */
|stack_ptr==stack|.
@^high-bit character handling@>
-@<Predecl...@>=
-static void get_output(void);@/
-
-@ @c
+@c
static void
get_output(void) /* sends next token to |out_char| */
{
@@ -398,6 +394,8 @@ get_output(void) /* sends next token to |out_char| */
}
}
+@ @<Predecl...@>=@+static void get_output(void);
+
@ The user may have forgotten to give any \CEE/ text for a section name,
or the \CEE/ text may have been associated with a different name by mistake.
@@ -459,10 +457,7 @@ static boolean protect; /* should newline characters be quoted? */
During the output process, |cur_line| equals the number of the next line
to be output.
-@<Predecl...@>=
-static void flush_buffer(void);@/
-
-@ @c
+@c
static void
flush_buffer(void) /* writes one line to output file */
{
@@ -475,6 +470,8 @@ flush_buffer(void) /* writes one line to output file */
cur_line++;
}
+@ @<Predecl...@>=@+static void flush_buffer(void);
+
@ Second, we have modified the original \.{TANGLE} so that it will write output
on multiple files.
If a section name is introduced in at least one place by \.{@@(}
@@ -514,10 +511,7 @@ complain we're out of room@>=
@* The big output switch. Here then is the routine that does the
output.
-@<Predecl...@>=
-static void phase_two(void);@/
-
-@ @c
+@c
static void
phase_two (void) {
web_file_open=false;
@@ -552,6 +546,8 @@ writeloop: @<Write all the named output files@>@;
}
}
+@ @<Predecl...@>=@+static void phase_two(void);
+
@ To write the named output files, we proceed as for the unnamed
section.
The only subtlety is that we have to open each one.
@@ -588,7 +584,7 @@ static boolean output_defs_seen=false;
@ @<Predecl...@>=
static void output_defs(void);@/
-static void out_char(eight_bits);@/
+static void out_char(eight_bits);
@ @c
static void
@@ -795,11 +791,7 @@ static eight_bits ccode[256]; /* meaning of a char following \.{@@} */
@ The |skip_ahead| procedure reads through the input at fairly high speed
until finding the next non-ignorable control code, which it returns.
-@<Predecl...@>=
-static eight_bits skip_ahead(void);@/
-static boolean skip_comment(boolean);@/
-
-@ @c
+@c
static eight_bits
skip_ahead(void) /* skip to next control code */
{
@@ -815,6 +807,10 @@ skip_ahead(void) /* skip to next control code */
}
}
+@ @<Predecl...@>=
+static eight_bits skip_ahead(void);@/
+static boolean skip_comment(boolean);
+
@ The |skip_comment| procedure reads through the input at somewhat high
speed in order to pass over comments, which \.{CTANGLE} does not transmit
to the output. If the comment is introduced by \.{/*}, |skip_comment|
@@ -882,10 +878,7 @@ that branches to the various special cases that can arise.
@d ishigh(c) ((eight_bits)(c)>0177)
@^high-bit character handling@>
-@<Predecl...@>=
-static eight_bits get_next(void);@/
-
-@ @c
+@c
static eight_bits
get_next(void) /* produces the next input token */
{
@@ -928,6 +921,8 @@ get_next(void) /* produces the next input token */
}
}
+@ @<Predecl...@>=@+static eight_bits get_next(void);
+
@ The following code assigns values to the combinations \.{++},
\.{--}, \.{->}, \.{>=}, \.{<=}, \.{==}, \.{<<}, \.{>>}, \.{!=}, \.{||} and
\.{\&\&}, and to the \CPLUSPLUS/
@@ -1188,9 +1183,6 @@ acted, |cur_text| will point to the replacement text just generated, and
static text_pointer cur_text; /* replacement text formed by |scan_repl| */
static eight_bits next_control;
-@ @<Predecl...@>=
-static void scan_repl(eight_bits);@/
-
@ @c
static void
scan_repl(@t\1\1@> /* creates a replacement text */
@@ -1213,6 +1205,8 @@ eight_bits t@t\2\2@>)
cur_text=text_ptr; (++text_ptr)->tok_start=tok_ptr;
}
+@ @<Predecl...@>=@+static void scan_repl(eight_bits);
+
@ Here is the code for the line number: first a |sixteen_bits| equal
to |0150000|; then the numeric line number; then a pointer to the
file name.
@@ -1345,10 +1339,7 @@ sensed in the input, and it proceeds until the end of that section. It
uses |section_count| to keep track of the current section number; with luck,
\.{CWEAVE} and \.{CTANGLE} will both assign the same numbers to sections.
-@<Predecl...@>=
-static void scan_section(void);@/
-
-@ The body of |scan_section| is a loop where we look for control codes
+The body of |scan_section| is a loop where we look for control codes
that are significant to \.{CTANGLE}: those
that delimit a definition, the \CEE/ part of a module, or a new module.
@@ -1385,6 +1376,8 @@ scan_section(void)
@<Scan the \CEE/ part of the current section@>@;
}
+@ @<Predecl...@>=@+static void scan_section(void);
+
@ At the top of this loop, if |next_control==section_name|, the
section name has already been scanned (see |@<Get control code
and...@>|). Thus, if we encounter |next_control==section_name| in the
@@ -1452,9 +1445,6 @@ else {
cur_text->text_link=section_flag;
/* mark this replacement text as a nonmacro */
-@ @<Predec...@>=
-static void phase_one(void);@/
-
@ @c
static void
phase_one(void) {
@@ -1467,13 +1457,12 @@ phase_one(void) {
phase=2;
}
+@ @<Predec...@>=@+static void phase_one(void);
+
@ Only a small subset of the control codes is legal in limbo, so limbo
processing is straightforward.
-@<Predecl...@>=
-static void skip_limbo(void);@/
-
-@ @c
+@c
static void
skip_limbo(void)
{
@@ -1502,6 +1491,8 @@ skip_limbo(void)
}
}
+@ @<Predecl...@>=@+static void skip_limbo(void);
+
@ @<Read in transliteration of a character@>=
while(xisspace(*loc)&&loc<limit) loc++;
loc+=3;
diff --git a/Build/source/texk/web2c/cwebdir/ctwill-mini.ch b/Build/source/texk/web2c/cwebdir/ctwill-mini.ch
index 1b5c284433f..77a892db20e 100644
--- a/Build/source/texk/web2c/cwebdir/ctwill-mini.ch
+++ b/Build/source/texk/web2c/cwebdir/ctwill-mini.ch
@@ -707,21 +707,21 @@ the category codes |pp->cat,@,@,(pp+1)->cat|$,\,\,\ldots\,$
the category codes |pp->cat|, |(pp+1)->cat|, $\,\ldots\,$
@z
-Section 138.
+Section 139.
@x
-@ @<Set init...@>=
+@ Token lists in |@!tok_mem| are composed of the following kinds of
@y
-@r @ @<Set init...@>=
+@ Token lists in |@!tok_mem| are composed of the following kinds of
+@-p@>
@z
-Section 139.
+Section 141.
@x
-@ Token lists in |@!tok_mem| are composed of the following kinds of
+@ @<Print token |r|...@>=
@y
-@ Token lists in |@!tok_mem| are composed of the following kinds of
-@-p@>
+@r @ @<Print token |r|...@>=
@z
Section 142.
@@ -933,6 +933,14 @@ Section 168.
@r @ @<Cases for |decl_head|@>=
@z
+Section 173.
+
+@x
+@ @<Cases for |fn_decl|@>=
+@y
+@r @ @<Cases for |fn_decl|@>=
+@z
+
Section 208.
@x
@@ -941,6 +949,14 @@ Section 208.
@r @ Here's the |squash| procedure, which
@z
+Section 212.
+
+@x
+@ @<Print a snapsh...@>=
+@y
+@r @ @<Print a snapsh...@>=
+@z
+
Section 220.
@x
@@ -1063,14 +1079,6 @@ Section 272.
@r @ The |footnote| procedure gives cross-reference information about
@z
-Section 277.
-
-@x
-@ @<Output information about usage of id's defined in other sections@>=
-@y
-@r @ @<Output information about usage of id's defined in other sections@>=
-@z
-
Section 284.
@x
diff --git a/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch b/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch
index e87b31170a1..682e2c0e039 100644
--- a/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch
+++ b/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch
@@ -500,11 +500,11 @@ ccode['r']=ccode['R']=right_start;
@z
@x
-static eight_bits skip_TeX(void);@/
+static eight_bits skip_TeX(void);
@ @c
@y
-static eight_bits skip_TeX(void);@/
+static eight_bits skip_TeX(void);
@ We look for a clue about the program's title, because this will become
part of all meanings.
@@ -899,17 +899,15 @@ null_scrap.trans=&tok_start[0];
@z
@x
-static void print_text(text_pointer p);@/
-@y
-#if 0
-static void print_text(text_pointer p);@/
-#endif
-@z
+@d inner_tok_flag 5*id_flag /* signifies a token list in `\pb' */
-@x
+@c
static void
print_text(@t\1\1@> /* prints a token list for debugging; not used in |main| */
@y
+@d inner_tok_flag 5*id_flag /* signifies a token list in `\pb' */
+
+@c
#if 0
static void
print_text(@t\1\1@> /* prints a token list for debugging; not used in |main| */
@@ -929,6 +927,15 @@ print_text(@t\1\1@> /* prints a token list for debugging; not used in |main| */
@z
@x
+@ @<Predecl...@>=@+static void print_text(text_pointer p);
+@y
+@ @<Predecl...@>=
+#if 0
+static void print_text(text_pointer p);
+#endif
+@z
+
+@x
the |for| loop below.
@c
@@ -1633,7 +1640,7 @@ placed on the list, unless they are reserved and their current
}
@ @<Output information about usage of id's defined in other sections@>=
-{@+struct perm_meaning *q;
+{ struct perm_meaning *q;
while (temp_meaning_ptr>temp_meaning_stack) {
out_mini(--temp_meaning_ptr);
q=temp_meaning_ptr->id-name_dir+cur_meaning;
@@ -1647,9 +1654,6 @@ placed on the list, unless they are reserved and their current
}
}
-@ @<Predec...@>=
-static void out_mini(meaning_struct *);@/
-
@ @c static void
out_mini(
meaning_struct *m)
@@ -1669,6 +1673,8 @@ out_mini(
out(' '); out_str(m->tex_part); finish_line();
}
+@ @<Predec...@>=@+static void out_mini(meaning_struct *);
+
@ @<Mini-output...@>=
switch (cur_name->ilk) {
case normal: case func_template: if (length(cur_name)==1) out_str("\\|");
diff --git a/Build/source/texk/web2c/cwebdir/cweav-w2c.ch b/Build/source/texk/web2c/cwebdir/cweav-w2c.ch
index 79ff089b8ce..102bbc06a93 100644
--- a/Build/source/texk/web2c/cwebdir/cweav-w2c.ch
+++ b/Build/source/texk/web2c/cwebdir/cweav-w2c.ch
@@ -248,17 +248,15 @@ tex_puts("cwebma");
@z
@x
-static void print_text(text_pointer p);@/
-@y
-#if 0
-static void print_text(text_pointer p);@/
-#endif
-@z
+@d inner_tok_flag 5*id_flag /* signifies a token list in `\pb' */
-@x
+@c
static void
print_text(@t\1\1@> /* prints a token list for debugging; not used in |main| */
@y
+@d inner_tok_flag 5*id_flag /* signifies a token list in `\pb' */
+
+@c
#if 0
static void
print_text(@t\1\1@> /* prints a token list for debugging; not used in |main| */
@@ -272,6 +270,15 @@ print_text(@t\1\1@> /* prints a token list for debugging; not used in |main| */
@z
@x
+@ @<Predecl...@>=@+static void print_text(text_pointer p);
+@y
+@ @<Predecl...@>=
+#if 0
+static void print_text(text_pointer p);
+#endif
+@z
+
+@x
@<Cases for |exp|@>=
if (cat1==lbrace || cat1==int_like || cat1==decl) {
make_underlined(pp); big_app1(pp); big_app(indent); app(indent);
diff --git a/Build/source/texk/web2c/cwebdir/cweave.w b/Build/source/texk/web2c/cwebdir/cweave.w
index 2c589a5662b..bf4232339a5 100644
--- a/Build/source/texk/web2c/cwebdir/cweave.w
+++ b/Build/source/texk/web2c/cwebdir/cweave.w
@@ -251,7 +251,7 @@ If one were careful, one could probably make more changes around section
@<Predecl...@>=
static void new_xref(name_pointer);@/
static void new_section_xref(name_pointer);@/
-static void set_file_flag(name_pointer);@/
+static void set_file_flag(name_pointer);
@ @c
static void
@@ -383,8 +383,7 @@ name_pointer p)
p->xref=(void *)xref_ptr;
}
-@ @<Predecl...@>=
-static void update_node(name_pointer p);@/
+@ @<Predecl...@>=@+static void update_node(name_pointer p);
@ We have to get \CEE/'s
reserved words into the hash table, and the simplest way to do this is
@@ -490,8 +489,7 @@ id_lookup("volatile",NULL,const_like);
id_lookup("wchar_t",NULL,raw_int);
id_lookup("while",NULL,for_like);
id_lookup("xor",NULL,alfop);
-id_lookup("xor_eq",NULL,alfop);
-res_wd_end=name_ptr;
+id_lookup("xor_eq",NULL,alfop);@+ res_wd_end=name_ptr;
id_lookup("TeX",NULL,custom);
id_lookup("make_pair",NULL,func_template);
@@ -590,7 +588,7 @@ interpretation of identifiers.
@<Predec...@>=
static void skip_limbo(void);@/
-static eight_bits skip_TeX(void);@/
+static eight_bits skip_TeX(void);
@ @c
static void
@@ -681,10 +679,7 @@ compilers even allow the dollar sign.
@d ishigh(c) ((eight_bits)(c)>0177)
@^high-bit character handling@>
-@<Predecl...@>=
-static eight_bits get_next(void);@/
-
-@ @c
+@c
static eight_bits
get_next(void) /* produces the next input token */
{
@@ -709,6 +704,8 @@ get_next(void) /* produces the next input token */
}
}
+@ @<Predecl...@>=@+static eight_bits get_next(void);
+
@ Because preprocessor commands do not fit in with the rest of the syntax
of \CEE/,
we have to deal with them separately. One solution is to enclose such
@@ -961,10 +958,7 @@ if (c=='@@') {
@ This function skips over a restricted context at relatively high speed.
-@<Predecl...@>=
-static void skip_restricted(void);@/
-
-@ @c
+@c
static void
skip_restricted(void)
{
@@ -984,6 +978,8 @@ false_alarm:
}
}
+@ @<Predecl...@>=@+static void skip_restricted(void);
+
@ At the present point in the program we
have |*(loc-1)==verbatim|; we set |id_first| to the beginning
of the string itself, and |id_loc| to its ending-plus-one location in the
@@ -1014,10 +1010,7 @@ static eight_bits next_control; /* control code waiting to be acting upon */
@ The overall processing strategy in phase one has the following
straightforward outline.
-@<Predecl...@>=
-static void phase_one(void);@/
-
-@ @c
+@c
static void
phase_one(void) {
phase=1; reset_input(); section_count=0;
@@ -1030,6 +1023,8 @@ phase_one(void) {
@<Print error messages about unused or undefined section names@>@;
}
+@ @<Predecl...@>=@+static void phase_one(void);
+
@ @<Store cross-reference data...@>=
{
if (++section_count==max_sections) overflow("section number");
@@ -1068,7 +1063,7 @@ as well as |normal==0|.
@<Predecl...@>=
static void C_xref(eight_bits);@/
-static void outer_xref(void);@/
+static void outer_xref(void);
@ @c
static void
@@ -1254,10 +1249,7 @@ static boolean an_output; /* did |file_flag| precede |cur_xref|? */
walks through the tree of section names and prints out anomalies.
@^recursion@>
-@<Predecl...@>=
-static void section_check(name_pointer);@/
-
-@ @c
+@c
static void
section_check(
name_pointer p) /* print anomalies in subtree |p| */
@@ -1282,6 +1274,8 @@ name_pointer p) /* print anomalies in subtree |p| */
}
}
+@ @<Predecl...@>=@+static void section_check(name_pointer);
+
@ @<Print error messages about un...@>=section_check(root);
@* Low-level output routines.
@@ -1315,7 +1309,7 @@ of commented-out text).
@<Predecl...@>=
static void flush_buffer(char *,boolean,boolean);@/
-static void finish_line(void);@/
+static void finish_line(void);
@ @c
static void
@@ -1380,7 +1374,7 @@ A line break will occur at a space or after a single-nonletter
@<Predecl...@>=
static void out_str(const char *);@/
-static void break_out(void);@/
+static void break_out(void);
@ @c
static void
@@ -1438,7 +1432,7 @@ the section is changed, we output `\.{\\*}' just after the number.
@<Predecl...@>=
static void out_section(sixteen_bits);@/
-static void out_name(name_pointer,boolean);@/
+static void out_name(name_pointer,boolean);
@ @c
static void
@@ -1485,7 +1479,7 @@ The use of `\.{@@}' signs is severely restricted in such material:
@<Predecl...@>=
static void copy_limbo(void);@/
static eight_bits copy_TeX(void);@/
-static int copy_comment(boolean,int);@/
+static int copy_comment(boolean,int);
@ @c
static void
@@ -1784,10 +1778,7 @@ static char cat_name[256][12];
@ This code allows \.{CWEAVE} to display its parsing steps.
-@<Predecl...@>=
-static void print_cat(eight_bits);@/
-
-@ @c
+@c
static void
print_cat(@t\1\1@> /* symbolic printout of a category */
eight_bits c@t\2\2@>)
@@ -1795,6 +1786,8 @@ eight_bits c@t\2\2@>)
fputs(cat_name[c],stdout);
}
+@ @<Predecl...@>=@+static void print_cat(eight_bits);
+
@ The token lists for translated \TEX/ output contain some special control
symbols as well as ordinary characters. These control symbols are
interpreted by \.{CWEAVE} before they are written to the output file.
@@ -2142,10 +2135,7 @@ translated without line-break controls.
@d tok_flag 4*id_flag /* signifies a token list */
@d inner_tok_flag 5*id_flag /* signifies a token list in `\pb' */
-@<Predecl...@>=
-static void print_text(text_pointer p);@/
-
-@ @c
+@c
static void
print_text(@t\1\1@> /* prints a token list for debugging; not used in |main| */
text_pointer p@t\2\2@>)
@@ -2170,6 +2160,8 @@ text_pointer p@t\2\2@>)
update_terminal;
}
+@ @<Predecl...@>=@+static void print_text(text_pointer p);
+
@ @<Print token |r|...@>=
switch (r) {
case math_rel: printf("\\mathrel{"@q}@>); break;
@@ -2272,7 +2264,7 @@ static int cur_mathness, init_mathness;
@ @<Predecl...@>=
static void app_str(const char *);@/
static void big_app(token);@/
-static void big_app1(scrap_pointer);@/
+static void big_app1(scrap_pointer);
@ @c
static void
@@ -2429,7 +2421,7 @@ more properly alpha\-betized,
static token_pointer find_first_ident(text_pointer);@/
static void make_reserved(scrap_pointer);@/
static void make_underlined(scrap_pointer);@/
-static void underline_xref(name_pointer);@/
+static void underline_xref(name_pointer);
@ @c
static token_pointer
@@ -3023,7 +3015,7 @@ too large, since it is assumed that this test was done beforehand.
@<Predecl...@>=
static void reduce(scrap_pointer,short,eight_bits,short,short);@/
-static void squash(scrap_pointer,short,eight_bits,short,short);@/
+static void squash(scrap_pointer,short,eight_bits,short,short);
@ @c
static void
@@ -3147,10 +3139,7 @@ lists with up to six tokens without checking for overflow. Before calling
since |translate| might add a new text and a new scrap before it checks
for overflow.
-@<Predecl...@>=
-static text_pointer translate(void);@/
-
-@ @c
+@c
static text_pointer
translate(void) /* converts a sequence of scraps */
{
@@ -3162,6 +3151,8 @@ translate(void) /* converts a sequence of scraps */
@<Combine the irreducible scraps that remain@>@;
}
+@ @<Predecl...@>=@+static text_pointer translate(void);
+
@ If the initial sequence of scraps does not reduce to a single scrap,
we concatenate the translations of all remaining scraps, separated by
blank spaces, with dollar signs surrounding the translations of scraps
@@ -3215,10 +3206,7 @@ repeatedly to read \CEE/ text until encountering the next `\.{\v}' or
what it reads are appended into the |cat| and |trans| arrays, and |scrap_ptr|
is advanced.
-@<Predecl...@>=
-static void C_parse(eight_bits);@/
-
-@ @c
+@c
static void
C_parse(@t\1\1@> /* creates scraps from \CEE/ tokens */
eight_bits spec_ctrl@t\2\2@>)
@@ -3232,6 +3220,8 @@ C_parse(@t\1\1@> /* creates scraps from \CEE/ tokens */
}
}
+@ @<Predecl...@>=@+static void C_parse(eight_bits);
+
@ The following macro is used to append a scrap whose tokens have just
been appended:
@@ -3453,7 +3443,7 @@ token list; it also builds a new scrap if |scrapping==true|.
@<Predec...@>=
static void app_cur_id(boolean);@/
static text_pointer C_translate(void);@/
-static void outer_parse(void);@/
+static void outer_parse(void);
@ @c
static void
@@ -3621,7 +3611,7 @@ The value of |cur_mode| is not changed.
@<Predecl...@>=
static void push_level(text_pointer);@/
-static void pop_level(void);@/
+static void pop_level(void);
@ @c
static void
@@ -3668,7 +3658,7 @@ static name_pointer cur_name;
@<Predecl...@>=
static eight_bits get_output(void);@/
static void output_C(void);@/
-static void make_output(void);@/
+static void make_output(void);
@ @c
static eight_bits
@@ -3991,10 +3981,7 @@ is analogous to phase one, except that more work is involved because we must
actually output the \TEX/ material instead of merely looking at the
\.{CWEB} specifications.
-@<Predecl...@>=
-static void phase_two(void);@/
-
-@ @c
+@c
static void
phase_two(void) {
reset_input(); if (show_progress) fputs("\nWriting the output file...",stdout);
@@ -4004,6 +3991,8 @@ finish_line(); flush_buffer(out_buf,false,false); /* insert a blank line, it loo
while (!input_has_ended) @<Translate the current section@>@;
}
+@ @<Predecl...@>=@+static void phase_two(void);
+
@ The output file will contain the control sequence \.{\\Y} between non-null
sections of a section, e.g., between the \TEX/ and definition parts if both
are nonempty. This puts a little white space between the parts when they are
@@ -4114,10 +4103,7 @@ takes place, so that the translation will normally end with \.{\\6} or
\.{\\7} (the \TEX/ macros for |force| and |big_force|). This \.{\\6} or
\.{\\7} is replaced by the concluding \.{\\par} or by \.{\\Y\\par}.
-@<Predecl...@>=
-static void finish_C(boolean);@/
-
-@ @c
+@c
static void
finish_C(@t\1\1@> /* finishes a definition or a \CEE/ part */
boolean visible@t\2\2@>) /* nonzero if we should produce \TeX\ output */
@@ -4146,6 +4132,8 @@ finish_C(@t\1\1@> /* finishes a definition or a \CEE/ part */
/* forget the tokens and the scraps */
}
+@ @<Predecl...@>=@+static void finish_C(boolean);
+
@ Keeping in line with the conventions of the \CEE/ preprocessor (and
otherwise contrary to the rules of \.{CWEB}) we distinguish here
between the case that `\.(' immediately follows an identifier and the
@@ -4287,10 +4275,7 @@ leaves |cur_xref| pointing to the first element not printed. Typical outputs:
Note that the output of \.{CWEAVE} is not English-specific; users may
supply new definitions for the macros \.{\\A}, \.{\\As}, etc.
-@<Predecl...@>=
-static void footnote(sixteen_bits);@/
-
-@ @c
+@c
static void
footnote(@t\1\1@> /* outputs section cross-references */
sixteen_bits flag@t\2\2@>)
@@ -4306,6 +4291,8 @@ sixteen_bits flag@t\2\2@>)
out('.');
}
+@ @<Predecl...@>=@+static void footnote(sixteen_bits);
+
@ The following code distinguishes three cases, according as the number
of cross-references is one, two, or more than two. Variable |q| points
to the first cross-reference, and the last link is a zero.
@@ -4336,10 +4323,7 @@ If the user has set the |no_xref| flag (the \.{-x} option on the command line),
just finish off the page, omitting the index, section name list, and table of
contents.
-@<Predecl...@>=
-static void phase_three(void);@/
-
-@ @c
+@c
static void
phase_three(void) {
if (no_xref) {
@@ -4387,6 +4371,8 @@ if (show_happiness) {
check_complete(); /* was all of the change file used? */
}
+@ @<Predecl...@>=@+static void phase_three(void);
+
@ Just before the index comes a list of all the changed sections, including
the index section itself.
@@ -4531,10 +4517,7 @@ regarded as identical.
@d infinity 255 /* $\infty$ (approximately) */
-@<Predecl...@>=
-static void unbucket(eight_bits);@/
-
-@ @c
+@c
static void
unbucket(@t\1\1@> /* empties buckets having depth |d| */
eight_bits d@t\2\2@>)
@@ -4552,6 +4535,8 @@ eight_bits d@t\2\2@>)
}
}
+@ @<Predecl...@>=@+static void unbucket(eight_bits);
+
@ @<Sort and output...@>=
sort_ptr=scrap_info; unbucket(1);
while (sort_ptr>scrap_info) {
@@ -4651,10 +4636,7 @@ do {
prints them.
@^recursion@>
-@<Predecl...@>=
-static void section_print(name_pointer);@/
-
-@ @c
+@c
static void
section_print(@t\1\1@> /* print all section names in subtree |p| */
name_pointer p@t\2\2@>)
@@ -4671,6 +4653,8 @@ name_pointer p@t\2\2@>)
}
}
+@ @<Predecl...@>=@+static void section_print(name_pointer);
+
@ @<Output all the section names@>=section_print(root);
@ Because on some systems the difference between two pointers is a |ptrdiff_t|