diff options
author | Karl Berry <karl@freefriends.org> | 2017-01-28 23:54:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-01-28 23:54:14 +0000 |
commit | 8db02857a7a71eb67ca99293eb2bc658fa4447a2 (patch) | |
tree | b125bc4142ffef9d30a7317fa06fef3212d3a40c /Build/source | |
parent | 391207ac22fa195cb8f5dffb01338323caf51f24 (diff) |
cweb 3.64ai
git-svn-id: svn://tug.org/texlive/trunk@43075 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r-- | Build/source/texk/web2c/cwebboot.cin | 128 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebboot.hin | 20 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/ChangeLog | 20 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/Makefile | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/README | 8 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/comm-w2c.ch | 3 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/common.c | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/common.h | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/common.w | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/ctang-bs.ch | 8 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/ctang-w2c.ch | 3 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/ctangle.w | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/cweav-bs.ch | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/cweav-w2c.ch | 11 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/cweave.w | 13 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/cweb.el | 3 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/cwebmac.tex | 18 | ||||
-rw-r--r-- | Build/source/texk/web2c/cwebdir/cwebman.tex | 11 |
18 files changed, 148 insertions, 114 deletions
diff --git a/Build/source/texk/web2c/cwebboot.cin b/Build/source/texk/web2c/cwebboot.cin index 3f6232421a3..2e9be01a814 100644 --- a/Build/source/texk/web2c/cwebboot.cin +++ b/Build/source/texk/web2c/cwebboot.cin @@ -4,7 +4,7 @@ /*5:*/ #line 102 "cwebdir/common.w" -#line 74 "cwebdir/comm-w2c.ch" +#line 73 "cwebdir/comm-w2c.ch" #define CWEB #include "cpascal.h" #include <ctype.h> @@ -18,7 +18,7 @@ /*:8*//*22:*/ #line 471 "cwebdir/common.w" -#line 213 "cwebdir/comm-w2c.ch" +#line 212 "cwebdir/comm-w2c.ch" #include <kpathsea/kpathsea.h> #include <stdlib.h> #include "help.h" @@ -46,7 +46,7 @@ #define minus_gt_ast 027 \ #define buf_size 1000 -#define longest_name 1000 +#define longest_name 10000 #define long_buf_size (buf_size+longest_name) #define xisspace(c) (isspace((unsigned char) c) &&((unsigned char) c<0200) ) #define xisupper(c) (isupper((unsigned char) c) &&((unsigned char) c<0200) ) \ @@ -226,7 +226,7 @@ name_pointer hash[hash_size]; hash_pointer hash_end= hash+hash_size-1; hash_pointer h; -#line 345 "cwebdir/comm-w2c.ch" +#line 344 "cwebdir/comm-w2c.ch" /*:34*//*58:*/ #line 1082 "cwebdir/common.w" @@ -250,7 +250,7 @@ FILE*C_file; FILE*tex_file; FILE*idx_file; FILE*scn_file; -#line 731 "cwebdir/comm-w2c.ch" +#line 730 "cwebdir/comm-w2c.ch" FILE*active_file; char*found_filename; #line 1376 "cwebdir/common.w" @@ -271,24 +271,24 @@ char*change_limit; /*:11*/ #line 62 "cwebdir/common.w" -#line 38 "cwebdir/comm-w2c.ch" +#line 37 "cwebdir/comm-w2c.ch" #include "cwebboot.h" /*55:*/ #line 1017 "cwebdir/common.w" -#line 519 "cwebdir/comm-w2c.ch" +#line 518 "cwebdir/comm-w2c.ch" static int section_name_cmp(char**,int,name_pointer); #line 1019 "cwebdir/common.w" /*:55*//*71:*/ #line 1251 "cwebdir/common.w" -#line 648 "cwebdir/comm-w2c.ch" +#line 647 "cwebdir/comm-w2c.ch" static void scan_args(void); #line 1253 "cwebdir/common.w" /*:71*/ -#line 39 "cwebdir/comm-w2c.ch" +#line 38 "cwebdir/comm-w2c.ch" #line 64 "cwebdir/common.w" @@ -296,11 +296,11 @@ static void scan_args(void); #line 89 "cwebdir/common.w" void -#line 59 "cwebdir/comm-w2c.ch" +#line 58 "cwebdir/comm-w2c.ch" common_init(void) #line 92 "cwebdir/common.w" { -#line 65 "cwebdir/comm-w2c.ch" +#line 64 "cwebdir/comm-w2c.ch" /*32:*/ #line 621 "cwebdir/common.w" @@ -319,22 +319,22 @@ for(h= hash;h<=hash_end;*h++= NULL); root= NULL; /*:43*/ -#line 65 "cwebdir/comm-w2c.ch" +#line 64 "cwebdir/comm-w2c.ch" ; /*24:*/ -#line 248 "cwebdir/comm-w2c.ch" +#line 247 "cwebdir/comm-w2c.ch" kpse_set_program_name(argv[0],"cweb"); #line 473 "cwebdir/common.w" /*:24*/ -#line 66 "cwebdir/comm-w2c.ch" +#line 65 "cwebdir/comm-w2c.ch" ; #line 94 "cwebdir/common.w" /*70:*/ #line 1233 "cwebdir/common.w" -#line 640 "cwebdir/comm-w2c.ch" +#line 639 "cwebdir/comm-w2c.ch" show_banner= show_happiness= show_progress= 1; #line 1235 "cwebdir/common.w" @@ -346,14 +346,14 @@ show_banner= show_happiness= show_progress= 1; scan_args(); if(program==ctangle){ -#line 740 "cwebdir/comm-w2c.ch" +#line 739 "cwebdir/comm-w2c.ch" if((C_file= fopen(C_file_name,"wb"))==NULL) #line 1381 "cwebdir/common.w" fatal("! Cannot open output file ",C_file_name); } else{ -#line 746 "cwebdir/comm-w2c.ch" +#line 745 "cwebdir/comm-w2c.ch" if((tex_file= fopen(tex_file_name,"wb"))==NULL) #line 1386 "cwebdir/common.w" fatal("! Cannot open output file ",tex_file_name); @@ -367,7 +367,7 @@ fatal("! Cannot open output file ",tex_file_name); /*:4*//*9:*/ #line 172 "cwebdir/common.w" -#line 101 "cwebdir/comm-w2c.ch" +#line 100 "cwebdir/comm-w2c.ch" int input_ln(FILE*fp) #line 175 "cwebdir/common.w" { @@ -376,7 +376,7 @@ register char*k; if(feof(fp))return(0); limit= k= buffer; while(k<=buffer_end&&(c= getc(fp))!=EOF&&c!='\n') -#line 107 "cwebdir/comm-w2c.ch" +#line 106 "cwebdir/comm-w2c.ch" if((*(k++)= c)!=' '&&c!='\r')limit= k; #line 182 "cwebdir/common.w" if(k> buffer_end) @@ -392,7 +392,7 @@ return(1); /*:9*//*12:*/ #line 251 "cwebdir/common.w" -#line 129 "cwebdir/comm-w2c.ch" +#line 128 "cwebdir/comm-w2c.ch" static void prime_the_change_buffer(void) #line 254 "cwebdir/common.w" @@ -406,7 +406,7 @@ change_line++; if(!input_ln(change_file))return; if(limit<buffer+2)continue; if(buffer[0]!='@')continue; -#line 136 "cwebdir/comm-w2c.ch" +#line 135 "cwebdir/comm-w2c.ch" if(xisupper(buffer[1]))buffer[1]= tolower((unsigned char)buffer[1]); #line 272 "cwebdir/common.w" if(buffer[1]=='x')break; @@ -451,7 +451,7 @@ strncpy(change_buffer,buffer,limit-buffer+1); /*:12*//*16:*/ #line 320 "cwebdir/common.w" -#line 145 "cwebdir/comm-w2c.ch" +#line 144 "cwebdir/comm-w2c.ch" static void check_change(void) #line 323 "cwebdir/common.w" @@ -472,7 +472,7 @@ change_limit= change_buffer;changing= 0; return; } if(limit> buffer+1&&buffer[0]=='@'){ -#line 152 "cwebdir/comm-w2c.ch" +#line 151 "cwebdir/comm-w2c.ch" char xyz_code= xisupper(buffer[1])?tolower((unsigned char)buffer[1]):buffer[1]; #line 341 "cwebdir/common.w" /*17:*/ @@ -525,7 +525,7 @@ if(lines_dont_match)n++; #line 378 "cwebdir/common.w" void -#line 160 "cwebdir/comm-w2c.ch" +#line 159 "cwebdir/comm-w2c.ch" reset_input(void) #line 381 "cwebdir/common.w" { @@ -533,7 +533,7 @@ limit= buffer;loc= buffer+1;buffer[0]= ' '; /*19:*/ #line 393 "cwebdir/common.w" -#line 172 "cwebdir/comm-w2c.ch" +#line 171 "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); @@ -545,7 +545,7 @@ free(found_filename); web_file_open= 1; -#line 185 "cwebdir/comm-w2c.ch" +#line 184 "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); @@ -567,7 +567,7 @@ limit= buffer;loc= buffer+1;buffer[0]= ' ';input_has_ended= 0; /*:18*//*21:*/ #line 426 "cwebdir/common.w" -#line 205 "cwebdir/comm-w2c.ch" +#line 204 "cwebdir/comm-w2c.ch" int get_line(void) #line 428 "cwebdir/common.w" { @@ -591,7 +591,7 @@ changed_section[section_count]= 1;change_pending= 0; } *limit= ' '; if(buffer[0]=='@'){ -#line 312 "cwebdir/comm-w2c.ch" +#line 311 "cwebdir/comm-w2c.ch" if(xisupper(buffer[1]))buffer[1]= tolower((unsigned char)buffer[1]); #line 554 "cwebdir/common.w" if(buffer[1]=='x'||buffer[1]=='y'){ @@ -653,7 +653,7 @@ include_depth++; /*25:*/ #line 474 "cwebdir/common.w" { -#line 261 "cwebdir/comm-w2c.ch" +#line 260 "cwebdir/comm-w2c.ch" char*cur_file_name_end= cur_file_name+max_file_name_length-1; char*k= cur_file_name; #line 479 "cwebdir/common.w" @@ -667,7 +667,7 @@ while(*loc!=' '&&*loc!='\t'&&*loc!='"'&&k<=cur_file_name_end)*k++= *loc++; if(k> cur_file_name_end)too_long(); *k= '\0'; -#line 268 "cwebdir/comm-w2c.ch" +#line 267 "cwebdir/comm-w2c.ch" if((found_filename= kpse_find_cweb(cur_file_name))!=NULL&& (cur_file= fopen(found_filename,"r"))!=NULL){ @@ -694,7 +694,7 @@ return 1; #line 569 "cwebdir/common.w" void -#line 318 "cwebdir/comm-w2c.ch" +#line 317 "cwebdir/comm-w2c.ch" check_complete(void){ #line 572 "cwebdir/common.w" if(change_limit!=change_buffer){ @@ -710,14 +710,14 @@ err_print("! Change file entry did not match"); #line 660 "cwebdir/common.w" name_pointer -#line 357 "cwebdir/comm-w2c.ch" +#line 356 "cwebdir/comm-w2c.ch" id_lookup(const char*first,const char*last,char t) #line 666 "cwebdir/common.w" { -#line 364 "cwebdir/comm-w2c.ch" +#line 363 "cwebdir/comm-w2c.ch" const char*i= first; -#line 370 "cwebdir/comm-w2c.ch" +#line 369 "cwebdir/comm-w2c.ch" int h; #line 669 "cwebdir/common.w" int l; @@ -727,7 +727,7 @@ l= last-first; /*38:*/ #line 683 "cwebdir/common.w" -#line 379 "cwebdir/comm-w2c.ch" +#line 378 "cwebdir/comm-w2c.ch" h= (unsigned char)*i; while(++i<last)h= (h+h+(int)((unsigned char)*i))%hash_size; #line 686 "cwebdir/common.w" @@ -739,13 +739,13 @@ while(++i<last)h= (h+h+(int)((unsigned char)*i))%hash_size; /*39:*/ #line 691 "cwebdir/common.w" -#line 388 "cwebdir/comm-w2c.ch" +#line 387 "cwebdir/comm-w2c.ch" p= hash[h]; #line 693 "cwebdir/common.w" while(p&&!names_match(p,first,l,t))p= p->link; if(p==NULL){ p= name_ptr; -#line 394 "cwebdir/comm-w2c.ch" +#line 393 "cwebdir/comm-w2c.ch" p->link= hash[h];hash[h]= p; #line 697 "cwebdir/common.w" } @@ -773,7 +773,7 @@ return(p); #line 764 "cwebdir/common.w" void -#line 413 "cwebdir/comm-w2c.ch" +#line 412 "cwebdir/comm-w2c.ch" print_section_name(name_pointer p) #line 768 "cwebdir/common.w" { @@ -795,7 +795,7 @@ if(q)term_write("...",3); #line 783 "cwebdir/common.w" void -#line 423 "cwebdir/comm-w2c.ch" +#line 422 "cwebdir/comm-w2c.ch" sprint_section_name(char*dest,name_pointer p) #line 788 "cwebdir/common.w" { @@ -817,7 +817,7 @@ s= p->byte_start; /*:45*//*46:*/ #line 804 "cwebdir/common.w" -#line 433 "cwebdir/comm-w2c.ch" +#line 432 "cwebdir/comm-w2c.ch" static void print_prefix_name(name_pointer p) #line 808 "cwebdir/common.w" @@ -831,13 +831,13 @@ if(s+l<(p+1)->byte_start)term_write("...",3); /*:46*//*47:*/ #line 825 "cwebdir/common.w" -#line 444 "cwebdir/comm-w2c.ch" +#line 443 "cwebdir/comm-w2c.ch" static int web_strcmp(char*j,int j_len,char*k,int k_len) #line 829 "cwebdir/common.w" { -#line 456 "cwebdir/comm-w2c.ch" +#line 455 "cwebdir/comm-w2c.ch" char*j1= j+j_len,*k1= k+k_len; while(k<k1&&j<j1&&*j==*k)k++,j++; if(k==k1)if(j==j1)return equal; @@ -851,7 +851,7 @@ else return greater; /*:47*//*49:*/ #line 855 "cwebdir/common.w" -#line 484 "cwebdir/comm-w2c.ch" +#line 483 "cwebdir/comm-w2c.ch" static name_pointer add_section_name(name_pointer par,int c,char*first,char*last, int ispref) @@ -880,7 +880,7 @@ return par==NULL?(root= p):c==less?(par->llink= p):(par->rlink= p); /*:49*//*50:*/ #line 884 "cwebdir/common.w" -#line 499 "cwebdir/comm-w2c.ch" +#line 498 "cwebdir/comm-w2c.ch" static void extend_section_name(name_pointer p,char*first,char*last,int ispref) #line 891 "cwebdir/common.w" @@ -903,7 +903,7 @@ if(ispref)*(byte_ptr-1)= ' '; #line 912 "cwebdir/common.w" name_pointer -#line 510 "cwebdir/comm-w2c.ch" +#line 509 "cwebdir/comm-w2c.ch" section_lookup(char*first,char*last,int ispref) #line 917 "cwebdir/common.w" @@ -996,7 +996,7 @@ return r; /*:51*//*56:*/ #line 1020 "cwebdir/common.w" -#line 530 "cwebdir/comm-w2c.ch" +#line 529 "cwebdir/comm-w2c.ch" static int section_name_cmp(char**pfirst,int len,name_pointer r) #line 1025 "cwebdir/common.w" @@ -1031,7 +1031,7 @@ default:return c; #line 1095 "cwebdir/common.w" void -#line 550 "cwebdir/comm-w2c.ch" +#line 549 "cwebdir/comm-w2c.ch" err_print(const char*s) #line 1099 "cwebdir/common.w" { @@ -1066,7 +1066,7 @@ update_terminal;mark_error; /*:60*//*63:*/ #line 1150 "cwebdir/common.w" -#line 570 "cwebdir/comm-w2c.ch" +#line 569 "cwebdir/comm-w2c.ch" int wrap_up(void){ #line 1152 "cwebdir/common.w" putchar('\n'); @@ -1094,7 +1094,7 @@ else return(0); /*:63*//*66:*/ #line 1179 "cwebdir/common.w" void -#line 590 "cwebdir/comm-w2c.ch" +#line 589 "cwebdir/comm-w2c.ch" fatal(const char*s,const char*t) #line 1182 "cwebdir/common.w" { @@ -1106,7 +1106,7 @@ history= fatal_message;exit(wrap_up()); /*:66*//*67:*/ #line 1190 "cwebdir/common.w" void -#line 599 "cwebdir/comm-w2c.ch" +#line 598 "cwebdir/comm-w2c.ch" overflow(const char*t) #line 1193 "cwebdir/common.w" { @@ -1117,7 +1117,7 @@ printf("\n! Sorry, %s capacity exceeded",t);fatal("",""); /*:67*//*72:*/ #line 1254 "cwebdir/common.w" -#line 658 "cwebdir/comm-w2c.ch" +#line 657 "cwebdir/comm-w2c.ch" static void scan_args(void) #line 1257 "cwebdir/common.w" @@ -1131,40 +1131,40 @@ boolean flag_change; while(--argc> 0){ if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*76:*/ -#line 683 "cwebdir/comm-w2c.ch" +#line 682 "cwebdir/comm-w2c.ch" { if(strcmp("-help",*argv)==0||strcmp("--help",*argv)==0) /*86:*/ -#line 798 "cwebdir/comm-w2c.ch" +#line 797 "cwebdir/comm-w2c.ch" usagehelp(program==ctangle?CTANGLEHELP:CWEAVEHELP,NULL); /*:86*/ -#line 686 "cwebdir/comm-w2c.ch" +#line 685 "cwebdir/comm-w2c.ch" ; if(strcmp("-version",*argv)==0||strcmp("--version",*argv)==0) /*87:*/ -#line 807 "cwebdir/comm-w2c.ch" +#line 806 "cwebdir/comm-w2c.ch" printversionandexit((program==ctangle?ctangle_banner:cweave_banner), "Silvio Levy and Donald E. Knuth",NULL,NULL); /*:87*/ -#line 688 "cwebdir/comm-w2c.ch" +#line 687 "cwebdir/comm-w2c.ch" ; #line 1346 "cwebdir/common.w" if(**argv=='-')flag_change= 0; -#line 694 "cwebdir/comm-w2c.ch" +#line 693 "cwebdir/comm-w2c.ch" else flag_change= 1; if(*(*argv+1)=='d') if(sscanf(*argv+2,"%u",&kpathsea_debug)!=1)/*77:*/ #line 1352 "cwebdir/common.w" { -#line 717 "cwebdir/comm-w2c.ch" +#line 716 "cwebdir/comm-w2c.ch" if(program==ctangle){ fprintf(stderr,"ctangle: Need one to three file arguments.\n"); usage("ctangle"); @@ -1176,11 +1176,11 @@ usage("cweave"); } /*:77*/ -#line 696 "cwebdir/comm-w2c.ch" +#line 695 "cwebdir/comm-w2c.ch" ; #line 1348 "cwebdir/common.w" for(dot_pos= *argv+1;*dot_pos> '\0';dot_pos++) -#line 702 "cwebdir/comm-w2c.ch" +#line 701 "cwebdir/comm-w2c.ch" flags[(unsigned char)*dot_pos]= flag_change; #line 1350 "cwebdir/common.w" } @@ -1280,7 +1280,7 @@ sprintf(scn_file_name,"%s.scn",*argv); found_out= 1; } -#line 683 "cwebdir/comm-w2c.ch" +#line 682 "cwebdir/comm-w2c.ch" /*:75*/ #line 1277 "cwebdir/common.w" @@ -1288,7 +1288,7 @@ else/*77:*/ #line 1352 "cwebdir/common.w" { -#line 717 "cwebdir/comm-w2c.ch" +#line 716 "cwebdir/comm-w2c.ch" if(program==ctangle){ fprintf(stderr,"ctangle: Need one to three file arguments.\n"); usage("ctangle"); @@ -1308,7 +1308,7 @@ if(!found_web)/*77:*/ #line 1352 "cwebdir/common.w" { -#line 717 "cwebdir/comm-w2c.ch" +#line 716 "cwebdir/comm-w2c.ch" if(program==ctangle){ fprintf(stderr,"ctangle: Need one to three file arguments.\n"); usage("ctangle"); @@ -1322,7 +1322,7 @@ usage("cweave"); /*:77*/ #line 1281 "cwebdir/common.w" ; -#line 668 "cwebdir/comm-w2c.ch" +#line 667 "cwebdir/comm-w2c.ch" if(found_change<=0)strcpy(change_file_name,DEV_NULL); #line 1283 "cwebdir/common.w" } diff --git a/Build/source/texk/web2c/cwebboot.hin b/Build/source/texk/web2c/cwebboot.hin index a8a03287963..9028733d312 100644 --- a/Build/source/texk/web2c/cwebboot.hin +++ b/Build/source/texk/web2c/cwebboot.hin @@ -1,49 +1,49 @@ /*84:*/ -#line 787 "cwebdir/comm-w2c.ch" +#line 786 "cwebdir/comm-w2c.ch" /* Prototypes for functions, either * declared in common.w and used in ctangle.w and cweave.w, or * used in common.w and declared in ctangle.w and cweave.w. */ /*35:*/ -#line 345 "cwebdir/comm-w2c.ch" +#line 344 "cwebdir/comm-w2c.ch" extern int names_match(name_pointer,const char*,int,char); #line 652 "cwebdir/common.w" /*:35*//*40:*/ -#line 403 "cwebdir/comm-w2c.ch" +#line 402 "cwebdir/comm-w2c.ch" extern void init_p(name_pointer p,char t); #line 705 "cwebdir/common.w" /*:40*//*48:*/ -#line 469 "cwebdir/comm-w2c.ch" +#line 468 "cwebdir/comm-w2c.ch" extern void init_node(name_pointer node); #line 854 "cwebdir/common.w" /*:48*//*59:*/ -#line 540 "cwebdir/comm-w2c.ch" +#line 539 "cwebdir/comm-w2c.ch" extern void err_print(const char*); #line 1094 "cwebdir/common.w" /*:59*//*62:*/ -#line 560 "cwebdir/comm-w2c.ch" +#line 559 "cwebdir/comm-w2c.ch" extern int wrap_up(void); extern void print_stats(void); #line 1143 "cwebdir/common.w" /*:62*//*65:*/ -#line 579 "cwebdir/comm-w2c.ch" +#line 578 "cwebdir/comm-w2c.ch" extern void fatal(const char*,const char*); extern void overflow(const char*); #line 1175 "cwebdir/common.w" /*:65*//*83:*/ -#line 768 "cwebdir/comm-w2c.ch" +#line 767 "cwebdir/comm-w2c.ch" extern void common_init(void); extern int input_ln(FILE*fp); @@ -56,9 +56,9 @@ extern void sprint_section_name(char*dest,name_pointer p); extern name_pointer section_lookup(char*first,char*last,int ispref); #line 1417 "cwebdir/common.w" -#line 783 "cwebdir/comm-w2c.ch" +#line 782 "cwebdir/comm-w2c.ch" /*:83*/ -#line 791 "cwebdir/comm-w2c.ch" +#line 790 "cwebdir/comm-w2c.ch" extern const char*versionstring; diff --git a/Build/source/texk/web2c/cwebdir/ChangeLog b/Build/source/texk/web2c/cwebdir/ChangeLog index 79fbbc4b489..095ee826201 100644 --- a/Build/source/texk/web2c/cwebdir/ChangeLog +++ b/Build/source/texk/web2c/cwebdir/ChangeLog @@ -1,3 +1,23 @@ +2017-01-29 Karl Berry <karl@tug.org> + + * ../cwebboot.cin, + * Makefile, + * README, + * common.c, + * common.h, + * common.w, + * ctang-bs.ch, + * ctangle.w, + * cweav-bs.ch, + * cweav-w2c.ch, + * cweave.w, + * cweb.el, + * cwebmac.tex, + * cwebman.tex, + * Master/texmf-dist/tex/plain/cweb/cwebmac.tex: sync all with + cweb 3.64ai from DEK, http://ctan.org/pkg/cweb. + * cweav-w2c.ch: sync @x blocks with 3.64ai. + 2014-06-18 Peter Breitenlohner <peb@mppmu.mpg.de> * comm-w2c.ch, ctang-w2c.ch, cweav-w2c.ch: Avoid useless diff --git a/Build/source/texk/web2c/cwebdir/Makefile b/Build/source/texk/web2c/cwebdir/Makefile index 528f05f9566..1367d008924 100644 --- a/Build/source/texk/web2c/cwebdir/Makefile +++ b/Build/source/texk/web2c/cwebdir/Makefile @@ -193,3 +193,5 @@ tarfile: $(ALL) examples tar cvhf /tmp/cweb.tar $(ALL) examples gzip -9 /tmp/cweb.tar +tarball: + tar zcvhf /tmp/cweb.tgz $(ALL) examples diff --git a/Build/source/texk/web2c/cwebdir/README b/Build/source/texk/web2c/cwebdir/README index e4dfc0de0ae..6429dabfa8f 100644 --- a/Build/source/texk/web2c/cwebdir/README +++ b/Build/source/texk/web2c/cwebdir/README @@ -19,7 +19,7 @@ % % DEK takes no responsibility for the changefiles; they should be % maintained independently. His job is to correct errors in -% ctangle.w, cweave.w, common.w, cwebmac.tex, cwebman.tex, +% ctangle.w, cweave.w, prod.w, common.w, cwebmac.tex, cwebman.tex, % and in the files of examples/*.w, nothing more. This directory contains the following files: @@ -102,3 +102,9 @@ Note that change files for VMS, AMIGA, MAC, and PCs are provided. When you are first bootstrapping to a new system, you may need to edit common.c and ctangle.c by hand, but the vast majority of the change-file changes are minor refinements that are not necessary for a rudimentary ctangle. + +----------------------------------------- +These archival sources are maintained only to the extent of fixing +significant bugs that were unintended at the time of writing. +A multi-decade ongoing project to improve and extend CWEB can be found at + https://github.com/ascherer/cwebbin diff --git a/Build/source/texk/web2c/cwebdir/comm-w2c.ch b/Build/source/texk/web2c/cwebdir/comm-w2c.ch index bd6ac50e1e0..426a011b61d 100644 --- a/Build/source/texk/web2c/cwebdir/comm-w2c.ch +++ b/Build/source/texk/web2c/cwebdir/comm-w2c.ch @@ -1,5 +1,4 @@ -% Kpathsea changes for CWEB by Wlodek Bzyl and Olaf Weber -% Copyright 2002 Wlodek Bzyl and Olaf Weber +% Original Kpathsea changes for CWEB by Wlodek Bzyl and Olaf Weber % This file is in the Public Domain. @x l.20 diff --git a/Build/source/texk/web2c/cwebdir/common.c b/Build/source/texk/web2c/cwebdir/common.c index 8fca7c63335..2bf7a9d4a81 100644 --- a/Build/source/texk/web2c/cwebdir/common.c +++ b/Build/source/texk/web2c/cwebdir/common.c @@ -39,7 +39,7 @@ #define minus_gt_ast 027 \ #define buf_size 100 -#define longest_name 1000 +#define longest_name 10000 #define long_buf_size (buf_size+longest_name) #define xisspace(c) (isspace(c) &&((unsigned char) c<0200) ) #define xisupper(c) (isupper(c) &&((unsigned char) c<0200) ) \ diff --git a/Build/source/texk/web2c/cwebdir/common.h b/Build/source/texk/web2c/cwebdir/common.h index a91b8e8d8ea..b1cd2e15e53 100644 --- a/Build/source/texk/web2c/cwebdir/common.h +++ b/Build/source/texk/web2c/cwebdir/common.h @@ -101,7 +101,7 @@ extern char byte_mem[]; /* characters of names */ extern char *byte_mem_end; /* end of |byte_mem| */ extern name_info name_dir[]; /* information about names */ extern name_pointer name_dir_end; /* end of |name_dir| */ -extern name_pointer name_ptr; /* first unused position in |byte_start| */ +extern name_pointer name_ptr; /* first unused position in |name_dir| */ extern char *byte_ptr; /* first unused position in |byte_mem| */ extern name_pointer hash[]; /* heads of hash lists */ extern hash_pointer hash_end; /* end of |hash| */ diff --git a/Build/source/texk/web2c/cwebdir/common.w b/Build/source/texk/web2c/cwebdir/common.w index 466456c306d..d8aacfb7b91 100644 --- a/Build/source/texk/web2c/cwebdir/common.w +++ b/Build/source/texk/web2c/cwebdir/common.w @@ -151,7 +151,7 @@ some of \.{CWEB}'s routines use the fact that it is safe to refer to |*(limit+2)| without overstepping the bounds of the array. @d buf_size 100 /* for \.{CWEAVE} and \.{CTANGLE} */ -@d longest_name 1000 +@d longest_name 10000 @d long_buf_size (buf_size+longest_name) /* for \.{CWEAVE} */ @d xisspace(c) (isspace(c)&&((unsigned char)c<0200)) @d xisupper(c) (isupper(c)&&((unsigned char)c<0200)) @@ -615,7 +615,7 @@ usually have |name_ptr->byte_start==byte_ptr|, and certainly we want to keep |name_ptr<=name_dir_end| and |byte_ptr<=byte_mem_end|. @<Defini...@>= -name_pointer name_ptr; /* first unused position in |byte_start| */ +name_pointer name_ptr; /* first unused position in |name_dir| */ char *byte_ptr; /* first unused position in |byte_mem| */ @ @<Init...@>= diff --git a/Build/source/texk/web2c/cwebdir/ctang-bs.ch b/Build/source/texk/web2c/cwebdir/ctang-bs.ch index 634dc9acc83..c4062c4064c 100644 --- a/Build/source/texk/web2c/cwebdir/ctang-bs.ch +++ b/Build/source/texk/web2c/cwebdir/ctang-bs.ch @@ -40,7 +40,7 @@ change them in the file |"common.w"|. must be less than 10240; used in |"common.w"| */ @d max_texts 2500 /* number of replacement texts, must be less than 10240 */ @d hash_size 353 /* should be prime; used in |"common.w"| */ -@d longest_name 1000 /* section names shouldn't be longer than this */ +@d longest_name 10000 /* section names shouldn't be longer than this */ @d stack_size 50 /* number of simultaneous levels of macro expansion */ @d buf_size 100 /* for \.{CWEAVE} and \.{CTANGLE} */ @y @@ -67,7 +67,7 @@ to run \.{CTANGLE} from a makefile.) must be less than 10240; used in |"common.w"| */ @d max_texts 2500 /* number of replacement texts, must be less than 10240 */ @d hash_size 353 /* should be prime; used in |"common.w"| */ -@d longest_name 1000 /* section names shouldn't be longer than this */ +@d longest_name 10000 /* section names shouldn't be longer than this */ @d stack_size 50 /* number of simultaneous levels of macro expansion */ @d buf_size 100 /* for \.{CWEAVE} and \.{CTANGLE} */ @z @@ -93,7 +93,7 @@ extern char byte_mem[]; /* characters of names */ extern char *byte_mem_end; /* end of |byte_mem| */ extern name_info name_dir[]; /* information about names */ extern name_pointer name_dir_end; /* end of |name_dir| */ -extern name_pointer name_ptr; /* first unused position in |byte_start| */ +extern name_pointer name_ptr; /* first unused position in |name_dir| */ extern char *byte_ptr; /* first unused position in |byte_mem| */ extern name_pointer hash[]; /* heads of hash lists */ extern hash_pointer hash_end; /* end of |hash| */ @@ -126,7 +126,7 @@ extern char huge byte_mem[]; /* characters of names */ extern char huge* byte_mem_end; /* end of |byte_mem| */ extern name_info name_dir[]; /* information about names */ extern name_pointer name_dir_end; /* end of |name_dir| */ -extern name_pointer name_ptr; /* first unused position in |byte_start| */ +extern name_pointer name_ptr; /* first unused position in |name_dir| */ extern char huge* byte_ptr; /* first unused position in |byte_mem| */ extern name_pointer hash[]; /* heads of hash lists */ extern hash_pointer hash_end; /* end of |hash| */ diff --git a/Build/source/texk/web2c/cwebdir/ctang-w2c.ch b/Build/source/texk/web2c/cwebdir/ctang-w2c.ch index f1be29aacc5..1b58dc240f4 100644 --- a/Build/source/texk/web2c/cwebdir/ctang-w2c.ch +++ b/Build/source/texk/web2c/cwebdir/ctang-w2c.ch @@ -1,5 +1,4 @@ -% Kpathsea changes for CWEB by Wlodek Bzyl and Olaf Weber -% Copyright 2002 Wlodek Bzyl and Olaf Weber +% Original Kpathsea changes for CWEB by Wlodek Bzyl and Olaf Weber % This file is in the Public Domain. @x l.27 diff --git a/Build/source/texk/web2c/cwebdir/ctangle.w b/Build/source/texk/web2c/cwebdir/ctangle.w index 86d0d0a5103..2b10a243a5b 100644 --- a/Build/source/texk/web2c/cwebdir/ctangle.w +++ b/Build/source/texk/web2c/cwebdir/ctangle.w @@ -116,7 +116,7 @@ change them in the file |"common.w"|. must be less than 10240; used in |"common.w"| */ @d max_texts 2500 /* number of replacement texts, must be less than 10240 */ @d hash_size 353 /* should be prime; used in |"common.w"| */ -@d longest_name 10000 /* section names shouldn't be longer than this */ +@d longest_name 10000 /* section names and strings shouldn't be longer than this */ @d stack_size 50 /* number of simultaneous levels of macro expansion */ @d buf_size 100 /* for \.{CWEAVE} and \.{CTANGLE} */ diff --git a/Build/source/texk/web2c/cwebdir/cweav-bs.ch b/Build/source/texk/web2c/cwebdir/cweav-bs.ch index 186d4cc777c..8c4c1fe8ff3 100644 --- a/Build/source/texk/web2c/cwebdir/cweav-bs.ch +++ b/Build/source/texk/web2c/cwebdir/cweav-bs.ch @@ -49,7 +49,7 @@ extern char byte_mem[]; /* characters of names */ extern char *byte_mem_end; /* end of |byte_mem| */ extern name_info name_dir[]; /* information about names */ extern name_pointer name_dir_end; /* end of |name_dir| */ -extern name_pointer name_ptr; /* first unused position in |byte_start| */ +extern name_pointer name_ptr; /* first unused position in |name_dir| */ extern char *byte_ptr; /* first unused position in |byte_mem| */ extern name_pointer hash[]; /* heads of hash lists */ extern hash_pointer hash_end; /* end of |hash| */ @@ -82,7 +82,7 @@ extern char huge byte_mem[]; /* characters of names */ extern char huge* byte_mem_end; /* end of |byte_mem| */ extern name_info name_dir[]; /* information about names */ extern name_pointer name_dir_end; /* end of |name_dir| */ -extern name_pointer name_ptr; /* first unused position in |byte_start| */ +extern name_pointer name_ptr; /* first unused position in |name_dir| */ extern char huge* byte_ptr; /* first unused position in |byte_mem| */ extern name_pointer hash[]; /* heads of hash lists */ extern hash_pointer hash_end; /* end of |hash| */ diff --git a/Build/source/texk/web2c/cwebdir/cweav-w2c.ch b/Build/source/texk/web2c/cwebdir/cweav-w2c.ch index 0fde9a7df49..c4dada00d68 100644 --- a/Build/source/texk/web2c/cwebdir/cweav-w2c.ch +++ b/Build/source/texk/web2c/cwebdir/cweav-w2c.ch @@ -1,5 +1,4 @@ -% Kpathsea changes for CWEB by Wlodek Bzyl and Olaf Weber -% Copyright 2002 Wlodek Bzyl and Olaf Weber +% Original Kpathsea changes for CWEB by Wlodek Bzyl and Olaf Weber % This file is in the Public Domain. @@ -23,7 +22,7 @@ \vfill} @z -This change can not be applied when `tie' is used +This change cannot be applied when `tie' is used (TOC file can not be typeset). %@x l.51 @@ -471,7 +470,7 @@ Section 78. @x l.1322 void flush_buffer(b,per_cent,carryover) -char *b; /* outputs from |out_buf+1| to |b|,where |b<=out_ptr| */ +char *b; /* outputs from |out_buf+1| to |b|,where |b<=out_ptr| */ boolean per_cent,carryover; @y static void @@ -582,9 +581,9 @@ copy_comment (boolean is_long_comment, int bal) Section 93. @x l.1608 - if (phase==2) app_tok(*(loc++)) else loc++; + if (phase==2) app_tok(*(loc++))@; else loc++; @y - {if (phase==2) app_tok(*(loc++)) else loc++;} + {if (phase==2) app_tok(*(loc++))@; else loc++;} @z Section 99. diff --git a/Build/source/texk/web2c/cwebdir/cweave.w b/Build/source/texk/web2c/cwebdir/cweave.w index 91b8785bfe9..e06762b1fc3 100644 --- a/Build/source/texk/web2c/cwebdir/cweave.w +++ b/Build/source/texk/web2c/cwebdir/cweave.w @@ -5,6 +5,7 @@ % Version 3.64 --- February 2002 % (essentially the same as version 3.6, which added % recently introduced features of standard C++ to version 3.4) +% (In November 2016 I made minor adjustments but changed no code -- DEK) % Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth @@ -1298,7 +1299,7 @@ be output. @<Global...@>= char out_buf[line_length+1]; /* assembled characters */ -char *out_ptr; /* just after last character in |out_buf| */ +char *out_ptr; /* last character in |out_buf| */ char *out_buf_end = out_buf+line_length; /* end of |out_buf| */ int out_line; /* number of next line to be output */ @@ -1321,7 +1322,7 @@ of commented-out text). @c void flush_buffer(b,per_cent,carryover) -char *b; /* outputs from |out_buf+1| to |b|,where |b<=out_ptr| */ +char *b; /* outputs from |out_buf+1| to |b|,where |b<=out_ptr| */ boolean per_cent,carryover; { char *j; j=b; /* pointer into |out_buf| */ @@ -1605,7 +1606,7 @@ if (c=='@@') { } } else if (c=='\\' && *loc!='@@') - if (phase==2) app_tok(*(loc++)) else loc++; + if (phase==2) app_tok(*(loc++))@; else loc++; @ We output enough right braces to keep \TEX/ happy. @@ -3890,7 +3891,7 @@ while (k<k_limit) { @.\\\_@> default: out(b); } - else if (b!='|') out(b) + else if (b!='|') out(b)@; else { @<Copy the \CEE/ text into the |buffer| array@>; save_loc=loc; save_limit=limit; loc=limit+2; limit=j+1; @@ -3922,7 +3923,7 @@ while (1) { } b=*(k++); if (b=='@@' || (b=='\\' && delim!=0)) - @<Copy a quoted character into the buffer@> + @<Copy a quoted character into the buffer@>@; else { if (b=='\'' || b=='"') if (delim==0) delim=b; @@ -4478,7 +4479,7 @@ void unbucket(d) /* empties buckets having depth |d| */ eight_bits d; { - int c; /* index into |bucket|; cannot be a simple |char| because of sign + int c; /* index into |bucket|; cannot be a simple |char| because of sign comparison below*/ for (c=100+128; c>= 0; c--) if (bucket[collate[c]]) { @^high-bit character handling@> diff --git a/Build/source/texk/web2c/cwebdir/cweb.el b/Build/source/texk/web2c/cwebdir/cweb.el index b7cfb2ee535..c243f35b2e4 100644 --- a/Build/source/texk/web2c/cwebdir/cweb.el +++ b/Build/source/texk/web2c/cwebdir/cweb.el @@ -110,6 +110,8 @@ otherwise do an ordinary Meta-y." (insert ch) (setq arg (1- arg))))) (global-set-key "\M-\"" 'ditto) +; If "ditto" suddenly fails to work, you have probably set goal-column +; inadvertently. To unset it, say C-u C-x C-n. ;; OK, here's part (2): Changes to TeX mode. ; The WEB modes below are very much like TeX mode, but some improvements were @@ -210,6 +212,7 @@ for relative module movement. The automatic \" feature is disabled." (modify-syntax-entry ?% "@") (setq mode-name "CWEB") (setq major-mode 'cweb-mode) + (setq tex-fontify-script nil) ;; needed in GNU Emacs version 22? (run-hooks 'cweb-mode-hook)) (setq auto-mode-alist (cons '("\\.w$" . cweb-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.ch$" . cweb-mode) auto-mode-alist)) diff --git a/Build/source/texk/web2c/cwebdir/cwebmac.tex b/Build/source/texk/web2c/cwebdir/cwebmac.tex index d50987da9be..c1880cd3c92 100644 --- a/Build/source/texk/web2c/cwebdir/cwebmac.tex +++ b/Build/source/texk/web2c/cwebdir/cwebmac.tex @@ -1,8 +1,8 @@ % standard macros for CWEB listings (in addition to plain.tex) -% Version 3.68 --- January 2016 +% Version 3.69 --- February 2016 \ifx\renewenvironment\undefined\else\endinput\fi % LaTeX will use other macros -\xdef\fmtversion{\fmtversion+CWEB3.68} -\chardef\cwebversion=3 \chardef\cwebrevision=68 +\xdef\fmtversion{\fmtversion+CWEB3.69} +\chardef\cwebversion=3 \chardef\cwebrevision=69 \newif\ifpdf \ifx\pdf+\pdftrue\fi % Uncomment the following line if you want PDF goodies to be the default @@ -10,7 +10,11 @@ \def\pdflinkcolor{0 0 1} % the RGB values for hyperlink color \newif\ifpdftex \ifx\pdfoutput\undefined \pdftexfalse \else\ifnum\pdfoutput=0 \pdftexfalse -\else \pdftextrue \pdfoutput=1 \input pdfcolor \let\setcolor\pdfsetcolor \fi\fi +%\else \pdftextrue \pdfoutput=1 \input pdfcolor \let\setcolor\pdfsetcolor \fi\fi +\else \pdftextrue \pdfoutput=1 % changed in 3.69 + \def\Black{\pdfliteral{0 g 0 G}} % use rgb colors for direct PDF output too + \def\Blue{\pdfliteral{0 0 1 rg 0 0 1 RG}} +\fi\fi \newif\ifacro \ifpdf\acrotrue\fi \ifpdftex\acrotrue\fi \let\:=\. % preserve a way to get the dot accent @@ -136,7 +140,7 @@ \ifpdftex \ifx\pdfannotlink\undefined\let\pdfannotlink\pdfstartlink\fi% for pdfTeX 0.14 \def\pdflink#1#2{\hbox{\pdfannotlink height\ht\strutbox depth\dp\strutbox - attr{/Border [0 0 0]} goto num #1 \BlueGreen #1\Black\pdfendlink}} + attr{/Border [0 0 0]} goto num #1 \Blue #1\Black\pdfendlink}} % changed 3.69 \else\def\pdflink#1#2{\setbox0=\hbox{\special{pdf: bc [ \pdflinkcolor ]}{#1}% \special{pdf: ec}}\special{pdf: ann width \thewidth height \theheight depth \thedepth << /Type /Annot /Subtype /Link @@ -166,7 +170,7 @@ \def\maketoksdone{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \def\pdfURL#1#2{\ifpdftex\pdfannotlink height\ht\strutbox depth\dp\strutbox attr {/Border [0 0 0]} user { /Type /Action /Subtype /Link /A - << /S /URI /URI (#2) >>}\BlueGreen #1\Black \pdfendlink + << /S /URI /URI (#2) >>}\Blue #1\Black \pdfendlink % changed in 3.69 \else \ifpdf{\setbox0=\hbox{\special{pdf: bc [ \pdflinkcolor ]}{#1}% \special{pdf: ec}}\special{pdf: ann width \thewidth\space height \theheight \space depth \thedepth\space << /Border [0 0 0] @@ -473,7 +477,7 @@ \def\I{\par\hangindent 2em}\let\*=* \ifacro \def\outsecname{Names of the sections} \let\Xpdf\X % \ifpdftex \makebookmarks \pdfdest name {NOS} fitb % in versions < 3.68 - \ifpdftex \pdfdest name {NOS} fitb % changed in version 3.68 + \ifpdftex \pdfdest name {NOS} fith % changed in version 3.69 \pdfoutline goto name {NOS} count -\secno {\outsecname} \def\X##1:##2\X{\Xpdf##1:##2\X \firstsecno##1.% {\toksF={}\makeoutlinetoks##2\outlinedone\outlinedone}% diff --git a/Build/source/texk/web2c/cwebdir/cwebman.tex b/Build/source/texk/web2c/cwebdir/cwebman.tex index 2bd52e3efd8..2e4ec65ea57 100644 --- a/Build/source/texk/web2c/cwebdir/cwebman.tex +++ b/Build/source/texk/web2c/cwebdir/cwebman.tex @@ -1,4 +1,5 @@ % This file generates the user manual; TeX it, don't read it! +% update 14 Nov 2016 by DEK: corrected obsolete remarks re debugging info \def\tangref{3} % where the main explanation of CTANGLing is given \input cwebmac @@ -1087,9 +1088,9 @@ you get the following gibberish on your screen: \begingroup \verbatim [...] -4:*exp ( +exp+ )... -11:*exp +exp+ int... -5:*+exp+ int +unorbinop+... +14:*exp +(+ exp... +11:*exp +exp+ raw... +10:*+exp+ raw +ubinop?+... [...] 60: +fn_decl+*+{+ -stmt- +}- 55:*+fn_decl+ -stmt- @@ -1098,7 +1099,7 @@ you get the following gibberish on your screen: !endgroup \endgroup \medskip -The first line says that grammar rule 4 has just been applied, and \.{CWEAVE} +The first line says that grammar rule 14 has just been applied, and \.{CWEAVE} currently has in its memory a sequence of chunks of \TEX/ code (called ``scraps'') that are respectively of type \\{exp} (for expression), open-parenthesis, @@ -1514,7 +1515,7 @@ is to explain some of the possibilities. \point 1. Four fonts have been declared in addition to the standard fonts of \.{PLAIN} format: You can say `\.{\{\\mc UNIX\}}' to get {\mc UNIX} in -xmedium-size caps; you can say `\.{\{\\sc STUFF\}}' to get {\sc STUFF} +medium-size caps; you can say `\.{\{\\sc STUFF\}}' to get {\sc STUFF} in small caps; and you can select the largish fonts \.{\\titlefont} and \.{\\ttitlefont} in the title of your document, where \.{\\ttitlefont} is a typewriter style of type. There are macros \.{\\UNIX/} and \.{\\CEE/} |