texlive[67749] Build/source/texk/web2c: [CWEB] Format 'common' with
commits+ascherer at tug.org
commits+ascherer at tug.org
Fri Jul 28 16:25:33 CEST 2023
Revision: 67749
http://tug.org/svn/texlive?view=revision&revision=67749
Author: ascherer
Date: 2023-07-28 16:25:33 +0200 (Fri, 28 Jul 2023)
Log Message:
-----------
[CWEB] Format 'common' with 'ctwill'.
$ ctie -m common-twill.w common.w comm-{w2c,mini}.ch
$ mv common-twill.w common.w
$ ctwill -f -lpdf common (twice)
$ pdftex common
$ ctwill-refsort < common.ref > common.sref
$ pdftex common
TODO: Study the application of 'ctwill-twinx' and create a general index
for COMMON and CTWILL.
Modified Paths:
--------------
trunk/Build/source/texk/web2c/ChangeLog
trunk/Build/source/texk/web2c/ctangleboot.cin
trunk/Build/source/texk/web2c/cwebboot.cin
trunk/Build/source/texk/web2c/cwebdir/ChangeLog
trunk/Build/source/texk/web2c/cwebdir/comm-mini.ch
trunk/Build/source/texk/web2c/cwebdir/comm-w2c.ch
trunk/Build/source/texk/web2c/cwebdir/common.bux
trunk/Build/source/texk/web2c/cwebdir/common.c
trunk/Build/source/texk/web2c/cwebdir/common.w
trunk/Build/source/texk/web2c/cwebdir/ctangle.c
trunk/Build/source/texk/web2c/cwebdir/ctangle.w
trunk/Build/source/texk/web2c/cwebdir/system.bux
Modified: trunk/Build/source/texk/web2c/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/ChangeLog 2023-07-27 23:43:01 UTC (rev 67748)
+++ trunk/Build/source/texk/web2c/ChangeLog 2023-07-28 14:25:33 UTC (rev 67749)
@@ -1,3 +1,8 @@
+2023-06-28 Andreas Scherer <https://ascherer.github.io>
+
+ * ctangleboot.cin,
+ * cwebboot.cin: Format 'common' with 'ctwill'.
+
2023-06-26 Andreas Scherer <https://ascherer.github.io>
* ctangleboot.cin,
Modified: trunk/Build/source/texk/web2c/ctangleboot.cin
===================================================================
--- trunk/Build/source/texk/web2c/ctangleboot.cin 2023-07-27 23:43:01 UTC (rev 67748)
+++ trunk/Build/source/texk/web2c/ctangleboot.cin 2023-07-28 14:25:33 UTC (rev 67749)
@@ -140,11 +140,11 @@
#define verbatim 4 \
#define max_files 256
+#define macro_end (cur_text+1) ->tok_start \
+
#define C_printf(c,a) fprintf(C_file,c,a)
#define C_putc(c) putc((int) (c) ,C_file) \
-#define macro_end (cur_text+1) ->tok_start \
-
#define translit_length 10 \
#define transliterate_utf_eight flags['u'] \
Modified: trunk/Build/source/texk/web2c/cwebboot.cin
===================================================================
--- trunk/Build/source/texk/web2c/cwebboot.cin 2023-07-27 23:43:01 UTC (rev 67748)
+++ trunk/Build/source/texk/web2c/cwebboot.cin 2023-07-28 14:25:33 UTC (rev 67749)
@@ -26,20 +26,20 @@
#line 78 "cwebdir/comm-w2c.h"
/*:4*//*91:*/
-#line 739 "cwebdir/comm-w2c.ch"
+#line 738 "cwebdir/comm-w2c.ch"
#if HAVE_GETTEXT
#include <locale.h>
#else
-#line 743 "cwebdir/comm-w2c.ch"
+#line 742 "cwebdir/comm-w2c.ch"
#define setlocale(a,b) ""
#define bindtextdomain(a,b) ""
#define textdomain(a) ""
#endif
-#line 747 "cwebdir/comm-w2c.ch"
+#line 746 "cwebdir/comm-w2c.ch"
/*:91*//*93:*/
-#line 786 "cwebdir/comm-w2c.ch"
+#line 785 "cwebdir/comm-w2c.ch"
#include <kpathsea/kpathsea.h>
@@ -47,7 +47,7 @@
#include <lib/lib.h>
/*:93*//*96:*/
-#line 823 "cwebdir/comm-w2c.ch"
+#line 822 "cwebdir/comm-w2c.ch"
#define CWEB
#include "help.h"
@@ -340,7 +340,7 @@
static char*change_limit;
/*:26*//*42:*/
-#line 545 "cwebdir/common.w"
+#line 544 "cwebdir/common.w"
sixteen_bits section_count;
boolean changed_section[max_sections];
@@ -349,7 +349,7 @@
boolean print_where= false;
/*:42*//*43:*/
-#line 590 "cwebdir/common.w"
+#line 589 "cwebdir/common.w"
char byte_mem[max_bytes];
char*byte_mem_end= byte_mem+max_bytes-1;
@@ -357,13 +357,13 @@
name_pointer name_dir_end= name_dir+max_names-1;
/*:43*//*44:*/
-#line 601 "cwebdir/common.w"
+#line 600 "cwebdir/common.w"
char*byte_ptr;
name_pointer name_ptr;
/*:44*//*46:*/
-#line 621 "cwebdir/common.w"
+#line 620 "cwebdir/common.w"
name_pointer hash[hash_size];
hash_pointer hash_end= hash+hash_size-1;
@@ -370,12 +370,12 @@
hash_pointer h;
/*:46*//*65:*/
-#line 1004 "cwebdir/common.w"
+#line 1003 "cwebdir/common.w"
int history= spotless;
/*:65*//*73:*/
-#line 1127 "cwebdir/common.w"
+#line 1126 "cwebdir/common.w"
int argc;
char**argv;
@@ -382,33 +382,33 @@
char C_file_name[max_file_name_length];
char tex_file_name[max_file_name_length];
char idx_file_name[max_file_name_length];
-#line 454 "cwebdir/comm-w2c.ch"
+#line 453 "cwebdir/comm-w2c.ch"
char scn_file_name[max_file_name_length];
char check_file_name[max_file_name_length];
-#line 1134 "cwebdir/common.w"
+#line 1133 "cwebdir/common.w"
boolean flags[128];
/*:73*//*83:*/
-#line 1268 "cwebdir/common.w"
+#line 1267 "cwebdir/common.w"
FILE*C_file;
FILE*tex_file;
FILE*idx_file;
FILE*scn_file;
-#line 584 "cwebdir/comm-w2c.ch"
+#line 583 "cwebdir/comm-w2c.ch"
FILE*active_file;
FILE*check_file;
-#line 1274 "cwebdir/common.w"
+#line 1273 "cwebdir/common.w"
-#line 601 "cwebdir/comm-w2c.ch"
+#line 600 "cwebdir/comm-w2c.ch"
/*:83*//*86:*/
-#line 629 "cwebdir/comm-w2c.ch"
+#line 628 "cwebdir/comm-w2c.ch"
const char*use_language= "";
/*:86*//*87:*/
-#line 642 "cwebdir/comm-w2c.ch"
+#line 641 "cwebdir/comm-w2c.ch"
char cb_banner[max_banner];
string texmf_locale;
@@ -415,7 +415,7 @@
#ifndef SEPARATORS
#define SEPARATORS "://"
#endif
-#line 648 "cwebdir/comm-w2c.ch"
+#line 647 "cwebdir/comm-w2c.ch"
char separators[]= SEPARATORS;
/*:87*/
@@ -471,7 +471,7 @@
static void check_change(void);
/*:33*//*55:*/
-#line 765 "cwebdir/common.w"
+#line 764 "cwebdir/common.w"
static int web_strcmp(char*,size_t,char*,size_t);
static name_pointer add_section_name(name_pointer,int,char*,char*,boolean);
@@ -478,16 +478,16 @@
static void extend_section_name(name_pointer,char*,char*,boolean);
/*:55*//*64:*/
-#line 992 "cwebdir/common.w"
+#line 991 "cwebdir/common.w"
static int section_name_cmp(char**,size_t,name_pointer);
/*:64*//*76:*/
-#line 1187 "cwebdir/common.w"
+#line 1186 "cwebdir/common.w"
static void scan_args(void);
-#line 514 "cwebdir/comm-w2c.ch"
+#line 513 "cwebdir/comm-w2c.ch"
/*:76*//*98:*/
-#line 836 "cwebdir/comm-w2c.ch"
+#line 835 "cwebdir/comm-w2c.ch"
static void cb_usage(const_string str);
static void cb_usagehelp(const_string*message);
@@ -504,7 +504,7 @@
{
#line 78 "cwebdir/comm-w2c.ch"
/*45:*/
-#line 605 "cwebdir/common.w"
+#line 604 "cwebdir/common.w"
name_dir->byte_start= byte_ptr= byte_mem;
name_ptr= name_dir+1;
@@ -512,7 +512,7 @@
root= NULL;
/*:45*//*47:*/
-#line 628 "cwebdir/common.w"
+#line 627 "cwebdir/common.w"
for(h= hash;h<=hash_end;*h++= NULL);
@@ -520,7 +520,7 @@
#line 78 "cwebdir/comm-w2c.ch"
/*94:*/
-#line 798 "cwebdir/comm-w2c.ch"
+#line 797 "cwebdir/comm-w2c.ch"
kpse_set_program_name(argv[0],"cweb");
@@ -529,7 +529,7 @@
#line 85 "cwebdir/comm-w2c.ch"
/*92:*/
-#line 748 "cwebdir/comm-w2c.ch"
+#line 747 "cwebdir/comm-w2c.ch"
setlocale(LC_MESSAGES,setlocale(LC_CTYPE,""));
texmf_locale= kpse_var_expand("${TEXMFLOCALEDIR}");
@@ -548,11 +548,11 @@
#line 85 "cwebdir/comm-w2c.ch"
/*74:*/
-#line 1140 "cwebdir/common.w"
+#line 1139 "cwebdir/common.w"
-#line 461 "cwebdir/comm-w2c.ch"
+#line 460 "cwebdir/comm-w2c.ch"
make_xrefs= true;
-#line 1142 "cwebdir/common.w"
+#line 1141 "cwebdir/common.w"
/*:74*/
#line 86 "cwebdir/comm-w2c.ch"
@@ -559,12 +559,12 @@
#line 101 "cwebdir/common.w"
/*84:*/
-#line 601 "cwebdir/comm-w2c.ch"
+#line 600 "cwebdir/comm-w2c.ch"
scan_args();
if(program==ctangle){
if(check_for_change)/*88:*/
-#line 659 "cwebdir/comm-w2c.ch"
+#line 658 "cwebdir/comm-w2c.ch"
{
if((C_file= fopen(C_file_name,"a"))==NULL)
fatal(_("! Cannot open output file "),C_file_name);
@@ -581,7 +581,7 @@
}
/*:88*/
-#line 604 "cwebdir/comm-w2c.ch"
+#line 603 "cwebdir/comm-w2c.ch"
else if((C_file= fopen(C_file_name,"wb"))==NULL)
fatal(_("! Cannot open output file "),C_file_name);
@@ -589,7 +589,7 @@
}
else{
if(check_for_change)/*89:*/
-#line 674 "cwebdir/comm-w2c.ch"
+#line 673 "cwebdir/comm-w2c.ch"
{
if((tex_file= fopen(tex_file_name,"a"))==NULL)
fatal(_("! Cannot open output file "),tex_file_name);
@@ -606,14 +606,14 @@
}
/*:89*/
-#line 610 "cwebdir/comm-w2c.ch"
+#line 609 "cwebdir/comm-w2c.ch"
else if((tex_file= fopen(tex_file_name,"wb"))==NULL)
fatal(_("! Cannot open output file "),tex_file_name);
}
-#line 1286 "cwebdir/common.w"
+#line 1285 "cwebdir/common.w"
-#line 619 "cwebdir/comm-w2c.ch"
+#line 618 "cwebdir/comm-w2c.ch"
/*:84*/
#line 101 "cwebdir/common.w"
@@ -785,13 +785,13 @@
restart:
if(changing&&include_depth==change_depth)
/*38:*/
-#line 470 "cwebdir/common.w"
+#line 469 "cwebdir/common.w"
{
change_line++;
if(!input_ln(change_file)){
-#line 240 "cwebdir/comm-w2c.ch"
+#line 239 "cwebdir/comm-w2c.ch"
err_print(_("! Change file ended without @z"));
-#line 474 "cwebdir/common.w"
+#line 473 "cwebdir/common.w"
buffer[0]= '@';buffer[1]= 'z';limit= buffer+2;
}
@@ -807,9 +807,9 @@
if(xisupper(buffer[1]))buffer[1]= tolower((int)buffer[1]);
if(buffer[1]=='x'||buffer[1]=='y'){
loc= buffer+2;
-#line 246 "cwebdir/comm-w2c.ch"
+#line 245 "cwebdir/comm-w2c.ch"
err_print(_("! Where is the matching @z?"));
-#line 490 "cwebdir/common.w"
+#line 489 "cwebdir/common.w"
}
else if(buffer[1]=='z'){
@@ -824,7 +824,7 @@
if(!changing||include_depth> change_depth){
/*37:*/
-#line 453 "cwebdir/common.w"
+#line 452 "cwebdir/common.w"
{
cur_line++;
while(!input_ln(cur_file)){
@@ -898,9 +898,9 @@
cur_line= 0;print_where= true;
goto restart;
}
-#line 234 "cwebdir/comm-w2c.ch"
+#line 233 "cwebdir/comm-w2c.ch"
include_depth--;err_print(_("! Cannot open include file"));goto restart;
-#line 451 "cwebdir/common.w"
+#line 450 "cwebdir/common.w"
}
/*:36*/
@@ -912,7 +912,7 @@
#line 167 "cwebdir/comm-w2c.ch"
/*:35*//*39:*/
-#line 502 "cwebdir/common.w"
+#line 501 "cwebdir/common.w"
void
check_complete(void){
@@ -920,15 +920,15 @@
strncpy(buffer,change_buffer,(size_t)(change_limit-change_buffer+1));
limit= buffer+(ptrdiff_t)(change_limit-change_buffer);
changing= true;change_depth= include_depth;loc= buffer;
-#line 252 "cwebdir/comm-w2c.ch"
+#line 251 "cwebdir/comm-w2c.ch"
err_print(_("! Change file entry did not match"));
-#line 510 "cwebdir/common.w"
+#line 509 "cwebdir/common.w"
}
}
/*:39*//*40:*/
-#line 518 "cwebdir/common.w"
+#line 517 "cwebdir/common.w"
void
reset_input(void)
@@ -935,9 +935,9 @@
{
limit= buffer;loc= buffer+1;buffer[0]= ' ';
/*41:*/
-#line 533 "cwebdir/common.w"
+#line 532 "cwebdir/common.w"
-#line 262 "cwebdir/comm-w2c.ch"
+#line 261 "cwebdir/comm-w2c.ch"
if((found_filename= kpse_find_cweb(web_file_name))==NULL
||(web_file= fopen(found_filename,"r"))==NULL)
fatal(_("! Cannot open input file "),web_file_name);
@@ -948,11 +948,11 @@
((strncmp(found_filename,"./",2)==0)?2:0));
free(found_filename);
}else fatal(_("! Filename too long\n"),found_filename);
-#line 539 "cwebdir/common.w"
+#line 538 "cwebdir/common.w"
web_file_open= true;
-#line 278 "cwebdir/comm-w2c.ch"
+#line 277 "cwebdir/comm-w2c.ch"
if((found_filename= kpse_find_cweb(change_file_name))==NULL
||(change_file= fopen(found_filename,"r"))==NULL)
fatal(_("! Cannot open change file "),change_file_name);
@@ -963,10 +963,10 @@
((strncmp(found_filename,"./",2)==0)?2:0));
free(found_filename);
}else fatal(_("! Filename too long\n"),found_filename);
-#line 544 "cwebdir/common.w"
+#line 543 "cwebdir/common.w"
/*:41*/
-#line 523 "cwebdir/common.w"
+#line 522 "cwebdir/common.w"
include_depth= cur_line= change_line= 0;
change_depth= include_depth;
@@ -975,7 +975,7 @@
}
/*:40*//*48:*/
-#line 633 "cwebdir/common.w"
+#line 632 "cwebdir/common.w"
name_pointer
id_lookup(
@@ -990,7 +990,7 @@
if(last==NULL)for(last= first;*last!='\0';last++);
l= (size_t)(last-first);
/*49:*/
-#line 656 "cwebdir/common.w"
+#line 655 "cwebdir/common.w"
h= (int)((eight_bits)*i);
while(++i<last)h= (h+h+(int)((eight_bits)*i))%hash_size;
@@ -997,10 +997,10 @@
/*:49*/
-#line 646 "cwebdir/common.w"
+#line 645 "cwebdir/common.w"
/*50:*/
-#line 664 "cwebdir/common.w"
+#line 663 "cwebdir/common.w"
p= hash[h];
while(p&&!names_match(p,first,l,t))p= p->link;
@@ -1010,32 +1010,32 @@
}
/*:50*/
-#line 647 "cwebdir/common.w"
+#line 646 "cwebdir/common.w"
if(p==name_ptr)/*51:*/
-#line 675 "cwebdir/common.w"
+#line 674 "cwebdir/common.w"
{
-#line 300 "cwebdir/comm-w2c.ch"
+#line 299 "cwebdir/comm-w2c.ch"
if(byte_ptr+l> byte_mem_end)overflow(_("byte memory"));
if(name_ptr>=name_dir_end)overflow(_("name"));
-#line 678 "cwebdir/common.w"
+#line 677 "cwebdir/common.w"
strncpy(byte_ptr,first,l);
(++name_ptr)->byte_start= byte_ptr+= l;
-#line 307 "cwebdir/comm-w2c.ch"
+#line 306 "cwebdir/comm-w2c.ch"
if(program!=ctangle){
-#line 681 "cwebdir/common.w"
+#line 680 "cwebdir/common.w"
p->ilk= t;init_node(p);
}
}
/*:51*/
-#line 648 "cwebdir/common.w"
+#line 647 "cwebdir/common.w"
return p;
}
/*:48*//*52:*/
-#line 709 "cwebdir/common.w"
+#line 708 "cwebdir/common.w"
void
print_section_name(
@@ -1054,7 +1054,7 @@
}
/*:52*//*53:*/
-#line 726 "cwebdir/common.w"
+#line 725 "cwebdir/common.w"
void
sprint_section_name(
@@ -1074,7 +1074,7 @@
}
/*:53*//*54:*/
-#line 744 "cwebdir/common.w"
+#line 743 "cwebdir/common.w"
void
print_prefix_name(
@@ -1087,7 +1087,7 @@
}
/*:54*//*56:*/
-#line 770 "cwebdir/common.w"
+#line 769 "cwebdir/common.w"
static int web_strcmp(
char*j,
@@ -1105,7 +1105,7 @@
}
/*:56*//*57:*/
-#line 799 "cwebdir/common.w"
+#line 798 "cwebdir/common.w"
static name_pointer
add_section_name(
@@ -1118,10 +1118,10 @@
name_pointer p= name_ptr;
char*s= first_chunk(p);
size_t name_len= (size_t)(last-first+(int)ispref);
-#line 314 "cwebdir/comm-w2c.ch"
+#line 313 "cwebdir/comm-w2c.ch"
if(s+name_len> byte_mem_end)overflow(_("byte memory"));
if(name_ptr+1>=name_dir_end)overflow(_("name"));
-#line 813 "cwebdir/common.w"
+#line 812 "cwebdir/common.w"
(++name_ptr)->byte_start= byte_ptr= s+name_len;
if(ispref){
*(byte_ptr-1)= ' ';
@@ -1137,7 +1137,7 @@
}
/*:57*//*58:*/
-#line 827 "cwebdir/common.w"
+#line 826 "cwebdir/common.w"
static void
extend_section_name(
@@ -1149,16 +1149,16 @@
char*s;
name_pointer q= p+1;
size_t name_len= (size_t)(last-first+(int)ispref);
-#line 321 "cwebdir/comm-w2c.ch"
+#line 320 "cwebdir/comm-w2c.ch"
if(name_ptr>=name_dir_end)overflow(_("name"));
-#line 839 "cwebdir/common.w"
+#line 838 "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 327 "cwebdir/comm-w2c.ch"
+#line 326 "cwebdir/comm-w2c.ch"
if(s+name_len> byte_mem_end)overflow(_("byte memory"));
-#line 844 "cwebdir/common.w"
+#line 843 "cwebdir/common.w"
(++name_ptr)->byte_start= byte_ptr= s+name_len;
strncpy(s,first,name_len);
if(ispref)*(byte_ptr-1)= ' ';
@@ -1165,7 +1165,7 @@
}
/*:58*//*59:*/
-#line 855 "cwebdir/common.w"
+#line 854 "cwebdir/common.w"
name_pointer
section_lookup(
@@ -1180,7 +1180,7 @@
size_t name_len= (size_t)(last-first+1);
/*60:*/
-#line 879 "cwebdir/common.w"
+#line 878 "cwebdir/common.w"
while(p){
c= web_strcmp(first,name_len,first_chunk(p),prefix_length(p));
@@ -1190,14 +1190,14 @@
p= (c==less?p->llink:p->rlink);
}else{
if(r!=NULL){
-#line 333 "cwebdir/comm-w2c.ch"
+#line 332 "cwebdir/comm-w2c.ch"
fputs(_("\n! Ambiguous prefix: matches <"),stdout);
-#line 889 "cwebdir/common.w"
+#line 888 "cwebdir/common.w"
print_prefix_name(p);
-#line 339 "cwebdir/comm-w2c.ch"
+#line 338 "cwebdir/comm-w2c.ch"
fputs(_(">\n and <"),stdout);
-#line 892 "cwebdir/common.w"
+#line 891 "cwebdir/common.w"
print_prefix_name(r);
err_print(">");
return name_dir;
@@ -1211,27 +1211,27 @@
}
/*:60*/
-#line 869 "cwebdir/common.w"
+#line 868 "cwebdir/common.w"
/*61:*/
-#line 904 "cwebdir/common.w"
+#line 903 "cwebdir/common.w"
if(r==NULL)
return add_section_name(par,c,first,last+1,ispref);
/*:61*/
-#line 870 "cwebdir/common.w"
+#line 869 "cwebdir/common.w"
/*62:*/
-#line 912 "cwebdir/common.w"
+#line 911 "cwebdir/common.w"
switch(section_name_cmp(&first,name_len,r)){
case prefix:
if(!ispref){
-#line 345 "cwebdir/comm-w2c.ch"
+#line 344 "cwebdir/comm-w2c.ch"
fputs(_("\n! New name is a prefix of <"),stdout);
-#line 918 "cwebdir/common.w"
+#line 917 "cwebdir/common.w"
print_section_name(r);
err_print(">");
@@ -1243,22 +1243,22 @@
extend_section_name(r,first,last+1,ispref);
break;
case bad_extension:
-#line 351 "cwebdir/comm-w2c.ch"
+#line 350 "cwebdir/comm-w2c.ch"
fputs(_("\n! New name extends <"),stdout);
-#line 930 "cwebdir/common.w"
+#line 929 "cwebdir/common.w"
print_section_name(r);
err_print(">");
break;
default:
-#line 357 "cwebdir/comm-w2c.ch"
+#line 356 "cwebdir/comm-w2c.ch"
fputs(_("\n! Section name incompatible with <"),stdout);
-#line 936 "cwebdir/common.w"
+#line 935 "cwebdir/common.w"
print_prefix_name(r);
-#line 363 "cwebdir/comm-w2c.ch"
+#line 362 "cwebdir/comm-w2c.ch"
fputs(_(">,\n which abbreviates <"),stdout);
-#line 939 "cwebdir/common.w"
+#line 938 "cwebdir/common.w"
print_section_name(r);
err_print(">");
}
@@ -1265,12 +1265,12 @@
return r;
/*:62*/
-#line 871 "cwebdir/common.w"
+#line 870 "cwebdir/common.w"
}
/*:59*//*63:*/
-#line 960 "cwebdir/common.w"
+#line 959 "cwebdir/common.w"
static int section_name_cmp(
char**pfirst,
@@ -1304,7 +1304,7 @@
}
/*:63*//*66:*/
-#line 1014 "cwebdir/common.w"
+#line 1013 "cwebdir/common.w"
void
err_print(
@@ -1312,15 +1312,15 @@
{
*s=='!'?printf("\n%s",s):printf("%s",s);
if(web_file_open)/*67:*/
-#line 1033 "cwebdir/common.w"
+#line 1032 "cwebdir/common.w"
{char*k,*l;
if(changing&&include_depth==change_depth)
-#line 371 "cwebdir/comm-w2c.ch"
+#line 370 "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 1039 "cwebdir/common.w"
+#line 1038 "cwebdir/common.w"
l= (loc>=limit?limit:loc);
if(l> buffer){
for(k= buffer;k<l;k++)
@@ -1335,24 +1335,24 @@
}
/*:67*/
-#line 1020 "cwebdir/common.w"
+#line 1019 "cwebdir/common.w"
update_terminal;mark_error;
}
/*:66*//*68:*/
-#line 1066 "cwebdir/common.w"
+#line 1065 "cwebdir/common.w"
int wrap_up(void){
if(show_progress)new_line;
if(show_stats)
print_stats();
-#line 401 "cwebdir/comm-w2c.ch"
+#line 400 "cwebdir/comm-w2c.ch"
/*69:*/
-#line 1076 "cwebdir/common.w"
+#line 1075 "cwebdir/common.w"
switch(history){
-#line 427 "cwebdir/comm-w2c.ch"
+#line 426 "cwebdir/comm-w2c.ch"
case spotless:
if(show_happiness)puts(_("(No errors were found.)"));break;
case harmless_message:
@@ -1361,14 +1361,14 @@
puts(_("(Pardon me, but I think I spotted something wrong.)"));break;
case fatal_message:default:
puts(_("(That was a fatal error, my friend.)"));
-#line 1086 "cwebdir/common.w"
+#line 1085 "cwebdir/common.w"
}
/*:69*/
-#line 401 "cwebdir/comm-w2c.ch"
+#line 400 "cwebdir/comm-w2c.ch"
/*90:*/
-#line 692 "cwebdir/comm-w2c.ch"
+#line 691 "cwebdir/comm-w2c.ch"
if(C_file)fclose(C_file);
if(tex_file)fclose(tex_file);
@@ -1377,9 +1377,9 @@
remove(check_file_name);
/*:90*/
-#line 402 "cwebdir/comm-w2c.ch"
+#line 401 "cwebdir/comm-w2c.ch"
-#line 409 "cwebdir/comm-w2c.ch"
+#line 408 "cwebdir/comm-w2c.ch"
switch(history){
case spotless:return RETURN_OK;
case harmless_message:return RETURN_WARN;
@@ -1386,11 +1386,11 @@
case error_message:return RETURN_ERROR;
case fatal_message:default:return RETURN_FAIL;
}
-#line 1074 "cwebdir/common.w"
+#line 1073 "cwebdir/common.w"
}
/*:68*//*70:*/
-#line 1094 "cwebdir/common.w"
+#line 1093 "cwebdir/common.w"
void
fatal(
const char*s,const char*t)
@@ -1401,19 +1401,19 @@
}
/*:70*//*71:*/
-#line 1105 "cwebdir/common.w"
+#line 1104 "cwebdir/common.w"
void
overflow(
const char*t)
{
-#line 440 "cwebdir/comm-w2c.ch"
+#line 439 "cwebdir/comm-w2c.ch"
printf(_("\n! Sorry, %s capacity exceeded"),t);fatal("","");
-#line 1110 "cwebdir/common.w"
+#line 1109 "cwebdir/common.w"
}
/*:71*//*75:*/
-#line 1158 "cwebdir/common.w"
+#line 1157 "cwebdir/common.w"
static void
scan_args(void)
@@ -1424,29 +1424,29 @@
boolean found_web= false,found_change= false,found_out= false;
-#line 484 "cwebdir/comm-w2c.ch"
+#line 483 "cwebdir/comm-w2c.ch"
strcpy(change_file_name,"/dev/null");
#if defined DEV_NULL
strncpy(change_file_name,DEV_NULL,max_file_name_length-2);
change_file_name[max_file_name_length-2]= '\0';
#elif defined _DEV_NULL
-#line 489 "cwebdir/comm-w2c.ch"
+#line 488 "cwebdir/comm-w2c.ch"
strncpy(change_file_name,_DEV_NULL,max_file_name_length-2);
change_file_name[max_file_name_length-2]= '\0';
#endif
-#line 492 "cwebdir/comm-w2c.ch"
+#line 491 "cwebdir/comm-w2c.ch"
-#line 1169 "cwebdir/common.w"
+#line 1168 "cwebdir/common.w"
while(--argc> 0){
if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*80:*/
-#line 1246 "cwebdir/common.w"
+#line 1245 "cwebdir/common.w"
-#line 527 "cwebdir/comm-w2c.ch"
+#line 526 "cwebdir/comm-w2c.ch"
{
if(strcmp("-help",*argv)==0||strcmp("--help",*argv)==0)
/*97:*/
-#line 827 "cwebdir/comm-w2c.ch"
+#line 826 "cwebdir/comm-w2c.ch"
cb_usagehelp(program==ctangle?CTANGLEHELP:
program==cweave?CWEAVEHELP:CTWILLHELP);
@@ -1453,12 +1453,12 @@
/*:97*/
-#line 530 "cwebdir/comm-w2c.ch"
+#line 529 "cwebdir/comm-w2c.ch"
if(strcmp("-version",*argv)==0||strcmp("--version",*argv)==0)
/*100:*/
-#line 873 "cwebdir/comm-w2c.ch"
+#line 872 "cwebdir/comm-w2c.ch"
printversionandexit(cb_banner,
program==ctwill?"Donald E. Knuth":"Silvio Levy and Donald E. Knuth",
@@ -1466,7 +1466,7 @@
/*:100*/
-#line 533 "cwebdir/comm-w2c.ch"
+#line 532 "cwebdir/comm-w2c.ch"
if(strcmp("-verbose",*argv)==0||strcmp("--verbose",*argv)==0)
@@ -1480,15 +1480,15 @@
case'q':show_banner= show_progress= show_happiness= false;continue;
case'd':
if(sscanf(++dot_pos,"%u",&kpathsea_debug)!=1)/*81:*/
-#line 570 "cwebdir/comm-w2c.ch"
+#line 569 "cwebdir/comm-w2c.ch"
cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill");
-#line 1261 "cwebdir/common.w"
+#line 1260 "cwebdir/common.w"
-#line 578 "cwebdir/comm-w2c.ch"
+#line 577 "cwebdir/comm-w2c.ch"
/*:81*/
-#line 545 "cwebdir/comm-w2c.ch"
+#line 544 "cwebdir/comm-w2c.ch"
while(isdigit(*dot_pos))dot_pos++;
dot_pos--;
@@ -1499,15 +1499,15 @@
break;
}
}
-#line 1249 "cwebdir/common.w"
+#line 1248 "cwebdir/common.w"
-#line 570 "cwebdir/comm-w2c.ch"
+#line 569 "cwebdir/comm-w2c.ch"
/*:80*/
-#line 1170 "cwebdir/common.w"
+#line 1169 "cwebdir/common.w"
else{
s= name_pos= *argv;dot_pos= NULL;
-#line 501 "cwebdir/comm-w2c.ch"
+#line 500 "cwebdir/comm-w2c.ch"
while(*s)
if(*s=='.')dot_pos= s++;
else if(*s==DIR_SEPARATOR||*s==DEVICE_SEPARATOR||*s=='/')
@@ -1514,20 +1514,20 @@
dot_pos= NULL,name_pos= ++s;
else s++;
-#line 1177 "cwebdir/common.w"
+#line 1176 "cwebdir/common.w"
if(!found_web)/*77:*/
-#line 1196 "cwebdir/common.w"
+#line 1195 "cwebdir/common.w"
{
if(s-*argv> max_file_name_length-5)
/*82:*/
-#line 578 "cwebdir/comm-w2c.ch"
+#line 577 "cwebdir/comm-w2c.ch"
fatal(_("! Filename too long\n"),*argv);
-#line 1263 "cwebdir/common.w"
+#line 1262 "cwebdir/common.w"
/*:82*/
-#line 1199 "cwebdir/common.w"
+#line 1198 "cwebdir/common.w"
if(dot_pos==NULL)
sprintf(web_file_name,"%s.w",*argv);
@@ -1535,7 +1535,7 @@
strcpy(web_file_name,*argv);
*dot_pos= '\0';
}
-#line 1207 "cwebdir/common.w"
+#line 1206 "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);
@@ -1544,22 +1544,22 @@
}
/*:77*/
-#line 1178 "cwebdir/common.w"
+#line 1177 "cwebdir/common.w"
else if(!found_change)/*78:*/
-#line 1214 "cwebdir/common.w"
+#line 1213 "cwebdir/common.w"
{
if(strcmp(*argv,"-")!=0){
if(s-*argv> max_file_name_length-4)
/*82:*/
-#line 578 "cwebdir/comm-w2c.ch"
+#line 577 "cwebdir/comm-w2c.ch"
fatal(_("! Filename too long\n"),*argv);
-#line 1263 "cwebdir/common.w"
+#line 1262 "cwebdir/common.w"
/*:82*/
-#line 1218 "cwebdir/common.w"
+#line 1217 "cwebdir/common.w"
if(dot_pos==NULL)
sprintf(change_file_name,"%s.ch",*argv);
@@ -1569,21 +1569,21 @@
}
/*:78*/
-#line 1179 "cwebdir/common.w"
+#line 1178 "cwebdir/common.w"
else if(!found_out)/*79:*/
-#line 1226 "cwebdir/common.w"
+#line 1225 "cwebdir/common.w"
{
if(s-*argv> max_file_name_length-5)
/*82:*/
-#line 578 "cwebdir/comm-w2c.ch"
+#line 577 "cwebdir/comm-w2c.ch"
fatal(_("! Filename too long\n"),*argv);
-#line 1263 "cwebdir/common.w"
+#line 1262 "cwebdir/common.w"
/*:82*/
-#line 1229 "cwebdir/common.w"
+#line 1228 "cwebdir/common.w"
if(dot_pos==NULL){
sprintf(tex_file_name,"%s.tex",*argv);
@@ -1601,36 +1601,36 @@
}
/*:79*/
-#line 1180 "cwebdir/common.w"
+#line 1179 "cwebdir/common.w"
else/*81:*/
-#line 570 "cwebdir/comm-w2c.ch"
+#line 569 "cwebdir/comm-w2c.ch"
cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill");
-#line 1261 "cwebdir/common.w"
+#line 1260 "cwebdir/common.w"
-#line 578 "cwebdir/comm-w2c.ch"
+#line 577 "cwebdir/comm-w2c.ch"
/*:81*/
-#line 1181 "cwebdir/common.w"
+#line 1180 "cwebdir/common.w"
}
}
if(!found_web)/*81:*/
-#line 570 "cwebdir/comm-w2c.ch"
+#line 569 "cwebdir/comm-w2c.ch"
cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill");
-#line 1261 "cwebdir/common.w"
+#line 1260 "cwebdir/common.w"
-#line 578 "cwebdir/comm-w2c.ch"
+#line 577 "cwebdir/comm-w2c.ch"
/*:81*/
-#line 1184 "cwebdir/common.w"
+#line 1183 "cwebdir/common.w"
}
/*:75*//*99:*/
-#line 840 "cwebdir/comm-w2c.ch"
+#line 839 "cwebdir/comm-w2c.ch"
static void cb_usage(const_string str)
{
@@ -1662,7 +1662,7 @@
}
/*:99*//*101:*/
-#line 881 "cwebdir/comm-w2c.ch"
+#line 880 "cwebdir/comm-w2c.ch"
void cb_show_banner(void)
{
Modified: trunk/Build/source/texk/web2c/cwebdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ChangeLog 2023-07-27 23:43:01 UTC (rev 67748)
+++ trunk/Build/source/texk/web2c/cwebdir/ChangeLog 2023-07-28 14:25:33 UTC (rev 67749)
@@ -1,3 +1,14 @@
+2023-07-28 Andreas Scherer <https://ascherer.github.io>
+
+ * comm-mini.ch,
+ * comm-w2c.ch,
+ * common.bux,
+ * common.c,
+ * common.w,
+ * ctangle.c,
+ * ctangle.w,
+ * system.bux: Format 'common' with 'ctwill'.
+
2023-07-26 Andreas Scherer <https://ascherer.github.io>
* comm-bs.ch,
Modified: trunk/Build/source/texk/web2c/cwebdir/comm-mini.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/comm-mini.ch 2023-07-27 23:43:01 UTC (rev 67748)
+++ trunk/Build/source/texk/web2c/cwebdir/comm-mini.ch 2023-07-28 14:25:33 UTC (rev 67749)
@@ -1,9 +1,9 @@
Limbo.
@x
-\def\title{Common code for CTANGLE and CWEAVE (Version 4.9 [CWEBbin 2023])}
+\def\title{Common code for CTANGLE and CWEAVE (4.9 [\TeX~Live])}
@y
-\def\title{COMMON (Version 4.9 [CWEBbin 2023])}
+\def\title{COMMON (4.9 [\TeX~Live])}
\def\contentspagenumber{0}
@z
@@ -13,10 +13,20 @@
internationalization.
@y
internationalization.
- at -A@>
- at -S@>
+ at -a@>
+ at -s@>
+ at -HAVE_GETTEXT@>
@z
+Section 5.
+
+ at x
+@ Code related to the character set:
+ at y
+@ Code related to the character set:
+ at -c@>
+ at z
+
Section 6.
@x
@@ -40,11 +50,31 @@
@x
@ Code related to output:
@y
-@ Code related to output:
+ at r @ Code related to output:
@-a@>
@-b@>
@z
+Section 24.
+
+ at x
+@ @<Predecl...@>=@+static boolean input_ln(FILE *);
+ at y
+@ @<Predecl...@>=@+static boolean input_ln(FILE *);
+ at -input_ln@>
+@$input_ln {COMMON}23 \&{static} \&{boolean} (\,)@>
+ at z
+
+ẞection 28.
+
+ at x
+@ @<Predecl...@>=@+static void prime_the_change_buffer(void);
+ at y
+@ @<Predecl...@>=@+static void prime_the_change_buffer(void);
+ at -prime_the_change_buffer@>
+@$prime_the_change_buffer {COMMON}27 \&{static} \&{void} (\,)@>
+ at z
+
Section 32.
@x
@@ -54,6 +84,45 @@
@-b@>
@z
+Section 33.
+
+ at x
+@ @<Predecl...@>=@+static void check_change(void);
+ at y
+@ @<Predecl...@>=@+static void check_change(void);
+ at -check_change@>
+@$check_change {COMMON}32 \&{static} \&{void} (\,)@>
+ at z
+
+Section 36.
+
+ at x
+@ When an \.{@@i} line is found in the |cur_file|, we must temporarily
+ at y
+ at r @ When an \.{@@i} line is found in the |cur_file|, we must temporarily
+ at z
+
+Section 48.
+
+ at x
+id_lookup( /* looks up a string in the identifier table */
+ at y
+id_lookup( /* looks up a string in the identifier table */
+ at -h@>
+ at -id_lookup@>
+@$id_lookup {COMMON}48 \&{name\_pointer} (\,)@>
+ at z
+
+Section 49.
+
+ at x
+h=(int)((eight_bits)*i);
+ at y
+h=(int)((eight_bits)*i);
+@%
+@$h {COMMON}48 \&{int}@>
+ at z
+
Section 52.
@x
@@ -63,29 +132,118 @@
@d first_chunk(p) ((p)->byte_start+2)
@z
-Section 87.
+Section 54.
@x
-@^system dependencies@> @.CWEBINPUTS@>
+ *dest='\0';
+}
+
+@ @c
@y
-@^system dependencies@> @.CWEBINPUTS@>
- at -CWEBINPUTS@>
+ *dest='\0';
+}
+
+ at r @ @c
@z
-Section 88.
+Section 56.
@x
-@ @c
+static int web_strcmp( /* fuller comparison than |strcmp| */
@y
-@ @-CWEBINPUTS@>@c
+static int web_strcmp( /* fuller comparison than |strcmp| */
+ at -web_strcmp@>
+@$web_strcmp {COMMON}56 \&{static} \&{int} ${}(\,){}$@>
@z
-Section 89.
+Section 57.
@x
-needs a few extra variables.
+add_section_name( /* install a new node in the tree */
@y
-needs a few extra variables.
+add_section_name( /* install a new node in the tree */
+ at -add_section_name@>
+@$add_section_name {COMMON}57 \&{static} \&{name\_pointer} ${}(\,){}$@>
+ at z
+
+Section 59.
+
+ at x
+@ The |section_lookup| procedure is supposed to find a
+ at y
+ at r @ The |section_lookup| procedure is supposed to find a
+ at z
+
+ at x
+section_lookup( /* find or install section name in tree */
+ at y
+section_lookup( /* find or install section name in tree */
+ at -section_lookup@>
+@$section_lookup {COMMON}59 \&{name\_pointer} (\,)@>
+ at z
+
+Section 62.
+
+ at x
+@ Although error messages are given in anomalous cases, we do return the
+ at y
+ at r @ Although error messages are given in anomalous cases, we do return the
+ at z
+
+Section 64.
+
+ at x
+@ @<Predec...@>=@+static int section_name_cmp(char **,size_t,name_pointer);
+ at y
+@ @<Predec...@>=@+static int section_name_cmp(char **,size_t,name_pointer);
+ at -section_name_cmp@>
+@$section_name_cmp {COMMON}63 \&{static} \&{int} (\,)@>
+ at z
+
+Section 66.
+
+ at x
+err_print( /* prints `\..' and location of error message */
+ at y
+err_print( /* prints `\..' and location of error message */
+ at -err_print@>
+@$err_print {COMMON}66 \&{void} (\,)@>
+ at z
+
+Section 75.
+
+ at x
+systems the contents of the compile-time variable |DEV_NULL| (\TeX~Live) or
+ at y
+systems the contents of the compile-time variable |DEV_NULL| (\TeX~Live) or
+ at -DEV_NULL@>
+ at -_DEV_NULL@>
+ at z
+
+Section 76.
+
+ at x
+@ @<Pred...@>=@+static void scan_args(void);
+ at y
+@ @<Pred...@>=@+static void scan_args(void);
+ at -scan_args@>
+@$scan_args {COMMON}75 \&{static} \&{void} (\,)@>
+ at z
+
+Section 77.
+
+ at x
+@ We use all of |*argv| for the |web_file_name| if there is a |'.'| in it,
+ at y
+ at r @ We use all of |*argv| for the |web_file_name| if there is a |'.'| in it,
+ at z
+
+Section 87.
+
+ at x
+|bindtextdomain| argument string need a few extra variables.
+ at y
+|bindtextdomain| argument string need a few extra variables.
@-SEPARATORS@>
@z
@@ -95,13 +253,34 @@
@.cweb.mo@>
@y
@.cweb.mo@>
- at -A@>
- at -B@>
+ at -HAVE_GETTEXT@>
+ at -TEXMFLOCALEDIR@>
+ at -a@>
+ at -b@>
@z
Section 93.
@x
+ at d kpse_find_cweb(name) kpse_find_file(name,kpse_cweb_format,true)
+ at y
+ at d kpse_find_cweb(name) kpse_find_file(name,kpse_cweb_format,true)
+ at -name@>
+ at z
+
+Section 96.
+
+ at x
+#include "help.h" /* |@!CTANGLEHELP|, |@!CWEAVEHELP|, |@!CTWILLHELP| */
+ at y
+#include "help.h" /* |@!CTANGLEHELP|, |@!CWEAVEHELP|, |@!CTWILLHELP| */
+@$CTANGLEHELP "help.h" \zip@>
+@$CTWILLHELP "help.h" \zip@>
+@$CWEAVEHELP "help.h" \zip@>
+ at -CWEB@>
+ at z
+
+ at x
@** Index.
@y
@z
Modified: trunk/Build/source/texk/web2c/cwebdir/comm-w2c.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/comm-w2c.ch 2023-07-27 23:43:01 UTC (rev 67748)
+++ trunk/Build/source/texk/web2c/cwebdir/comm-w2c.ch 2023-07-28 14:25:33 UTC (rev 67749)
@@ -76,7 +76,7 @@
@<Initialize pointers@>@;
@y
@<Initialize pointers@>@;
- @<Set up |PROGNAME| feature and initialize the search path mechanism@>@;
+ @<Set up \.{PROGNAME} feature and initialize the search path mechanism@>@;
@z
@x
@@ -157,7 +157,7 @@
stop reading it and start reading from the named include file. The
\.{@@i} line should give a complete file name with or without
double quotes.
-If the environment variable \.{CWEBINPUTS} is set, or if the compiler flag
+If the environment variable |CWEBINPUTS| is set, or if the compiler flag
of the same name was defined at compile time,
\.{CWEB} will look for include files in the directory thus named, if
it cannot find them in the current directory.
@@ -206,7 +206,6 @@
@x
if ((kk=getenv("CWEBINPUTS"))!=NULL) {
- at qCWEBINPUTS@>
if ((l=strlen(kk))>max_file_name_length-2) too_long();
strcpy(temp_file_name,kk);
}
@@ -795,7 +794,7 @@
This allows different flavors of \.{CWEB} to have different search paths.
@.CWEBINPUTS@>
-@<Set up |PROGNAME| feature and initialize the search path mechanism@>=
+@<Set up \.{PROGNAME} feature and initialize the search path mechanism@>=
kpse_set_program_name(argv[0], "cweb");
@ When the files you expect are not found, the thing to do is to enable
Modified: trunk/Build/source/texk/web2c/cwebdir/common.bux
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/common.bux 2023-07-27 23:43:01 UTC (rev 67748)
+++ trunk/Build/source/texk/web2c/cwebdir/common.bux 2023-07-28 14:25:33 UTC (rev 67749)
@@ -1,12 +1,7 @@
-@$ctangle "common.h" \zip@>
-@$ctwill "common.h" \zip@>
-@$cweave "common.h" \zip@>
+@$ctangle {COMMON}2 \&{cweb}@>
+@$cweave {COMMON}2 \&{cweb}@>
+@$ctwill {COMMON}2 \&{cweb}@>
-@$HAVE_GETTEXT "common.h" \zip@>
-
-@$DEV_NULL {COMMON.W}75 macro@>
-@$_DEV_NULL {COMMON.W}75 macro@>
-
@$ac {CWEAVE.W}2 \&{int}@>
@$av {CWEAVE.W}2 \&{char} ${*}{*}$@>
@$main {CWEAVE.W}2 \&{int} (\,)@>
@@ -25,3 +20,12 @@
@$text_info {CTANGLE.W}20 \&{text} [\,]@>
@$equiv {CTANGLE.W}22 \\{equiv\_or\_xref}@>
+
+@$kpse_set_program_name "<kpathsea/progname.h>" \zip@>
+@$kpse_find_file "<kpathsea/tex-file.h>" \zip@>
+@$kpathsea_debug "<kpathsea/types.h>" \zip@>
+@$kpse_cweb_format "<kpathsea/types.h>" \zip@>
+@$kpse_program_name "<kpathsea/types.h>" \zip@>
+@$kpse_var_expand "<kpathsea/variable.h>" \zip@>
+@$printversionandexit "<lib/lib.h>" \zip@>
+@$versionstring "<lib/lib.h>" \zip@>
Modified: trunk/Build/source/texk/web2c/cwebdir/common.c
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/common.c 2023-07-27 23:43:01 UTC (rev 67748)
+++ trunk/Build/source/texk/web2c/cwebdir/common.c 2023-07-28 14:25:33 UTC (rev 67749)
@@ -277,7 +277,7 @@
static char*change_limit;
/*:26*//*42:*/
-#line 545 "common.w"
+#line 544 "common.w"
sixteen_bits section_count;
boolean changed_section[max_sections];
@@ -286,7 +286,7 @@
boolean print_where= false;
/*:42*//*43:*/
-#line 590 "common.w"
+#line 589 "common.w"
char byte_mem[max_bytes];
char*byte_mem_end= byte_mem+max_bytes-1;
@@ -294,13 +294,13 @@
name_pointer name_dir_end= name_dir+max_names-1;
/*:43*//*44:*/
-#line 601 "common.w"
+#line 600 "common.w"
char*byte_ptr;
name_pointer name_ptr;
/*:44*//*46:*/
-#line 621 "common.w"
+#line 620 "common.w"
name_pointer hash[hash_size];
hash_pointer hash_end= hash+hash_size-1;
@@ -307,12 +307,12 @@
hash_pointer h;
/*:46*//*65:*/
-#line 1004 "common.w"
+#line 1003 "common.w"
int history= spotless;
/*:65*//*73:*/
-#line 1127 "common.w"
+#line 1126 "common.w"
int argc;
char**argv;
@@ -323,7 +323,7 @@
boolean flags[128];
/*:73*//*83:*/
-#line 1268 "common.w"
+#line 1267 "common.w"
FILE*C_file;
FILE*tex_file;
@@ -382,7 +382,7 @@
static void check_change(void);
/*:33*//*55:*/
-#line 765 "common.w"
+#line 764 "common.w"
static int web_strcmp(char*,size_t,char*,size_t);
static name_pointer add_section_name(name_pointer,int,char*,char*,boolean);
@@ -389,11 +389,11 @@
static void extend_section_name(name_pointer,char*,char*,boolean);
/*:55*//*64:*/
-#line 992 "common.w"
+#line 991 "common.w"
static int section_name_cmp(char**,size_t,name_pointer);
/*:64*//*76:*/
-#line 1187 "common.w"
+#line 1186 "common.w"
static void scan_args(void);
/*:76*/
@@ -407,7 +407,7 @@
common_init(void)
{
/*45:*/
-#line 605 "common.w"
+#line 604 "common.w"
name_dir->byte_start= byte_ptr= byte_mem;
name_ptr= name_dir+1;
@@ -415,7 +415,7 @@
root= NULL;
/*:45*//*47:*/
-#line 628 "common.w"
+#line 627 "common.w"
for(h= hash;h<=hash_end;*h++= NULL);
@@ -423,7 +423,7 @@
#line 99 "common.w"
/*74:*/
-#line 1140 "common.w"
+#line 1139 "common.w"
show_banner= show_happiness= show_progress= make_xrefs= true;
@@ -431,7 +431,7 @@
#line 100 "common.w"
/*84:*/
-#line 1275 "common.w"
+#line 1274 "common.w"
scan_args();
if(program==ctangle){
@@ -599,7 +599,7 @@
restart:
if(changing&&include_depth==change_depth)
/*38:*/
-#line 470 "common.w"
+#line 469 "common.w"
{
change_line++;
if(!input_ln(change_file)){
@@ -634,7 +634,7 @@
if(!changing||include_depth> change_depth){
/*37:*/
-#line 453 "common.w"
+#line 452 "common.w"
{
cur_line++;
while(!input_ln(cur_file)){
@@ -695,7 +695,6 @@
goto restart;
}
if((kk= getenv("CWEBINPUTS"))!=NULL){
-
if((l= strlen(kk))> max_file_name_length-2)too_long();
strcpy(temp_file_name,kk);
}
@@ -704,10 +703,10 @@
if((l= strlen(CWEBINPUTS))> max_file_name_length-2)too_long();
strcpy(temp_file_name,CWEBINPUTS);
#else
-#line 436 "common.w"
+#line 435 "common.w"
l= 0;
#endif
-#line 438 "common.w"
+#line 437 "common.w"
}
if(l> 0){
if(k+l+2>=cur_file_name_end)too_long();
@@ -731,7 +730,7 @@
}
/*:35*//*39:*/
-#line 502 "common.w"
+#line 501 "common.w"
void
check_complete(void){
@@ -745,7 +744,7 @@
}
/*:39*//*40:*/
-#line 518 "common.w"
+#line 517 "common.w"
void
reset_input(void)
@@ -752,7 +751,7 @@
{
limit= buffer;loc= buffer+1;buffer[0]= ' ';
/*41:*/
-#line 533 "common.w"
+#line 532 "common.w"
if((web_file= fopen(web_file_name,"r"))==NULL){
strcpy(web_file_name,alt_web_file_name);
@@ -766,7 +765,7 @@
fatal("! Cannot open change file ",change_file_name);
/*:41*/
-#line 523 "common.w"
+#line 522 "common.w"
include_depth= cur_line= change_line= 0;
change_depth= include_depth;
@@ -775,7 +774,7 @@
}
/*:40*//*48:*/
-#line 633 "common.w"
+#line 632 "common.w"
name_pointer
id_lookup(
@@ -790,7 +789,7 @@
if(last==NULL)for(last= first;*last!='\0';last++);
l= (size_t)(last-first);
/*49:*/
-#line 656 "common.w"
+#line 655 "common.w"
h= (int)((eight_bits)*i);
while(++i<last)h= (h+h+(int)((eight_bits)*i))%hash_size;
@@ -797,10 +796,10 @@
/*:49*/
-#line 646 "common.w"
+#line 645 "common.w"
/*50:*/
-#line 664 "common.w"
+#line 663 "common.w"
p= hash[h];
while(p&&!names_match(p,first,l,t))p= p->link;
@@ -810,10 +809,10 @@
}
/*:50*/
-#line 647 "common.w"
+#line 646 "common.w"
if(p==name_ptr)/*51:*/
-#line 675 "common.w"
+#line 674 "common.w"
{
if(byte_ptr+l> byte_mem_end)overflow("byte memory");
if(name_ptr>=name_dir_end)overflow("name");
@@ -825,13 +824,13 @@
}
/*:51*/
-#line 648 "common.w"
+#line 647 "common.w"
return p;
}
/*:48*//*52:*/
-#line 709 "common.w"
+#line 708 "common.w"
void
print_section_name(
@@ -850,7 +849,7 @@
}
/*:52*//*53:*/
-#line 726 "common.w"
+#line 725 "common.w"
void
sprint_section_name(
@@ -870,7 +869,7 @@
}
/*:53*//*54:*/
-#line 744 "common.w"
+#line 743 "common.w"
void
print_prefix_name(
@@ -883,7 +882,7 @@
}
/*:54*//*56:*/
-#line 770 "common.w"
+#line 769 "common.w"
static int web_strcmp(
char*j,
@@ -901,7 +900,7 @@
}
/*:56*//*57:*/
-#line 799 "common.w"
+#line 798 "common.w"
static name_pointer
add_section_name(
@@ -931,7 +930,7 @@
}
/*:57*//*58:*/
-#line 827 "common.w"
+#line 826 "common.w"
static void
extend_section_name(
@@ -955,7 +954,7 @@
}
/*:58*//*59:*/
-#line 855 "common.w"
+#line 854 "common.w"
name_pointer
section_lookup(
@@ -970,7 +969,7 @@
size_t name_len= (size_t)(last-first+1);
/*60:*/
-#line 879 "common.w"
+#line 878 "common.w"
while(p){
c= web_strcmp(first,name_len,first_chunk(p),prefix_length(p));
@@ -997,19 +996,19 @@
}
/*:60*/
-#line 869 "common.w"
+#line 868 "common.w"
/*61:*/
-#line 904 "common.w"
+#line 903 "common.w"
if(r==NULL)
return add_section_name(par,c,first,last+1,ispref);
/*:61*/
-#line 870 "common.w"
+#line 869 "common.w"
/*62:*/
-#line 912 "common.w"
+#line 911 "common.w"
switch(section_name_cmp(&first,name_len,r)){
@@ -1043,12 +1042,12 @@
return r;
/*:62*/
-#line 871 "common.w"
+#line 870 "common.w"
}
/*:59*//*63:*/
-#line 960 "common.w"
+#line 959 "common.w"
static int section_name_cmp(
char**pfirst,
@@ -1082,7 +1081,7 @@
}
/*:63*//*66:*/
-#line 1014 "common.w"
+#line 1013 "common.w"
void
err_print(
@@ -1090,7 +1089,7 @@
{
*s=='!'?printf("\n%s",s):printf("%s",s);
if(web_file_open)/*67:*/
-#line 1033 "common.w"
+#line 1032 "common.w"
{char*k,*l;
if(changing&&include_depth==change_depth)
@@ -1111,13 +1110,13 @@
}
/*:67*/
-#line 1020 "common.w"
+#line 1019 "common.w"
update_terminal;mark_error;
}
/*:66*//*68:*/
-#line 1066 "common.w"
+#line 1065 "common.w"
int wrap_up(void){
if(show_progress)new_line;
@@ -1124,7 +1123,7 @@
if(show_stats)
print_stats();
/*69:*/
-#line 1076 "common.w"
+#line 1075 "common.w"
switch(history){
case spotless:
@@ -1138,7 +1137,7 @@
}
/*:69*/
-#line 1071 "common.w"
+#line 1070 "common.w"
if(history> harmless_message)return EXIT_FAILURE;
else return EXIT_SUCCESS;
@@ -1145,7 +1144,7 @@
}
/*:68*//*70:*/
-#line 1094 "common.w"
+#line 1093 "common.w"
void
fatal(
const char*s,const char*t)
@@ -1156,7 +1155,7 @@
}
/*:70*//*71:*/
-#line 1105 "common.w"
+#line 1104 "common.w"
void
overflow(
const char*t)
@@ -1166,7 +1165,7 @@
/*:71*//*75:*/
-#line 1158 "common.w"
+#line 1157 "common.w"
static void
scan_args(void)
@@ -1180,13 +1179,13 @@
strcpy(change_file_name,"/dev/null");
while(--argc> 0){
if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*80:*/
-#line 1246 "common.w"
+#line 1245 "common.w"
for(dot_pos= *argv+1;*dot_pos> '\0';dot_pos++)
flags[(eight_bits)*dot_pos]= flag_change;
/*:80*/
-#line 1170 "common.w"
+#line 1169 "common.w"
else{
s= name_pos= *argv;dot_pos= NULL;
@@ -1195,17 +1194,17 @@
else if(*s=='/')dot_pos= NULL,name_pos= ++s;
else s++;
if(!found_web)/*77:*/
-#line 1196 "common.w"
+#line 1195 "common.w"
{
if(s-*argv> max_file_name_length-5)
/*82:*/
-#line 1262 "common.w"
+#line 1261 "common.w"
fatal("! Filename too long\n",*argv);
/*:82*/
-#line 1199 "common.w"
+#line 1198 "common.w"
if(dot_pos==NULL)
sprintf(web_file_name,"%s.w",*argv);
@@ -1222,21 +1221,21 @@
}
/*:77*/
-#line 1178 "common.w"
+#line 1177 "common.w"
else if(!found_change)/*78:*/
-#line 1214 "common.w"
+#line 1213 "common.w"
{
if(strcmp(*argv,"-")!=0){
if(s-*argv> max_file_name_length-4)
/*82:*/
-#line 1262 "common.w"
+#line 1261 "common.w"
fatal("! Filename too long\n",*argv);
/*:82*/
-#line 1218 "common.w"
+#line 1217 "common.w"
if(dot_pos==NULL)
sprintf(change_file_name,"%s.ch",*argv);
@@ -1246,20 +1245,20 @@
}
/*:78*/
-#line 1179 "common.w"
+#line 1178 "common.w"
else if(!found_out)/*79:*/
-#line 1226 "common.w"
+#line 1225 "common.w"
{
if(s-*argv> max_file_name_length-5)
/*82:*/
-#line 1262 "common.w"
+#line 1261 "common.w"
fatal("! Filename too long\n",*argv);
/*:82*/
-#line 1229 "common.w"
+#line 1228 "common.w"
if(dot_pos==NULL){
sprintf(tex_file_name,"%s.tex",*argv);
@@ -1277,10 +1276,10 @@
}
/*:79*/
-#line 1180 "common.w"
+#line 1179 "common.w"
else/*81:*/
-#line 1250 "common.w"
+#line 1249 "common.w"
{
if(program==ctangle)
@@ -1294,12 +1293,12 @@
}
/*:81*/
-#line 1181 "common.w"
+#line 1180 "common.w"
}
}
if(!found_web)/*81:*/
-#line 1250 "common.w"
+#line 1249 "common.w"
{
if(program==ctangle)
@@ -1313,7 +1312,7 @@
}
/*:81*/
-#line 1184 "common.w"
+#line 1183 "common.w"
}
Modified: trunk/Build/source/texk/web2c/cwebdir/common.w
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/common.w 2023-07-27 23:43:01 UTC (rev 67748)
+++ trunk/Build/source/texk/web2c/cwebdir/common.w 2023-07-28 14:25:33 UTC (rev 67749)
@@ -394,7 +394,7 @@
stop reading it and start reading from the named include file. The
\.{@@i} line should give a complete file name with or without
double quotes.
-If the environment variable \.{CWEBINPUTS} is set, or if the compiler flag
+If the environment variable |CWEBINPUTS| is set, or if the compiler flag
of the same name was defined at compile time,
\.{CWEB} will look for include files in the directory thus named, if
it cannot find them in the current directory.
@@ -424,7 +424,6 @@
goto restart; /* success */
}
if ((kk=getenv("CWEBINPUTS"))!=NULL) {
- at qCWEBINPUTS@>
if ((l=strlen(kk))>max_file_name_length-2) too_long();
strcpy(temp_file_name,kk);
}
Modified: trunk/Build/source/texk/web2c/cwebdir/ctangle.c
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctangle.c 2023-07-27 23:43:01 UTC (rev 67748)
+++ trunk/Build/source/texk/web2c/cwebdir/ctangle.c 2023-07-28 14:25:33 UTC (rev 67749)
@@ -15,7 +15,7 @@
/*:5*/
#line 67 "ctangle.w"
-#define banner "This is CTANGLE (Version 4.9)" \
+#define banner "This is CTANGLE (Version 4.9win32)" \
#define ctangle false
#define cweave true \
@@ -126,11 +126,11 @@
#define verbatim 4 \
#define max_files 256
+#define macro_end (cur_text+1) ->tok_start \
+
#define C_printf(c,a) fprintf(C_file,c,a)
#define C_putc(c) putc((int) (c) ,C_file) \
-#define macro_end (cur_text+1) ->tok_start \
-
#define translit_length 10 \
#define ignore 00
@@ -527,11 +527,13 @@
/*:2*//*24:*/
#line 155 "ctangle.w"
-boolean names_match(
+#line 19 "ctang-w32.ch"
+boolean __cdecl names_match(
name_pointer p,
const char*first,
size_t l,
eight_bits t)
+#line 161 "ctangle.w"
{(void)t;
return length(p)==l&&strncmp(first,p->byte_start,l)==0;
}
@@ -539,6 +541,7 @@
/*:24*//*25:*/
#line 168 "ctangle.w"
+#line 34 "ctang-w32.ch"
void
init_node(
name_pointer node)
@@ -545,6 +548,7 @@
{
node->equiv= (void*)text_info;
}
+#line 175 "ctangle.w"
/*:25*//*29:*/
#line 232 "ctangle.w"
Modified: trunk/Build/source/texk/web2c/cwebdir/ctangle.w
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctangle.w 2023-07-27 23:43:01 UTC (rev 67748)
+++ trunk/Build/source/texk/web2c/cwebdir/ctangle.w 2023-07-28 14:25:33 UTC (rev 67749)
@@ -583,10 +583,10 @@
static void output_defs(void);@/
static void out_char(eight_bits);
-@ @d C_printf(c,a) fprintf(C_file,c,a)
+@ @d macro_end (cur_text+1)->tok_start /* end of |macro| replacement text */
+@#
+ at d C_printf(c,a) fprintf(C_file,c,a)
@d C_putc(c) putc((int)(c),C_file) /* isn't \CEE/ wonderfully consistent? */
-@#
- at d macro_end (cur_text+1)->tok_start /* end of |macro| replacement text */
@c
static void
Modified: trunk/Build/source/texk/web2c/cwebdir/system.bux
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/system.bux 2023-07-27 23:43:01 UTC (rev 67748)
+++ trunk/Build/source/texk/web2c/cwebdir/system.bux 2023-07-28 14:25:33 UTC (rev 67749)
@@ -26,6 +26,7 @@
@$puts "<stdio.h>" \zip@>
@$rename "<stdio.h>" \zip@>
@$remove "<stdio.h>" \zip@>
+@$sscanf "<stdio.h>" \zip@>
@$sprintf "<stdio.h>" \zip@>
@$stderr "<stdio.h>" \zip@>
@$stdin "<stdio.h>" \zip@>
More information about the tex-live-commits
mailing list.