summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAndreas Scherer <andreas_tex@freenet.de>2021-02-08 08:21:23 +0000
committerAndreas Scherer <andreas_tex@freenet.de>2021-02-08 08:21:23 +0000
commit21789d78376b470876b5e1f80a10fb5c7c653b37 (patch)
treef5299be80b8dec00390e5e84bbc4c046f0694882 /Build
parent14a54f4d8c7cb19c2283cf2b3ad5e7fb31d96279 (diff)
[CWEB] Don't repeat yourself.
Purge repeated lines in *.w by uncommenting line in common.h. Unfortunately, this shifts all #line numbers. ;o) git-svn-id: svn://tug.org/texlive/trunk@57676 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/ChangeLog5
-rw-r--r--Build/source/texk/web2c/ctangleboot.cin306
-rw-r--r--Build/source/texk/web2c/cwebboot.cin276
-rw-r--r--Build/source/texk/web2c/cwebdir/ChangeLog10
-rw-r--r--Build/source/texk/web2c/cwebdir/comm-w2c.h2
-rw-r--r--Build/source/texk/web2c/cwebdir/common.c198
-rw-r--r--Build/source/texk/web2c/cwebdir/common.h2
-rw-r--r--Build/source/texk/web2c/cwebdir/common.w2
-rw-r--r--Build/source/texk/web2c/cwebdir/ctangle.c236
-rw-r--r--Build/source/texk/web2c/cwebdir/ctangle.w2
-rw-r--r--Build/source/texk/web2c/cwebdir/cweave.w2
11 files changed, 525 insertions, 516 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog
index cea41bebe21..16037c6ba05 100644
--- a/Build/source/texk/web2c/ChangeLog
+++ b/Build/source/texk/web2c/ChangeLog
@@ -1,3 +1,8 @@
+2021-02-08 Andreas Scherer <https://ascherer.github.io>
+
+ * ctangleboot.cin,
+ * cwebboot.cin: Don't repeat yourself.
+
2021-02-07 Andreas Scherer <https://ascherer.github.io>
* cwebboot.cin: CWEB development has moved to another level.
diff --git a/Build/source/texk/web2c/ctangleboot.cin b/Build/source/texk/web2c/ctangleboot.cin
index d29a6ad3944..aa32ae911bb 100644
--- a/Build/source/texk/web2c/ctangleboot.cin
+++ b/Build/source/texk/web2c/ctangleboot.cin
@@ -273,7 +273,7 @@ extern char cb_banner[];
#line 69 "cwebdir/ctangle.w"
/*19:*/
-#line 124 "cwebdir/ctangle.w"
+#line 122 "cwebdir/ctangle.w"
typedef struct{
eight_bits*tok_start;
@@ -282,7 +282,7 @@ sixteen_bits text_link;
typedef text*text_pointer;
/*:19*//*31:*/
-#line 272 "cwebdir/ctangle.w"
+#line 270 "cwebdir/ctangle.w"
typedef struct{
eight_bits*end_field;
@@ -297,7 +297,7 @@ typedef output_state*stack_pointer;
#line 70 "cwebdir/ctangle.w"
/*20:*/
-#line 131 "cwebdir/ctangle.w"
+#line 129 "cwebdir/ctangle.w"
text text_info[max_texts];
text_pointer text_info_end= text_info+max_texts-1;
@@ -307,12 +307,12 @@ eight_bits*tok_mem_end= tok_mem+max_toks-1;
eight_bits*tok_ptr;
/*:20*//*26:*/
-#line 200 "cwebdir/ctangle.w"
+#line 198 "cwebdir/ctangle.w"
text_pointer last_unnamed;
/*:26*//*32:*/
-#line 288 "cwebdir/ctangle.w"
+#line 286 "cwebdir/ctangle.w"
output_state cur_state;
@@ -321,18 +321,18 @@ stack_pointer stack_ptr;
stack_pointer stack_end= stack+stack_size;
/*:32*//*37:*/
-#line 364 "cwebdir/ctangle.w"
+#line 362 "cwebdir/ctangle.w"
int cur_val;
/*:37*//*42:*/
-#line 456 "cwebdir/ctangle.w"
+#line 454 "cwebdir/ctangle.w"
eight_bits out_state;
boolean protect;
/*:42*//*45:*/
-#line 488 "cwebdir/ctangle.w"
+#line 486 "cwebdir/ctangle.w"
name_pointer output_files[max_files];
name_pointer*cur_out_file,*end_output_files,*an_output_file;
@@ -340,39 +340,39 @@ char cur_section_name_char;
char output_file_name[longest_name+1];
/*:45*//*52:*/
-#line 588 "cwebdir/ctangle.w"
+#line 586 "cwebdir/ctangle.w"
boolean output_defs_seen= 0;
/*:52*//*57:*/
-#line 697 "cwebdir/ctangle.w"
+#line 695 "cwebdir/ctangle.w"
char translit[128][translit_length];
/*:57*//*62:*/
-#line 776 "cwebdir/ctangle.w"
+#line 774 "cwebdir/ctangle.w"
eight_bits ccode[256];
/*:62*//*66:*/
-#line 836 "cwebdir/ctangle.w"
+#line 834 "cwebdir/ctangle.w"
boolean comment_continues= 0;
/*:66*//*68:*/
-#line 875 "cwebdir/ctangle.w"
+#line 873 "cwebdir/ctangle.w"
name_pointer cur_section_name;
int no_where;
/*:68*//*82:*/
-#line 1189 "cwebdir/ctangle.w"
+#line 1187 "cwebdir/ctangle.w"
text_pointer cur_text;
eight_bits next_control;
/*:82*//*90:*/
-#line 1350 "cwebdir/ctangle.w"
+#line 1348 "cwebdir/ctangle.w"
extern sixteen_bits section_count;
@@ -415,65 +415,65 @@ extern void print_stats(void);
extern void cb_show_banner(void);
/*:16*//*29:*/
-#line 233 "cwebdir/ctangle.w"
+#line 231 "cwebdir/ctangle.w"
static void store_two_bytes(sixteen_bits);
/*:29*//*34:*/
-#line 312 "cwebdir/ctangle.w"
+#line 310 "cwebdir/ctangle.w"
static void push_level(name_pointer);
static void pop_level(int);
/*:34*//*38:*/
-#line 371 "cwebdir/ctangle.w"
+#line 369 "cwebdir/ctangle.w"
static void get_output(void);
/*:38*//*43:*/
-#line 464 "cwebdir/ctangle.w"
+#line 462 "cwebdir/ctangle.w"
static void flush_buffer(void);
/*:43*//*48:*/
-#line 519 "cwebdir/ctangle.w"
+#line 517 "cwebdir/ctangle.w"
static void phase_two(void);
/*:48*//*53:*/
-#line 591 "cwebdir/ctangle.w"
+#line 589 "cwebdir/ctangle.w"
static void output_defs(void);
static void out_char(eight_bits);
/*:53*//*64:*/
-#line 800 "cwebdir/ctangle.w"
+#line 798 "cwebdir/ctangle.w"
static eight_bits skip_ahead(void);
static boolean skip_comment(boolean);
/*:64*//*69:*/
-#line 887 "cwebdir/ctangle.w"
+#line 885 "cwebdir/ctangle.w"
static eight_bits get_next(void);
/*:69*//*83:*/
-#line 1193 "cwebdir/ctangle.w"
+#line 1191 "cwebdir/ctangle.w"
static void scan_repl(eight_bits);
/*:83*//*91:*/
-#line 1357 "cwebdir/ctangle.w"
+#line 1355 "cwebdir/ctangle.w"
static void scan_section(void);
/*:91*//*99:*/
-#line 1460 "cwebdir/ctangle.w"
+#line 1458 "cwebdir/ctangle.w"
static void phase_one(void);
/*:99*//*101:*/
-#line 1478 "cwebdir/ctangle.w"
+#line 1476 "cwebdir/ctangle.w"
static void skip_limbo(void);
@@ -491,28 +491,28 @@ char**av)
argc= ac;argv= av;
program= ctangle;
/*21:*/
-#line 139 "cwebdir/ctangle.w"
+#line 137 "cwebdir/ctangle.w"
text_info->tok_start= tok_ptr= tok_mem;
text_ptr= text_info+1;text_ptr->tok_start= tok_mem;
/*:21*//*23:*/
-#line 149 "cwebdir/ctangle.w"
+#line 147 "cwebdir/ctangle.w"
init_node(name_dir);
/*:23*//*27:*/
-#line 203 "cwebdir/ctangle.w"
+#line 201 "cwebdir/ctangle.w"
last_unnamed= text_info;text_info->text_link= 0;
/*:27*//*46:*/
-#line 498 "cwebdir/ctangle.w"
+#line 496 "cwebdir/ctangle.w"
cur_out_file= end_output_files= output_files+max_files;
/*:46*//*58:*/
-#line 700 "cwebdir/ctangle.w"
+#line 698 "cwebdir/ctangle.w"
{
int i;
@@ -520,7 +520,7 @@ for(i= 0;i<128;i++)sprintf(translit[i],"X%02X",(unsigned int)(128+i));
}
/*:58*//*63:*/
-#line 779 "cwebdir/ctangle.w"
+#line 777 "cwebdir/ctangle.w"
{
int c;
for(c= 0;c<256;c++)ccode[c]= ignore;
@@ -540,7 +540,7 @@ ccode['\'']= ord;
}
/*:63*//*78:*/
-#line 1110 "cwebdir/ctangle.w"
+#line 1108 "cwebdir/ctangle.w"
section_text[0]= ' ';
/*:78*//*117:*/
@@ -561,7 +561,7 @@ return wrap_up();
}
/*:2*//*24:*/
-#line 155 "cwebdir/ctangle.w"
+#line 153 "cwebdir/ctangle.w"
boolean names_match(
name_pointer p,
@@ -574,7 +574,7 @@ return!strncmp(first,p->byte_start,l);
}
/*:24*//*25:*/
-#line 171 "cwebdir/ctangle.w"
+#line 169 "cwebdir/ctangle.w"
void
init_node(
@@ -586,7 +586,7 @@ void
init_p(name_pointer p,eight_bits t){(void)p;(void)t;}
/*:25*//*30:*/
-#line 236 "cwebdir/ctangle.w"
+#line 234 "cwebdir/ctangle.w"
void
store_two_bytes(
@@ -594,13 +594,13 @@ sixteen_bits x)
{
#line 65 "cwebdir/ctang-w2c.ch"
if(tok_ptr+2> tok_mem_end)overflow(_("token"));
-#line 242 "cwebdir/ctangle.w"
+#line 240 "cwebdir/ctangle.w"
*tok_ptr++= x>>8;
*tok_ptr++= x&0377;
}
/*:30*//*35:*/
-#line 316 "cwebdir/ctangle.w"
+#line 314 "cwebdir/ctangle.w"
static void
push_level(
@@ -608,7 +608,7 @@ name_pointer p)
{
#line 71 "cwebdir/ctang-w2c.ch"
if(stack_ptr==stack_end)overflow(_("stack"));
-#line 322 "cwebdir/ctangle.w"
+#line 320 "cwebdir/ctangle.w"
*stack_ptr= cur_state;
stack_ptr++;
if(p!=NULL){
@@ -619,7 +619,7 @@ cur_section= 0;
}
/*:35*//*36:*/
-#line 335 "cwebdir/ctangle.w"
+#line 333 "cwebdir/ctangle.w"
static void
pop_level(
@@ -635,7 +635,7 @@ if(stack_ptr> stack)cur_state= *stack_ptr;
}
/*:36*//*39:*/
-#line 374 "cwebdir/ctangle.w"
+#line 372 "cwebdir/ctangle.w"
static void
get_output(void)
@@ -658,7 +658,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 406 "cwebdir/ctangle.w"
+#line 404 "cwebdir/ctangle.w"
{
a-= 024000;
@@ -666,7 +666,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 412 "cwebdir/ctangle.w"
+#line 410 "cwebdir/ctangle.w"
print_section_name(a+name_dir);err_print(">");
}
@@ -674,7 +674,7 @@ goto restart;
}
/*:40*/
-#line 395 "cwebdir/ctangle.w"
+#line 393 "cwebdir/ctangle.w"
break;
default:cur_val= a-050000;if(cur_val> 0)cur_section= cur_val;
@@ -684,7 +684,7 @@ out_char(section_number);
}
/*:39*//*44:*/
-#line 467 "cwebdir/ctangle.w"
+#line 465 "cwebdir/ctangle.w"
static void
flush_buffer(void)
@@ -699,34 +699,34 @@ cur_line++;
}
/*:44*//*49:*/
-#line 522 "cwebdir/ctangle.w"
+#line 520 "cwebdir/ctangle.w"
static void
phase_two(void){
web_file_open= 0;
cur_line= 1;
/*33:*/
-#line 301 "cwebdir/ctangle.w"
+#line 299 "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 527 "cwebdir/ctangle.w"
+#line 525 "cwebdir/ctangle.w"
/*51:*/
-#line 584 "cwebdir/ctangle.w"
+#line 582 "cwebdir/ctangle.w"
if(!output_defs_seen)
output_defs();
/*:51*/
-#line 528 "cwebdir/ctangle.w"
+#line 526 "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 531 "cwebdir/ctangle.w"
+#line 529 "cwebdir/ctangle.w"
}
else{
@@ -734,13 +734,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 537 "cwebdir/ctangle.w"
+#line 535 "cwebdir/ctangle.w"
}
else{
if(show_progress){
#line 101 "cwebdir/ctang-w2c.ch"
fputs(_("\nWriting the output files:"),stdout);
-#line 541 "cwebdir/ctangle.w"
+#line 539 "cwebdir/ctangle.w"
printf(" (%s)",C_file_name);
update_terminal;
@@ -984,22 +984,22 @@ rename(check_file_name,output_file_name);
}
strcpy(check_file_name,"");
-#line 579 "cwebdir/ctangle.w"
+#line 577 "cwebdir/ctangle.w"
/*:50*/
-#line 549 "cwebdir/ctangle.w"
+#line 547 "cwebdir/ctangle.w"
if(show_happiness){
if(show_progress)new_line;
#line 107 "cwebdir/ctang-w2c.ch"
fputs(_("Done."),stdout);
-#line 553 "cwebdir/ctangle.w"
+#line 551 "cwebdir/ctangle.w"
}
}
}
/*:49*//*54:*/
-#line 595 "cwebdir/ctangle.w"
+#line 593 "cwebdir/ctangle.w"
static void
output_defs(void)
@@ -1027,7 +1027,7 @@ cur_val= a;out_char(identifier);
}
#line 159 "cwebdir/ctang-w2c.ch"
else if(a<050000){confusion(_("macro defs have strange char"));}
-#line 621 "cwebdir/ctangle.w"
+#line 619 "cwebdir/ctangle.w"
else{
cur_val= a-050000;cur_section= cur_val;out_char(section_number);
}
@@ -1041,7 +1041,7 @@ pop_level(0);
}
/*:54*//*55:*/
-#line 638 "cwebdir/ctangle.w"
+#line 636 "cwebdir/ctangle.w"
static void
out_char(
@@ -1054,7 +1054,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 706 "cwebdir/ctangle.w"
+#line 704 "cwebdir/ctangle.w"
case identifier:
if(out_state==num_or_id)C_putc(' ');
@@ -1069,10 +1069,10 @@ j++;
out_state= num_or_id;break;
/*:59*/
-#line 649 "cwebdir/ctangle.w"
+#line 647 "cwebdir/ctangle.w"
/*60:*/
-#line 719 "cwebdir/ctangle.w"
+#line 717 "cwebdir/ctangle.w"
case section_number:
if(cur_val> 0)C_printf("/*%d:*/",cur_val);
@@ -1099,10 +1099,10 @@ C_printf("%s","\"\n");
break;
/*:60*/
-#line 650 "cwebdir/ctangle.w"
+#line 648 "cwebdir/ctangle.w"
/*56:*/
-#line 668 "cwebdir/ctangle.w"
+#line 666 "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;
@@ -1123,7 +1123,7 @@ case minus_gt_ast:C_putc('-');C_putc('>');C_putc('*');out_state= normal;
break;
/*:56*/
-#line 651 "cwebdir/ctangle.w"
+#line 649 "cwebdir/ctangle.w"
case'=':case'>':C_putc(cur_char);C_putc(' ');
out_state= normal;break;
@@ -1142,7 +1142,7 @@ default:C_putc(cur_char);out_state= normal;break;
}
/*:55*//*65:*/
-#line 804 "cwebdir/ctangle.w"
+#line 802 "cwebdir/ctangle.w"
static eight_bits
skip_ahead(void)
@@ -1160,7 +1160,7 @@ if(c!=ignore||*(loc-1)=='>')return(c);
}
/*:65*//*67:*/
-#line 839 "cwebdir/ctangle.w"
+#line 837 "cwebdir/ctangle.w"
static boolean skip_comment(
boolean is_long_comment)
@@ -1173,7 +1173,7 @@ if(get_line())return(comment_continues= 1);
else{
#line 165 "cwebdir/ctang-w2c.ch"
err_print(_("! Input ended in mid-comment"));
-#line 850 "cwebdir/ctangle.w"
+#line 848 "cwebdir/ctangle.w"
return(comment_continues= 0);
}
@@ -1188,7 +1188,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 863 "cwebdir/ctangle.w"
+#line 861 "cwebdir/ctangle.w"
return(comment_continues= 0);
}
@@ -1198,7 +1198,7 @@ else loc++;
}
/*:67*//*70:*/
-#line 890 "cwebdir/ctangle.w"
+#line 888 "cwebdir/ctangle.w"
static eight_bits
get_next(void)
@@ -1212,7 +1212,7 @@ if(get_line()==0)return(new_section);
else if(print_where&&!no_where){
print_where= 0;
/*85:*/
-#line 1222 "cwebdir/ctangle.w"
+#line 1220 "cwebdir/ctangle.w"
store_two_bytes(0150000);
if(changing&&include_depth==change_depth){
@@ -1227,7 +1227,7 @@ id_loc= id_first+strlen(id_first);
app_repl(a_l%0400);}
/*:85*/
-#line 902 "cwebdir/ctangle.w"
+#line 900 "cwebdir/ctangle.w"
}
else return('\n');
@@ -1241,7 +1241,7 @@ else continue;
}
loc++;
if(xisdigit(c)||c=='.')/*73:*/
-#line 971 "cwebdir/ctangle.w"
+#line 969 "cwebdir/ctangle.w"
{
id_first= loc-1;
if(*id_first=='.'&&!xisdigit(*loc))goto mistake;
@@ -1266,13 +1266,13 @@ return(constant);
}
/*:73*/
-#line 914 "cwebdir/ctangle.w"
+#line 912 "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 999 "cwebdir/ctangle.w"
+#line 997 "cwebdir/ctangle.w"
{
char delim= c;
id_first= section_text+1;
@@ -1286,13 +1286,13 @@ if(loc>=limit){
if(*(limit-1)!='\\'){
#line 177 "cwebdir/ctang-w2c.ch"
err_print(_("! String didn't end"));loc= limit;break;
-#line 1011 "cwebdir/ctangle.w"
+#line 1009 "cwebdir/ctangle.w"
}
if(get_line()==0){
#line 183 "cwebdir/ctang-w2c.ch"
err_print(_("! Input ended in middle of string"));loc= buffer;break;
-#line 1015 "cwebdir/ctangle.w"
+#line 1013 "cwebdir/ctangle.w"
}
else if(++id_loc<=section_text_end)*id_loc= '\n';
@@ -1312,7 +1312,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 1033 "cwebdir/ctangle.w"
+#line 1031 "cwebdir/ctangle.w"
term_write(section_text+1,25);
err_print("...");
@@ -1322,11 +1322,11 @@ return(string);
}
/*:74*/
-#line 918 "cwebdir/ctangle.w"
+#line 916 "cwebdir/ctangle.w"
else if(isalpha(c)||isxalpha(c)||ishigh(c))
/*72:*/
-#line 964 "cwebdir/ctangle.w"
+#line 962 "cwebdir/ctangle.w"
{
id_first= --loc;
while(isalpha((eight_bits)*++loc)||isdigit((eight_bits)*loc)
@@ -1335,47 +1335,47 @@ id_loc= loc;return(identifier);
}
/*:72*/
-#line 920 "cwebdir/ctangle.w"
+#line 918 "cwebdir/ctangle.w"
else if(c=='@')/*75:*/
-#line 1044 "cwebdir/ctangle.w"
+#line 1042 "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 1049 "cwebdir/ctangle.w"
+#line 1047 "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 1054 "cwebdir/ctangle.w"
+#line 1052 "cwebdir/ctangle.w"
continue;
case section_name:
cur_section_name_char= *(loc-1);
/*77:*/
-#line 1092 "cwebdir/ctangle.w"
+#line 1090 "cwebdir/ctangle.w"
{
char*k;
/*79:*/
-#line 1112 "cwebdir/ctangle.w"
+#line 1110 "cwebdir/ctangle.w"
k= section_text;
while(1){
if(loc> limit&&get_line()==0){
#line 219 "cwebdir/ctang-w2c.ch"
err_print(_("! Input ended in section name"));
-#line 1117 "cwebdir/ctangle.w"
+#line 1115 "cwebdir/ctangle.w"
loc= buffer+1;break;
}
c= *loc;
/*80:*/
-#line 1136 "cwebdir/ctangle.w"
+#line 1134 "cwebdir/ctangle.w"
if(c=='@'){
c= *(loc+1);
@@ -1385,20 +1385,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 1144 "cwebdir/ctangle.w"
+#line 1142 "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 1148 "cwebdir/ctangle.w"
+#line 1146 "cwebdir/ctangle.w"
}
*(++k)= '@';loc++;
}
/*:80*/
-#line 1121 "cwebdir/ctangle.w"
+#line 1119 "cwebdir/ctangle.w"
loc++;if(k<section_text_end)k++;
if(xisspace(c)){
@@ -1409,7 +1409,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 1130 "cwebdir/ctangle.w"
+#line 1128 "cwebdir/ctangle.w"
term_write(section_text+1,25);
printf("...");mark_harmless;
@@ -1417,14 +1417,14 @@ printf("...");mark_harmless;
if(*k==' '&&k> section_text)k--;
/*:79*/
-#line 1094 "cwebdir/ctangle.w"
+#line 1092 "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 502 "cwebdir/ctangle.w"
+#line 500 "cwebdir/ctangle.w"
{
for(an_output_file= cur_out_file;
@@ -1436,38 +1436,38 @@ if(cur_out_file> output_files)
else{
#line 83 "cwebdir/ctang-w2c.ch"
overflow(_("output files"));
-#line 512 "cwebdir/ctangle.w"
+#line 510 "cwebdir/ctangle.w"
}
}
}
/*:47*/
-#line 1100 "cwebdir/ctangle.w"
+#line 1098 "cwebdir/ctangle.w"
return(section_name);
}
/*:77*/
-#line 1058 "cwebdir/ctangle.w"
+#line 1056 "cwebdir/ctangle.w"
case string:/*81:*/
-#line 1158 "cwebdir/ctangle.w"
+#line 1156 "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 1162 "cwebdir/ctangle.w"
+#line 1160 "cwebdir/ctangle.w"
id_loc= loc;loc+= 2;
return(string);
}
/*:81*/
-#line 1059 "cwebdir/ctangle.w"
+#line 1057 "cwebdir/ctangle.w"
case ord:/*76:*/
-#line 1071 "cwebdir/ctangle.w"
+#line 1069 "cwebdir/ctangle.w"
id_first= loc;
if(*loc=='\\'){
@@ -1478,7 +1478,7 @@ if(*loc=='@'){
if(*(loc+1)!='@')
#line 207 "cwebdir/ctang-w2c.ch"
err_print(_("! Double @ should be used in ASCII constant"));
-#line 1080 "cwebdir/ctangle.w"
+#line 1078 "cwebdir/ctangle.w"
else loc++;
}
@@ -1486,7 +1486,7 @@ loc++;
if(loc> limit){
#line 213 "cwebdir/ctang-w2c.ch"
err_print(_("! String didn't end"));loc= limit-1;break;
-#line 1086 "cwebdir/ctangle.w"
+#line 1084 "cwebdir/ctangle.w"
}
}
@@ -1494,14 +1494,14 @@ loc++;
return(ord);
/*:76*/
-#line 1060 "cwebdir/ctangle.w"
+#line 1058 "cwebdir/ctangle.w"
default:return(c);
}
}
/*:75*/
-#line 921 "cwebdir/ctangle.w"
+#line 919 "cwebdir/ctangle.w"
else if(xisspace(c)){
if(!preprocessing||loc> limit)continue;
@@ -1510,7 +1510,7 @@ else return(' ');
}
else if(c=='#'&&loc==buffer+1)preprocessing= 1;
mistake:/*71:*/
-#line 942 "cwebdir/ctangle.w"
+#line 940 "cwebdir/ctangle.w"
switch(c){
case'+':if(*loc=='+')compress(plus_plus);break;
@@ -1534,14 +1534,14 @@ case'!':if(*loc=='=')compress(non_eq);break;
}
/*:71*/
-#line 928 "cwebdir/ctangle.w"
+#line 926 "cwebdir/ctangle.w"
return(c);
}
}
/*:70*//*84:*/
-#line 1196 "cwebdir/ctangle.w"
+#line 1194 "cwebdir/ctangle.w"
static void
scan_repl(
@@ -1549,7 +1549,7 @@ eight_bits t)
{
sixteen_bits a;
if(t==section_name){/*85:*/
-#line 1222 "cwebdir/ctangle.w"
+#line 1220 "cwebdir/ctangle.w"
store_two_bytes(0150000);
if(changing&&include_depth==change_depth){
@@ -1564,11 +1564,11 @@ id_loc= id_first+strlen(id_first);
app_repl(a_l%0400);}
/*:85*/
-#line 1202 "cwebdir/ctangle.w"
+#line 1200 "cwebdir/ctangle.w"
}
while(1)switch(a= get_next()){
/*86:*/
-#line 1235 "cwebdir/ctangle.w"
+#line 1233 "cwebdir/ctangle.w"
case identifier:a= id_lookup(id_first,id_loc,0)-name_dir;
app_repl((a/0400)+0200);
@@ -1576,7 +1576,7 @@ app_repl(a%0400);break;
case section_name:if(t!=section_name)goto done;
else{
/*87:*/
-#line 1268 "cwebdir/ctangle.w"
+#line 1266 "cwebdir/ctangle.w"
{
char*try_loc= loc;
while(*try_loc==' '&&try_loc<limit)try_loc++;
@@ -1584,20 +1584,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 1274 "cwebdir/ctangle.w"
+#line 1272 "cwebdir/ctangle.w"
}
/*:87*/
-#line 1241 "cwebdir/ctangle.w"
+#line 1239 "cwebdir/ctangle.w"
a= cur_section_name-name_dir;
app_repl((a/0400)+0250);
app_repl(a%0400);
/*85:*/
-#line 1222 "cwebdir/ctangle.w"
+#line 1220 "cwebdir/ctangle.w"
store_two_bytes(0150000);
if(changing&&include_depth==change_depth){
@@ -1612,12 +1612,12 @@ id_loc= id_first+strlen(id_first);
app_repl(a_l%0400);}
/*:85*/
-#line 1245 "cwebdir/ctangle.w"
+#line 1243 "cwebdir/ctangle.w"
break;
}
#line 261 "cwebdir/ctang-w2c.ch"
case output_defs_code:if(t!=section_name)err_print(_("! Misplaced @h"));
-#line 1248 "cwebdir/ctangle.w"
+#line 1246 "cwebdir/ctangle.w"
else{
output_defs_seen= 1;
@@ -1625,7 +1625,7 @@ a= output_defs_flag;
app_repl((a/0400)+0200);
app_repl(a%0400);
/*85:*/
-#line 1222 "cwebdir/ctangle.w"
+#line 1220 "cwebdir/ctangle.w"
store_two_bytes(0150000);
if(changing&&include_depth==change_depth){
@@ -1640,13 +1640,13 @@ id_loc= id_first+strlen(id_first);
app_repl(a_l%0400);}
/*:85*/
-#line 1254 "cwebdir/ctangle.w"
+#line 1252 "cwebdir/ctangle.w"
}
break;
case constant:case string:
/*88:*/
-#line 1279 "cwebdir/ctangle.w"
+#line 1277 "cwebdir/ctangle.w"
app_repl(a);
while(id_first<id_loc){
@@ -1654,7 +1654,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 1285 "cwebdir/ctangle.w"
+#line 1283 "cwebdir/ctangle.w"
}
app_repl(*id_first++);
@@ -1662,11 +1662,11 @@ app_repl(*id_first++);
app_repl(a);break;
/*:88*/
-#line 1258 "cwebdir/ctangle.w"
+#line 1256 "cwebdir/ctangle.w"
case ord:
/*89:*/
-#line 1295 "cwebdir/ctangle.w"
+#line 1293 "cwebdir/ctangle.w"
{
int c= (eight_bits)*id_first;
if(c=='\\'){
@@ -1705,7 +1705,7 @@ case'\'':c= '\'';break;
case'\"':c= '\"';break;
#line 285 "cwebdir/ctang-w2c.ch"
default:err_print(_("! Unrecognized escape sequence"));
-#line 1332 "cwebdir/ctangle.w"
+#line 1330 "cwebdir/ctangle.w"
}
}
@@ -1719,19 +1719,19 @@ app_repl(constant);
break;
/*:89*/
-#line 1260 "cwebdir/ctangle.w"
+#line 1258 "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 1264 "cwebdir/ctangle.w"
+#line 1262 "cwebdir/ctangle.w"
}
case new_section:goto done;
/*:86*/
-#line 1207 "cwebdir/ctangle.w"
+#line 1205 "cwebdir/ctangle.w"
case')':app_repl(a);
if(t==macro)app_repl(' ');
@@ -1741,12 +1741,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 1215 "cwebdir/ctangle.w"
+#line 1213 "cwebdir/ctangle.w"
cur_text= text_ptr;(++text_ptr)->tok_start= tok_ptr;
}
/*:84*//*92:*/
-#line 1360 "cwebdir/ctangle.w"
+#line 1358 "cwebdir/ctangle.w"
static void
scan_section(void)
@@ -1761,7 +1761,7 @@ printf("*%d",section_count);update_terminal;
next_control= 0;
while(1){
/*93:*/
-#line 1399 "cwebdir/ctangle.w"
+#line 1397 "cwebdir/ctangle.w"
while(next_control<definition)
@@ -1770,17 +1770,17 @@ loc-= 2;next_control= get_next();
}
/*:93*/
-#line 1374 "cwebdir/ctangle.w"
+#line 1372 "cwebdir/ctangle.w"
if(next_control==definition){
/*94:*/
-#line 1406 "cwebdir/ctangle.w"
+#line 1404 "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 1410 "cwebdir/ctangle.w"
+#line 1408 "cwebdir/ctangle.w"
continue;
}
@@ -1795,7 +1795,7 @@ cur_text->text_link= 0;
}
/*:94*/
-#line 1376 "cwebdir/ctangle.w"
+#line 1374 "cwebdir/ctangle.w"
continue;
}
@@ -1805,14 +1805,14 @@ p= name_dir;break;
if(next_control==section_name){
p= cur_section_name;
/*95:*/
-#line 1431 "cwebdir/ctangle.w"
+#line 1429 "cwebdir/ctangle.w"
while((next_control= get_next())=='+');
if(next_control!='='&&next_control!=eq_eq)
continue;
/*:95*/
-#line 1384 "cwebdir/ctangle.w"
+#line 1382 "cwebdir/ctangle.w"
break;
}
@@ -1820,20 +1820,20 @@ return;
}
no_where= print_where= 0;
/*96:*/
-#line 1436 "cwebdir/ctangle.w"
+#line 1434 "cwebdir/ctangle.w"
/*97:*/
-#line 1441 "cwebdir/ctangle.w"
+#line 1439 "cwebdir/ctangle.w"
store_two_bytes((sixteen_bits)(0150000+section_count));
/*:97*/
-#line 1437 "cwebdir/ctangle.w"
+#line 1435 "cwebdir/ctangle.w"
scan_repl(section_name);
/*98:*/
-#line 1445 "cwebdir/ctangle.w"
+#line 1443 "cwebdir/ctangle.w"
if(p==name_dir||p==0){
(last_unnamed)->text_link= cur_text-text_info;last_unnamed= cur_text;
@@ -1850,16 +1850,16 @@ cur_text->text_link= section_flag;
/*:98*/
-#line 1439 "cwebdir/ctangle.w"
+#line 1437 "cwebdir/ctangle.w"
/*:96*/
-#line 1390 "cwebdir/ctangle.w"
+#line 1388 "cwebdir/ctangle.w"
}
/*:92*//*100:*/
-#line 1463 "cwebdir/ctangle.w"
+#line 1461 "cwebdir/ctangle.w"
static void
phase_one(void){
@@ -1873,7 +1873,7 @@ phase= 2;
}
/*:100*//*102:*/
-#line 1481 "cwebdir/ctangle.w"
+#line 1479 "cwebdir/ctangle.w"
static void
skip_limbo(void)
@@ -1888,7 +1888,7 @@ c= *loc++;
if(ccode[(eight_bits)c]==new_section)break;
switch(ccode[(eight_bits)c]){
case translit_code:/*103:*/
-#line 1510 "cwebdir/ctangle.w"
+#line 1508 "cwebdir/ctangle.w"
while(xisspace(*loc)&&loc<limit)loc++;
loc+= 3;
@@ -1896,7 +1896,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 1516 "cwebdir/ctangle.w"
+#line 1514 "cwebdir/ctangle.w"
else{
unsigned int i;
@@ -1908,7 +1908,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 1526 "cwebdir/ctangle.w"
+#line 1524 "cwebdir/ctangle.w"
else{
strncpy(translit[i-0200],beg,(size_t)(loc-beg));
@@ -1917,7 +1917,7 @@ translit[i-0200][loc-beg]= '\0';
}
/*:103*/
-#line 1494 "cwebdir/ctangle.w"
+#line 1492 "cwebdir/ctangle.w"
break;
case format_code:case'@':break;
case control_text:if(c=='q'||c=='Q'){
@@ -1925,13 +1925,13 @@ while((c= skip_ahead())=='@');
if(*(loc-1)!='>')
#line 297 "cwebdir/ctang-w2c.ch"
err_print(_("! Double @ should be used in control text"));
-#line 1500 "cwebdir/ctangle.w"
+#line 1498 "cwebdir/ctangle.w"
break;
}
#line 303 "cwebdir/ctang-w2c.ch"
default:err_print(_("! Double @ should be used in limbo"));
-#line 1504 "cwebdir/ctangle.w"
+#line 1502 "cwebdir/ctangle.w"
}
}
@@ -1939,7 +1939,7 @@ default:err_print(_("! Double @ should be used in limbo"));
}
/*:102*//*104:*/
-#line 1536 "cwebdir/ctangle.w"
+#line 1534 "cwebdir/ctangle.w"
void
print_stats(void){
@@ -1952,7 +1952,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 1547 "cwebdir/ctangle.w"
+#line 1545 "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 1b1a2c234ee..6d38bc2c1ad 100644
--- a/Build/source/texk/web2c/cwebboot.cin
+++ b/Build/source/texk/web2c/cwebboot.cin
@@ -283,18 +283,18 @@ extern FILE*check_file;
#line 69 "cwebdir/common.w"
/*18:*/
-#line 85 "cwebdir/common.w"
+#line 83 "cwebdir/common.w"
#line 72 "cwebdir/comm-w2c.ch"
cweb program;
-#line 87 "cwebdir/common.w"
+#line 85 "cwebdir/common.w"
/*:18*//*19:*/
-#line 94 "cwebdir/common.w"
+#line 92 "cwebdir/common.w"
int phase;
/*:19*//*21:*/
-#line 131 "cwebdir/common.w"
+#line 129 "cwebdir/common.w"
char section_text[longest_name+1];
char*section_text_end= section_text+longest_name;
@@ -302,7 +302,7 @@ char*id_first;
char*id_loc;
/*:21*//*22:*/
-#line 151 "cwebdir/common.w"
+#line 149 "cwebdir/common.w"
char buffer[long_buf_size];
char*buffer_end= buffer+buf_size-2;
@@ -310,7 +310,7 @@ char*limit= buffer;
char*loc= buffer;
/*:22*//*25:*/
-#line 196 "cwebdir/common.w"
+#line 194 "cwebdir/common.w"
int include_depth;
FILE*file[max_include_depth];
@@ -318,7 +318,7 @@ FILE*change_file;
char file_name[max_include_depth][max_file_name_length];
char change_file_name[max_file_name_length];
-#line 204 "cwebdir/common.w"
+#line 202 "cwebdir/common.w"
int line[max_include_depth];
int change_line;
int change_depth;
@@ -327,13 +327,13 @@ boolean changing;
boolean web_file_open= 0;
/*:25*//*26:*/
-#line 222 "cwebdir/common.w"
+#line 220 "cwebdir/common.w"
char change_buffer[buf_size];
char*change_limit;
/*:26*//*37:*/
-#line 403 "cwebdir/common.w"
+#line 401 "cwebdir/common.w"
sixteen_bits section_count;
boolean changed_section[max_sections];
@@ -342,7 +342,7 @@ boolean change_pending;
boolean print_where= 0;
/*:37*//*43:*/
-#line 600 "cwebdir/common.w"
+#line 598 "cwebdir/common.w"
char byte_mem[max_bytes];
char*byte_mem_end= byte_mem+max_bytes-1;
@@ -350,25 +350,25 @@ name_info name_dir[max_names];
name_pointer name_dir_end= name_dir+max_names-1;
/*:43*//*44:*/
-#line 611 "cwebdir/common.w"
+#line 609 "cwebdir/common.w"
name_pointer name_ptr;
char*byte_ptr;
/*:44*//*46:*/
-#line 631 "cwebdir/common.w"
+#line 629 "cwebdir/common.w"
name_pointer hash[hash_size];
hash_pointer hash_end= hash+hash_size-1;
hash_pointer h;
/*:46*//*65:*/
-#line 1019 "cwebdir/common.w"
+#line 1017 "cwebdir/common.w"
int history= spotless;
/*:65*//*73:*/
-#line 1140 "cwebdir/common.w"
+#line 1138 "cwebdir/common.w"
int argc;
char**argv;
@@ -378,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 1147 "cwebdir/common.w"
+#line 1145 "cwebdir/common.w"
boolean flags[128];
/*:73*//*83:*/
-#line 1288 "cwebdir/common.w"
+#line 1286 "cwebdir/common.w"
FILE*C_file;
FILE*tex_file;
@@ -393,7 +393,7 @@ FILE*check_file;
#line 576 "cwebdir/comm-w2c.ch"
FILE*active_file;
char*found_filename;
-#line 1294 "cwebdir/common.w"
+#line 1292 "cwebdir/common.w"
#line 593 "cwebdir/comm-w2c.ch"
/*:83*//*86:*/
@@ -451,34 +451,34 @@ extern void print_stats(void);
extern void cb_show_banner(void);
/*:15*//*23:*/
-#line 161 "cwebdir/common.w"
+#line 159 "cwebdir/common.w"
static boolean input_ln(FILE*);
/*:23*//*27:*/
-#line 233 "cwebdir/common.w"
+#line 231 "cwebdir/common.w"
static void prime_the_change_buffer(void);
/*:27*//*32:*/
-#line 305 "cwebdir/common.w"
+#line 303 "cwebdir/common.w"
static void check_change(void);
/*:32*//*55:*/
-#line 778 "cwebdir/common.w"
+#line 776 "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 974 "cwebdir/common.w"
+#line 972 "cwebdir/common.w"
static int section_name_cmp(char**,int,name_pointer);
/*:63*//*75:*/
-#line 1172 "cwebdir/common.w"
+#line 1170 "cwebdir/common.w"
static void scan_args(void);
@@ -493,14 +493,14 @@ static void cb_usagehelp(const_string*message,const_string bug_email);
/*:1*//*20:*/
-#line 100 "cwebdir/common.w"
+#line 98 "cwebdir/common.w"
void
common_init(void)
{
#line 78 "cwebdir/comm-w2c.ch"
/*45:*/
-#line 615 "cwebdir/common.w"
+#line 613 "cwebdir/common.w"
name_dir->byte_start= byte_ptr= byte_mem;
name_ptr= name_dir+1;
@@ -508,7 +508,7 @@ name_ptr->byte_start= byte_mem;
root= NULL;
/*:45*//*47:*/
-#line 638 "cwebdir/common.w"
+#line 636 "cwebdir/common.w"
for(h= hash;h<=hash_end;*h++= NULL);
@@ -544,18 +544,18 @@ textdomain("cweb");
#line 85 "cwebdir/comm-w2c.ch"
/*74:*/
-#line 1153 "cwebdir/common.w"
+#line 1151 "cwebdir/common.w"
#line 438 "cwebdir/comm-w2c.ch"
make_xrefs= true;
temporary_output= true;
-#line 1155 "cwebdir/common.w"
+#line 1153 "cwebdir/common.w"
show_stats= false;
/*:74*/
#line 86 "cwebdir/comm-w2c.ch"
-#line 106 "cwebdir/common.w"
+#line 104 "cwebdir/common.w"
/*84:*/
#line 593 "cwebdir/comm-w2c.ch"
@@ -588,16 +588,16 @@ else strcpy(dot_pos,".wtp");
if((tex_file= fopen(check_file_name,"wb"))==NULL)
fatal(_("! Cannot open output file "),check_file_name);
}
-#line 1306 "cwebdir/common.w"
+#line 1304 "cwebdir/common.w"
#line 628 "cwebdir/comm-w2c.ch"
/*:84*/
-#line 106 "cwebdir/common.w"
+#line 104 "cwebdir/common.w"
}
/*:20*//*24:*/
-#line 164 "cwebdir/common.w"
+#line 162 "cwebdir/common.w"
static boolean input_ln(
FILE*fp)
@@ -609,12 +609,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 174 "cwebdir/common.w"
+#line 172 "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 177 "cwebdir/common.w"
+#line 175 "cwebdir/common.w"
}
if(c==EOF&&limit==buffer)return(0);
@@ -623,14 +623,14 @@ return(1);
}
/*:24*//*28:*/
-#line 236 "cwebdir/common.w"
+#line 234 "cwebdir/common.w"
static void
prime_the_change_buffer(void)
{
change_limit= change_buffer;
/*29:*/
-#line 250 "cwebdir/common.w"
+#line 248 "cwebdir/common.w"
while(1){
change_line++;
@@ -643,33 +643,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 261 "cwebdir/common.w"
+#line 259 "cwebdir/common.w"
}
}
/*:29*/
-#line 241 "cwebdir/common.w"
+#line 239 "cwebdir/common.w"
/*30:*/
-#line 267 "cwebdir/common.w"
+#line 265 "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 272 "cwebdir/common.w"
+#line 270 "cwebdir/common.w"
return;
}
}while(limit==buffer);
/*:30*/
-#line 242 "cwebdir/common.w"
+#line 240 "cwebdir/common.w"
/*31:*/
-#line 277 "cwebdir/common.w"
+#line 275 "cwebdir/common.w"
{
change_limit= change_buffer+(ptrdiff_t)(limit-buffer);
@@ -677,12 +677,12 @@ strncpy(change_buffer,buffer,(size_t)(limit-buffer+1));
}
/*:31*/
-#line 243 "cwebdir/common.w"
+#line 241 "cwebdir/common.w"
}
/*:28*//*33:*/
-#line 308 "cwebdir/common.w"
+#line 306 "cwebdir/common.w"
static void
check_change(void)
@@ -699,7 +699,7 @@ changing= 1;print_where= 1;change_line++;
if(!input_ln(change_file)){
#line 121 "cwebdir/comm-w2c.ch"
err_print(_("! Change file ended before @y"));
-#line 323 "cwebdir/common.w"
+#line 321 "cwebdir/common.w"
change_limit= change_buffer;changing= 0;
return;
@@ -707,12 +707,12 @@ return;
if(limit> buffer+1&&buffer[0]=='@'){
char xyz_code= xisupper(buffer[1])?tolower((eight_bits)buffer[1]):buffer[1];
/*34:*/
-#line 346 "cwebdir/common.w"
+#line 344 "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 349 "cwebdir/common.w"
+#line 347 "cwebdir/common.w"
}
else if(xyz_code=='y'){
@@ -721,7 +721,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 356 "cwebdir/common.w"
+#line 354 "cwebdir/common.w"
}
change_depth= include_depth;
@@ -729,11 +729,11 @@ return;
}
/*:34*/
-#line 330 "cwebdir/common.w"
+#line 328 "cwebdir/common.w"
}
/*31:*/
-#line 277 "cwebdir/common.w"
+#line 275 "cwebdir/common.w"
{
change_limit= change_buffer+(ptrdiff_t)(limit-buffer);
@@ -741,14 +741,14 @@ strncpy(change_buffer,buffer,(size_t)(limit-buffer+1));
}
/*:31*/
-#line 332 "cwebdir/common.w"
+#line 330 "cwebdir/common.w"
changing= 0;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 337 "cwebdir/common.w"
+#line 335 "cwebdir/common.w"
input_has_ended= 1;return;
}
@@ -759,14 +759,14 @@ if(lines_dont_match)n++;
}
/*:33*//*35:*/
-#line 366 "cwebdir/common.w"
+#line 364 "cwebdir/common.w"
void
reset_input(void)
{
limit= buffer;loc= buffer+1;buffer[0]= ' ';
/*36:*/
-#line 381 "cwebdir/common.w"
+#line 379 "cwebdir/common.w"
#line 149 "cwebdir/comm-w2c.ch"
if((found_filename= kpse_find_cweb(web_file_name))==NULL||
@@ -779,7 +779,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 387 "cwebdir/common.w"
+#line 385 "cwebdir/common.w"
web_file_open= 1;
@@ -794,10 +794,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 392 "cwebdir/common.w"
+#line 390 "cwebdir/common.w"
/*:36*/
-#line 371 "cwebdir/common.w"
+#line 369 "cwebdir/common.w"
include_depth= 0;cur_line= 0;change_line= 0;
change_depth= include_depth;
@@ -806,20 +806,20 @@ limit= buffer;loc= buffer+1;buffer[0]= ' ';input_has_ended= 0;
}
/*:35*//*38:*/
-#line 410 "cwebdir/common.w"
+#line 408 "cwebdir/common.w"
boolean get_line(void)
{
restart:
if(changing&&include_depth==change_depth)
/*41:*/
-#line 518 "cwebdir/common.w"
+#line 516 "cwebdir/common.w"
{
change_line++;
if(!input_ln(change_file)){
#line 274 "cwebdir/comm-w2c.ch"
err_print(_("! Change file ended without @z"));
-#line 522 "cwebdir/common.w"
+#line 520 "cwebdir/common.w"
buffer[0]= '@';buffer[1]= 'z';limit= buffer+2;
}
@@ -837,7 +837,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 538 "cwebdir/common.w"
+#line 536 "cwebdir/common.w"
}
else if(buffer[1]=='z'){
@@ -848,11 +848,11 @@ prime_the_change_buffer();changing= !changing;print_where= 1;
}
/*:41*/
-#line 415 "cwebdir/common.w"
+#line 413 "cwebdir/common.w"
if(!changing||include_depth> change_depth){
/*40:*/
-#line 501 "cwebdir/common.w"
+#line 499 "cwebdir/common.w"
{
cur_line++;
while(!input_ln(cur_file)){
@@ -871,7 +871,7 @@ if(change_limit> change_buffer)check_change();
}
/*:40*/
-#line 417 "cwebdir/common.w"
+#line 415 "cwebdir/common.w"
if(changing&&include_depth==change_depth)goto restart;
}
@@ -883,25 +883,25 @@ while(*loc==' '||*loc=='\t')loc++;
if(loc>=limit){
#line 180 "cwebdir/comm-w2c.ch"
err_print(_("! Include file name not given"));
-#line 427 "cwebdir/common.w"
+#line 425 "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 432 "cwebdir/common.w"
+#line 430 "cwebdir/common.w"
goto restart;
}
include_depth++;
/*39:*/
-#line 455 "cwebdir/common.w"
+#line 453 "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 460 "cwebdir/common.w"
+#line 458 "cwebdir/common.w"
if(*loc=='"'){
loc++;
@@ -922,17 +922,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 471 "cwebdir/common.w"
+#line 469 "cwebdir/common.w"
cur_line= 0;print_where= 1;
goto restart;
}
#line 268 "cwebdir/comm-w2c.ch"
include_depth--;err_print(_("! Cannot open include file"));goto restart;
-#line 499 "cwebdir/common.w"
+#line 497 "cwebdir/common.w"
}
/*:39*/
-#line 436 "cwebdir/common.w"
+#line 434 "cwebdir/common.w"
}
return 1;
@@ -940,7 +940,7 @@ return 1;
#line 201 "cwebdir/comm-w2c.ch"
/*:38*//*42:*/
-#line 550 "cwebdir/common.w"
+#line 548 "cwebdir/common.w"
void
check_complete(void){
@@ -950,13 +950,13 @@ limit= buffer+(ptrdiff_t)(change_limit-change_buffer);
changing= 1;change_depth= include_depth;loc= buffer;
#line 286 "cwebdir/comm-w2c.ch"
err_print(_("! Change file entry did not match"));
-#line 558 "cwebdir/common.w"
+#line 556 "cwebdir/common.w"
}
}
/*:42*//*48:*/
-#line 643 "cwebdir/common.w"
+#line 641 "cwebdir/common.w"
name_pointer
id_lookup(
@@ -971,17 +971,17 @@ name_pointer p;
if(last==NULL)for(last= first;*last!='\0';last++);
l= (int)(last-first);
/*49:*/
-#line 666 "cwebdir/common.w"
+#line 664 "cwebdir/common.w"
h= (eight_bits)*i;
while(++i<last)h= (h+h+(int)((eight_bits)*i))%hash_size;
/*:49*/
-#line 656 "cwebdir/common.w"
+#line 654 "cwebdir/common.w"
/*50:*/
-#line 674 "cwebdir/common.w"
+#line 672 "cwebdir/common.w"
p= hash[h];
while(p&&!names_match(p,first,l,t))p= p->link;
@@ -991,28 +991,28 @@ p->link= hash[h];hash[h]= p;
}
/*:50*/
-#line 657 "cwebdir/common.w"
+#line 655 "cwebdir/common.w"
if(p==name_ptr)/*51:*/
-#line 685 "cwebdir/common.w"
+#line 683 "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 688 "cwebdir/common.w"
+#line 686 "cwebdir/common.w"
strncpy(byte_ptr,first,l);
(++name_ptr)->byte_start= byte_ptr+= l;
init_p(p,t);
}
/*:51*/
-#line 658 "cwebdir/common.w"
+#line 656 "cwebdir/common.w"
return(p);
}
/*:48*//*52:*/
-#line 717 "cwebdir/common.w"
+#line 715 "cwebdir/common.w"
void
print_section_name(
@@ -1033,7 +1033,7 @@ if(q)term_write("...",3);
}
/*:52*//*53:*/
-#line 736 "cwebdir/common.w"
+#line 734 "cwebdir/common.w"
void
sprint_section_name(
@@ -1056,7 +1056,7 @@ s= p->byte_start;
}
/*:53*//*54:*/
-#line 757 "cwebdir/common.w"
+#line 755 "cwebdir/common.w"
void
print_prefix_name(
@@ -1069,7 +1069,7 @@ if(s+l<(p+1)->byte_start)term_write("...",3);
}
/*:54*//*56:*/
-#line 783 "cwebdir/common.w"
+#line 781 "cwebdir/common.w"
static int web_strcmp(
char*j,
@@ -1087,7 +1087,7 @@ else return greater;
}
/*:56*//*57:*/
-#line 812 "cwebdir/common.w"
+#line 810 "cwebdir/common.w"
static name_pointer
add_section_name(
@@ -1103,7 +1103,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 826 "cwebdir/common.w"
+#line 824 "cwebdir/common.w"
(++name_ptr)->byte_start= byte_ptr= s+name_len;
if(ispref){
*(byte_ptr-1)= ' ';
@@ -1120,7 +1120,7 @@ return par==NULL?(root= p):c==less?(par->llink= p):(par->rlink= p);
}
/*:57*//*58:*/
-#line 841 "cwebdir/common.w"
+#line 839 "cwebdir/common.w"
static void
extend_section_name(
@@ -1134,21 +1134,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 853 "cwebdir/common.w"
+#line 851 "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 858 "cwebdir/common.w"
+#line 856 "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 869 "cwebdir/common.w"
+#line 867 "cwebdir/common.w"
name_pointer
section_lookup(
@@ -1163,7 +1163,7 @@ name_pointer par= NULL;
int name_len= (int)(last-first)+1;
/*60:*/
-#line 893 "cwebdir/common.w"
+#line 891 "cwebdir/common.w"
while(p){
c= web_strcmp(first,name_len,first_chunk(p),prefix_length(p));
@@ -1175,12 +1175,12 @@ p= (c==less?p->llink:p->rlink);
if(r!=NULL){
#line 320 "cwebdir/comm-w2c.ch"
fputs(_("\n! Ambiguous prefix: matches <"),stdout);
-#line 903 "cwebdir/common.w"
+#line 901 "cwebdir/common.w"
print_prefix_name(p);
#line 326 "cwebdir/comm-w2c.ch"
fputs(_(">\n and <"),stdout);
-#line 906 "cwebdir/common.w"
+#line 904 "cwebdir/common.w"
print_prefix_name(r);
err_print(">");
return name_dir;
@@ -1194,19 +1194,19 @@ p= q,q= NULL;
}
/*:60*/
-#line 883 "cwebdir/common.w"
+#line 881 "cwebdir/common.w"
/*61:*/
-#line 918 "cwebdir/common.w"
+#line 916 "cwebdir/common.w"
if(r==NULL)
return add_section_name(par,c,first,last+1,ispref);
/*:61*/
-#line 884 "cwebdir/common.w"
+#line 882 "cwebdir/common.w"
/*62:*/
-#line 926 "cwebdir/common.w"
+#line 924 "cwebdir/common.w"
switch(section_name_cmp(&first,name_len,r)){
@@ -1214,7 +1214,7 @@ case prefix:
if(!ispref){
#line 332 "cwebdir/comm-w2c.ch"
fputs(_("\n! New name is a prefix of <"),stdout);
-#line 932 "cwebdir/common.w"
+#line 930 "cwebdir/common.w"
print_section_name(r);
err_print(">");
@@ -1228,7 +1228,7 @@ return r;
case bad_extension:
#line 338 "cwebdir/comm-w2c.ch"
fputs(_("\n! New name extends <"),stdout);
-#line 944 "cwebdir/common.w"
+#line 942 "cwebdir/common.w"
print_section_name(r);
err_print(">");
@@ -1236,24 +1236,24 @@ return r;
default:
#line 344 "cwebdir/comm-w2c.ch"
fputs(_("\n! Section name incompatible with <"),stdout);
-#line 950 "cwebdir/common.w"
+#line 948 "cwebdir/common.w"
print_prefix_name(r);
#line 350 "cwebdir/comm-w2c.ch"
fputs(_(">,\n which abbreviates <"),stdout);
-#line 953 "cwebdir/common.w"
+#line 951 "cwebdir/common.w"
print_section_name(r);
err_print(">");
return r;
}
/*:62*/
-#line 885 "cwebdir/common.w"
+#line 883 "cwebdir/common.w"
}
/*:59*//*64:*/
-#line 977 "cwebdir/common.w"
+#line 975 "cwebdir/common.w"
static int section_name_cmp(
char**pfirst,
@@ -1287,7 +1287,7 @@ default:return c;
}
/*:64*//*66:*/
-#line 1029 "cwebdir/common.w"
+#line 1027 "cwebdir/common.w"
void
err_print(
@@ -1296,14 +1296,14 @@ const char*s)
char*k,*l;
printf(*s=='!'?"\n%s":"%s",s);
if(web_file_open)/*67:*/
-#line 1049 "cwebdir/common.w"
+#line 1047 "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 1054 "cwebdir/common.w"
+#line 1052 "cwebdir/common.w"
l= (loc>=limit?limit:loc);
if(l> buffer){
for(k= buffer;k<l;k++)
@@ -1318,13 +1318,13 @@ putchar(' ');
}
/*:67*/
-#line 1036 "cwebdir/common.w"
+#line 1034 "cwebdir/common.w"
update_terminal;mark_error;
}
/*:66*//*68:*/
-#line 1081 "cwebdir/common.w"
+#line 1079 "cwebdir/common.w"
int wrap_up(void){
if(show_progress)new_line;
@@ -1332,7 +1332,7 @@ if(show_stats)
print_stats();
#line 388 "cwebdir/comm-w2c.ch"
/*69:*/
-#line 1091 "cwebdir/common.w"
+#line 1089 "cwebdir/common.w"
switch(history){
#line 412 "cwebdir/comm-w2c.ch"
@@ -1344,7 +1344,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 1099 "cwebdir/common.w"
+#line 1097 "cwebdir/common.w"
}
/*:69*/
@@ -1369,11 +1369,11 @@ case error_message:return RETURN_ERROR;
case fatal_message:return RETURN_FAIL;
default:return RETURN_OK;
}
-#line 1089 "cwebdir/common.w"
+#line 1087 "cwebdir/common.w"
}
/*:68*//*70:*/
-#line 1107 "cwebdir/common.w"
+#line 1105 "cwebdir/common.w"
void
fatal(
const char*s,const char*t)
@@ -1384,19 +1384,19 @@ history= fatal_message;exit(wrap_up());
}
/*:70*//*71:*/
-#line 1118 "cwebdir/common.w"
+#line 1116 "cwebdir/common.w"
void
overflow(
const char*t)
{
#line 425 "cwebdir/comm-w2c.ch"
printf(_("\n! Sorry, %s capacity exceeded"),t);fatal("","");
-#line 1123 "cwebdir/common.w"
+#line 1121 "cwebdir/common.w"
}
/*:71*//*76:*/
-#line 1175 "cwebdir/common.w"
+#line 1173 "cwebdir/common.w"
static void
scan_args(void)
@@ -1419,7 +1419,7 @@ change_file_name[max_file_name_length-2]= '\0';
strcpy(change_file_name,"/dev/null");
#endif
-#line 1186 "cwebdir/common.w"
+#line 1184 "cwebdir/common.w"
while(--argc> 0){
if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*80:*/
#line 510 "cwebdir/comm-w2c.ch"
@@ -1469,7 +1469,7 @@ if(sscanf(++dot_pos,"%u",&kpathsea_debug)!=1)/*81:*/
cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill");
-#line 1281 "cwebdir/common.w"
+#line 1279 "cwebdir/common.w"
#line 563 "cwebdir/comm-w2c.ch"
/*:81*/
@@ -1482,13 +1482,13 @@ if(*dot_pos=='l'){
use_language= ++dot_pos;
break;
}else
-#line 1267 "cwebdir/common.w"
+#line 1265 "cwebdir/common.w"
flags[(eight_bits)*dot_pos]= flag_change;
}
#line 555 "cwebdir/comm-w2c.ch"
/*:80*/
-#line 1187 "cwebdir/common.w"
+#line 1185 "cwebdir/common.w"
else{
s= name_pos= *argv;dot_pos= NULL;
@@ -1500,20 +1500,20 @@ dot_pos= NULL,name_pos= ++s;
else s++;
}
-#line 1195 "cwebdir/common.w"
+#line 1193 "cwebdir/common.w"
if(!found_web)/*77:*/
-#line 1212 "cwebdir/common.w"
+#line 1210 "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 1283 "cwebdir/common.w"
+#line 1281 "cwebdir/common.w"
/*:82*/
-#line 1215 "cwebdir/common.w"
+#line 1213 "cwebdir/common.w"
if(dot_pos==NULL)
sprintf(web_file_name,"%s.w",*argv);
@@ -1521,7 +1521,7 @@ else{
strcpy(web_file_name,*argv);
*dot_pos= 0;
}
-#line 1223 "cwebdir/common.w"
+#line 1221 "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);
@@ -1530,10 +1530,10 @@ found_web= 1;
}
/*:77*/
-#line 1196 "cwebdir/common.w"
+#line 1194 "cwebdir/common.w"
else if(!found_change)/*78:*/
-#line 1230 "cwebdir/common.w"
+#line 1228 "cwebdir/common.w"
{
if(strcmp(*argv,"-")!=0){
@@ -1541,11 +1541,11 @@ if(s-*argv> max_file_name_length-4)
/*82:*/
#line 563 "cwebdir/comm-w2c.ch"
fatal(_("! Filename too long\n"),*argv);
-#line 1283 "cwebdir/common.w"
+#line 1281 "cwebdir/common.w"
/*:82*/
-#line 1234 "cwebdir/common.w"
+#line 1232 "cwebdir/common.w"
if(dot_pos==NULL)
sprintf(change_file_name,"%s.ch",*argv);
@@ -1555,21 +1555,21 @@ found_change= 1;
}
/*:78*/
-#line 1197 "cwebdir/common.w"
+#line 1195 "cwebdir/common.w"
else if(!found_out)/*79:*/
-#line 1242 "cwebdir/common.w"
+#line 1240 "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 1283 "cwebdir/common.w"
+#line 1281 "cwebdir/common.w"
/*:82*/
-#line 1245 "cwebdir/common.w"
+#line 1243 "cwebdir/common.w"
if(dot_pos==NULL){
sprintf(tex_file_name,"%s.tex",*argv);
@@ -1589,18 +1589,18 @@ found_out= 1;
}
/*:79*/
-#line 1198 "cwebdir/common.w"
+#line 1196 "cwebdir/common.w"
else/*81:*/
#line 555 "cwebdir/comm-w2c.ch"
cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill");
-#line 1281 "cwebdir/common.w"
+#line 1279 "cwebdir/common.w"
#line 563 "cwebdir/comm-w2c.ch"
/*:81*/
-#line 1199 "cwebdir/common.w"
+#line 1197 "cwebdir/common.w"
}
}
@@ -1609,11 +1609,11 @@ if(!found_web)/*81:*/
cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill");
-#line 1281 "cwebdir/common.w"
+#line 1279 "cwebdir/common.w"
#line 563 "cwebdir/comm-w2c.ch"
/*:81*/
-#line 1202 "cwebdir/common.w"
+#line 1200 "cwebdir/common.w"
}
diff --git a/Build/source/texk/web2c/cwebdir/ChangeLog b/Build/source/texk/web2c/cwebdir/ChangeLog
index 2d0dac80f0c..8abb63037fd 100644
--- a/Build/source/texk/web2c/cwebdir/ChangeLog
+++ b/Build/source/texk/web2c/cwebdir/ChangeLog
@@ -1,3 +1,13 @@
+2021-02-08 Andreas Scherer <https://ascherer.github.io>
+
+ * comm-w2c.ch,
+ * common.c,
+ * common.h,
+ * common.w,
+ * ctangle.c,
+ * ctangle.w,
+ * cweave.w: Don't repeat yourself.
+
2021-02-07 Andreas Scherer <https://ascherer.github.io>
* comm-w2c.ch: Fix 'reading error';
diff --git a/Build/source/texk/web2c/cwebdir/comm-w2c.h b/Build/source/texk/web2c/cwebdir/comm-w2c.h
index cc01a9caaec..3b4c0d5a6aa 100644
--- a/Build/source/texk/web2c/cwebdir/comm-w2c.h
+++ b/Build/source/texk/web2c/cwebdir/comm-w2c.h
@@ -25,7 +25,7 @@
% file |"common.h"|, which is also included in |"common.w"| to propagate
% possible changes from this single source consistently.
-% First comes general stuff:
+First comes general stuff:
@s boolean int
@s uint8_t int
diff --git a/Build/source/texk/web2c/cwebdir/common.c b/Build/source/texk/web2c/cwebdir/common.c
index a01cb2d89ba..b65227e1e80 100644
--- a/Build/source/texk/web2c/cwebdir/common.c
+++ b/Build/source/texk/web2c/cwebdir/common.c
@@ -227,16 +227,16 @@ extern FILE*active_file;
#line 69 "common.w"
/*18:*/
-#line 85 "common.w"
+#line 83 "common.w"
boolean program;
/*:18*//*19:*/
-#line 94 "common.w"
+#line 92 "common.w"
int phase;
/*:19*//*21:*/
-#line 131 "common.w"
+#line 129 "common.w"
char section_text[longest_name+1];
char*section_text_end= section_text+longest_name;
@@ -244,7 +244,7 @@ char*id_first;
char*id_loc;
/*:21*//*22:*/
-#line 151 "common.w"
+#line 149 "common.w"
char buffer[long_buf_size];
char*buffer_end= buffer+buf_size-2;
@@ -252,7 +252,7 @@ char*limit= buffer;
char*loc= buffer;
/*:22*//*25:*/
-#line 196 "common.w"
+#line 194 "common.w"
int include_depth;
FILE*file[max_include_depth];
@@ -269,13 +269,13 @@ boolean changing;
boolean web_file_open= 0;
/*:25*//*26:*/
-#line 222 "common.w"
+#line 220 "common.w"
char change_buffer[buf_size];
char*change_limit;
/*:26*//*37:*/
-#line 403 "common.w"
+#line 401 "common.w"
sixteen_bits section_count;
boolean changed_section[max_sections];
@@ -284,7 +284,7 @@ boolean change_pending;
boolean print_where= 0;
/*:37*//*43:*/
-#line 600 "common.w"
+#line 598 "common.w"
char byte_mem[max_bytes];
char*byte_mem_end= byte_mem+max_bytes-1;
@@ -292,25 +292,25 @@ name_info name_dir[max_names];
name_pointer name_dir_end= name_dir+max_names-1;
/*:43*//*44:*/
-#line 611 "common.w"
+#line 609 "common.w"
name_pointer name_ptr;
char*byte_ptr;
/*:44*//*46:*/
-#line 631 "common.w"
+#line 629 "common.w"
name_pointer hash[hash_size];
hash_pointer hash_end= hash+hash_size-1;
hash_pointer h;
/*:46*//*65:*/
-#line 1019 "common.w"
+#line 1017 "common.w"
int history= spotless;
/*:65*//*73:*/
-#line 1140 "common.w"
+#line 1138 "common.w"
int argc;
char**argv;
@@ -321,7 +321,7 @@ char scn_file_name[max_file_name_length];
boolean flags[128];
/*:73*//*83:*/
-#line 1288 "common.w"
+#line 1286 "common.w"
FILE*C_file;
FILE*tex_file;
@@ -367,34 +367,34 @@ extern void common_init(void);
extern void print_stats(void);
/*:15*//*23:*/
-#line 161 "common.w"
+#line 159 "common.w"
static boolean input_ln(FILE*);
/*:23*//*27:*/
-#line 233 "common.w"
+#line 231 "common.w"
static void prime_the_change_buffer(void);
/*:27*//*32:*/
-#line 305 "common.w"
+#line 303 "common.w"
static void check_change(void);
/*:32*//*55:*/
-#line 778 "common.w"
+#line 776 "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 974 "common.w"
+#line 972 "common.w"
static int section_name_cmp(char**,int,name_pointer);
/*:63*//*75:*/
-#line 1172 "common.w"
+#line 1170 "common.w"
static void scan_args(void);
@@ -403,13 +403,13 @@ static void scan_args(void);
/*:1*//*20:*/
-#line 100 "common.w"
+#line 98 "common.w"
void
common_init(void)
{
/*45:*/
-#line 615 "common.w"
+#line 613 "common.w"
name_dir->byte_start= byte_ptr= byte_mem;
name_ptr= name_dir+1;
@@ -417,24 +417,24 @@ name_ptr->byte_start= byte_mem;
root= NULL;
/*:45*//*47:*/
-#line 638 "common.w"
+#line 636 "common.w"
for(h= hash;h<=hash_end;*h++= NULL);
/*:47*/
-#line 104 "common.w"
+#line 102 "common.w"
/*74:*/
-#line 1153 "common.w"
+#line 1151 "common.w"
show_banner= show_happiness= show_progress= make_xrefs= true;
show_stats= false;
/*:74*/
-#line 105 "common.w"
+#line 103 "common.w"
/*84:*/
-#line 1295 "common.w"
+#line 1293 "common.w"
scan_args();
if(program==ctangle){
@@ -448,12 +448,12 @@ fatal("! Cannot open output file ",tex_file_name);
}
/*:84*/
-#line 106 "common.w"
+#line 104 "common.w"
}
/*:20*//*24:*/
-#line 164 "common.w"
+#line 162 "common.w"
static boolean input_ln(
FILE*fp)
@@ -475,14 +475,14 @@ return(1);
}
/*:24*//*28:*/
-#line 236 "common.w"
+#line 234 "common.w"
static void
prime_the_change_buffer(void)
{
change_limit= change_buffer;
/*29:*/
-#line 250 "common.w"
+#line 248 "common.w"
while(1){
change_line++;
@@ -499,10 +499,10 @@ err_print("! Missing @x in change file");
}
/*:29*/
-#line 241 "common.w"
+#line 239 "common.w"
/*30:*/
-#line 267 "common.w"
+#line 265 "common.w"
do{
change_line++;
@@ -514,10 +514,10 @@ return;
}while(limit==buffer);
/*:30*/
-#line 242 "common.w"
+#line 240 "common.w"
/*31:*/
-#line 277 "common.w"
+#line 275 "common.w"
{
change_limit= change_buffer+(ptrdiff_t)(limit-buffer);
@@ -525,12 +525,12 @@ strncpy(change_buffer,buffer,(size_t)(limit-buffer+1));
}
/*:31*/
-#line 243 "common.w"
+#line 241 "common.w"
}
/*:28*//*33:*/
-#line 308 "common.w"
+#line 306 "common.w"
static void
check_change(void)
@@ -553,7 +553,7 @@ return;
if(limit> buffer+1&&buffer[0]=='@'){
char xyz_code= xisupper(buffer[1])?tolower((eight_bits)buffer[1]):buffer[1];
/*34:*/
-#line 346 "common.w"
+#line 344 "common.w"
if(xyz_code=='x'||xyz_code=='z'){
loc= buffer+2;err_print("! Where is the matching @y?");
@@ -571,11 +571,11 @@ return;
}
/*:34*/
-#line 330 "common.w"
+#line 328 "common.w"
}
/*31:*/
-#line 277 "common.w"
+#line 275 "common.w"
{
change_limit= change_buffer+(ptrdiff_t)(limit-buffer);
@@ -583,7 +583,7 @@ strncpy(change_buffer,buffer,(size_t)(limit-buffer+1));
}
/*:31*/
-#line 332 "common.w"
+#line 330 "common.w"
changing= 0;cur_line++;
while(!input_ln(cur_file)){
@@ -599,14 +599,14 @@ if(lines_dont_match)n++;
}
/*:33*//*35:*/
-#line 366 "common.w"
+#line 364 "common.w"
void
reset_input(void)
{
limit= buffer;loc= buffer+1;buffer[0]= ' ';
/*36:*/
-#line 381 "common.w"
+#line 379 "common.w"
if((web_file= fopen(web_file_name,"r"))==NULL){
strcpy(web_file_name,alt_web_file_name);
@@ -620,7 +620,7 @@ if((change_file= fopen(change_file_name,"r"))==NULL)
fatal("! Cannot open change file ",change_file_name);
/*:36*/
-#line 371 "common.w"
+#line 369 "common.w"
include_depth= 0;cur_line= 0;change_line= 0;
change_depth= include_depth;
@@ -629,14 +629,14 @@ limit= buffer;loc= buffer+1;buffer[0]= ' ';input_has_ended= 0;
}
/*:35*//*38:*/
-#line 410 "common.w"
+#line 408 "common.w"
boolean get_line(void)
{
restart:
if(changing&&include_depth==change_depth)
/*41:*/
-#line 518 "common.w"
+#line 516 "common.w"
{
change_line++;
if(!input_ln(change_file)){
@@ -667,11 +667,11 @@ prime_the_change_buffer();changing= !changing;print_where= 1;
}
/*:41*/
-#line 415 "common.w"
+#line 413 "common.w"
if(!changing||include_depth> change_depth){
/*40:*/
-#line 501 "common.w"
+#line 499 "common.w"
{
cur_line++;
while(!input_ln(cur_file)){
@@ -690,7 +690,7 @@ if(change_limit> change_buffer)check_change();
}
/*:40*/
-#line 417 "common.w"
+#line 415 "common.w"
if(changing&&include_depth==change_depth)goto restart;
}
@@ -711,7 +711,7 @@ goto restart;
}
include_depth++;
/*39:*/
-#line 455 "common.w"
+#line 453 "common.w"
{
char temp_file_name[max_file_name_length];
char*cur_file_name_end= cur_file_name+max_file_name_length-1;
@@ -759,14 +759,14 @@ include_depth--;err_print("! Cannot open include file");goto restart;
}
/*:39*/
-#line 436 "common.w"
+#line 434 "common.w"
}
return 1;
}
/*:38*//*42:*/
-#line 550 "common.w"
+#line 548 "common.w"
void
check_complete(void){
@@ -780,7 +780,7 @@ err_print("! Change file entry did not match");
}
/*:42*//*48:*/
-#line 643 "common.w"
+#line 641 "common.w"
name_pointer
id_lookup(
@@ -795,17 +795,17 @@ name_pointer p;
if(last==NULL)for(last= first;*last!='\0';last++);
l= (int)(last-first);
/*49:*/
-#line 666 "common.w"
+#line 664 "common.w"
h= (eight_bits)*i;
while(++i<last)h= (h+h+(int)((eight_bits)*i))%hash_size;
/*:49*/
-#line 656 "common.w"
+#line 654 "common.w"
/*50:*/
-#line 674 "common.w"
+#line 672 "common.w"
p= hash[h];
while(p&&!names_match(p,first,l,t))p= p->link;
@@ -815,10 +815,10 @@ p->link= hash[h];hash[h]= p;
}
/*:50*/
-#line 657 "common.w"
+#line 655 "common.w"
if(p==name_ptr)/*51:*/
-#line 685 "common.w"
+#line 683 "common.w"
{
if(byte_ptr+l> byte_mem_end)overflow("byte memory");
if(name_ptr>=name_dir_end)overflow("name");
@@ -828,13 +828,13 @@ init_p(p,t);
}
/*:51*/
-#line 658 "common.w"
+#line 656 "common.w"
return(p);
}
/*:48*//*52:*/
-#line 717 "common.w"
+#line 715 "common.w"
void
print_section_name(
@@ -855,7 +855,7 @@ if(q)term_write("...",3);
}
/*:52*//*53:*/
-#line 736 "common.w"
+#line 734 "common.w"
void
sprint_section_name(
@@ -878,7 +878,7 @@ s= p->byte_start;
}
/*:53*//*54:*/
-#line 757 "common.w"
+#line 755 "common.w"
void
print_prefix_name(
@@ -891,7 +891,7 @@ if(s+l<(p+1)->byte_start)term_write("...",3);
}
/*:54*//*56:*/
-#line 783 "common.w"
+#line 781 "common.w"
static int web_strcmp(
char*j,
@@ -909,7 +909,7 @@ else return greater;
}
/*:56*//*57:*/
-#line 812 "common.w"
+#line 810 "common.w"
static name_pointer
add_section_name(
@@ -940,7 +940,7 @@ return par==NULL?(root= p):c==less?(par->llink= p):(par->rlink= p);
}
/*:57*//*58:*/
-#line 841 "common.w"
+#line 839 "common.w"
static void
extend_section_name(
@@ -964,7 +964,7 @@ if(ispref)*(byte_ptr-1)= ' ';
}
/*:58*//*59:*/
-#line 869 "common.w"
+#line 867 "common.w"
name_pointer
section_lookup(
@@ -979,7 +979,7 @@ name_pointer par= NULL;
int name_len= (int)(last-first)+1;
/*60:*/
-#line 893 "common.w"
+#line 891 "common.w"
while(p){
c= web_strcmp(first,name_len,first_chunk(p),prefix_length(p));
@@ -1006,19 +1006,19 @@ p= q,q= NULL;
}
/*:60*/
-#line 883 "common.w"
+#line 881 "common.w"
/*61:*/
-#line 918 "common.w"
+#line 916 "common.w"
if(r==NULL)
return add_section_name(par,c,first,last+1,ispref);
/*:61*/
-#line 884 "common.w"
+#line 882 "common.w"
/*62:*/
-#line 926 "common.w"
+#line 924 "common.w"
switch(section_name_cmp(&first,name_len,r)){
@@ -1052,12 +1052,12 @@ return r;
}
/*:62*/
-#line 885 "common.w"
+#line 883 "common.w"
}
/*:59*//*64:*/
-#line 977 "common.w"
+#line 975 "common.w"
static int section_name_cmp(
char**pfirst,
@@ -1091,7 +1091,7 @@ default:return c;
}
/*:64*//*66:*/
-#line 1029 "common.w"
+#line 1027 "common.w"
void
err_print(
@@ -1100,7 +1100,7 @@ const char*s)
char*k,*l;
printf(*s=='!'?"\n%s":"%s",s);
if(web_file_open)/*67:*/
-#line 1049 "common.w"
+#line 1047 "common.w"
{if(changing&&include_depth==change_depth)
printf(". (l. %d of change file)\n",change_line);
@@ -1120,20 +1120,20 @@ putchar(' ');
}
/*:67*/
-#line 1036 "common.w"
+#line 1034 "common.w"
update_terminal;mark_error;
}
/*:66*//*68:*/
-#line 1081 "common.w"
+#line 1079 "common.w"
int wrap_up(void){
if(show_progress)new_line;
if(show_stats)
print_stats();
/*69:*/
-#line 1091 "common.w"
+#line 1089 "common.w"
switch(history){
case spotless:if(show_happiness)puts("(No errors were found.)");break;
@@ -1145,14 +1145,14 @@ case fatal_message:puts("(That was a fatal error, my friend.)");
}
/*:69*/
-#line 1086 "common.w"
+#line 1084 "common.w"
if(history> harmless_message)return(1);
else return(0);
}
/*:68*//*70:*/
-#line 1107 "common.w"
+#line 1105 "common.w"
void
fatal(
const char*s,const char*t)
@@ -1163,7 +1163,7 @@ history= fatal_message;exit(wrap_up());
}
/*:70*//*71:*/
-#line 1118 "common.w"
+#line 1116 "common.w"
void
overflow(
const char*t)
@@ -1173,7 +1173,7 @@ printf("\n! Sorry, %s capacity exceeded",t);fatal("","");
/*:71*//*76:*/
-#line 1175 "common.w"
+#line 1173 "common.w"
static void
scan_args(void)
@@ -1187,7 +1187,7 @@ boolean found_web= 0,found_change= 0,found_out= 0;
strcpy(change_file_name,"/dev/null");
while(--argc> 0){
if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*80:*/
-#line 1264 "common.w"
+#line 1262 "common.w"
{
for(dot_pos= *argv+1;*dot_pos> '\0';dot_pos++)
@@ -1195,7 +1195,7 @@ flags[(eight_bits)*dot_pos]= flag_change;
}
/*:80*/
-#line 1187 "common.w"
+#line 1185 "common.w"
else{
s= name_pos= *argv;dot_pos= NULL;
@@ -1205,17 +1205,17 @@ else if(*s=='/')dot_pos= NULL,name_pos= ++s;
else s++;
}
if(!found_web)/*77:*/
-#line 1212 "common.w"
+#line 1210 "common.w"
{
if(s-*argv> max_file_name_length-5)
/*82:*/
-#line 1282 "common.w"
+#line 1280 "common.w"
fatal("! Filename too long\n",*argv);
/*:82*/
-#line 1215 "common.w"
+#line 1213 "common.w"
if(dot_pos==NULL)
sprintf(web_file_name,"%s.w",*argv);
@@ -1232,21 +1232,21 @@ found_web= 1;
}
/*:77*/
-#line 1196 "common.w"
+#line 1194 "common.w"
else if(!found_change)/*78:*/
-#line 1230 "common.w"
+#line 1228 "common.w"
{
if(strcmp(*argv,"-")!=0){
if(s-*argv> max_file_name_length-4)
/*82:*/
-#line 1282 "common.w"
+#line 1280 "common.w"
fatal("! Filename too long\n",*argv);
/*:82*/
-#line 1234 "common.w"
+#line 1232 "common.w"
if(dot_pos==NULL)
sprintf(change_file_name,"%s.ch",*argv);
@@ -1256,20 +1256,20 @@ found_change= 1;
}
/*:78*/
-#line 1197 "common.w"
+#line 1195 "common.w"
else if(!found_out)/*79:*/
-#line 1242 "common.w"
+#line 1240 "common.w"
{
if(s-*argv> max_file_name_length-5)
/*82:*/
-#line 1282 "common.w"
+#line 1280 "common.w"
fatal("! Filename too long\n",*argv);
/*:82*/
-#line 1245 "common.w"
+#line 1243 "common.w"
if(dot_pos==NULL){
sprintf(tex_file_name,"%s.tex",*argv);
@@ -1289,10 +1289,10 @@ found_out= 1;
}
/*:79*/
-#line 1198 "common.w"
+#line 1196 "common.w"
else/*81:*/
-#line 1270 "common.w"
+#line 1268 "common.w"
{
if(program==ctangle)
@@ -1306,12 +1306,12 @@ else fatal(
}
/*:81*/
-#line 1199 "common.w"
+#line 1197 "common.w"
}
}
if(!found_web)/*81:*/
-#line 1270 "common.w"
+#line 1268 "common.w"
{
if(program==ctangle)
@@ -1325,7 +1325,7 @@ else fatal(
}
/*:81*/
-#line 1202 "common.w"
+#line 1200 "common.w"
}
diff --git a/Build/source/texk/web2c/cwebdir/common.h b/Build/source/texk/web2c/cwebdir/common.h
index b33dfc10556..71ceaa8f432 100644
--- a/Build/source/texk/web2c/cwebdir/common.h
+++ b/Build/source/texk/web2c/cwebdir/common.h
@@ -25,7 +25,7 @@
% file |"common.h"|, which is also included in |"common.w"| to propagate
% possible changes from this single source consistently.
-% First comes general stuff:
+First comes general stuff:
@s boolean int
@s uint8_t int
diff --git a/Build/source/texk/web2c/cwebdir/common.w b/Build/source/texk/web2c/cwebdir/common.w
index 79083985c6a..66236aca6bf 100644
--- a/Build/source/texk/web2c/cwebdir/common.w
+++ b/Build/source/texk/web2c/cwebdir/common.w
@@ -73,8 +73,6 @@ The file begins with a few basic definitions.
@ The details will be filled in due course. The interface of this module
is included first. It is also used by the main programs.
-First comes general stuff:
-
@i common.h
@ In certain cases \.{CTANGLE} and \.{CWEAVE} should do almost, but not
diff --git a/Build/source/texk/web2c/cwebdir/ctangle.c b/Build/source/texk/web2c/cwebdir/ctangle.c
index 3c8b2649da0..83d3780e1fa 100644
--- a/Build/source/texk/web2c/cwebdir/ctangle.c
+++ b/Build/source/texk/web2c/cwebdir/ctangle.c
@@ -249,7 +249,7 @@ extern FILE*active_file;
#line 69 "ctangle.w"
/*19:*/
-#line 124 "ctangle.w"
+#line 122 "ctangle.w"
typedef struct{
eight_bits*tok_start;
@@ -258,7 +258,7 @@ sixteen_bits text_link;
typedef text*text_pointer;
/*:19*//*31:*/
-#line 272 "ctangle.w"
+#line 270 "ctangle.w"
typedef struct{
eight_bits*end_field;
@@ -273,7 +273,7 @@ typedef output_state*stack_pointer;
#line 70 "ctangle.w"
/*20:*/
-#line 131 "ctangle.w"
+#line 129 "ctangle.w"
text text_info[max_texts];
text_pointer text_info_end= text_info+max_texts-1;
@@ -283,12 +283,12 @@ eight_bits*tok_mem_end= tok_mem+max_toks-1;
eight_bits*tok_ptr;
/*:20*//*26:*/
-#line 200 "ctangle.w"
+#line 198 "ctangle.w"
text_pointer last_unnamed;
/*:26*//*32:*/
-#line 288 "ctangle.w"
+#line 286 "ctangle.w"
output_state cur_state;
@@ -297,18 +297,18 @@ stack_pointer stack_ptr;
stack_pointer stack_end= stack+stack_size;
/*:32*//*37:*/
-#line 364 "ctangle.w"
+#line 362 "ctangle.w"
int cur_val;
/*:37*//*42:*/
-#line 456 "ctangle.w"
+#line 454 "ctangle.w"
eight_bits out_state;
boolean protect;
/*:42*//*45:*/
-#line 488 "ctangle.w"
+#line 486 "ctangle.w"
name_pointer output_files[max_files];
name_pointer*cur_out_file,*end_output_files,*an_output_file;
@@ -316,39 +316,39 @@ char cur_section_name_char;
char output_file_name[longest_name+1];
/*:45*//*52:*/
-#line 588 "ctangle.w"
+#line 586 "ctangle.w"
boolean output_defs_seen= 0;
/*:52*//*57:*/
-#line 697 "ctangle.w"
+#line 695 "ctangle.w"
char translit[128][translit_length];
/*:57*//*62:*/
-#line 776 "ctangle.w"
+#line 774 "ctangle.w"
eight_bits ccode[256];
/*:62*//*66:*/
-#line 836 "ctangle.w"
+#line 834 "ctangle.w"
boolean comment_continues= 0;
/*:66*//*68:*/
-#line 875 "ctangle.w"
+#line 873 "ctangle.w"
name_pointer cur_section_name;
int no_where;
/*:68*//*82:*/
-#line 1189 "ctangle.w"
+#line 1187 "ctangle.w"
text_pointer cur_text;
eight_bits next_control;
/*:82*//*90:*/
-#line 1350 "ctangle.w"
+#line 1348 "ctangle.w"
extern sixteen_bits section_count;
@@ -390,65 +390,65 @@ extern void common_init(void);
extern void print_stats(void);
/*:16*//*29:*/
-#line 233 "ctangle.w"
+#line 231 "ctangle.w"
static void store_two_bytes(sixteen_bits);
/*:29*//*34:*/
-#line 312 "ctangle.w"
+#line 310 "ctangle.w"
static void push_level(name_pointer);
static void pop_level(int);
/*:34*//*38:*/
-#line 371 "ctangle.w"
+#line 369 "ctangle.w"
static void get_output(void);
/*:38*//*43:*/
-#line 464 "ctangle.w"
+#line 462 "ctangle.w"
static void flush_buffer(void);
/*:43*//*48:*/
-#line 519 "ctangle.w"
+#line 517 "ctangle.w"
static void phase_two(void);
/*:48*//*53:*/
-#line 591 "ctangle.w"
+#line 589 "ctangle.w"
static void output_defs(void);
static void out_char(eight_bits);
/*:53*//*64:*/
-#line 800 "ctangle.w"
+#line 798 "ctangle.w"
static eight_bits skip_ahead(void);
static boolean skip_comment(boolean);
/*:64*//*69:*/
-#line 887 "ctangle.w"
+#line 885 "ctangle.w"
static eight_bits get_next(void);
/*:69*//*83:*/
-#line 1193 "ctangle.w"
+#line 1191 "ctangle.w"
static void scan_repl(eight_bits);
/*:83*//*91:*/
-#line 1357 "ctangle.w"
+#line 1355 "ctangle.w"
static void scan_section(void);
/*:91*//*99:*/
-#line 1460 "ctangle.w"
+#line 1458 "ctangle.w"
static void phase_one(void);
/*:99*//*101:*/
-#line 1478 "ctangle.w"
+#line 1476 "ctangle.w"
static void skip_limbo(void);
@@ -466,28 +466,28 @@ char**av)
argc= ac;argv= av;
program= ctangle;
/*21:*/
-#line 139 "ctangle.w"
+#line 137 "ctangle.w"
text_info->tok_start= tok_ptr= tok_mem;
text_ptr= text_info+1;text_ptr->tok_start= tok_mem;
/*:21*//*23:*/
-#line 149 "ctangle.w"
+#line 147 "ctangle.w"
init_node(name_dir);
/*:23*//*27:*/
-#line 203 "ctangle.w"
+#line 201 "ctangle.w"
last_unnamed= text_info;text_info->text_link= 0;
/*:27*//*46:*/
-#line 498 "ctangle.w"
+#line 496 "ctangle.w"
cur_out_file= end_output_files= output_files+max_files;
/*:46*//*58:*/
-#line 700 "ctangle.w"
+#line 698 "ctangle.w"
{
int i;
@@ -495,7 +495,7 @@ for(i= 0;i<128;i++)sprintf(translit[i],"X%02X",(unsigned int)(128+i));
}
/*:58*//*63:*/
-#line 779 "ctangle.w"
+#line 777 "ctangle.w"
{
int c;
for(c= 0;c<256;c++)ccode[c]= ignore;
@@ -515,7 +515,7 @@ ccode['\'']= ord;
}
/*:63*//*78:*/
-#line 1110 "ctangle.w"
+#line 1108 "ctangle.w"
section_text[0]= ' ';
/*:78*/
@@ -529,7 +529,7 @@ return wrap_up();
}
/*:2*//*24:*/
-#line 155 "ctangle.w"
+#line 153 "ctangle.w"
boolean names_match(
name_pointer p,
@@ -542,7 +542,7 @@ return!strncmp(first,p->byte_start,l);
}
/*:24*//*25:*/
-#line 171 "ctangle.w"
+#line 169 "ctangle.w"
void
init_node(
@@ -554,7 +554,7 @@ void
init_p(name_pointer p,eight_bits t){(void)p;(void)t;}
/*:25*//*30:*/
-#line 236 "ctangle.w"
+#line 234 "ctangle.w"
void
store_two_bytes(
@@ -566,7 +566,7 @@ if(tok_ptr+2> tok_mem_end)overflow("token");
}
/*:30*//*35:*/
-#line 316 "ctangle.w"
+#line 314 "ctangle.w"
static void
push_level(
@@ -583,7 +583,7 @@ cur_section= 0;
}
/*:35*//*36:*/
-#line 335 "ctangle.w"
+#line 333 "ctangle.w"
static void
pop_level(
@@ -599,7 +599,7 @@ if(stack_ptr> stack)cur_state= *stack_ptr;
}
/*:36*//*39:*/
-#line 374 "ctangle.w"
+#line 372 "ctangle.w"
static void
get_output(void)
@@ -622,7 +622,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 406 "ctangle.w"
+#line 404 "ctangle.w"
{
a-= 024000;
@@ -636,7 +636,7 @@ goto restart;
}
/*:40*/
-#line 395 "ctangle.w"
+#line 393 "ctangle.w"
break;
default:cur_val= a-050000;if(cur_val> 0)cur_section= cur_val;
@@ -646,7 +646,7 @@ out_char(section_number);
}
/*:39*//*44:*/
-#line 467 "ctangle.w"
+#line 465 "ctangle.w"
static void
flush_buffer(void)
@@ -661,29 +661,29 @@ cur_line++;
}
/*:44*//*49:*/
-#line 522 "ctangle.w"
+#line 520 "ctangle.w"
static void
phase_two(void){
web_file_open= 0;
cur_line= 1;
/*33:*/
-#line 301 "ctangle.w"
+#line 299 "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 527 "ctangle.w"
+#line 525 "ctangle.w"
/*51:*/
-#line 584 "ctangle.w"
+#line 582 "ctangle.w"
if(!output_defs_seen)
output_defs();
/*:51*/
-#line 528 "ctangle.w"
+#line 526 "ctangle.w"
if(text_info->text_link==0&&cur_out_file==end_output_files){
fputs("\n! No program text was specified.",stdout);mark_harmless;
@@ -706,7 +706,7 @@ if(text_info->text_link==0)goto writeloop;
while(stack_ptr> stack)get_output();
flush_buffer();
writeloop:/*50:*/
-#line 561 "ctangle.w"
+#line 559 "ctangle.w"
for(an_output_file= end_output_files;an_output_file> cur_out_file;){
an_output_file--;
@@ -727,7 +727,7 @@ flush_buffer();
}
/*:50*/
-#line 549 "ctangle.w"
+#line 547 "ctangle.w"
if(show_happiness){
if(show_progress)new_line;
@@ -737,7 +737,7 @@ fputs("Done.",stdout);
}
/*:49*//*54:*/
-#line 595 "ctangle.w"
+#line 593 "ctangle.w"
static void
output_defs(void)
@@ -777,7 +777,7 @@ pop_level(0);
}
/*:54*//*55:*/
-#line 638 "ctangle.w"
+#line 636 "ctangle.w"
static void
out_char(
@@ -790,7 +790,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 706 "ctangle.w"
+#line 704 "ctangle.w"
case identifier:
if(out_state==num_or_id)C_putc(' ');
@@ -805,10 +805,10 @@ j++;
out_state= num_or_id;break;
/*:59*/
-#line 649 "ctangle.w"
+#line 647 "ctangle.w"
/*60:*/
-#line 719 "ctangle.w"
+#line 717 "ctangle.w"
case section_number:
if(cur_val> 0)C_printf("/*%d:*/",cur_val);
@@ -835,10 +835,10 @@ C_printf("%s","\"\n");
break;
/*:60*/
-#line 650 "ctangle.w"
+#line 648 "ctangle.w"
/*56:*/
-#line 668 "ctangle.w"
+#line 666 "ctangle.w"
case plus_plus:C_putc('+');C_putc('+');out_state= normal;break;
case minus_minus:C_putc('-');C_putc('-');out_state= normal;break;
@@ -859,7 +859,7 @@ case minus_gt_ast:C_putc('-');C_putc('>');C_putc('*');out_state= normal;
break;
/*:56*/
-#line 651 "ctangle.w"
+#line 649 "ctangle.w"
case'=':case'>':C_putc(cur_char);C_putc(' ');
out_state= normal;break;
@@ -878,7 +878,7 @@ default:C_putc(cur_char);out_state= normal;break;
}
/*:55*//*65:*/
-#line 804 "ctangle.w"
+#line 802 "ctangle.w"
static eight_bits
skip_ahead(void)
@@ -896,7 +896,7 @@ if(c!=ignore||*(loc-1)=='>')return(c);
}
/*:65*//*67:*/
-#line 839 "ctangle.w"
+#line 837 "ctangle.w"
static boolean skip_comment(
boolean is_long_comment)
@@ -930,7 +930,7 @@ else loc++;
}
/*:67*//*70:*/
-#line 890 "ctangle.w"
+#line 888 "ctangle.w"
static eight_bits
get_next(void)
@@ -944,7 +944,7 @@ if(get_line()==0)return(new_section);
else if(print_where&&!no_where){
print_where= 0;
/*85:*/
-#line 1222 "ctangle.w"
+#line 1220 "ctangle.w"
store_two_bytes(0150000);
if(changing&&include_depth==change_depth){
@@ -959,7 +959,7 @@ id_loc= id_first+strlen(id_first);
app_repl(a_l%0400);}
/*:85*/
-#line 902 "ctangle.w"
+#line 900 "ctangle.w"
}
else return('\n');
@@ -973,7 +973,7 @@ else continue;
}
loc++;
if(xisdigit(c)||c=='.')/*73:*/
-#line 971 "ctangle.w"
+#line 969 "ctangle.w"
{
id_first= loc-1;
if(*id_first=='.'&&!xisdigit(*loc))goto mistake;
@@ -998,13 +998,13 @@ return(constant);
}
/*:73*/
-#line 914 "ctangle.w"
+#line 912 "ctangle.w"
else if(c=='\''||c=='"'
||((c=='L'||c=='u'||c=='U')&&(*loc=='\''||*loc=='"'))
||((c=='u'&&*loc=='8')&&(*(loc+1)=='\''||*(loc+1)=='"')))
/*74:*/
-#line 999 "ctangle.w"
+#line 997 "ctangle.w"
{
char delim= c;
id_first= section_text+1;
@@ -1048,11 +1048,11 @@ return(string);
}
/*:74*/
-#line 918 "ctangle.w"
+#line 916 "ctangle.w"
else if(isalpha(c)||isxalpha(c)||ishigh(c))
/*72:*/
-#line 964 "ctangle.w"
+#line 962 "ctangle.w"
{
id_first= --loc;
while(isalpha((eight_bits)*++loc)||isdigit((eight_bits)*loc)
@@ -1061,10 +1061,10 @@ id_loc= loc;return(identifier);
}
/*:72*/
-#line 920 "ctangle.w"
+#line 918 "ctangle.w"
else if(c=='@')/*75:*/
-#line 1044 "ctangle.w"
+#line 1042 "ctangle.w"
{
c= ccode[(eight_bits)*loc++];
switch(c){
@@ -1080,11 +1080,11 @@ continue;
case section_name:
cur_section_name_char= *(loc-1);
/*77:*/
-#line 1092 "ctangle.w"
+#line 1090 "ctangle.w"
{
char*k;
/*79:*/
-#line 1112 "ctangle.w"
+#line 1110 "ctangle.w"
k= section_text;
while(1){
@@ -1095,7 +1095,7 @@ loc= buffer+1;break;
}
c= *loc;
/*80:*/
-#line 1136 "ctangle.w"
+#line 1134 "ctangle.w"
if(c=='@'){
c= *(loc+1);
@@ -1114,7 +1114,7 @@ err_print("! Nesting of section names not allowed");break;
}
/*:80*/
-#line 1121 "ctangle.w"
+#line 1119 "ctangle.w"
loc++;if(k<section_text_end)k++;
if(xisspace(c)){
@@ -1131,14 +1131,14 @@ printf("...");mark_harmless;
if(*k==' '&&k> section_text)k--;
/*:79*/
-#line 1094 "ctangle.w"
+#line 1092 "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 502 "ctangle.w"
+#line 500 "ctangle.w"
{
for(an_output_file= cur_out_file;
@@ -1154,16 +1154,16 @@ overflow("output files");
}
/*:47*/
-#line 1100 "ctangle.w"
+#line 1098 "ctangle.w"
return(section_name);
}
/*:77*/
-#line 1058 "ctangle.w"
+#line 1056 "ctangle.w"
case string:/*81:*/
-#line 1158 "ctangle.w"
+#line 1156 "ctangle.w"
{
id_first= loc++;*(limit+1)= '@';*(limit+2)= '>';
while(*loc!='@'||*(loc+1)!='>')loc++;
@@ -1174,10 +1174,10 @@ return(string);
}
/*:81*/
-#line 1059 "ctangle.w"
+#line 1057 "ctangle.w"
case ord:/*76:*/
-#line 1071 "ctangle.w"
+#line 1069 "ctangle.w"
id_first= loc;
if(*loc=='\\'){
@@ -1200,14 +1200,14 @@ loc++;
return(ord);
/*:76*/
-#line 1060 "ctangle.w"
+#line 1058 "ctangle.w"
default:return(c);
}
}
/*:75*/
-#line 921 "ctangle.w"
+#line 919 "ctangle.w"
else if(xisspace(c)){
if(!preprocessing||loc> limit)continue;
@@ -1216,7 +1216,7 @@ else return(' ');
}
else if(c=='#'&&loc==buffer+1)preprocessing= 1;
mistake:/*71:*/
-#line 942 "ctangle.w"
+#line 940 "ctangle.w"
switch(c){
case'+':if(*loc=='+')compress(plus_plus);break;
@@ -1240,14 +1240,14 @@ case'!':if(*loc=='=')compress(non_eq);break;
}
/*:71*/
-#line 928 "ctangle.w"
+#line 926 "ctangle.w"
return(c);
}
}
/*:70*//*84:*/
-#line 1196 "ctangle.w"
+#line 1194 "ctangle.w"
static void
scan_repl(
@@ -1255,7 +1255,7 @@ eight_bits t)
{
sixteen_bits a;
if(t==section_name){/*85:*/
-#line 1222 "ctangle.w"
+#line 1220 "ctangle.w"
store_two_bytes(0150000);
if(changing&&include_depth==change_depth){
@@ -1270,11 +1270,11 @@ id_loc= id_first+strlen(id_first);
app_repl(a_l%0400);}
/*:85*/
-#line 1202 "ctangle.w"
+#line 1200 "ctangle.w"
}
while(1)switch(a= get_next()){
/*86:*/
-#line 1235 "ctangle.w"
+#line 1233 "ctangle.w"
case identifier:a= id_lookup(id_first,id_loc,0)-name_dir;
app_repl((a/0400)+0200);
@@ -1282,7 +1282,7 @@ app_repl(a%0400);break;
case section_name:if(t!=section_name)goto done;
else{
/*87:*/
-#line 1268 "ctangle.w"
+#line 1266 "ctangle.w"
{
char*try_loc= loc;
while(*try_loc==' '&&try_loc<limit)try_loc++;
@@ -1295,13 +1295,13 @@ if(*try_loc=='=')err_print("! Missing `@ ' before a named section");
}
/*:87*/
-#line 1241 "ctangle.w"
+#line 1239 "ctangle.w"
a= cur_section_name-name_dir;
app_repl((a/0400)+0250);
app_repl(a%0400);
/*85:*/
-#line 1222 "ctangle.w"
+#line 1220 "ctangle.w"
store_two_bytes(0150000);
if(changing&&include_depth==change_depth){
@@ -1316,7 +1316,7 @@ id_loc= id_first+strlen(id_first);
app_repl(a_l%0400);}
/*:85*/
-#line 1245 "ctangle.w"
+#line 1243 "ctangle.w"
break;
}
case output_defs_code:if(t!=section_name)err_print("! Misplaced @h");
@@ -1327,7 +1327,7 @@ a= output_defs_flag;
app_repl((a/0400)+0200);
app_repl(a%0400);
/*85:*/
-#line 1222 "ctangle.w"
+#line 1220 "ctangle.w"
store_two_bytes(0150000);
if(changing&&include_depth==change_depth){
@@ -1342,13 +1342,13 @@ id_loc= id_first+strlen(id_first);
app_repl(a_l%0400);}
/*:85*/
-#line 1254 "ctangle.w"
+#line 1252 "ctangle.w"
}
break;
case constant:case string:
/*88:*/
-#line 1279 "ctangle.w"
+#line 1277 "ctangle.w"
app_repl(a);
while(id_first<id_loc){
@@ -1362,11 +1362,11 @@ app_repl(*id_first++);
app_repl(a);break;
/*:88*/
-#line 1258 "ctangle.w"
+#line 1256 "ctangle.w"
case ord:
/*89:*/
-#line 1295 "ctangle.w"
+#line 1293 "ctangle.w"
{
int c= (eight_bits)*id_first;
if(c=='\\'){
@@ -1417,7 +1417,7 @@ app_repl(constant);
break;
/*:89*/
-#line 1260 "ctangle.w"
+#line 1258 "ctangle.w"
case definition:case format_code:case begin_C:if(t!=section_name)goto done;
else{
@@ -1427,7 +1427,7 @@ err_print("! @d, @f and @c are ignored in C text");continue;
case new_section:goto done;
/*:86*/
-#line 1207 "ctangle.w"
+#line 1205 "ctangle.w"
case')':app_repl(a);
if(t==macro)app_repl(' ');
@@ -1440,7 +1440,7 @@ cur_text= text_ptr;(++text_ptr)->tok_start= tok_ptr;
}
/*:84*//*92:*/
-#line 1360 "ctangle.w"
+#line 1358 "ctangle.w"
static void
scan_section(void)
@@ -1455,7 +1455,7 @@ printf("*%d",section_count);update_terminal;
next_control= 0;
while(1){
/*93:*/
-#line 1399 "ctangle.w"
+#line 1397 "ctangle.w"
while(next_control<definition)
@@ -1464,11 +1464,11 @@ loc-= 2;next_control= get_next();
}
/*:93*/
-#line 1374 "ctangle.w"
+#line 1372 "ctangle.w"
if(next_control==definition){
/*94:*/
-#line 1406 "ctangle.w"
+#line 1404 "ctangle.w"
{
while((next_control= get_next())=='\n');
if(next_control!=identifier){
@@ -1487,7 +1487,7 @@ cur_text->text_link= 0;
}
/*:94*/
-#line 1376 "ctangle.w"
+#line 1374 "ctangle.w"
continue;
}
@@ -1497,14 +1497,14 @@ p= name_dir;break;
if(next_control==section_name){
p= cur_section_name;
/*95:*/
-#line 1431 "ctangle.w"
+#line 1429 "ctangle.w"
while((next_control= get_next())=='+');
if(next_control!='='&&next_control!=eq_eq)
continue;
/*:95*/
-#line 1384 "ctangle.w"
+#line 1382 "ctangle.w"
break;
}
@@ -1512,20 +1512,20 @@ return;
}
no_where= print_where= 0;
/*96:*/
-#line 1436 "ctangle.w"
+#line 1434 "ctangle.w"
/*97:*/
-#line 1441 "ctangle.w"
+#line 1439 "ctangle.w"
store_two_bytes((sixteen_bits)(0150000+section_count));
/*:97*/
-#line 1437 "ctangle.w"
+#line 1435 "ctangle.w"
scan_repl(section_name);
/*98:*/
-#line 1445 "ctangle.w"
+#line 1443 "ctangle.w"
if(p==name_dir||p==0){
(last_unnamed)->text_link= cur_text-text_info;last_unnamed= cur_text;
@@ -1542,16 +1542,16 @@ cur_text->text_link= section_flag;
/*:98*/
-#line 1439 "ctangle.w"
+#line 1437 "ctangle.w"
/*:96*/
-#line 1390 "ctangle.w"
+#line 1388 "ctangle.w"
}
/*:92*//*100:*/
-#line 1463 "ctangle.w"
+#line 1461 "ctangle.w"
static void
phase_one(void){
@@ -1565,7 +1565,7 @@ phase= 2;
}
/*:100*//*102:*/
-#line 1481 "ctangle.w"
+#line 1479 "ctangle.w"
static void
skip_limbo(void)
@@ -1580,7 +1580,7 @@ c= *loc++;
if(ccode[(eight_bits)c]==new_section)break;
switch(ccode[(eight_bits)c]){
case translit_code:/*103:*/
-#line 1510 "ctangle.w"
+#line 1508 "ctangle.w"
while(xisspace(*loc)&&loc<limit)loc++;
loc+= 3;
@@ -1605,7 +1605,7 @@ translit[i-0200][loc-beg]= '\0';
}
/*:103*/
-#line 1494 "ctangle.w"
+#line 1492 "ctangle.w"
break;
case format_code:case'@':break;
case control_text:if(c=='q'||c=='Q'){
@@ -1623,7 +1623,7 @@ default:err_print("! Double @ should be used in limbo");
}
/*:102*//*104:*/
-#line 1536 "ctangle.w"
+#line 1534 "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 92a55a180a5..dd76890046a 100644
--- a/Build/source/texk/web2c/cwebdir/ctangle.w
+++ b/Build/source/texk/web2c/cwebdir/ctangle.w
@@ -98,8 +98,6 @@ be included in both |"ctangle.w"| and |"cweave.w"|. It appears in
file |"common.h"|, which is also included in |"common.w"| to propagate
possible changes from this \.{COMMON} interface consistently.
-First comes general stuff:
-
@i common.h
@* Data structures exclusive to {\tt CTANGLE}.
diff --git a/Build/source/texk/web2c/cwebdir/cweave.w b/Build/source/texk/web2c/cwebdir/cweave.w
index 8b9ec49cb45..5cc62b1721a 100644
--- a/Build/source/texk/web2c/cwebdir/cweave.w
+++ b/Build/source/texk/web2c/cwebdir/cweave.w
@@ -107,8 +107,6 @@ be included in both |"ctangle.w"| and |"cweave.w"|. It appears in
file |"common.h"|, which is also included in |"common.w"| to propagate
possible changes from this \.{COMMON} interface consistently.
-First comes general stuff:
-
@i common.h
@ The following parameters were sufficient in the original \.{WEAVE} to