diff options
author | Andreas Scherer <andreas_tex@freenet.de> | 2021-07-14 09:23:02 +0000 |
---|---|---|
committer | Andreas Scherer <andreas_tex@freenet.de> | 2021-07-14 09:23:02 +0000 |
commit | 274b2b3e8a9a283ddf07c2e4b7c4fc39cb889a2e (patch) | |
tree | 8f0b9090b8e5691b7bc2969a3dd6f6f1b8411776 /Build | |
parent | fe3a5e65c56c42bd8598b2a8c110ec250eb5214d (diff) |
[CWEB] New release 4.5.
This is a service release for CWEB 4.0.
* Upstream CWEB 4.5 was reviewed with the 'splint' utility. This
resulted in lots of cast changes and a few code improvements.
* All 'length' variables are retyped to 'size_t'.
* <stdbool.h> is replaced by <kpathsea/simpletypes.h> to keep CWEB
compatible with antique systems that still support TeX Live.
git-svn-id: svn://tug.org/texlive/trunk@59926 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
45 files changed, 880 insertions, 806 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog index 3bd33b5079a..6a020587c6f 100644 --- a/Build/source/texk/web2c/ChangeLog +++ b/Build/source/texk/web2c/ChangeLog @@ -1,3 +1,8 @@ +2021-07-14 Andreas Scherer <https://ascherer.github.io> + + * ctangleboot.cin, + * cwebboot.cin: CWEB release 4.5. + 2021-06-15 Karl Berry <karl@freefriends.org> * dvicopy.web: erroneous '/'; also switch to "Unix" in text. diff --git a/Build/source/texk/web2c/ctangleboot.cin b/Build/source/texk/web2c/ctangleboot.cin index 02eef23e706..bdd9262516b 100644 --- a/Build/source/texk/web2c/ctangleboot.cin +++ b/Build/source/texk/web2c/ctangleboot.cin @@ -15,7 +15,7 @@ #endif #include <ctype.h> -#include <stdbool.h> +#include <kpathsea/simpletypes.h> #include <stddef.h> #include <stdint.h> #include <stdlib.h> @@ -25,7 +25,7 @@ /*:4*/ #line 67 "cwebdir/ctangle.w" -#define banner "This is CTANGLE, Version 4.4" \ +#define banner "This is CTANGLE, Version 4.5" \ \ #define _(s) gettext(s) \ @@ -48,12 +48,12 @@ #define compress(c) if(loc++<=limit) return c \ -#define xisalpha(c) (isalpha((eight_bits) (c) ) &&((eight_bits) (c) <0200) ) -#define xisdigit(c) (isdigit((eight_bits) (c) ) &&((eight_bits) (c) <0200) ) -#define xisspace(c) (isspace((eight_bits) (c) ) &&((eight_bits) (c) <0200) ) -#define xislower(c) (islower((eight_bits) (c) ) &&((eight_bits) (c) <0200) ) -#define xisupper(c) (isupper((eight_bits) (c) ) &&((eight_bits) (c) <0200) ) -#define xisxdigit(c) (isxdigit((eight_bits) (c) ) &&((eight_bits) (c) <0200) ) +#define xisalpha(c) (isalpha((int) (c) ) &&((eight_bits) (c) <0200) ) +#define xisdigit(c) (isdigit((int) (c) ) &&((eight_bits) (c) <0200) ) +#define xisspace(c) (isspace((int) (c) ) &&((eight_bits) (c) <0200) ) +#define xislower(c) (islower((int) (c) ) &&((eight_bits) (c) <0200) ) +#define xisupper(c) (isupper((int) (c) ) &&((eight_bits) (c) <0200) ) +#define xisxdigit(c) (isxdigit((int) (c) ) &&((eight_bits) (c) <0200) ) #define isxalpha(c) ((c) =='_'||(c) =='$') \ #define ishigh(c) ((eight_bits) (c) > 0177) \ @@ -135,7 +135,7 @@ #define max_files 256 #define C_printf(c,a) fprintf(C_file,c,a) -#define C_putc(c) putc(c,C_file) \ +#define C_putc(c) putc((int) (c) ,C_file) \ #define translit_length 10 \ @@ -150,11 +150,14 @@ #define section_name 0311 #define new_section 0312 \ -#define app_repl(c) {if(tok_ptr==tok_mem_end) overflow(_("token") ) ;*(tok_ptr++) = c;} \ +#define app_repl(c) { \ +if(tok_ptr==tok_mem_end) overflow(_("token") ) ; \ +else*(tok_ptr++) = (eight_bits) c; \ +} \ -#define store_id(a) a= id_lookup(id_first,id_loc,0) -name_dir; \ +#define store_id(a) a= id_lookup(id_first,id_loc,'\0') -name_dir; \ app_repl((a/0400) +0200) ; \ -app_repl(a%0400) ; \ +app_repl(a%0400) \ #define keep_digit_separators flags['k'] \ @@ -164,9 +167,8 @@ app_repl(a%0400) ; \ #line 68 "cwebdir/ctangle.w" /*3:*/ -#line 33 "cwebdir/comm-w2c.h" +#line 34 "cwebdir/comm-w2c.h" -typedef bool boolean; typedef uint8_t eight_bits; typedef uint16_t sixteen_bits; typedef enum{ @@ -269,7 +271,7 @@ extern FILE*active_file; extern FILE*check_file; /*:15*//*115:*/ -#line 481 "cwebdir/ctang-w2c.ch" +#line 487 "cwebdir/ctang-w2c.ch" extern char cb_banner[]; @@ -331,13 +333,13 @@ static stack_pointer stack_ptr; static int cur_val; /*:37*//*42:*/ -#line 458 "cwebdir/ctangle.w" +#line 459 "cwebdir/ctangle.w" static eight_bits out_state; static boolean protect; /*:42*//*45:*/ -#line 489 "cwebdir/ctangle.w" +#line 490 "cwebdir/ctangle.w" static name_pointer output_files[max_files]; static name_pointer*cur_out_file,*end_output_files,*an_output_file; @@ -345,33 +347,33 @@ static char cur_section_name_char; static char output_file_name[longest_name+1]; /*:45*//*52:*/ -#line 589 "cwebdir/ctangle.w" +#line 590 "cwebdir/ctangle.w" static boolean output_defs_seen= false; /*:52*//*57:*/ -#line 701 "cwebdir/ctangle.w" +#line 703 "cwebdir/ctangle.w" static char translit[128][translit_length]; /*:57*//*62:*/ -#line 777 "cwebdir/ctangle.w" +#line 779 "cwebdir/ctangle.w" static eight_bits ccode[256]; /*:62*//*66:*/ -#line 837 "cwebdir/ctangle.w" +#line 839 "cwebdir/ctangle.w" static boolean comment_continues= false; /*:66*//*68:*/ -#line 874 "cwebdir/ctangle.w" +#line 876 "cwebdir/ctangle.w" static name_pointer cur_section_name; static boolean no_where; /*:68*//*82:*/ -#line 1188 "cwebdir/ctangle.w" +#line 1193 "cwebdir/ctangle.w" static text_pointer cur_text; static eight_bits next_control; @@ -390,7 +392,7 @@ extern void reset_input(void); #line 184 "cwebdir/comm-w2c.h" extern boolean names_match(name_pointer,const char*,size_t,eight_bits); -extern name_pointer id_lookup(const char*,const char*,char); +extern name_pointer id_lookup(const char*,const char*,eight_bits); extern name_pointer section_lookup(char*,char*,boolean); extern void init_node(name_pointer); @@ -425,47 +427,47 @@ static void push_level(name_pointer); static void pop_level(boolean); /*:35*//*39:*/ -#line 403 "cwebdir/ctangle.w" +#line 404 "cwebdir/ctangle.w" static void get_output(void); /*:39*//*44:*/ -#line 479 "cwebdir/ctangle.w" +#line 480 "cwebdir/ctangle.w" static void flush_buffer(void); /*:44*//*49:*/ -#line 556 "cwebdir/ctangle.w" +#line 557 "cwebdir/ctangle.w" static void phase_two(void); /*:49*//*53:*/ -#line 592 "cwebdir/ctangle.w" +#line 593 "cwebdir/ctangle.w" static void output_defs(void); static void out_char(eight_bits); /*:53*//*65:*/ -#line 817 "cwebdir/ctangle.w" +#line 819 "cwebdir/ctangle.w" static eight_bits skip_ahead(void); static boolean skip_comment(boolean); /*:65*//*70:*/ -#line 924 "cwebdir/ctangle.w" +#line 926 "cwebdir/ctangle.w" static eight_bits get_next(void); /*:70*//*84:*/ -#line 1214 "cwebdir/ctangle.w" +#line 1219 "cwebdir/ctangle.w" static void scan_repl(eight_bits); /*:84*//*91:*/ -#line 1397 "cwebdir/ctangle.w" +#line 1404 "cwebdir/ctangle.w" static void scan_section(void); /*:91*//*99:*/ -#line 1474 "cwebdir/ctangle.w" +#line 1481 "cwebdir/ctangle.w" static void phase_one(void); /*:99*//*101:*/ -#line 1507 "cwebdir/ctangle.w" +#line 1514 "cwebdir/ctangle.w" static void skip_limbo(void); /*:101*/ @@ -498,12 +500,12 @@ init_node(name_dir); last_unnamed= text_info;text_info->text_link= macro; /*:27*//*46:*/ -#line 499 "cwebdir/ctangle.w" +#line 500 "cwebdir/ctangle.w" cur_out_file= end_output_files= output_files+max_files; /*:46*//*58:*/ -#line 704 "cwebdir/ctangle.w" +#line 706 "cwebdir/ctangle.w" { int i; @@ -511,14 +513,14 @@ for(i= 0;i<128;i++)sprintf(translit[i],"X%02X",(unsigned int)(128+i)); } /*:58*//*63:*/ -#line 780 "cwebdir/ctangle.w" +#line 782 "cwebdir/ctangle.w" { int c; for(c= 0;c<256;c++)ccode[c]= ignore; } ccode[' ']= ccode['\t']= ccode['\n']= ccode['\v']= ccode['\r']= ccode['\f'] = ccode['*']= new_section; -ccode['@']= '@';ccode['=']= string; +ccode['@']= (eight_bits)'@';ccode['=']= string; ccode['d']= ccode['D']= definition; ccode['f']= ccode['F']= ccode['s']= ccode['S']= format_code; ccode['c']= ccode['C']= ccode['p']= ccode['P']= begin_C; @@ -531,11 +533,11 @@ ccode['<']= ccode['(']= section_name; ccode['\'']= ord; /*:63*//*78:*/ -#line 1112 "cwebdir/ctangle.w" +#line 1114 "cwebdir/ctangle.w" section_text[0]= ' '; /*:78*//*116:*/ -#line 484 "cwebdir/ctang-w2c.ch" +#line 490 "cwebdir/ctang-w2c.ch" strncpy(cb_banner,banner,max_banner-1); @@ -645,10 +647,10 @@ else if(a<0200)out_char(a); else{ a= (a-0200)*0400+*cur_byte++; switch(a/024000){ -case 0:cur_val= a;out_char(identifier);break; +case 0:cur_val= (int)a;out_char(identifier);break; case 1:if(a==output_defs_flag)output_defs(); else/*40:*/ -#line 408 "cwebdir/ctangle.w" +#line 409 "cwebdir/ctangle.w" { a-= 024000; @@ -656,7 +658,7 @@ if((a+name_dir)->equiv!=(void*)text_info)push_level(a+name_dir); else if(a!=0){ #line 85 "cwebdir/ctang-w2c.ch" fputs(_("\n! Not present: <"),stdout); -#line 414 "cwebdir/ctangle.w" +#line 415 "cwebdir/ctangle.w" print_section_name(a+name_dir);err_print(">"); } @@ -667,14 +669,15 @@ goto restart; #line 395 "cwebdir/ctangle.w" break; -default:cur_val= a-050000;if(cur_val> 0)cur_section= cur_val; +default:cur_val= (int)a-050000; +if(cur_val> 0)cur_section= (sixteen_bits)cur_val; out_char(section_number); } } } /*:38*//*43:*/ -#line 466 "cwebdir/ctangle.w" +#line 467 "cwebdir/ctangle.w" static void flush_buffer(void) @@ -689,7 +692,7 @@ cur_line++; } /*:43*//*48:*/ -#line 518 "cwebdir/ctangle.w" +#line 519 "cwebdir/ctangle.w" static void phase_two(void){ @@ -703,21 +706,21 @@ 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 524 "cwebdir/ctangle.w" +#line 525 "cwebdir/ctangle.w" /*51:*/ -#line 585 "cwebdir/ctangle.w" +#line 586 "cwebdir/ctangle.w" if(!output_defs_seen) output_defs(); /*:51*/ -#line 525 "cwebdir/ctangle.w" +#line 526 "cwebdir/ctangle.w" if(text_info->text_link==macro&&cur_out_file==end_output_files){ #line 97 "cwebdir/ctang-w2c.ch" fputs(_("\n! No program text was specified."),stdout);mark_harmless; -#line 528 "cwebdir/ctangle.w" +#line 529 "cwebdir/ctangle.w" } else{ @@ -725,7 +728,7 @@ if(cur_out_file==end_output_files){ if(show_progress){ #line 103 "cwebdir/ctang-w2c.ch" printf(_("\nWriting the output file (%s):"),C_file_name); -#line 534 "cwebdir/ctangle.w" +#line 535 "cwebdir/ctangle.w" update_terminal; } } @@ -733,7 +736,7 @@ else{ if(show_progress){ #line 109 "cwebdir/ctang-w2c.ch" fputs(_("\nWriting the output files:"),stdout); -#line 540 "cwebdir/ctangle.w" +#line 541 "cwebdir/ctangle.w" printf(" (%s)",C_file_name); update_terminal; @@ -747,11 +750,11 @@ writeloop:/*50:*/ fclose(C_file);C_file= NULL; /*105:*/ -#line 364 "cwebdir/ctang-w2c.ch" +#line 370 "cwebdir/ctang-w2c.ch" if((C_file= fopen(C_file_name,"r"))!=NULL){ /*106:*/ -#line 371 "cwebdir/ctang-w2c.ch" +#line 377 "cwebdir/ctang-w2c.ch" boolean comparison= false; @@ -760,7 +763,7 @@ fatal(_("! Cannot open output file "),check_file_name); if(check_for_change)/*107:*/ -#line 385 "cwebdir/ctang-w2c.ch" +#line 391 "cwebdir/ctang-w2c.ch" do{ char x[BUFSIZ],y[BUFSIZ]; @@ -770,17 +773,17 @@ comparison= (x_size==y_size)&&!memcmp(x,y,x_size); }while(comparison&&!feof(C_file)&&!feof(check_file)); /*:107*/ -#line 378 "cwebdir/ctang-w2c.ch" +#line 384 "cwebdir/ctang-w2c.ch" fclose(C_file);C_file= NULL; fclose(check_file);check_file= NULL; /*:106*/ -#line 366 "cwebdir/ctang-w2c.ch" +#line 372 "cwebdir/ctang-w2c.ch" /*108:*/ -#line 396 "cwebdir/ctang-w2c.ch" +#line 402 "cwebdir/ctang-w2c.ch" if(comparison) remove(check_file_name); @@ -790,7 +793,7 @@ rename(check_file_name,C_file_name); } /*:108*/ -#line 367 "cwebdir/ctang-w2c.ch" +#line 373 "cwebdir/ctang-w2c.ch" }else rename(check_file_name,C_file_name); @@ -817,14 +820,14 @@ cur_end= (cur_repl+1)->tok_start; while(stack_ptr> stack)get_output(); flush_buffer();fclose(C_file);C_file= NULL; /*109:*/ -#line 409 "cwebdir/ctang-w2c.ch" +#line 415 "cwebdir/ctang-w2c.ch" if(0==strcmp("/dev/stdout",output_file_name)) /*111:*/ -#line 436 "cwebdir/ctang-w2c.ch" +#line 442 "cwebdir/ctang-w2c.ch" { /*114:*/ -#line 467 "cwebdir/ctang-w2c.ch" +#line 473 "cwebdir/ctang-w2c.ch" char in_buf[BUFSIZ+1]; int in_size; @@ -834,7 +837,7 @@ fatal(_("! Cannot open output file "),check_file_name); /*:114*/ -#line 437 "cwebdir/ctang-w2c.ch" +#line 443 "cwebdir/ctang-w2c.ch" do{ in_size= fread(in_buf,sizeof(char),BUFSIZ,check_file); @@ -843,7 +846,7 @@ fprintf(stdout,"%s",in_buf); }while(!feof(check_file)); fclose(check_file);check_file= NULL; /*110:*/ -#line 426 "cwebdir/ctang-w2c.ch" +#line 432 "cwebdir/ctang-w2c.ch" if(comparison) remove(check_file_name); @@ -853,19 +856,19 @@ rename(check_file_name,output_file_name); } /*:110*/ -#line 444 "cwebdir/ctang-w2c.ch" +#line 450 "cwebdir/ctang-w2c.ch" } /*:111*/ -#line 411 "cwebdir/ctang-w2c.ch" +#line 417 "cwebdir/ctang-w2c.ch" else if(0==strcmp("/dev/stderr",output_file_name)) /*112:*/ -#line 449 "cwebdir/ctang-w2c.ch" +#line 455 "cwebdir/ctang-w2c.ch" { /*114:*/ -#line 467 "cwebdir/ctang-w2c.ch" +#line 473 "cwebdir/ctang-w2c.ch" char in_buf[BUFSIZ+1]; int in_size; @@ -875,7 +878,7 @@ fatal(_("! Cannot open output file "),check_file_name); /*:114*/ -#line 450 "cwebdir/ctang-w2c.ch" +#line 456 "cwebdir/ctang-w2c.ch" do{ in_size= fread(in_buf,sizeof(char),BUFSIZ,check_file); @@ -884,7 +887,7 @@ fprintf(stderr,"%s",in_buf); }while(!feof(check_file)); fclose(check_file);check_file= NULL; /*110:*/ -#line 426 "cwebdir/ctang-w2c.ch" +#line 432 "cwebdir/ctang-w2c.ch" if(comparison) remove(check_file_name); @@ -894,20 +897,20 @@ rename(check_file_name,output_file_name); } /*:110*/ -#line 457 "cwebdir/ctang-w2c.ch" +#line 463 "cwebdir/ctang-w2c.ch" } /*:112*/ -#line 413 "cwebdir/ctang-w2c.ch" +#line 419 "cwebdir/ctang-w2c.ch" else if(0==strcmp("/dev/null",output_file_name)) /*113:*/ -#line 462 "cwebdir/ctang-w2c.ch" +#line 468 "cwebdir/ctang-w2c.ch" { boolean comparison= true; /*110:*/ -#line 426 "cwebdir/ctang-w2c.ch" +#line 432 "cwebdir/ctang-w2c.ch" if(comparison) remove(check_file_name); @@ -917,17 +920,17 @@ rename(check_file_name,output_file_name); } /*:110*/ -#line 464 "cwebdir/ctang-w2c.ch" +#line 470 "cwebdir/ctang-w2c.ch" } /*:113*/ -#line 415 "cwebdir/ctang-w2c.ch" +#line 421 "cwebdir/ctang-w2c.ch" else{ if((C_file= fopen(output_file_name,"r"))!=NULL){ /*106:*/ -#line 371 "cwebdir/ctang-w2c.ch" +#line 377 "cwebdir/ctang-w2c.ch" boolean comparison= false; @@ -936,7 +939,7 @@ fatal(_("! Cannot open output file "),check_file_name); if(check_for_change)/*107:*/ -#line 385 "cwebdir/ctang-w2c.ch" +#line 391 "cwebdir/ctang-w2c.ch" do{ char x[BUFSIZ],y[BUFSIZ]; @@ -946,17 +949,17 @@ comparison= (x_size==y_size)&&!memcmp(x,y,x_size); }while(comparison&&!feof(C_file)&&!feof(check_file)); /*:107*/ -#line 378 "cwebdir/ctang-w2c.ch" +#line 384 "cwebdir/ctang-w2c.ch" fclose(C_file);C_file= NULL; fclose(check_file);check_file= NULL; /*:106*/ -#line 418 "cwebdir/ctang-w2c.ch" +#line 424 "cwebdir/ctang-w2c.ch" /*110:*/ -#line 426 "cwebdir/ctang-w2c.ch" +#line 432 "cwebdir/ctang-w2c.ch" if(comparison) remove(check_file_name); @@ -966,7 +969,7 @@ rename(check_file_name,output_file_name); } /*:110*/ -#line 419 "cwebdir/ctang-w2c.ch" +#line 425 "cwebdir/ctang-w2c.ch" }else rename(check_file_name,output_file_name); @@ -977,22 +980,22 @@ rename(check_file_name,output_file_name); } strcpy(check_file_name,""); -#line 580 "cwebdir/ctangle.w" +#line 581 "cwebdir/ctangle.w" /*:50*/ -#line 548 "cwebdir/ctangle.w" +#line 549 "cwebdir/ctangle.w" if(show_happiness){ if(show_progress)new_line; #line 115 "cwebdir/ctang-w2c.ch" fputs(_("Done."),stdout); -#line 552 "cwebdir/ctangle.w" +#line 553 "cwebdir/ctangle.w" } } } /*:48*//*54:*/ -#line 599 "cwebdir/ctangle.w" +#line 600 "cwebdir/ctangle.w" static void output_defs(void) @@ -1016,13 +1019,14 @@ else if(a<0200)out_char(a); else{ a= (a-0200)*0400+*cur_byte++; if(a<024000){ -cur_val= a;out_char(identifier); +cur_val= (int)a;out_char(identifier); } #line 167 "cwebdir/ctang-w2c.ch" else if(a<050000)confusion(_("macro defs have strange char")); -#line 625 "cwebdir/ctangle.w" +#line 626 "cwebdir/ctangle.w" else{ -cur_val= a-050000;cur_section= cur_val;out_char(section_number); +cur_val= (int)a-050000;cur_section= (sixteen_bits)cur_val; +out_char(section_number); } } @@ -1034,7 +1038,7 @@ pop_level(false); } /*:54*//*55:*/ -#line 642 "cwebdir/ctangle.w" +#line 644 "cwebdir/ctangle.w" static void out_char( @@ -1047,7 +1051,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 710 "cwebdir/ctangle.w" +#line 712 "cwebdir/ctangle.w" case identifier: if(out_state==num_or_id)C_putc(' '); @@ -1059,25 +1063,25 @@ else C_printf("%s",translit[(eight_bits)(*j)-0200]); out_state= num_or_id;break; /*:59*/ -#line 653 "cwebdir/ctangle.w" +#line 655 "cwebdir/ctangle.w" /*60:*/ -#line 720 "cwebdir/ctangle.w" +#line 722 "cwebdir/ctangle.w" case section_number: if(cur_val> 0)C_printf("/*%d:*/",cur_val); else if(cur_val<0)C_printf("/*:%d*/",-cur_val); else if(protect){ cur_byte+= 4; -cur_char= '\n'; +cur_char= (eight_bits)'\n'; goto restart; }else{ sixteen_bits a; a= *cur_byte++*0400; a+= *cur_byte++; -C_printf("\n#line %d \"",a); +C_printf("\n#line %d \"",(int)a); -cur_val= (*cur_byte++-0200)*0400; +cur_val= (int)(*cur_byte++-0200)*0400; cur_val+= *cur_byte++; for(j= (cur_val+name_dir)->byte_start,k= (cur_val+name_dir+1)->byte_start; j<k;j++){ @@ -1089,10 +1093,10 @@ C_putc('"');C_putc('\n'); break; /*:60*/ -#line 654 "cwebdir/ctangle.w" +#line 656 "cwebdir/ctangle.w" /*56:*/ -#line 672 "cwebdir/ctangle.w" +#line 674 "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; @@ -1113,7 +1117,7 @@ case minus_gt_ast:C_putc('-');C_putc('>');C_putc('*');out_state= normal; break; /*:56*/ -#line 655 "cwebdir/ctangle.w" +#line 657 "cwebdir/ctangle.w" case'=':case'>':C_putc(cur_char);C_putc(' '); out_state= normal;break; @@ -1132,7 +1136,7 @@ default:C_putc(cur_char);out_state= normal;break; } /*:55*//*64:*/ -#line 801 "cwebdir/ctangle.w" +#line 803 "cwebdir/ctangle.w" static eight_bits skip_ahead(void) @@ -1150,7 +1154,7 @@ if(c!=ignore||*(loc-1)=='>')return c; } /*:64*//*67:*/ -#line 840 "cwebdir/ctangle.w" +#line 842 "cwebdir/ctangle.w" static boolean skip_comment( boolean is_long_comment) @@ -1163,7 +1167,7 @@ if(get_line())return comment_continues= true; else{ #line 173 "cwebdir/ctang-w2c.ch" err_print(_("! Input ended in mid-comment")); -#line 851 "cwebdir/ctangle.w" +#line 853 "cwebdir/ctangle.w" return comment_continues= false; } @@ -1178,7 +1182,7 @@ if(c=='@'){ if(ccode[(eight_bits)*loc]==new_section){ #line 179 "cwebdir/ctang-w2c.ch" err_print(_("! Section name ended in mid-comment"));loc--; -#line 864 "cwebdir/ctangle.w" +#line 866 "cwebdir/ctangle.w" return comment_continues= false; } @@ -1188,7 +1192,7 @@ else loc++; } /*:67*//*69:*/ -#line 881 "cwebdir/ctangle.w" +#line 883 "cwebdir/ctangle.w" static eight_bits get_next(void) @@ -1202,7 +1206,7 @@ if(get_line()==false)return new_section; else if(print_where&&!no_where){ print_where= false; /*85:*/ -#line 1224 "cwebdir/ctangle.w" +#line 1229 "cwebdir/ctangle.w" { eight_bits a; @@ -1219,21 +1223,20 @@ store_id(a); } /*:85*/ -#line 893 "cwebdir/ctangle.w" +#line 895 "cwebdir/ctangle.w" } -else return'\n'; +else return(eight_bits)'\n'; } -c= *loc; +c= (eight_bits)*loc; if(comment_continues||(c=='/'&&(*(loc+1)=='*'||*(loc+1)=='/'))){ -skip_comment(comment_continues||*(loc+1)=='*'); +if(skip_comment(comment_continues||*(loc+1)=='*'))return'\n'; -if(comment_continues)return'\n'; else continue; } loc++; if(xisdigit(c)||c=='.')/*73:*/ -#line 965 "cwebdir/ctangle.w" +#line 967 "cwebdir/ctangle.w" { boolean hex_flag= false; id_first= loc-1; @@ -1267,15 +1270,15 @@ return constant; } /*:73*/ -#line 905 "cwebdir/ctangle.w" +#line 906 "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 1002 "cwebdir/ctangle.w" +#line 1004 "cwebdir/ctangle.w" { -char delim= c; +char delim= (char)c; id_first= section_text+1; id_loc= section_text;*++id_loc= delim; if(delim=='L'||delim=='u'||delim=='U'){ @@ -1287,33 +1290,33 @@ if(loc>=limit){ if(*(limit-1)!='\\'){ #line 185 "cwebdir/ctang-w2c.ch" err_print(_("! String didn't end"));loc= limit;break; -#line 1014 "cwebdir/ctangle.w" +#line 1016 "cwebdir/ctangle.w" } if(get_line()==false){ #line 191 "cwebdir/ctang-w2c.ch" err_print(_("! Input ended in middle of string"));loc= buffer;break; -#line 1018 "cwebdir/ctangle.w" +#line 1020 "cwebdir/ctangle.w" } else if(++id_loc<=section_text_end)*id_loc= '\n'; } -if((c= *loc++)==delim){ -if(++id_loc<=section_text_end)*id_loc= c; +if((c= (eight_bits)*loc++)==delim){ +if(++id_loc<=section_text_end)*id_loc= (char)c; break; } if(c=='\\'){ if(loc>=limit)continue; if(++id_loc<=section_text_end)*id_loc= '\\'; -c= *loc++; +c= (eight_bits)*loc++; } -if(++id_loc<=section_text_end)*id_loc= c; +if(++id_loc<=section_text_end)*id_loc= (char)c; } if(id_loc>=section_text_end){ #line 197 "cwebdir/ctang-w2c.ch" fputs(_("\n! String too long: "),stdout); -#line 1036 "cwebdir/ctangle.w" +#line 1038 "cwebdir/ctangle.w" term_write(section_text+1,25); err_print("..."); @@ -1323,94 +1326,94 @@ return string; } /*:74*/ -#line 909 "cwebdir/ctangle.w" +#line 910 "cwebdir/ctangle.w" -else if(isalpha(c)||isxalpha(c)||ishigh(c)) +else if(isalpha((int)c)||isxalpha(c)||ishigh(c)) /*72:*/ -#line 956 "cwebdir/ctangle.w" +#line 958 "cwebdir/ctangle.w" { id_first= --loc; do ++loc; -while(isalpha((eight_bits)*loc)||isdigit((eight_bits)*loc) -||isxalpha((eight_bits)*loc)||ishigh((eight_bits)*loc)); +while(isalpha((int)*loc)||isdigit((int)*loc) +||isxalpha(*loc)||ishigh(*loc)); id_loc= loc;return identifier; } /*:72*/ -#line 911 "cwebdir/ctangle.w" +#line 912 "cwebdir/ctangle.w" else if(c=='@')/*75:*/ -#line 1047 "cwebdir/ctangle.w" +#line 1049 "cwebdir/ctangle.w" switch(c= ccode[(eight_bits)*loc++]){ case ignore:continue; #line 203 "cwebdir/ctang-w2c.ch" case translit_code:err_print(_("! Use @l in limbo only"));continue; -#line 1051 "cwebdir/ctangle.w" +#line 1053 "cwebdir/ctangle.w" case control_text:while((c= skip_ahead())=='@'); if(*(loc-1)!='>') #line 209 "cwebdir/ctang-w2c.ch" err_print(_("! Double @ should be used in control text")); -#line 1056 "cwebdir/ctangle.w" +#line 1058 "cwebdir/ctangle.w" continue; case section_name: cur_section_name_char= *(loc-1); /*77:*/ -#line 1092 "cwebdir/ctangle.w" +#line 1094 "cwebdir/ctangle.w" { char*k= section_text; /*79:*/ -#line 1114 "cwebdir/ctangle.w" +#line 1116 "cwebdir/ctangle.w" while(true){ if(loc> limit&&get_line()==false){ #line 227 "cwebdir/ctang-w2c.ch" err_print(_("! Input ended in section name")); -#line 1118 "cwebdir/ctangle.w" +#line 1120 "cwebdir/ctangle.w" loc= buffer+1;break; } -c= *loc; +c= (eight_bits)*loc; /*80:*/ -#line 1137 "cwebdir/ctangle.w" +#line 1139 "cwebdir/ctangle.w" if(c=='@'){ -c= *(loc+1); +c= (eight_bits)*(loc+1); if(c=='>'){ loc+= 2;break; } if(ccode[(eight_bits)c]==new_section){ #line 239 "cwebdir/ctang-w2c.ch" err_print(_("! Section name didn't end"));break; -#line 1145 "cwebdir/ctangle.w" +#line 1147 "cwebdir/ctangle.w" } if(ccode[(eight_bits)c]==section_name){ #line 245 "cwebdir/ctang-w2c.ch" err_print(_("! Nesting of section names not allowed"));break; -#line 1149 "cwebdir/ctangle.w" +#line 1151 "cwebdir/ctangle.w" } *(++k)= '@';loc++; } /*:80*/ -#line 1122 "cwebdir/ctangle.w" +#line 1124 "cwebdir/ctangle.w" loc++;if(k<section_text_end)k++; if(xisspace(c)){ -c= ' ';if(*(k-1)==' ')k--; +c= (eight_bits)' ';if(*(k-1)==' ')k--; } -*k= c; +*k= (char)c; } if(k>=section_text_end){ #line 233 "cwebdir/ctang-w2c.ch" fputs(_("\n! Section name too long: "),stdout); -#line 1131 "cwebdir/ctangle.w" +#line 1133 "cwebdir/ctangle.w" term_write(section_text+1,25); printf("...");mark_harmless; @@ -1418,7 +1421,7 @@ printf("...");mark_harmless; if(*k==' '&&k> section_text)k--; /*:79*/ -#line 1094 "cwebdir/ctangle.w" +#line 1096 "cwebdir/ctangle.w" if(k-section_text> 3&&strncmp(k-2,"...",3)==0) cur_section_name= section_lookup(section_text+1,k-3,true); @@ -1427,7 +1430,7 @@ else cur_section_name= section_lookup(section_text+1,k,false); if(cur_section_name_char=='(') /*47:*/ -#line 503 "cwebdir/ctangle.w" +#line 504 "cwebdir/ctangle.w" { for(an_output_file= cur_out_file; @@ -1438,36 +1441,36 @@ if(cur_out_file> output_files) *--cur_out_file= cur_section_name; #line 91 "cwebdir/ctang-w2c.ch" else overflow(_("output files")); -#line 512 "cwebdir/ctangle.w" +#line 513 "cwebdir/ctangle.w" } } /*:47*/ -#line 1102 "cwebdir/ctangle.w" +#line 1104 "cwebdir/ctangle.w" return section_name; } /*:77*/ -#line 1060 "cwebdir/ctangle.w" +#line 1062 "cwebdir/ctangle.w" case string:/*81:*/ -#line 1159 "cwebdir/ctangle.w" +#line 1161 "cwebdir/ctangle.w" id_first= loc++;*(limit+1)= '@';*(limit+2)= '>'; while(*loc!='@'||*(loc+1)!='>')loc++; #line 251 "cwebdir/ctang-w2c.ch" if(loc>=limit)err_print(_("! Verbatim string didn't end")); -#line 1163 "cwebdir/ctangle.w" +#line 1165 "cwebdir/ctangle.w" id_loc= loc;loc+= 2; return string; /*:81*/ -#line 1061 "cwebdir/ctangle.w" +#line 1063 "cwebdir/ctangle.w" case ord:/*76:*/ -#line 1072 "cwebdir/ctangle.w" +#line 1074 "cwebdir/ctangle.w" id_first= loc; if(*loc=='\\') @@ -1477,7 +1480,7 @@ if(*loc=='@'){ if(*(loc+1)!='@') #line 215 "cwebdir/ctang-w2c.ch" err_print(_("! Double @ should be used in ASCII constant")); -#line 1080 "cwebdir/ctangle.w" +#line 1082 "cwebdir/ctangle.w" else loc++; } @@ -1485,7 +1488,7 @@ loc++; if(loc> limit){ #line 221 "cwebdir/ctang-w2c.ch" err_print(_("! String didn't end"));loc= limit-1;break; -#line 1086 "cwebdir/ctangle.w" +#line 1088 "cwebdir/ctangle.w" } } @@ -1493,22 +1496,23 @@ loc++; return ord; /*:76*/ -#line 1062 "cwebdir/ctangle.w" +#line 1064 "cwebdir/ctangle.w" default:return c; } /*:75*/ -#line 912 "cwebdir/ctangle.w" +#line 913 "cwebdir/ctangle.w" else if(xisspace(c)){ if(!preprocessing||loc> limit)continue; -else return' '; +else return(eight_bits)' '; + } else if(c=='#'&&loc==buffer+1)preprocessing= true; mistake:/*71:*/ -#line 933 "cwebdir/ctangle.w" +#line 935 "cwebdir/ctangle.w" switch(c){ case'+':if(*loc=='+')compress(plus_plus);break; @@ -1533,14 +1537,14 @@ case'!':if(*loc=='=')compress(non_eq);break; } /*:71*/ -#line 919 "cwebdir/ctangle.w" +#line 921 "cwebdir/ctangle.w" return c; } } /*:69*//*83:*/ -#line 1192 "cwebdir/ctangle.w" +#line 1197 "cwebdir/ctangle.w" static void scan_repl( @@ -1548,7 +1552,7 @@ eight_bits t) { sixteen_bits a; if(t==section_name)/*85:*/ -#line 1224 "cwebdir/ctangle.w" +#line 1229 "cwebdir/ctangle.w" { eight_bits a; @@ -1565,38 +1569,38 @@ store_id(a); } /*:85*/ -#line 1198 "cwebdir/ctangle.w" +#line 1203 "cwebdir/ctangle.w" while(true)switch(a= get_next()){ /*86:*/ -#line 1239 "cwebdir/ctangle.w" +#line 1244 "cwebdir/ctangle.w" case identifier:store_id(a);break; case section_name:if(t!=section_name)goto done; else{ /*87:*/ -#line 1270 "cwebdir/ctangle.w" +#line 1278 "cwebdir/ctangle.w" { char*try_loc= loc; while(*try_loc==' '&&try_loc<limit)try_loc++; if(*try_loc=='+'&&try_loc<limit)try_loc++; while(*try_loc==' '&&try_loc<limit)try_loc++; -#line 281 "cwebdir/ctang-w2c.ch" +#line 287 "cwebdir/ctang-w2c.ch" if(*try_loc=='=')err_print(_("! Missing `@ ' before a named section")); -#line 1276 "cwebdir/ctangle.w" +#line 1284 "cwebdir/ctangle.w" } /*:87*/ -#line 1243 "cwebdir/ctangle.w" +#line 1248 "cwebdir/ctangle.w" a= cur_section_name-name_dir; app_repl((a/0400)+0250); app_repl(a%0400); /*85:*/ -#line 1224 "cwebdir/ctangle.w" +#line 1229 "cwebdir/ctangle.w" { eight_bits a; @@ -1613,12 +1617,13 @@ store_id(a); } /*:85*/ -#line 1247 "cwebdir/ctangle.w" -break; +#line 1252 "cwebdir/ctangle.w" + } -#line 269 "cwebdir/ctang-w2c.ch" +break; +#line 275 "cwebdir/ctang-w2c.ch" case output_defs_code:if(t!=section_name)err_print(_("! Misplaced @h")); -#line 1250 "cwebdir/ctangle.w" +#line 1256 "cwebdir/ctangle.w" else{ output_defs_seen= true; @@ -1626,7 +1631,7 @@ a= output_defs_flag; app_repl((a/0400)+0200); app_repl(a%0400); /*85:*/ -#line 1224 "cwebdir/ctangle.w" +#line 1229 "cwebdir/ctangle.w" { eight_bits a; @@ -1643,39 +1648,40 @@ store_id(a); } /*:85*/ -#line 1256 "cwebdir/ctangle.w" +#line 1262 "cwebdir/ctangle.w" } break; case constant:case string: /*88:*/ -#line 1287 "cwebdir/ctangle.w" +#line 1295 "cwebdir/ctangle.w" app_repl(a); while(id_first<id_loc){ if(*id_first=='@'){ if(*(id_first+1)=='@')id_first++; -#line 287 "cwebdir/ctang-w2c.ch" +#line 293 "cwebdir/ctang-w2c.ch" else err_print(_("! Double @ should be used in string")); -#line 1293 "cwebdir/ctangle.w" +#line 1301 "cwebdir/ctangle.w" } else if(a==constant&&*id_first=='\''&&!keep_digit_separators) id_first++; app_repl(*id_first++); } -app_repl(a);break; +app_repl(a); /*:88*/ -#line 1260 "cwebdir/ctangle.w" +#line 1266 "cwebdir/ctangle.w" +break; case ord: /*89:*/ -#line 1305 "cwebdir/ctangle.w" +#line 1313 "cwebdir/ctangle.w" { -int c= (eight_bits)*id_first; +int c= (int)((eight_bits)*id_first); if(c=='\\'){ -c= *++id_first; +c= (int)((eight_bits)*++id_first); if(c>='0'&&c<='7'){ c-= '0'; if(*(id_first+1)>='0'&&*(id_first+1)<='7'){ @@ -1694,49 +1700,49 @@ case'r':c= '\r';break; case'a':c= '\7';break; case'?':c= '?';break; case'x': -if(xisdigit(*(id_first+1)))c= *(++id_first)-'0'; +if(xisdigit(*(id_first+1)))c= (int)(*(++id_first)-'0'); else if(xisxdigit(*(id_first+1))){ ++id_first; -c= toupper((eight_bits)*id_first)-'A'+10; +c= toupper((int)*id_first)-'A'+10; } -if(xisdigit(*(id_first+1)))c= 16*c+*(++id_first)-'0'; +if(xisdigit(*(id_first+1)))c= 16*c+(int)(*(++id_first)-'0'); else if(xisxdigit(*(id_first+1))){ ++id_first; -c= 16*c+toupper((eight_bits)*id_first)-'A'+10; +c= 16*c+toupper((int)*id_first)-(int)'A'+10; } break; case'\\':c= '\\';break; case'\'':c= '\'';break; case'\"':c= '\"';break; -#line 293 "cwebdir/ctang-w2c.ch" +#line 299 "cwebdir/ctang-w2c.ch" default:err_print(_("! Unrecognized escape sequence")); -#line 1342 "cwebdir/ctangle.w" +#line 1350 "cwebdir/ctangle.w" } } app_repl(constant); -if(c>=100)app_repl('0'+c/100); -if(c>=10)app_repl('0'+(c/10)%10); -app_repl('0'+c%10); +if(c>=100)app_repl((int)'0'+c/100); +if(c>=10)app_repl((int)'0'+(c/10)%10); +app_repl((int)'0'+c%10); app_repl(constant); } -break; /*:89*/ -#line 1262 "cwebdir/ctangle.w" +#line 1269 "cwebdir/ctangle.w" +break; case definition:case format_code:case begin_C:if(t!=section_name)goto done; else{ -#line 275 "cwebdir/ctang-w2c.ch" +#line 281 "cwebdir/ctang-w2c.ch" err_print(_("! @d, @f and @c are ignored in C text"));continue; -#line 1266 "cwebdir/ctangle.w" +#line 1274 "cwebdir/ctangle.w" } case new_section:goto done; /*:86*/ -#line 1203 "cwebdir/ctangle.w" +#line 1208 "cwebdir/ctangle.w" case')':app_repl(a); if(t==macro)app_repl(' '); @@ -1744,14 +1750,14 @@ break; default:app_repl(a); } done:next_control= (eight_bits)a; -#line 263 "cwebdir/ctang-w2c.ch" +#line 269 "cwebdir/ctang-w2c.ch" if(text_ptr> text_info_end)overflow(_("text")); -#line 1211 "cwebdir/ctangle.w" +#line 1216 "cwebdir/ctangle.w" cur_text= text_ptr;(++text_ptr)->tok_start= tok_ptr; } /*:83*//*90:*/ -#line 1364 "cwebdir/ctangle.w" +#line 1371 "cwebdir/ctangle.w" static void scan_section(void) @@ -1761,12 +1767,12 @@ text_pointer q; sixteen_bits a; section_count++;no_where= true; if(*(loc-1)=='*'&&show_progress){ -printf("*%d",section_count);update_terminal; +printf("*%d",(int)section_count);update_terminal; } next_control= ignore; while(true){ /*92:*/ -#line 1405 "cwebdir/ctangle.w" +#line 1412 "cwebdir/ctangle.w" while(next_control<definition) @@ -1775,17 +1781,17 @@ loc-= 2;next_control= get_next(); } /*:92*/ -#line 1378 "cwebdir/ctangle.w" +#line 1385 "cwebdir/ctangle.w" if(next_control==definition){ /*93:*/ -#line 1412 "cwebdir/ctangle.w" +#line 1419 "cwebdir/ctangle.w" while((next_control= get_next())=='\n'); if(next_control!=identifier){ -#line 299 "cwebdir/ctang-w2c.ch" +#line 305 "cwebdir/ctang-w2c.ch" err_print(_("! Definition flushed, must start with identifier")); -#line 1416 "cwebdir/ctangle.w" +#line 1423 "cwebdir/ctangle.w" continue; } @@ -1797,7 +1803,7 @@ scan_repl(macro); cur_text->text_link= macro; /*:93*/ -#line 1380 "cwebdir/ctangle.w" +#line 1387 "cwebdir/ctangle.w" continue; } @@ -1807,14 +1813,14 @@ p= name_dir;break; if(next_control==section_name){ p= cur_section_name; /*94:*/ -#line 1434 "cwebdir/ctangle.w" +#line 1441 "cwebdir/ctangle.w" while((next_control= get_next())=='+'); if(next_control!='='&&next_control!=eq_eq) continue; /*:94*/ -#line 1388 "cwebdir/ctangle.w" +#line 1395 "cwebdir/ctangle.w" break; } @@ -1822,20 +1828,20 @@ return; } no_where= print_where= false; /*95:*/ -#line 1439 "cwebdir/ctangle.w" +#line 1446 "cwebdir/ctangle.w" /*96:*/ -#line 1444 "cwebdir/ctangle.w" +#line 1451 "cwebdir/ctangle.w" store_two_bytes((sixteen_bits)(0150000+section_count)); /*:96*/ -#line 1440 "cwebdir/ctangle.w" +#line 1447 "cwebdir/ctangle.w" scan_repl(section_name); /*97:*/ -#line 1448 "cwebdir/ctangle.w" +#line 1455 "cwebdir/ctangle.w" if(p==name_dir||p==NULL){ last_unnamed->text_link= cur_text-text_info;last_unnamed= cur_text; @@ -1852,16 +1858,16 @@ cur_text->text_link= section_flag; /*:97*/ -#line 1442 "cwebdir/ctangle.w" +#line 1449 "cwebdir/ctangle.w" /*:95*/ -#line 1394 "cwebdir/ctangle.w" +#line 1401 "cwebdir/ctangle.w" } /*:90*//*98:*/ -#line 1463 "cwebdir/ctangle.w" +#line 1470 "cwebdir/ctangle.w" static void phase_one(void){ @@ -1874,7 +1880,7 @@ check_complete(); } /*:98*//*100:*/ -#line 1479 "cwebdir/ctangle.w" +#line 1486 "cwebdir/ctangle.w" static void skip_limbo(void) @@ -1888,15 +1894,15 @@ char c= *loc++; if(ccode[(eight_bits)c]==new_section)break; switch(ccode[(eight_bits)c]){ case translit_code:/*102:*/ -#line 1509 "cwebdir/ctangle.w" +#line 1516 "cwebdir/ctangle.w" while(xisspace(*loc)&&loc<limit)loc++; loc+= 3; if(loc> limit||!xisxdigit(*(loc-3))||!xisxdigit(*(loc-2)) ||(*(loc-3)>='0'&&*(loc-3)<='7')||!xisspace(*(loc-1))) -#line 317 "cwebdir/ctang-w2c.ch" +#line 323 "cwebdir/ctang-w2c.ch" err_print(_("! Improper hex number following @l")); -#line 1515 "cwebdir/ctangle.w" +#line 1522 "cwebdir/ctangle.w" else{ unsigned int i; @@ -1906,9 +1912,9 @@ while(xisspace(*loc)&&loc<limit)loc++; beg= loc; while(loc<limit&&(xisalpha(*loc)||xisdigit(*loc)||*loc=='_'))loc++; if(loc-beg>=translit_length) -#line 323 "cwebdir/ctang-w2c.ch" +#line 329 "cwebdir/ctang-w2c.ch" err_print(_("! Replacement string in @l too long")); -#line 1525 "cwebdir/ctangle.w" +#line 1532 "cwebdir/ctangle.w" else{ strncpy(translit[i-0200],beg,(size_t)(loc-beg)); @@ -1917,21 +1923,21 @@ translit[i-0200][loc-beg]= '\0'; } /*:102*/ -#line 1491 "cwebdir/ctangle.w" +#line 1498 "cwebdir/ctangle.w" break; case format_code:case'@':break; case control_text:if(c=='q'||c=='Q'){ -while((c= skip_ahead())=='@'); +while((c= (char)skip_ahead())=='@'); if(*(loc-1)!='>') -#line 305 "cwebdir/ctang-w2c.ch" +#line 311 "cwebdir/ctang-w2c.ch" err_print(_("! Double @ should be used in control text")); -#line 1497 "cwebdir/ctangle.w" +#line 1504 "cwebdir/ctangle.w" break; } -#line 311 "cwebdir/ctang-w2c.ch" +#line 317 "cwebdir/ctang-w2c.ch" default:err_print(_("! Double @ should be used in limbo")); -#line 1501 "cwebdir/ctangle.w" +#line 1508 "cwebdir/ctangle.w" } } @@ -1939,22 +1945,22 @@ default:err_print(_("! Double @ should be used in limbo")); } /*:100*//*103:*/ -#line 1535 "cwebdir/ctangle.w" +#line 1542 "cwebdir/ctangle.w" void print_stats(void){ -#line 336 "cwebdir/ctang-w2c.ch" +#line 342 "cwebdir/ctang-w2c.ch" puts(_("\nMemory usage statistics:")); -printf(_("%ld names (out of %ld)\n"), +printf(_("%td names (out of %ld)\n"), (ptrdiff_t)(name_ptr-name_dir),(long)max_names); -printf(_("%ld replacement texts (out of %ld)\n"), +printf(_("%td replacement texts (out of %ld)\n"), (ptrdiff_t)(text_ptr-text_info),(long)max_texts); -printf(_("%ld bytes (out of %ld)\n"), +printf(_("%td bytes (out of %ld)\n"), (ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes); -printf(_("%ld tokens (out of %ld)\n"), -#line 1546 "cwebdir/ctangle.w" +printf(_("%td tokens (out of %ld)\n"), +#line 1553 "cwebdir/ctangle.w" (ptrdiff_t)(tok_ptr-tok_mem),(long)max_toks); } -#line 349 "cwebdir/ctang-w2c.ch" +#line 355 "cwebdir/ctang-w2c.ch" /*:103*/ diff --git a/Build/source/texk/web2c/cwebboot.cin b/Build/source/texk/web2c/cwebboot.cin index d9f7c934973..821f88c1707 100644 --- a/Build/source/texk/web2c/cwebboot.cin +++ b/Build/source/texk/web2c/cwebboot.cin @@ -15,7 +15,7 @@ #endif #include <ctype.h> -#include <stdbool.h> +#include <kpathsea/simpletypes.h> #include <stddef.h> #include <stdint.h> #include <stdlib.h> @@ -36,15 +36,13 @@ /*:89*//*91:*/ #line 764 "cwebdir/comm-w2c.ch" -typedef bool boolean; -#define HAVE_BOOLEAN #include <kpathsea/kpathsea.h> #include <w2c/config.h> #include <lib/lib.h> /*:91*//*94:*/ -#line 803 "cwebdir/comm-w2c.ch" +#line 801 "cwebdir/comm-w2c.ch" #define CWEB #include "help.h" @@ -72,12 +70,12 @@ typedef bool boolean; #define compress(c) if(loc++<=limit) return c \ -#define xisalpha(c) (isalpha((eight_bits) (c) ) &&((eight_bits) (c) <0200) ) -#define xisdigit(c) (isdigit((eight_bits) (c) ) &&((eight_bits) (c) <0200) ) -#define xisspace(c) (isspace((eight_bits) (c) ) &&((eight_bits) (c) <0200) ) -#define xislower(c) (islower((eight_bits) (c) ) &&((eight_bits) (c) <0200) ) -#define xisupper(c) (isupper((eight_bits) (c) ) &&((eight_bits) (c) <0200) ) -#define xisxdigit(c) (isxdigit((eight_bits) (c) ) &&((eight_bits) (c) <0200) ) +#define xisalpha(c) (isalpha((int) (c) ) &&((eight_bits) (c) <0200) ) +#define xisdigit(c) (isdigit((int) (c) ) &&((eight_bits) (c) <0200) ) +#define xisspace(c) (isspace((int) (c) ) &&((eight_bits) (c) <0200) ) +#define xislower(c) (islower((int) (c) ) &&((eight_bits) (c) <0200) ) +#define xisupper(c) (isupper((int) (c) ) &&((eight_bits) (c) <0200) ) +#define xisxdigit(c) (isxdigit((int) (c) ) &&((eight_bits) (c) <0200) ) #define isxalpha(c) ((c) =='_'||(c) =='$') \ #define ishigh(c) ((eight_bits) (c) > 0177) \ @@ -130,13 +128,13 @@ typedef bool boolean; #define max_sections 4000 \ #define lines_dont_match (change_limit-change_buffer!=limit-buffer|| \ -strncmp(buffer,change_buffer,(size_t) (limit-buffer) ) ) \ +strncmp(buffer,change_buffer,(size_t) (limit-buffer) ) !=0) \ #define if_section_start_make_pending(b) \ *limit= '!'; \ for(loc= buffer;xisspace(*loc) ;loc++) ; \ *limit= ' '; \ -if(*loc=='@'&&(xisspace(*(loc+1) ) ||*(loc+1) =='*') ) change_pending= b; \ +if(*loc=='@'&&(xisspace(*(loc+1) ) ||*(loc+1) =='*') ) change_pending= b \ #define too_long() {include_depth--; \ err_print(_("! Include file name too long") ) ;goto restart;} \ @@ -144,10 +142,10 @@ err_print(_("! Include file name too long") ) ;goto restart;} \ #define hash_size 8501 \ #define first_chunk(p) ((p) ->byte_start+2) -#define prefix_length(p) (int) ((eight_bits) *((p) ->byte_start) *256+ \ +#define prefix_length(p) (size_t) ((eight_bits) *((p) ->byte_start) *256+ \ (eight_bits) *((p) ->byte_start+1) ) -#define set_prefix_length(p,m) (*((p) ->byte_start) = (m) /256, \ -*((p) ->byte_start+1) = (m) %256) \ +#define set_prefix_length(p,m) (*((p) ->byte_start) = (char) ((m) /256) , \ +*((p) ->byte_start+1) = (char) ((m) %256) ) \ #define less 0 #define equal 1 @@ -175,9 +173,8 @@ err_print(_("! Include file name too long") ) ;goto restart;} \ #line 64 "cwebdir/common.w" /*2:*/ -#line 33 "cwebdir/comm-w2c.h" +#line 34 "cwebdir/comm-w2c.h" -typedef bool boolean; typedef uint8_t eight_bits; typedef uint16_t sixteen_bits; typedef enum{ @@ -427,7 +424,7 @@ extern void reset_input(void); #line 184 "cwebdir/comm-w2c.h" extern boolean names_match(name_pointer,const char*,size_t,eight_bits); -extern name_pointer id_lookup(const char*,const char*,char); +extern name_pointer id_lookup(const char*,const char*,eight_bits); extern name_pointer section_lookup(char*,char*,boolean); extern void init_node(name_pointer); @@ -466,13 +463,13 @@ static void check_change(void); /*:33*//*55:*/ #line 764 "cwebdir/common.w" -static int web_strcmp(char*,int,char*,int); +static int web_strcmp(char*,size_t,char*,size_t); static name_pointer add_section_name(name_pointer,int,char*,char*,boolean); static void extend_section_name(name_pointer,char*,char*,boolean); /*:55*//*64:*/ #line 991 "cwebdir/common.w" -static int section_name_cmp(char**,int,name_pointer); +static int section_name_cmp(char**,size_t,name_pointer); /*:64*//*76:*/ #line 1186 "cwebdir/common.w" @@ -480,7 +477,7 @@ static void scan_args(void); #line 507 "cwebdir/comm-w2c.ch" /*:76*//*96:*/ -#line 816 "cwebdir/comm-w2c.ch" +#line 814 "cwebdir/comm-w2c.ch" static void cb_usage(const_string str); static void cb_usagehelp(const_string*message,const_string bug_email); @@ -513,7 +510,7 @@ for(h= hash;h<=hash_end;*h++= NULL); #line 78 "cwebdir/comm-w2c.ch" /*92:*/ -#line 778 "cwebdir/comm-w2c.ch" +#line 776 "cwebdir/comm-w2c.ch" kpse_set_program_name(argv[0],"cweb"); @@ -632,7 +629,7 @@ change_line++; if(!input_ln(change_file))return; if(limit<buffer+2)continue; if(buffer[0]!='@')continue; -if(xisupper(buffer[1]))buffer[1]= tolower((eight_bits)buffer[1]); +if(xisupper(buffer[1]))buffer[1]= tolower((int)buffer[1]); if(buffer[1]=='x')break; if(buffer[1]=='y'||buffer[1]=='z'||buffer[1]=='i'){ loc= buffer+2; @@ -698,7 +695,7 @@ change_limit= change_buffer;changing= false; return; } if(limit> buffer+1&&buffer[0]=='@'){ -char xyz_code= xisupper(buffer[1])?tolower((eight_bits)buffer[1]):buffer[1]; +char xyz_code= xisupper(buffer[1])?tolower((int)buffer[1]):buffer[1]; /*34:*/ #line 336 "cwebdir/common.w" @@ -823,7 +820,7 @@ changed_section[section_count]= true;change_pending= false; } *limit= ' '; if(buffer[0]=='@'){ -if(xisupper(buffer[1]))buffer[1]= tolower((eight_bits)buffer[1]); +if(xisupper(buffer[1]))buffer[1]= tolower((int)buffer[1]); if(buffer[1]=='x'||buffer[1]=='y'){ loc= buffer+2; #line 280 "cwebdir/comm-w2c.ch" @@ -953,18 +950,18 @@ name_pointer id_lookup( const char*first, const char*last, -char t) +eight_bits t) { const char*i= first; int h; -int l; +size_t l; name_pointer p; if(last==NULL)for(last= first;*last!='\0';last++); -l= (int)(last-first); +l= (size_t)(last-first); /*49:*/ #line 656 "cwebdir/common.w" -h= (eight_bits)*i; +h= (int)((eight_bits)*i); while(++i<last)h= (h+h+(int)((eight_bits)*i))%hash_size; @@ -1049,7 +1046,7 @@ print_prefix_name( name_pointer p) { char*s= first_chunk(p); -int l= prefix_length(p); +size_t l= prefix_length(p); term_write(s,l); if(s+l<(p+1)->byte_start)term_write("...",3); } @@ -1059,9 +1056,9 @@ if(s+l<(p+1)->byte_start)term_write("...",3); static int web_strcmp( char*j, -int j_len, +size_t j_len, char*k, -int k_len) +size_t k_len) { char*j1= j+j_len,*k1= k+k_len; while(k<k1&&j<j1&&*j==*k)k++,j++; @@ -1085,7 +1082,7 @@ boolean ispref) { name_pointer p= name_ptr; char*s= first_chunk(p); -int name_len= (int)(last-first)+ispref; +size_t name_len= (size_t)(last-first+(int)ispref); #line 307 "cwebdir/comm-w2c.ch" if(s+name_len> byte_mem_end)overflow(_("byte memory")); if(name_ptr+1>=name_dir_end)overflow(_("name")); @@ -1116,7 +1113,7 @@ boolean ispref) { char*s; name_pointer q= p+1; -int name_len= (int)(last-first)+ispref; +size_t name_len= (size_t)(last-first+(int)ispref); #line 314 "cwebdir/comm-w2c.ch" if(name_ptr>=name_dir_end)overflow(_("name")); #line 838 "cwebdir/common.w" @@ -1146,7 +1143,7 @@ name_pointer q= NULL; name_pointer r= NULL; name_pointer par= NULL; -int name_len= (int)(last-first)+1; +size_t name_len= (size_t)(last-first+1); /*60:*/ #line 878 "cwebdir/common.w" @@ -1242,7 +1239,7 @@ return r; static int section_name_cmp( char**pfirst, -int len, +size_t len, name_pointer r) { char*first= *pfirst; @@ -1254,7 +1251,7 @@ while(true){ ss= (r+1)->byte_start-1; if(*ss==' '&&ss>=r->byte_start)ispref= true,q= q->link; else ispref= false,ss++,q= name_dir; -switch(c= web_strcmp(first,len,s,ss-s)){ +switch(c= web_strcmp(first,len,s,(size_t)(ss-s))){ case equal:if(q==name_dir) if(ispref){ *pfirst= first+(ptrdiff_t)(ss-s); @@ -1278,7 +1275,7 @@ void err_print( const char*s) { -printf(*s=='!'?"\n%s":"%s",s); +*s=='!'?printf("\n%s",s):printf("%s",s); if(web_file_open)/*67:*/ #line 1032 "cwebdir/common.w" @@ -1412,7 +1409,7 @@ if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*80:*/ if(strcmp("-help",*argv)==0||strcmp("--help",*argv)==0) /*95:*/ -#line 807 "cwebdir/comm-w2c.ch" +#line 805 "cwebdir/comm-w2c.ch" cb_usagehelp(program==ctangle?CTANGLEHELP: program==cweave?CWEAVEHELP:CTWILLHELP,NULL); @@ -1424,7 +1421,7 @@ program==cweave?CWEAVEHELP:CTWILLHELP,NULL); if(strcmp("-version",*argv)==0||strcmp("--version",*argv)==0) /*98:*/ -#line 855 "cwebdir/comm-w2c.ch" +#line 853 "cwebdir/comm-w2c.ch" printversionandexit(cb_banner, program==ctwill?"Donald E. Knuth":"Silvio Levy and Donald E. Knuth", @@ -1598,7 +1595,7 @@ cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill"); } /*:75*//*97:*/ -#line 820 "cwebdir/comm-w2c.ch" +#line 818 "cwebdir/comm-w2c.ch" static void cb_usage(const_string str) { @@ -1632,7 +1629,7 @@ history= spotless;exit(wrap_up()); } /*:97*//*99:*/ -#line 863 "cwebdir/comm-w2c.ch" +#line 861 "cwebdir/comm-w2c.ch" void cb_show_banner(void) { diff --git a/Build/source/texk/web2c/cwebdir/ChangeLog b/Build/source/texk/web2c/cwebdir/ChangeLog index 35e9962bf64..16de59bc9d4 100644 --- a/Build/source/texk/web2c/cwebdir/ChangeLog +++ b/Build/source/texk/web2c/cwebdir/ChangeLog @@ -1,3 +1,29 @@ +2021-07-14 Andreas Scherer <https://ascherer.github.io> + + * Makefile, + * comm-{mac,mini,ql,w2c}.ch, + * comm-w2c.h, + * common.c, + * common.h, + * common.w, + * ctang-{bs,pc,ql,vms,w2c,w32}.ch, + * ctangle.c, + * ctangle.w, + * ctproofmac.tex, + * ctwill-{mini,w2c}.ch, + * ctwimac.tex, + * cweav-{bs,pc,ql,vms,w2c,w32}.ch, + * cweave.w, + * cwebmac.tex, + * cwebman-w2c.ch, + * cwebman.tex, + * po/cweb[-tl].pot, + * po/de/cweb[-tl].po, + * po/it/cweb.po, + * prod-twill.w, + * prod.w, + * texinputs/pdfctwimac.tex: CWEB 4.5 and CWEBbin 2021.5. + 2021-06-06 Andreas Scherer <https://ascherer.github.io> * Makefile, @@ -20,7 +46,7 @@ * po/de/cweb[-tl].po, * po/it/cweb.po, * prod-twill.w, - * prod.w: CWEB 4.3 and CWEBbin 2021. + * prod.w: CWEB 4.4 and CWEBbin 2021.4. 2021-03-26 Andreas Scherer <https://ascherer.github.io> diff --git a/Build/source/texk/web2c/cwebdir/Makefile b/Build/source/texk/web2c/cwebdir/Makefile index 85986b6fbf6..f3a7f7c59e6 100644 --- a/Build/source/texk/web2c/cwebdir/Makefile +++ b/Build/source/texk/web2c/cwebdir/Makefile @@ -1,6 +1,6 @@ # This file is part of CWEB. # It is distributed WITHOUT ANY WARRANTY, express or implied. -# Version 4.4 --- June 2021 +# Version 4.5 --- July 2021 # Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth diff --git a/Build/source/texk/web2c/cwebdir/comm-mac.ch b/Build/source/texk/web2c/cwebdir/comm-mac.ch index aa67bf6402b..7d741e933fa 100644 --- a/Build/source/texk/web2c/cwebdir/comm-mac.ch +++ b/Build/source/texk/web2c/cwebdir/comm-mac.ch @@ -4,9 +4,9 @@ No changes to CTANGLE or CWEAVE are needed. (Contributed 13 Oct 2000 by AndPio@aol.com; slightly edited by Don Knuth) @x in limbo, change the title page document to specify Mac version - \centerline{(Version 4.4)} + \centerline{(Version 4.5)} @y - \centerline{(Version 4.4 for MacOS)} + \centerline{(Version 4.5 for MacOS)} @z @x section 23: Make input_ln accept \n, \r, \n\r, or \r\n as line endings diff --git a/Build/source/texk/web2c/cwebdir/comm-mini.ch b/Build/source/texk/web2c/cwebdir/comm-mini.ch index eed8fa55401..ddca7840a99 100644 --- a/Build/source/texk/web2c/cwebdir/comm-mini.ch +++ b/Build/source/texk/web2c/cwebdir/comm-mini.ch @@ -1,9 +1,9 @@ Limbo. @x -\def\title{Common code for CTANGLE and CWEAVE (Version 4.4 [CWEBbin 2021])} +\def\title{Common code for CTANGLE and CWEAVE (Version 4.5 [CWEBbin 2021])} @y -\def\title{COMMON (Version 4.4 [CWEBbin 2021])} +\def\title{COMMON (Version 4.5 [CWEBbin 2021])} \def\contentspagenumber{0} @z diff --git a/Build/source/texk/web2c/cwebdir/comm-ql.ch b/Build/source/texk/web2c/cwebdir/comm-ql.ch index a50abbf583d..a1949b5cb7c 100644 --- a/Build/source/texk/web2c/cwebdir/comm-ql.ch +++ b/Build/source/texk/web2c/cwebdir/comm-ql.ch @@ -10,24 +10,24 @@ ex <dev_>cc;'-v -h -c -=500000 -DCWEBINPUTS=flp2_ common_c' @x \def\v{\char'174} % vertical (|) in typewriter font -\def\title{Common code for CTANGLE and CWEAVE (Version 4.4)} +\def\title{Common code for CTANGLE and CWEAVE (Version 4.5)} \def\topofcontents{\null\vfill \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and {\ttitlefont CWEAVE}} \vskip 15pt - \centerline{(Version 4.4)} + \centerline{(Version 4.5)} \vfill} \def\botofcontents{\vfill \noindent @y \def\v{\char'174} % vertical (|) in typewriter font -\def\title{Common code for CTANGLE and CWEAVE (QL Version 4.4)} +\def\title{Common code for CTANGLE and CWEAVE (QL Version 4.5)} \def\topofcontents{\null\vfill \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and {\ttitlefont CWEAVE}} \vskip 15pt - \centerline{(Version 4.4)} + \centerline{(Version 4.5)} \vfill} \def\botofcontents{\vfill \noindent diff --git a/Build/source/texk/web2c/cwebdir/comm-w2c.ch b/Build/source/texk/web2c/cwebdir/comm-w2c.ch index ecaf3d437b7..f0aa10ca7bf 100644 --- a/Build/source/texk/web2c/cwebdir/comm-w2c.ch +++ b/Build/source/texk/web2c/cwebdir/comm-w2c.ch @@ -17,16 +17,16 @@ @q Please send comments, suggestions, etc. to tex-k@@tug.org. @> @x -\def\title{Common code for CTANGLE and CWEAVE (Version 4.4)} +\def\title{Common code for CTANGLE and CWEAVE (Version 4.5)} @y \def\Kpathsea/{{\mc KPATHSEA\spacefactor1000}} \ifacro\sanitizecommand\Kpathsea{KPATHSEA}\fi -\def\title{Common code for CTANGLE and CWEAVE (4.4 [\TeX~Live])} +\def\title{Common code for CTANGLE and CWEAVE (4.5 [\TeX~Live])} @z @x - \centerline{(Version 4.4)} + \centerline{(Version 4.5)} @y - \centerline{(Version 4.4 [\TeX~Live])} + \centerline{(Version 4.5 [\TeX~Live])} @z @x @@ -218,7 +218,7 @@ The remainder of the \.{@@i} line after the file name is ignored. char temp_file_name[max_file_name_length]; char *cur_file_name_end=cur_file_name+max_file_name_length-1; char *kk, *k=cur_file_name; - int l; /* length of file name */ + size_t l; /* length of file name */ @y char *cur_file_name_end=cur_file_name+max_file_name_length-1; char *k=cur_file_name; @@ -762,8 +762,6 @@ The directories to be searched for come from three sources: @d kpse_find_cweb(name) kpse_find_file(name,kpse_cweb_format,true) @<Include files@>= -typedef bool boolean; -#define HAVE_BOOLEAN #include <kpathsea/kpathsea.h> /* include every \Kpathsea/ header; |@!kpathsea_debug|, |@!const_string|, |@!string| */ #include <w2c/config.h> /* \&{integer} */ diff --git a/Build/source/texk/web2c/cwebdir/comm-w2c.h b/Build/source/texk/web2c/cwebdir/comm-w2c.h index 73598ddddd9..02f9477a926 100644 --- a/Build/source/texk/web2c/cwebdir/comm-w2c.h +++ b/Build/source/texk/web2c/cwebdir/comm-w2c.h @@ -2,7 +2,7 @@ % This program by Silvio Levy and Donald E. Knuth % is based on a program by Knuth. % It is distributed WITHOUT ANY WARRANTY, express or implied. -% Version 4.4 --- June 2021 (works also with later versions) +% Version 4.5 --- July 2021 (works also with later versions) % Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth @@ -30,8 +30,8 @@ First comes general stuff: @i iso_types.w +@s boolean bool @<Common code...@>= -typedef bool boolean; typedef uint8_t eight_bits; typedef uint16_t sixteen_bits; typedef enum { @@ -60,7 +60,7 @@ internationalization. #endif @# #include <ctype.h> /* definition of |@!isalpha|, |@!isdigit| and so on */ -#include <stdbool.h> /* definition of |@!bool|, |@!true| and |@!false| */ +#include <kpathsea/simpletypes.h> /* |@!boolean|, |@!true| and |@!false| */ #include <stddef.h> /* definition of |@!ptrdiff_t| */ #include <stdint.h> /* definition of |@!uint8_t| and |@!uint16_t| */ #include <stdlib.h> /* definition of |@!getenv| and |@!exit| */ @@ -95,12 +95,12 @@ extern char *id_first; /* where the current identifier begins in the buffer */ extern char *id_loc; /* just after the current identifier in the buffer */ @ Code related to input routines: -@d xisalpha(c) (isalpha((eight_bits)(c))&&((eight_bits)(c)<0200)) -@d xisdigit(c) (isdigit((eight_bits)(c))&&((eight_bits)(c)<0200)) -@d xisspace(c) (isspace((eight_bits)(c))&&((eight_bits)(c)<0200)) -@d xislower(c) (islower((eight_bits)(c))&&((eight_bits)(c)<0200)) -@d xisupper(c) (isupper((eight_bits)(c))&&((eight_bits)(c)<0200)) -@d xisxdigit(c) (isxdigit((eight_bits)(c))&&((eight_bits)(c)<0200)) +@d xisalpha(c) (isalpha((int)(c))&&((eight_bits)(c)<0200)) +@d xisdigit(c) (isdigit((int)(c))&&((eight_bits)(c)<0200)) +@d xisspace(c) (isspace((int)(c))&&((eight_bits)(c)<0200)) +@d xislower(c) (islower((int)(c))&&((eight_bits)(c)<0200)) +@d xisupper(c) (isupper((int)(c))&&((eight_bits)(c)<0200)) +@d xisxdigit(c) (isxdigit((int)(c))&&((eight_bits)(c)<0200)) @d isxalpha(c) ((c)=='_' || (c)=='$') /* non-alpha characters allowed in identifier */ @d ishigh(c) ((eight_bits)(c)>0177) @@ -183,7 +183,7 @@ extern hash_pointer h; /* index into hash-head array */ @ @<Predecl...@>= extern boolean names_match(name_pointer,const char *,size_t,eight_bits);@/ -extern name_pointer id_lookup(const char *,const char *,char); +extern name_pointer id_lookup(const char *,const char *,eight_bits); /* looks up a string in the identifier table */ extern name_pointer section_lookup(char *,char *,boolean); /* finds section name */ extern void init_node(name_pointer);@/ diff --git a/Build/source/texk/web2c/cwebdir/common.c b/Build/source/texk/web2c/cwebdir/common.c index 16733c11856..5f3b490d2ba 100644 --- a/Build/source/texk/web2c/cwebdir/common.c +++ b/Build/source/texk/web2c/cwebdir/common.c @@ -36,12 +36,12 @@ #define compress(c) if(loc++<=limit) return c \ -#define xisalpha(c) (isalpha((eight_bits) (c) ) &&((eight_bits) (c) <0200) ) -#define xisdigit(c) (isdigit((eight_bits) (c) ) &&((eight_bits) (c) <0200) ) -#define xisspace(c) (isspace((eight_bits) (c) ) &&((eight_bits) (c) <0200) ) -#define xislower(c) (islower((eight_bits) (c) ) &&((eight_bits) (c) <0200) ) -#define xisupper(c) (isupper((eight_bits) (c) ) &&((eight_bits) (c) <0200) ) -#define xisxdigit(c) (isxdigit((eight_bits) (c) ) &&((eight_bits) (c) <0200) ) +#define xisalpha(c) (isalpha((int) (c) ) &&((eight_bits) (c) <0200) ) +#define xisdigit(c) (isdigit((int) (c) ) &&((eight_bits) (c) <0200) ) +#define xisspace(c) (isspace((int) (c) ) &&((eight_bits) (c) <0200) ) +#define xislower(c) (islower((int) (c) ) &&((eight_bits) (c) <0200) ) +#define xisupper(c) (isupper((int) (c) ) &&((eight_bits) (c) <0200) ) +#define xisxdigit(c) (isxdigit((int) (c) ) &&((eight_bits) (c) <0200) ) #define isxalpha(c) ((c) =='_'||(c) =='$') \ #define ishigh(c) ((eight_bits) (c) > 0177) \ @@ -93,13 +93,13 @@ #define max_sections 2000 \ #define lines_dont_match (change_limit-change_buffer!=limit-buffer|| \ -strncmp(buffer,change_buffer,(size_t) (limit-buffer) ) ) \ +strncmp(buffer,change_buffer,(size_t) (limit-buffer) ) !=0) \ #define if_section_start_make_pending(b) \ *limit= '!'; \ for(loc= buffer;xisspace(*loc) ;loc++) ; \ *limit= ' '; \ -if(*loc=='@'&&(xisspace(*(loc+1) ) ||*(loc+1) =='*') ) change_pending= b; \ +if(*loc=='@'&&(xisspace(*(loc+1) ) ||*(loc+1) =='*') ) change_pending= b \ #define too_long() {include_depth--; \ err_print("! Include file name too long") ;goto restart;} \ @@ -107,10 +107,10 @@ err_print("! Include file name too long") ;goto restart;} \ #define hash_size 353 \ #define first_chunk(p) ((p) ->byte_start+2) -#define prefix_length(p) (int) ((eight_bits) *((p) ->byte_start) *256+ \ +#define prefix_length(p) (size_t) ((eight_bits) *((p) ->byte_start) *256+ \ (eight_bits) *((p) ->byte_start+1) ) -#define set_prefix_length(p,m) (*((p) ->byte_start) = (m) /256, \ -*((p) ->byte_start+1) = (m) %256) \ +#define set_prefix_length(p,m) (*((p) ->byte_start) = (char) ((m) /256) , \ +*((p) ->byte_start+1) = (char) ((m) %256) ) \ #define less 0 #define equal 1 @@ -344,7 +344,7 @@ extern void reset_input(void); #line 166 "common.h" extern boolean names_match(name_pointer,const char*,size_t,eight_bits); -extern name_pointer id_lookup(const char*,const char*,char); +extern name_pointer id_lookup(const char*,const char*,eight_bits); extern name_pointer section_lookup(char*,char*,boolean); extern void init_node(name_pointer); @@ -382,13 +382,13 @@ static void check_change(void); /*:33*//*55:*/ #line 764 "common.w" -static int web_strcmp(char*,int,char*,int); +static int web_strcmp(char*,size_t,char*,size_t); static name_pointer add_section_name(name_pointer,int,char*,char*,boolean); static void extend_section_name(name_pointer,char*,char*,boolean); /*:55*//*64:*/ #line 991 "common.w" -static int section_name_cmp(char**,int,name_pointer); +static int section_name_cmp(char**,size_t,name_pointer); /*:64*//*76:*/ #line 1186 "common.w" @@ -484,7 +484,7 @@ change_line++; if(!input_ln(change_file))return; if(limit<buffer+2)continue; if(buffer[0]!='@')continue; -if(xisupper(buffer[1]))buffer[1]= tolower((eight_bits)buffer[1]); +if(xisupper(buffer[1]))buffer[1]= tolower((int)buffer[1]); if(buffer[1]=='x')break; if(buffer[1]=='y'||buffer[1]=='z'||buffer[1]=='i'){ loc= buffer+2; @@ -544,7 +544,7 @@ change_limit= change_buffer;changing= false; return; } if(limit> buffer+1&&buffer[0]=='@'){ -char xyz_code= xisupper(buffer[1])?tolower((eight_bits)buffer[1]):buffer[1]; +char xyz_code= xisupper(buffer[1])?tolower((int)buffer[1]):buffer[1]; /*34:*/ #line 336 "common.w" @@ -644,7 +644,7 @@ changed_section[section_count]= true;change_pending= false; } *limit= ' '; if(buffer[0]=='@'){ -if(xisupper(buffer[1]))buffer[1]= tolower((eight_bits)buffer[1]); +if(xisupper(buffer[1]))buffer[1]= tolower((int)buffer[1]); if(buffer[1]=='x'||buffer[1]=='y'){ loc= buffer+2; err_print("! Where is the matching @z?"); @@ -707,7 +707,7 @@ include_depth++; char temp_file_name[max_file_name_length]; char*cur_file_name_end= cur_file_name+max_file_name_length-1; char*kk,*k= cur_file_name; -int l; +size_t l; if(*loc=='"'){ loc++; @@ -777,18 +777,18 @@ name_pointer id_lookup( const char*first, const char*last, -char t) +eight_bits t) { const char*i= first; int h; -int l; +size_t l; name_pointer p; if(last==NULL)for(last= first;*last!='\0';last++); -l= (int)(last-first); +l= (size_t)(last-first); /*49:*/ #line 656 "common.w" -h= (eight_bits)*i; +h= (int)((eight_bits)*i); while(++i<last)h= (h+h+(int)((eight_bits)*i))%hash_size; @@ -871,7 +871,7 @@ print_prefix_name( name_pointer p) { char*s= first_chunk(p); -int l= prefix_length(p); +size_t l= prefix_length(p); term_write(s,l); if(s+l<(p+1)->byte_start)term_write("...",3); } @@ -881,9 +881,9 @@ if(s+l<(p+1)->byte_start)term_write("...",3); static int web_strcmp( char*j, -int j_len, +size_t j_len, char*k, -int k_len) +size_t k_len) { char*j1= j+j_len,*k1= k+k_len; while(k<k1&&j<j1&&*j==*k)k++,j++; @@ -907,7 +907,7 @@ boolean ispref) { name_pointer p= name_ptr; char*s= first_chunk(p); -int name_len= (int)(last-first)+ispref; +size_t name_len= (size_t)(last-first+(int)ispref); if(s+name_len> byte_mem_end)overflow("byte memory"); if(name_ptr+1>=name_dir_end)overflow("name"); (++name_ptr)->byte_start= byte_ptr= s+name_len; @@ -936,7 +936,7 @@ boolean ispref) { char*s; name_pointer q= p+1; -int name_len= (int)(last-first)+ispref; +size_t name_len= (size_t)(last-first+(int)ispref); if(name_ptr>=name_dir_end)overflow("name"); while(q->link!=name_dir)q= q->link; q->link= name_ptr; @@ -962,7 +962,7 @@ name_pointer q= NULL; name_pointer r= NULL; name_pointer par= NULL; -int name_len= (int)(last-first)+1; +size_t name_len= (size_t)(last-first+1); /*60:*/ #line 878 "common.w" @@ -1046,7 +1046,7 @@ return r; static int section_name_cmp( char**pfirst, -int len, +size_t len, name_pointer r) { char*first= *pfirst; @@ -1058,7 +1058,7 @@ while(true){ ss= (r+1)->byte_start-1; if(*ss==' '&&ss>=r->byte_start)ispref= true,q= q->link; else ispref= false,ss++,q= name_dir; -switch(c= web_strcmp(first,len,s,ss-s)){ +switch(c= web_strcmp(first,len,s,(size_t)(ss-s))){ case equal:if(q==name_dir) if(ispref){ *pfirst= first+(ptrdiff_t)(ss-s); @@ -1082,7 +1082,7 @@ void err_print( const char*s) { -printf(*s=='!'?"\n%s":"%s",s); +*s=='!'?printf("\n%s",s):printf("%s",s); if(web_file_open)/*67:*/ #line 1032 "common.w" diff --git a/Build/source/texk/web2c/cwebdir/common.h b/Build/source/texk/web2c/cwebdir/common.h index 17717a52ddb..4f0c4d26770 100644 --- a/Build/source/texk/web2c/cwebdir/common.h +++ b/Build/source/texk/web2c/cwebdir/common.h @@ -2,7 +2,7 @@ % This program by Silvio Levy and Donald E. Knuth % is based on a program by Knuth. % It is distributed WITHOUT ANY WARRANTY, express or implied. -% Version 4.4 --- June 2021 (works also with later versions) +% Version 4.5 --- July 2021 (works also with later versions) % Copyright (C) 1987,1990,1993 Silvio Levy and Donald E. Knuth @@ -78,12 +78,12 @@ extern char *id_first; /* where the current identifier begins in the buffer */ extern char *id_loc; /* just after the current identifier in the buffer */ @ Code related to input routines: -@d xisalpha(c) (isalpha((eight_bits)(c))&&((eight_bits)(c)<0200)) -@d xisdigit(c) (isdigit((eight_bits)(c))&&((eight_bits)(c)<0200)) -@d xisspace(c) (isspace((eight_bits)(c))&&((eight_bits)(c)<0200)) -@d xislower(c) (islower((eight_bits)(c))&&((eight_bits)(c)<0200)) -@d xisupper(c) (isupper((eight_bits)(c))&&((eight_bits)(c)<0200)) -@d xisxdigit(c) (isxdigit((eight_bits)(c))&&((eight_bits)(c)<0200)) +@d xisalpha(c) (isalpha((int)(c))&&((eight_bits)(c)<0200)) +@d xisdigit(c) (isdigit((int)(c))&&((eight_bits)(c)<0200)) +@d xisspace(c) (isspace((int)(c))&&((eight_bits)(c)<0200)) +@d xislower(c) (islower((int)(c))&&((eight_bits)(c)<0200)) +@d xisupper(c) (isupper((int)(c))&&((eight_bits)(c)<0200)) +@d xisxdigit(c) (isxdigit((int)(c))&&((eight_bits)(c)<0200)) @d isxalpha(c) ((c)=='_' || (c)=='$') /* non-alpha characters allowed in identifier */ @d ishigh(c) ((eight_bits)(c)>0177) @@ -165,7 +165,7 @@ extern hash_pointer h; /* index into hash-head array */ @ @<Predecl...@>= extern boolean names_match(name_pointer,const char *,size_t,eight_bits);@/ -extern name_pointer id_lookup(const char *,const char *,char); +extern name_pointer id_lookup(const char *,const char *,eight_bits); /* looks up a string in the identifier table */ extern name_pointer section_lookup(char *,char *,boolean); /* finds section name */ extern void init_node(name_pointer);@/ diff --git a/Build/source/texk/web2c/cwebdir/common.w b/Build/source/texk/web2c/cwebdir/common.w index dba196747a2..bca9b5a2bbf 100644 --- a/Build/source/texk/web2c/cwebdir/common.w +++ b/Build/source/texk/web2c/cwebdir/common.w @@ -2,7 +2,7 @@ % This program by Silvio Levy and Donald E. Knuth % is based on a program by Knuth. % It is distributed WITHOUT ANY WARRANTY, express or implied. -% Version 4.4 --- June 2021 +% Version 4.5 --- July 2021 % Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth @@ -22,12 +22,12 @@ \def\v{\char'174} % vertical (|) in typewriter font -\def\title{Common code for CTANGLE and CWEAVE (Version 4.4)} +\def\title{Common code for CTANGLE and CWEAVE (Version 4.5)} \def\topofcontents{\null\vfill \centerline{\titlefont Common code for {\ttitlefont CTANGLE} and {\ttitlefont CWEAVE}} \vskip 15pt - \centerline{(Version 4.4)} + \centerline{(Version 4.5)} \vfill} \def\botofcontents{\vfill \noindent @@ -211,7 +211,7 @@ so that no further matches will be made. Here's a shorthand expression for inequality between the two lines: @d lines_dont_match (change_limit-change_buffer != limit-buffer @| || - strncmp(buffer, change_buffer, (size_t)(limit-buffer))) + strncmp(buffer, change_buffer, (size_t)(limit-buffer)) != 0) @<Global var...@>= static char change_buffer[buf_size]; /* next line of |change_file| */ @@ -246,7 +246,7 @@ while(true) { if (!input_ln(change_file)) return; if (limit<buffer+2) continue; if (buffer[0]!='@@') continue; - if (xisupper(buffer[1])) buffer[1]=tolower((eight_bits)buffer[1]); + if (xisupper(buffer[1])) buffer[1]=tolower((int)buffer[1]); if (buffer[1]=='x') break; if (buffer[1]=='y' || buffer[1]=='z' || buffer[1]=='i') { loc=buffer+2; @@ -290,8 +290,8 @@ current line is nonempty. @d if_section_start_make_pending(b)@/ *limit='!';@+ for (loc=buffer;xisspace(*loc);loc++) ;@+ - *limit=' '; - if (*loc=='@@' && (xisspace(*(loc+1)) || *(loc+1)=='*')) change_pending=b; + *limit=' ';@/ + if (*loc=='@@' && (xisspace(*(loc+1)) || *(loc+1)=='*')) change_pending=b @c static void @@ -313,7 +313,7 @@ check_change(void) /* switches to |change_file| if the buffers match */ return; } if (limit>buffer+1 && buffer[0]=='@@') { - char xyz_code=xisupper(buffer[1])? tolower((eight_bits)buffer[1]): buffer[1]; + char xyz_code=xisupper(buffer[1])? tolower((int)buffer[1]): buffer[1]; @<If the current line starts with \.{@@y}, report any discrepancies and |return|@>@; } @@ -446,7 +446,7 @@ The remainder of the \.{@@i} line after the file name is ignored. char temp_file_name[max_file_name_length]; char *cur_file_name_end=cur_file_name+max_file_name_length-1; char *kk, *k=cur_file_name; - int l; /* length of file name */ + size_t l; /* length of file name */ if (*loc=='"') { loc++; @@ -521,7 +521,7 @@ The remainder of the \.{@@i} line after the file name is ignored. } *limit=' '; if (buffer[0]=='@@') { - if (xisupper(buffer[1])) buffer[1]=tolower((eight_bits)buffer[1]); + if (xisupper(buffer[1])) buffer[1]=tolower((int)buffer[1]); if (buffer[1]=='x' || buffer[1]=='y') { loc=buffer+2; err_print("! Where is the matching @@z?"); @@ -635,14 +635,14 @@ name_pointer id_lookup( /* looks up a string in the identifier table */ const char *first, /* first character of string */ const char *last, /* last character of string plus one */ -char t) /* the |ilk|; used by \.{CWEAVE} only */ +eight_bits t) /* the |ilk|; used by \.{CWEAVE} only */ { const char *i=first; /* position in |buffer| */ - int h; /* hash code */ - int l; /* length of the given identifier */ + int h; /* hash code; shadows |hash_pointer h| */ + size_t l; /* length of the given identifier */ name_pointer p; /* where the identifier is being sought */ if (last==NULL) for (last=first; *last!='\0'; last++); - l=(int)(last-first); /* compute the length */ + l=(size_t)(last-first); /* compute the length */ @<Compute the hash code |h|@>@; @<Compute the name location |p|@>@; if (p==name_ptr) @<Enter a new name into the table at position |p|@>@; @@ -654,7 +654,7 @@ character codes is $c_1c_2\ldots c_n$, its hash value will be $$(2^{n-1}c_1+2^{n-2}c_2+\cdots+c_n)\,\bmod\,|hash_size|.$$ @<Compute the hash...@>= -h=(eight_bits)*i; +h=(int)((eight_bits)*i); while (++i<last) h=(h+h+(int)((eight_bits)*i)) % hash_size; @^high-bit character handling@> @@ -700,10 +700,10 @@ to additional chunks in the same way. Null links are represented by |name_dir|. @d first_chunk(p) ((p)->byte_start+2) -@d prefix_length(p) (int)((eight_bits)*((p)->byte_start)*256 + +@d prefix_length(p) (size_t)((eight_bits)*((p)->byte_start)*256 + (eight_bits)*((p)->byte_start+1)) -@d set_prefix_length(p,m) (*((p)->byte_start)=(m)/256, - *((p)->byte_start+1)=(m)%256) +@d set_prefix_length(p,m) (*((p)->byte_start)=(char)((m)/256), + *((p)->byte_start+1)=(char)((m)%256)) @c void @@ -746,7 +746,7 @@ print_prefix_name( name_pointer p) { char *s = first_chunk(p); - int l = prefix_length(p); + size_t l = prefix_length(p); term_write(s,l); if (s+l<(p+1)->byte_start) term_write("...",3); } @@ -762,16 +762,16 @@ are null-terminated, and we keep an eye open for prefixes and extensions. @d extension 4 /* the first name is a proper extension of the second */ @<Predecl...@>= -static int web_strcmp(char *,int,char *,int);@/ +static int web_strcmp(char *,size_t,char *,size_t);@/ static name_pointer add_section_name(name_pointer,int,char *,char *,boolean);@/ static void extend_section_name(name_pointer,char *,char *,boolean); @ @c static int web_strcmp( /* fuller comparison than |strcmp| */ char *j, /* beginning of first string */ - int j_len, /* length of first string */ + size_t j_len, /* length of first string */ char *k, /* beginning of second string */ - int k_len) /* length of second string */ + size_t k_len) /* length of second string */ { char *j1=j+j_len, *k1=k+k_len; while (k<k1 && j<j1 && *j==*k) k++, j++; @@ -806,7 +806,7 @@ boolean ispref) /* are we adding a prefix or a full name? */ { name_pointer p=name_ptr; /* new node */ char *s=first_chunk(p); - int name_len=(int)(last-first)+ispref; /* length of section name */ + size_t name_len=(size_t)(last-first+(int)ispref); /* length of section name */ if (s+name_len>byte_mem_end) overflow("byte memory"); if (name_ptr+1>=name_dir_end) overflow("name"); (++name_ptr)->byte_start=byte_ptr=s+name_len; @@ -833,7 +833,7 @@ boolean ispref) /* are we adding a prefix or a full name? */ { char *s; name_pointer q=p+1; - int name_len=(int)(last-first)+ispref; + size_t name_len=(size_t)(last-first+(int)ispref); if (name_ptr>=name_dir_end) overflow("name"); while (q->link!=name_dir) q=q->link; q->link=name_ptr; @@ -863,7 +863,7 @@ boolean ispref) /* is the new name a prefix or a full name? */ name_pointer r=NULL; /* where a match has been found */ name_pointer par=NULL; /* parent of |p|, if |r| is |NULL|; otherwise parent of |r| */ - int name_len=(int)(last-first)+1; + size_t name_len=(size_t)(last-first+1); @<Look for matches for new name among shortest prefixes, complaining if more than one is found@>@; @<If no match found, add new name to tree@>@; @@ -959,7 +959,7 @@ us to regard \.{@@<foo...@@>} as an ``extension'' of itself. @c static int section_name_cmp( char **pfirst, /* pointer to beginning of comparison string */ -int len, /* length of string */ +size_t len, /* length of string */ name_pointer r) /* section name being compared */ { char *first=*pfirst; /* beginning of comparison string */ @@ -971,7 +971,7 @@ name_pointer r) /* section name being compared */ ss=(r+1)->byte_start-1; if (*ss==' ' && ss>=r->byte_start) ispref=true,q=q->link; else ispref=false,ss++,q=name_dir; - switch(c=web_strcmp(first,len,s,ss-s)) { + switch(c=web_strcmp(first,len,s,(size_t)(ss-s))) { case equal: if (q==name_dir) if (ispref) { *pfirst=first+(ptrdiff_t)(ss-s); @@ -988,7 +988,7 @@ name_pointer r) /* section name being compared */ } } -@ @<Predec...@>=@+static int section_name_cmp(char **,int,name_pointer); +@ @<Predec...@>=@+static int section_name_cmp(char **,size_t,name_pointer); @** Reporting errors to the user. A global variable called |history| will contain one of four values @@ -1015,7 +1015,7 @@ void err_print( /* prints `\..' and location of error message */ const char *s) { - printf(*s=='!'? "\n%s" : "%s",s); + *s=='!'? printf("\n%s",s) : printf("%s",s); if (web_file_open) @<Print error location based on input buffer@>@; update_terminal; mark_error; } diff --git a/Build/source/texk/web2c/cwebdir/ctang-bs.ch b/Build/source/texk/web2c/cwebdir/ctang-bs.ch index fa4b90c0a26..4664215673a 100644 --- a/Build/source/texk/web2c/cwebdir/ctang-bs.ch +++ b/Build/source/texk/web2c/cwebdir/ctang-bs.ch @@ -17,12 +17,12 @@ by using "huge" pointers. The ``banner line'' defined here should be changed whenever \.{CTANGLE} is modified. -@d banner "This is CTANGLE (Version 4.4)" +@d banner "This is CTANGLE (Version 4.5)" @y The ``banner line'' defined here should be changed whenever \.{CTANGLE} is modified. -@d banner "This is CTANGLE (Version 4.4pc/big)" +@d banner "This is CTANGLE (Version 4.5pc/big)" @z diff --git a/Build/source/texk/web2c/cwebdir/ctang-pc.ch b/Build/source/texk/web2c/cwebdir/ctang-pc.ch index f84c798da4b..2010d6d03dd 100644 --- a/Build/source/texk/web2c/cwebdir/ctang-pc.ch +++ b/Build/source/texk/web2c/cwebdir/ctang-pc.ch @@ -9,9 +9,9 @@ that allows >64K arrays. If you need lots of bytes and toks, try the alternate change files with -bs suffix instead of -pc. @x section 1 -@d banner "This is CTANGLE (Version 4.4)" +@d banner "This is CTANGLE (Version 4.5)" @y -@d banner "This is CTANGLE (Version 4.4pc)" +@d banner "This is CTANGLE (Version 4.5pc)" @z @x section 17 @d max_bytes 90000 /* the number of bytes in identifiers, diff --git a/Build/source/texk/web2c/cwebdir/ctang-ql.ch b/Build/source/texk/web2c/cwebdir/ctang-ql.ch index 27a7d013cf6..66568f4be16 100644 --- a/Build/source/texk/web2c/cwebdir/ctang-ql.ch +++ b/Build/source/texk/web2c/cwebdir/ctang-ql.ch @@ -7,15 +7,15 @@ ex <dev_>cc;"-v -h -c -=500000 ctangle_c" @x -\def\title{CTANGLE (Version 4.4)} +\def\title{CTANGLE (Version 4.5)} @y -\def\title{CTANGLE (QL Version 4.4)} +\def\title{CTANGLE (QL Version 4.5)} @z @x section 1 -@d banner "This is CTANGLE (Version 4.4)" +@d banner "This is CTANGLE (Version 4.5)" @y -@d banner "This is CTANGLE (QL Version 4.4)" +@d banner "This is CTANGLE (QL Version 4.5)" @z @x diff --git a/Build/source/texk/web2c/cwebdir/ctang-vms.ch b/Build/source/texk/web2c/cwebdir/ctang-vms.ch index a72de2997be..10cf9879a47 100644 --- a/Build/source/texk/web2c/cwebdir/ctang-vms.ch +++ b/Build/source/texk/web2c/cwebdir/ctang-vms.ch @@ -10,9 +10,9 @@ created: (these changes not necessary for initial bootstrapping) @x section 1 (01-FEB-1992 ST) -@d banner "This is CTANGLE (Version 4.4)" +@d banner "This is CTANGLE (Version 4.5)" @y -@d banner "This is CTANGLE (VAX/VMS Version 4.4)" +@d banner "This is CTANGLE (VAX/VMS Version 4.5)" @z @x section 4 (01-FEB-1992 ST) diff --git a/Build/source/texk/web2c/cwebdir/ctang-w2c.ch b/Build/source/texk/web2c/cwebdir/ctang-w2c.ch index b594fc93a03..af21d211ce8 100644 --- a/Build/source/texk/web2c/cwebdir/ctang-w2c.ch +++ b/Build/source/texk/web2c/cwebdir/ctang-w2c.ch @@ -17,15 +17,15 @@ @q Please send comments, suggestions, etc. to tex-k@@tug.org. @> @x -\def\title{CTANGLE (Version 4.4)} +\def\title{CTANGLE (Version 4.5)} @y -\def\title{CTANGLE (Version 4.4 [\TeX~Live])} +\def\title{CTANGLE (Version 4.5 [\TeX~Live])} @z @x - \centerline{(Version 4.4)} + \centerline{(Version 4.5)} @y - \centerline{(Version 4.4 [\TeX~Live])} + \centerline{(Version 4.5 [\TeX~Live])} @z @x @@ -41,9 +41,9 @@ @z @x -@d banner "This is CTANGLE (Version 4.4)" +@d banner "This is CTANGLE (Version 4.5)" @y -@d banner "This is CTANGLE, Version 4.4" +@d banner "This is CTANGLE, Version 4.5" /* will be extended by the \TeX~Live |versionstring| */ @z @@ -252,9 +252,15 @@ if (loc>=limit) err_print(_("! Verbatim string didn't end")); @z @x -@d app_repl(c) {if (tok_ptr==tok_mem_end) overflow("token"); *(tok_ptr++)=c;} +@d app_repl(c) { + if (tok_ptr==tok_mem_end) overflow("token"); + else *(tok_ptr++)=(eight_bits)c; +} @y -@d app_repl(c) {if (tok_ptr==tok_mem_end) overflow(_("token")); *(tok_ptr++)=c;} +@d app_repl(c) { + if (tok_ptr==tok_mem_end) overflow(_("token")); + else *(tok_ptr++)=(eight_bits)c; +} @z @x @@ -325,22 +331,22 @@ case output_defs_code: if (t!=section_name) err_print(_("! Misplaced @@h")); @x puts("\nMemory usage statistics:"); - printf("%ld names (out of %ld)\n", + printf("%td names (out of %ld)\n", (ptrdiff_t)(name_ptr-name_dir),(long)max_names); - printf("%ld replacement texts (out of %ld)\n", + printf("%td replacement texts (out of %ld)\n", (ptrdiff_t)(text_ptr-text_info),(long)max_texts); - printf("%ld bytes (out of %ld)\n", + printf("%td bytes (out of %ld)\n", (ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes); - printf("%ld tokens (out of %ld)\n", + printf("%td tokens (out of %ld)\n", @y puts(_("\nMemory usage statistics:")); - printf(_("%ld names (out of %ld)\n"), + printf(_("%td names (out of %ld)\n"), (ptrdiff_t)(name_ptr-name_dir),(long)max_names); - printf(_("%ld replacement texts (out of %ld)\n"), + printf(_("%td replacement texts (out of %ld)\n"), (ptrdiff_t)(text_ptr-text_info),(long)max_texts); - printf(_("%ld bytes (out of %ld)\n"), + printf(_("%td bytes (out of %ld)\n"), (ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes); - printf(_("%ld tokens (out of %ld)\n"), + printf(_("%td tokens (out of %ld)\n"), @z @x diff --git a/Build/source/texk/web2c/cwebdir/ctang-w32.ch b/Build/source/texk/web2c/cwebdir/ctang-w32.ch index ceba0fee761..acdcdd2381a 100644 --- a/Build/source/texk/web2c/cwebdir/ctang-w32.ch +++ b/Build/source/texk/web2c/cwebdir/ctang-w32.ch @@ -4,9 +4,9 @@ This is the change file for CWEB's CTANGLE under Win32 Changes necessary for compiling with Borland C/C++ @x section 1 -@d banner "This is CTANGLE (Version 4.4)" +@d banner "This is CTANGLE (Version 4.5)" @y -@d banner "This is CTANGLE (Version 4.4win32)" +@d banner "This is CTANGLE (Version 4.5win32)" @z @x diff --git a/Build/source/texk/web2c/cwebdir/ctangle.c b/Build/source/texk/web2c/cwebdir/ctangle.c index 14a0732742d..6016fcc0b9f 100644 --- a/Build/source/texk/web2c/cwebdir/ctangle.c +++ b/Build/source/texk/web2c/cwebdir/ctangle.c @@ -15,7 +15,7 @@ /*:4*/ #line 67 "ctangle.w" -#define banner "This is CTANGLE (Version 4.4)" \ +#define banner "This is CTANGLE (Version 4.5)" \ #define ctangle false #define cweave true \ @@ -38,12 +38,12 @@ #define compress(c) if(loc++<=limit) return c \ -#define xisalpha(c) (isalpha((eight_bits) (c) ) &&((eight_bits) (c) <0200) ) -#define xisdigit(c) (isdigit((eight_bits) (c) ) &&((eight_bits) (c) <0200) ) -#define xisspace(c) (isspace((eight_bits) (c) ) &&((eight_bits) (c) <0200) ) -#define xislower(c) (islower((eight_bits) (c) ) &&((eight_bits) (c) <0200) ) -#define xisupper(c) (isupper((eight_bits) (c) ) &&((eight_bits) (c) <0200) ) -#define xisxdigit(c) (isxdigit((eight_bits) (c) ) &&((eight_bits) (c) <0200) ) +#define xisalpha(c) (isalpha((int) (c) ) &&((eight_bits) (c) <0200) ) +#define xisdigit(c) (isdigit((int) (c) ) &&((eight_bits) (c) <0200) ) +#define xisspace(c) (isspace((int) (c) ) &&((eight_bits) (c) <0200) ) +#define xislower(c) (islower((int) (c) ) &&((eight_bits) (c) <0200) ) +#define xisupper(c) (isupper((int) (c) ) &&((eight_bits) (c) <0200) ) +#define xisxdigit(c) (isxdigit((int) (c) ) &&((eight_bits) (c) <0200) ) #define isxalpha(c) ((c) =='_'||(c) =='$') \ #define ishigh(c) ((eight_bits) (c) > 0177) \ @@ -124,7 +124,7 @@ #define max_files 256 #define C_printf(c,a) fprintf(C_file,c,a) -#define C_putc(c) putc(c,C_file) \ +#define C_putc(c) putc((int) (c) ,C_file) \ #define translit_length 10 \ @@ -139,11 +139,14 @@ #define section_name 0311 #define new_section 0312 \ -#define app_repl(c) {if(tok_ptr==tok_mem_end) overflow("token") ;*(tok_ptr++) = c;} \ +#define app_repl(c) { \ +if(tok_ptr==tok_mem_end) overflow("token") ; \ +else*(tok_ptr++) = (eight_bits) c; \ +} \ -#define store_id(a) a= id_lookup(id_first,id_loc,0) -name_dir; \ +#define store_id(a) a= id_lookup(id_first,id_loc,'\0') -name_dir; \ app_repl((a/0400) +0200) ; \ -app_repl(a%0400) ; \ +app_repl(a%0400) \ #define keep_digit_separators flags['k'] \ @@ -306,13 +309,13 @@ static stack_pointer stack_ptr; static int cur_val; /*:37*//*42:*/ -#line 458 "ctangle.w" +#line 459 "ctangle.w" static eight_bits out_state; static boolean protect; /*:42*//*45:*/ -#line 489 "ctangle.w" +#line 490 "ctangle.w" static name_pointer output_files[max_files]; static name_pointer*cur_out_file,*end_output_files,*an_output_file; @@ -320,33 +323,33 @@ static char cur_section_name_char; static char output_file_name[longest_name+1]; /*:45*//*52:*/ -#line 589 "ctangle.w" +#line 590 "ctangle.w" static boolean output_defs_seen= false; /*:52*//*57:*/ -#line 701 "ctangle.w" +#line 703 "ctangle.w" static char translit[128][translit_length]; /*:57*//*62:*/ -#line 777 "ctangle.w" +#line 779 "ctangle.w" static eight_bits ccode[256]; /*:62*//*66:*/ -#line 837 "ctangle.w" +#line 839 "ctangle.w" static boolean comment_continues= false; /*:66*//*68:*/ -#line 874 "ctangle.w" +#line 876 "ctangle.w" static name_pointer cur_section_name; static boolean no_where; /*:68*//*82:*/ -#line 1188 "ctangle.w" +#line 1193 "ctangle.w" static text_pointer cur_text; static eight_bits next_control; @@ -365,7 +368,7 @@ extern void reset_input(void); #line 166 "common.h" extern boolean names_match(name_pointer,const char*,size_t,eight_bits); -extern name_pointer id_lookup(const char*,const char*,char); +extern name_pointer id_lookup(const char*,const char*,eight_bits); extern name_pointer section_lookup(char*,char*,boolean); extern void init_node(name_pointer); @@ -399,47 +402,47 @@ static void push_level(name_pointer); static void pop_level(boolean); /*:35*//*39:*/ -#line 403 "ctangle.w" +#line 404 "ctangle.w" static void get_output(void); /*:39*//*44:*/ -#line 479 "ctangle.w" +#line 480 "ctangle.w" static void flush_buffer(void); /*:44*//*49:*/ -#line 556 "ctangle.w" +#line 557 "ctangle.w" static void phase_two(void); /*:49*//*53:*/ -#line 592 "ctangle.w" +#line 593 "ctangle.w" static void output_defs(void); static void out_char(eight_bits); /*:53*//*65:*/ -#line 817 "ctangle.w" +#line 819 "ctangle.w" static eight_bits skip_ahead(void); static boolean skip_comment(boolean); /*:65*//*70:*/ -#line 924 "ctangle.w" +#line 926 "ctangle.w" static eight_bits get_next(void); /*:70*//*84:*/ -#line 1214 "ctangle.w" +#line 1219 "ctangle.w" static void scan_repl(eight_bits); /*:84*//*91:*/ -#line 1397 "ctangle.w" +#line 1404 "ctangle.w" static void scan_section(void); /*:91*//*99:*/ -#line 1474 "ctangle.w" +#line 1481 "ctangle.w" static void phase_one(void); /*:99*//*101:*/ -#line 1507 "ctangle.w" +#line 1514 "ctangle.w" static void skip_limbo(void); /*:101*/ @@ -472,12 +475,12 @@ init_node(name_dir); last_unnamed= text_info;text_info->text_link= macro; /*:27*//*46:*/ -#line 499 "ctangle.w" +#line 500 "ctangle.w" cur_out_file= end_output_files= output_files+max_files; /*:46*//*58:*/ -#line 704 "ctangle.w" +#line 706 "ctangle.w" { int i; @@ -485,14 +488,14 @@ for(i= 0;i<128;i++)sprintf(translit[i],"X%02X",(unsigned int)(128+i)); } /*:58*//*63:*/ -#line 780 "ctangle.w" +#line 782 "ctangle.w" { int c; for(c= 0;c<256;c++)ccode[c]= ignore; } ccode[' ']= ccode['\t']= ccode['\n']= ccode['\v']= ccode['\r']= ccode['\f'] = ccode['*']= new_section; -ccode['@']= '@';ccode['=']= string; +ccode['@']= (eight_bits)'@';ccode['=']= string; ccode['d']= ccode['D']= definition; ccode['f']= ccode['F']= ccode['s']= ccode['S']= format_code; ccode['c']= ccode['C']= ccode['p']= ccode['P']= begin_C; @@ -505,7 +508,7 @@ ccode['<']= ccode['(']= section_name; ccode['\'']= ord; /*:63*//*78:*/ -#line 1112 "ctangle.w" +#line 1114 "ctangle.w" section_text[0]= ' '; /*:78*/ @@ -608,10 +611,10 @@ else if(a<0200)out_char(a); else{ a= (a-0200)*0400+*cur_byte++; switch(a/024000){ -case 0:cur_val= a;out_char(identifier);break; +case 0:cur_val= (int)a;out_char(identifier);break; case 1:if(a==output_defs_flag)output_defs(); else/*40:*/ -#line 408 "ctangle.w" +#line 409 "ctangle.w" { a-= 024000; @@ -628,14 +631,15 @@ goto restart; #line 395 "ctangle.w" break; -default:cur_val= a-050000;if(cur_val> 0)cur_section= cur_val; +default:cur_val= (int)a-050000; +if(cur_val> 0)cur_section= (sixteen_bits)cur_val; out_char(section_number); } } } /*:38*//*43:*/ -#line 466 "ctangle.w" +#line 467 "ctangle.w" static void flush_buffer(void) @@ -650,7 +654,7 @@ cur_line++; } /*:43*//*48:*/ -#line 518 "ctangle.w" +#line 519 "ctangle.w" static void phase_two(void){ @@ -664,16 +668,16 @@ 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 524 "ctangle.w" +#line 525 "ctangle.w" /*51:*/ -#line 585 "ctangle.w" +#line 586 "ctangle.w" if(!output_defs_seen) output_defs(); /*:51*/ -#line 525 "ctangle.w" +#line 526 "ctangle.w" if(text_info->text_link==macro&&cur_out_file==end_output_files){ fputs("\n! No program text was specified.",stdout);mark_harmless; @@ -698,7 +702,7 @@ if(text_info->text_link==macro)goto writeloop; while(stack_ptr> stack)get_output(); flush_buffer(); writeloop:/*50:*/ -#line 562 "ctangle.w" +#line 563 "ctangle.w" for(an_output_file= end_output_files;an_output_file> cur_out_file;){ an_output_file--; @@ -719,7 +723,7 @@ flush_buffer(); } /*:50*/ -#line 548 "ctangle.w" +#line 549 "ctangle.w" if(show_happiness){ if(show_progress)new_line; @@ -729,7 +733,7 @@ fputs("Done.",stdout); } /*:48*//*54:*/ -#line 599 "ctangle.w" +#line 600 "ctangle.w" static void output_defs(void) @@ -753,11 +757,12 @@ else if(a<0200)out_char(a); else{ a= (a-0200)*0400+*cur_byte++; if(a<024000){ -cur_val= a;out_char(identifier); +cur_val= (int)a;out_char(identifier); } else if(a<050000)confusion("macro defs have strange char"); else{ -cur_val= a-050000;cur_section= cur_val;out_char(section_number); +cur_val= (int)a-050000;cur_section= (sixteen_bits)cur_val; +out_char(section_number); } } @@ -769,7 +774,7 @@ pop_level(false); } /*:54*//*55:*/ -#line 642 "ctangle.w" +#line 644 "ctangle.w" static void out_char( @@ -782,7 +787,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 710 "ctangle.w" +#line 712 "ctangle.w" case identifier: if(out_state==num_or_id)C_putc(' '); @@ -794,25 +799,25 @@ else C_printf("%s",translit[(eight_bits)(*j)-0200]); out_state= num_or_id;break; /*:59*/ -#line 653 "ctangle.w" +#line 655 "ctangle.w" /*60:*/ -#line 720 "ctangle.w" +#line 722 "ctangle.w" case section_number: if(cur_val> 0)C_printf("/*%d:*/",cur_val); else if(cur_val<0)C_printf("/*:%d*/",-cur_val); else if(protect){ cur_byte+= 4; -cur_char= '\n'; +cur_char= (eight_bits)'\n'; goto restart; }else{ sixteen_bits a; a= *cur_byte++*0400; a+= *cur_byte++; -C_printf("\n#line %d \"",a); +C_printf("\n#line %d \"",(int)a); -cur_val= (*cur_byte++-0200)*0400; +cur_val= (int)(*cur_byte++-0200)*0400; cur_val+= *cur_byte++; for(j= (cur_val+name_dir)->byte_start,k= (cur_val+name_dir+1)->byte_start; j<k;j++){ @@ -824,10 +829,10 @@ C_putc('"');C_putc('\n'); break; /*:60*/ -#line 654 "ctangle.w" +#line 656 "ctangle.w" /*56:*/ -#line 672 "ctangle.w" +#line 674 "ctangle.w" case plus_plus:C_putc('+');C_putc('+');out_state= normal;break; case minus_minus:C_putc('-');C_putc('-');out_state= normal;break; @@ -848,7 +853,7 @@ case minus_gt_ast:C_putc('-');C_putc('>');C_putc('*');out_state= normal; break; /*:56*/ -#line 655 "ctangle.w" +#line 657 "ctangle.w" case'=':case'>':C_putc(cur_char);C_putc(' '); out_state= normal;break; @@ -867,7 +872,7 @@ default:C_putc(cur_char);out_state= normal;break; } /*:55*//*64:*/ -#line 801 "ctangle.w" +#line 803 "ctangle.w" static eight_bits skip_ahead(void) @@ -885,7 +890,7 @@ if(c!=ignore||*(loc-1)=='>')return c; } /*:64*//*67:*/ -#line 840 "ctangle.w" +#line 842 "ctangle.w" static boolean skip_comment( boolean is_long_comment) @@ -919,7 +924,7 @@ else loc++; } /*:67*//*69:*/ -#line 881 "ctangle.w" +#line 883 "ctangle.w" static eight_bits get_next(void) @@ -933,7 +938,7 @@ if(get_line()==false)return new_section; else if(print_where&&!no_where){ print_where= false; /*85:*/ -#line 1224 "ctangle.w" +#line 1229 "ctangle.w" { eight_bits a; @@ -950,21 +955,20 @@ store_id(a); } /*:85*/ -#line 893 "ctangle.w" +#line 895 "ctangle.w" } -else return'\n'; +else return(eight_bits)'\n'; } -c= *loc; +c= (eight_bits)*loc; if(comment_continues||(c=='/'&&(*(loc+1)=='*'||*(loc+1)=='/'))){ -skip_comment(comment_continues||*(loc+1)=='*'); +if(skip_comment(comment_continues||*(loc+1)=='*'))return'\n'; -if(comment_continues)return'\n'; else continue; } loc++; if(xisdigit(c)||c=='.')/*73:*/ -#line 965 "ctangle.w" +#line 967 "ctangle.w" { boolean hex_flag= false; id_first= loc-1; @@ -998,15 +1002,15 @@ return constant; } /*:73*/ -#line 905 "ctangle.w" +#line 906 "ctangle.w" else if(c=='\''||c=='"' ||((c=='L'||c=='u'||c=='U')&&(*loc=='\''||*loc=='"')) ||((c=='u'&&*loc=='8')&&(*(loc+1)=='\''||*(loc+1)=='"'))) /*74:*/ -#line 1002 "ctangle.w" +#line 1004 "ctangle.w" { -char delim= c; +char delim= (char)c; id_first= section_text+1; id_loc= section_text;*++id_loc= delim; if(delim=='L'||delim=='u'||delim=='U'){ @@ -1026,16 +1030,16 @@ err_print("! Input ended in middle of string");loc= buffer;break; else if(++id_loc<=section_text_end)*id_loc= '\n'; } -if((c= *loc++)==delim){ -if(++id_loc<=section_text_end)*id_loc= c; +if((c= (eight_bits)*loc++)==delim){ +if(++id_loc<=section_text_end)*id_loc= (char)c; break; } if(c=='\\'){ if(loc>=limit)continue; if(++id_loc<=section_text_end)*id_loc= '\\'; -c= *loc++; +c= (eight_bits)*loc++; } -if(++id_loc<=section_text_end)*id_loc= c; +if(++id_loc<=section_text_end)*id_loc= (char)c; } if(id_loc>=section_text_end){ fputs("\n! String too long: ",stdout); @@ -1048,25 +1052,25 @@ return string; } /*:74*/ -#line 909 "ctangle.w" +#line 910 "ctangle.w" -else if(isalpha(c)||isxalpha(c)||ishigh(c)) +else if(isalpha((int)c)||isxalpha(c)||ishigh(c)) /*72:*/ -#line 956 "ctangle.w" +#line 958 "ctangle.w" { id_first= --loc; do ++loc; -while(isalpha((eight_bits)*loc)||isdigit((eight_bits)*loc) -||isxalpha((eight_bits)*loc)||ishigh((eight_bits)*loc)); +while(isalpha((int)*loc)||isdigit((int)*loc) +||isxalpha(*loc)||ishigh(*loc)); id_loc= loc;return identifier; } /*:72*/ -#line 911 "ctangle.w" +#line 912 "ctangle.w" else if(c=='@')/*75:*/ -#line 1047 "ctangle.w" +#line 1049 "ctangle.w" switch(c= ccode[(eight_bits)*loc++]){ case ignore:continue; @@ -1081,11 +1085,11 @@ continue; case section_name: cur_section_name_char= *(loc-1); /*77:*/ -#line 1092 "ctangle.w" +#line 1094 "ctangle.w" { char*k= section_text; /*79:*/ -#line 1114 "ctangle.w" +#line 1116 "ctangle.w" while(true){ if(loc> limit&&get_line()==false){ @@ -1093,12 +1097,12 @@ err_print("! Input ended in section name"); loc= buffer+1;break; } -c= *loc; +c= (eight_bits)*loc; /*80:*/ -#line 1137 "ctangle.w" +#line 1139 "ctangle.w" if(c=='@'){ -c= *(loc+1); +c= (eight_bits)*(loc+1); if(c=='>'){ loc+= 2;break; } @@ -1114,13 +1118,13 @@ err_print("! Nesting of section names not allowed");break; } /*:80*/ -#line 1122 "ctangle.w" +#line 1124 "ctangle.w" loc++;if(k<section_text_end)k++; if(xisspace(c)){ -c= ' ';if(*(k-1)==' ')k--; +c= (eight_bits)' ';if(*(k-1)==' ')k--; } -*k= c; +*k= (char)c; } if(k>=section_text_end){ fputs("\n! Section name too long: ",stdout); @@ -1131,7 +1135,7 @@ printf("...");mark_harmless; if(*k==' '&&k> section_text)k--; /*:79*/ -#line 1094 "ctangle.w" +#line 1096 "ctangle.w" if(k-section_text> 3&&strncmp(k-2,"...",3)==0) cur_section_name= section_lookup(section_text+1,k-3,true); @@ -1140,7 +1144,7 @@ else cur_section_name= section_lookup(section_text+1,k,false); if(cur_section_name_char=='(') /*47:*/ -#line 503 "ctangle.w" +#line 504 "ctangle.w" { for(an_output_file= cur_out_file; @@ -1154,16 +1158,16 @@ else overflow("output files"); } /*:47*/ -#line 1102 "ctangle.w" +#line 1104 "ctangle.w" return section_name; } /*:77*/ -#line 1060 "ctangle.w" +#line 1062 "ctangle.w" case string:/*81:*/ -#line 1159 "ctangle.w" +#line 1161 "ctangle.w" id_first= loc++;*(limit+1)= '@';*(limit+2)= '>'; while(*loc!='@'||*(loc+1)!='>')loc++; @@ -1173,10 +1177,10 @@ id_loc= loc;loc+= 2; return string; /*:81*/ -#line 1061 "ctangle.w" +#line 1063 "ctangle.w" case ord:/*76:*/ -#line 1072 "ctangle.w" +#line 1074 "ctangle.w" id_first= loc; if(*loc=='\\') @@ -1198,22 +1202,23 @@ loc++; return ord; /*:76*/ -#line 1062 "ctangle.w" +#line 1064 "ctangle.w" default:return c; } /*:75*/ -#line 912 "ctangle.w" +#line 913 "ctangle.w" else if(xisspace(c)){ if(!preprocessing||loc> limit)continue; -else return' '; +else return(eight_bits)' '; + } else if(c=='#'&&loc==buffer+1)preprocessing= true; mistake:/*71:*/ -#line 933 "ctangle.w" +#line 935 "ctangle.w" switch(c){ case'+':if(*loc=='+')compress(plus_plus);break; @@ -1238,14 +1243,14 @@ case'!':if(*loc=='=')compress(non_eq);break; } /*:71*/ -#line 919 "ctangle.w" +#line 921 "ctangle.w" return c; } } /*:69*//*83:*/ -#line 1192 "ctangle.w" +#line 1197 "ctangle.w" static void scan_repl( @@ -1253,7 +1258,7 @@ eight_bits t) { sixteen_bits a; if(t==section_name)/*85:*/ -#line 1224 "ctangle.w" +#line 1229 "ctangle.w" { eight_bits a; @@ -1270,17 +1275,17 @@ store_id(a); } /*:85*/ -#line 1198 "ctangle.w" +#line 1203 "ctangle.w" while(true)switch(a= get_next()){ /*86:*/ -#line 1239 "ctangle.w" +#line 1244 "ctangle.w" case identifier:store_id(a);break; case section_name:if(t!=section_name)goto done; else{ /*87:*/ -#line 1270 "ctangle.w" +#line 1278 "ctangle.w" { char*try_loc= loc; while(*try_loc==' '&&try_loc<limit)try_loc++; @@ -1293,13 +1298,13 @@ if(*try_loc=='=')err_print("! Missing `@ ' before a named section"); } /*:87*/ -#line 1243 "ctangle.w" +#line 1248 "ctangle.w" a= cur_section_name-name_dir; app_repl((a/0400)+0250); app_repl(a%0400); /*85:*/ -#line 1224 "ctangle.w" +#line 1229 "ctangle.w" { eight_bits a; @@ -1316,9 +1321,10 @@ store_id(a); } /*:85*/ -#line 1247 "ctangle.w" -break; +#line 1252 "ctangle.w" + } +break; case output_defs_code:if(t!=section_name)err_print("! Misplaced @h"); else{ @@ -1327,7 +1333,7 @@ a= output_defs_flag; app_repl((a/0400)+0200); app_repl(a%0400); /*85:*/ -#line 1224 "ctangle.w" +#line 1229 "ctangle.w" { eight_bits a; @@ -1344,13 +1350,13 @@ store_id(a); } /*:85*/ -#line 1256 "ctangle.w" +#line 1262 "ctangle.w" } break; case constant:case string: /*88:*/ -#line 1287 "ctangle.w" +#line 1295 "ctangle.w" app_repl(a); while(id_first<id_loc){ @@ -1363,18 +1369,19 @@ else if(a==constant&&*id_first=='\''&&!keep_digit_separators) id_first++; app_repl(*id_first++); } -app_repl(a);break; +app_repl(a); /*:88*/ -#line 1260 "ctangle.w" +#line 1266 "ctangle.w" +break; case ord: /*89:*/ -#line 1305 "ctangle.w" +#line 1313 "ctangle.w" { -int c= (eight_bits)*id_first; +int c= (int)((eight_bits)*id_first); if(c=='\\'){ -c= *++id_first; +c= (int)((eight_bits)*++id_first); if(c>='0'&&c<='7'){ c-= '0'; if(*(id_first+1)>='0'&&*(id_first+1)<='7'){ @@ -1393,15 +1400,15 @@ case'r':c= '\r';break; case'a':c= '\7';break; case'?':c= '?';break; case'x': -if(xisdigit(*(id_first+1)))c= *(++id_first)-'0'; +if(xisdigit(*(id_first+1)))c= (int)(*(++id_first)-'0'); else if(xisxdigit(*(id_first+1))){ ++id_first; -c= toupper((eight_bits)*id_first)-'A'+10; +c= toupper((int)*id_first)-'A'+10; } -if(xisdigit(*(id_first+1)))c= 16*c+*(++id_first)-'0'; +if(xisdigit(*(id_first+1)))c= 16*c+(int)(*(++id_first)-'0'); else if(xisxdigit(*(id_first+1))){ ++id_first; -c= 16*c+toupper((eight_bits)*id_first)-'A'+10; +c= 16*c+toupper((int)*id_first)-(int)'A'+10; } break; case'\\':c= '\\';break; @@ -1413,16 +1420,16 @@ default:err_print("! Unrecognized escape sequence"); } app_repl(constant); -if(c>=100)app_repl('0'+c/100); -if(c>=10)app_repl('0'+(c/10)%10); -app_repl('0'+c%10); +if(c>=100)app_repl((int)'0'+c/100); +if(c>=10)app_repl((int)'0'+(c/10)%10); +app_repl((int)'0'+c%10); app_repl(constant); } -break; /*:89*/ -#line 1262 "ctangle.w" +#line 1269 "ctangle.w" +break; case definition:case format_code:case begin_C:if(t!=section_name)goto done; else{ err_print("! @d, @f and @c are ignored in C text");continue; @@ -1431,7 +1438,7 @@ err_print("! @d, @f and @c are ignored in C text");continue; case new_section:goto done; /*:86*/ -#line 1203 "ctangle.w" +#line 1208 "ctangle.w" case')':app_repl(a); if(t==macro)app_repl(' '); @@ -1444,7 +1451,7 @@ cur_text= text_ptr;(++text_ptr)->tok_start= tok_ptr; } /*:83*//*90:*/ -#line 1364 "ctangle.w" +#line 1371 "ctangle.w" static void scan_section(void) @@ -1454,12 +1461,12 @@ text_pointer q; sixteen_bits a; section_count++;no_where= true; if(*(loc-1)=='*'&&show_progress){ -printf("*%d",section_count);update_terminal; +printf("*%d",(int)section_count);update_terminal; } next_control= ignore; while(true){ /*92:*/ -#line 1405 "ctangle.w" +#line 1412 "ctangle.w" while(next_control<definition) @@ -1468,11 +1475,11 @@ loc-= 2;next_control= get_next(); } /*:92*/ -#line 1378 "ctangle.w" +#line 1385 "ctangle.w" if(next_control==definition){ /*93:*/ -#line 1412 "ctangle.w" +#line 1419 "ctangle.w" while((next_control= get_next())=='\n'); if(next_control!=identifier){ @@ -1488,7 +1495,7 @@ scan_repl(macro); cur_text->text_link= macro; /*:93*/ -#line 1380 "ctangle.w" +#line 1387 "ctangle.w" continue; } @@ -1498,14 +1505,14 @@ p= name_dir;break; if(next_control==section_name){ p= cur_section_name; /*94:*/ -#line 1434 "ctangle.w" +#line 1441 "ctangle.w" while((next_control= get_next())=='+'); if(next_control!='='&&next_control!=eq_eq) continue; /*:94*/ -#line 1388 "ctangle.w" +#line 1395 "ctangle.w" break; } @@ -1513,20 +1520,20 @@ return; } no_where= print_where= false; /*95:*/ -#line 1439 "ctangle.w" +#line 1446 "ctangle.w" /*96:*/ -#line 1444 "ctangle.w" +#line 1451 "ctangle.w" store_two_bytes((sixteen_bits)(0150000+section_count)); /*:96*/ -#line 1440 "ctangle.w" +#line 1447 "ctangle.w" scan_repl(section_name); /*97:*/ -#line 1448 "ctangle.w" +#line 1455 "ctangle.w" if(p==name_dir||p==NULL){ last_unnamed->text_link= cur_text-text_info;last_unnamed= cur_text; @@ -1543,16 +1550,16 @@ cur_text->text_link= section_flag; /*:97*/ -#line 1442 "ctangle.w" +#line 1449 "ctangle.w" /*:95*/ -#line 1394 "ctangle.w" +#line 1401 "ctangle.w" } /*:90*//*98:*/ -#line 1463 "ctangle.w" +#line 1470 "ctangle.w" static void phase_one(void){ @@ -1565,7 +1572,7 @@ check_complete(); } /*:98*//*100:*/ -#line 1479 "ctangle.w" +#line 1486 "ctangle.w" static void skip_limbo(void) @@ -1579,7 +1586,7 @@ char c= *loc++; if(ccode[(eight_bits)c]==new_section)break; switch(ccode[(eight_bits)c]){ case translit_code:/*102:*/ -#line 1509 "ctangle.w" +#line 1516 "ctangle.w" while(xisspace(*loc)&&loc<limit)loc++; loc+= 3; @@ -1604,11 +1611,11 @@ translit[i-0200][loc-beg]= '\0'; } /*:102*/ -#line 1491 "ctangle.w" +#line 1498 "ctangle.w" break; case format_code:case'@':break; case control_text:if(c=='q'||c=='Q'){ -while((c= skip_ahead())=='@'); +while((c= (char)skip_ahead())=='@'); if(*(loc-1)!='>') err_print("! Double @ should be used in control text"); @@ -1622,18 +1629,18 @@ default:err_print("! Double @ should be used in limbo"); } /*:100*//*103:*/ -#line 1535 "ctangle.w" +#line 1542 "ctangle.w" void print_stats(void){ puts("\nMemory usage statistics:"); -printf("%ld names (out of %ld)\n", +printf("%td names (out of %ld)\n", (ptrdiff_t)(name_ptr-name_dir),(long)max_names); -printf("%ld replacement texts (out of %ld)\n", +printf("%td replacement texts (out of %ld)\n", (ptrdiff_t)(text_ptr-text_info),(long)max_texts); -printf("%ld bytes (out of %ld)\n", +printf("%td bytes (out of %ld)\n", (ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes); -printf("%ld tokens (out of %ld)\n", +printf("%td tokens (out of %ld)\n", (ptrdiff_t)(tok_ptr-tok_mem),(long)max_toks); } diff --git a/Build/source/texk/web2c/cwebdir/ctangle.w b/Build/source/texk/web2c/cwebdir/ctangle.w index 810ebadc254..c8ec64de25e 100644 --- a/Build/source/texk/web2c/cwebdir/ctangle.w +++ b/Build/source/texk/web2c/cwebdir/ctangle.w @@ -2,7 +2,7 @@ % This program by Silvio Levy and Donald E. Knuth % is based on a program by Knuth. % It is distributed WITHOUT ANY WARRANTY, express or implied. -% Version 4.4 --- June 2021 +% Version 4.5 --- July 2021 % Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth @@ -27,11 +27,11 @@ \mathchardef\RA="3221 % right arrow \mathchardef\BA="3224 % double arrow -\def\title{CTANGLE (Version 4.4)} +\def\title{CTANGLE (Version 4.5)} \def\topofcontents{\null\vfill \centerline{\titlefont The {\ttitlefont CTANGLE} processor} \vskip 15pt - \centerline{(Version 4.4)} + \centerline{(Version 4.5)} \vfill} \def\botofcontents{\vfill \noindent @@ -61,7 +61,7 @@ Joachim Schrod, Lee Wittenberg, and others who have contributed improvements. The ``banner line'' defined here should be changed whenever \.{CTANGLE} is modified. -@d banner "This is CTANGLE (Version 4.4)" +@d banner "This is CTANGLE (Version 4.5)" @c @<Include files@>@/ @@ -390,11 +390,12 @@ get_output(void) /* sends next token to |out_char| */ else { a=(a-0200)*0400+*cur_byte++; switch (a/024000) { /* |024000==(0250-0200)*0400| */ - case 0: cur_val=a; out_char(identifier); break; + case 0: cur_val=(int)a; out_char(identifier); break; case 1: if (a==output_defs_flag) output_defs(); else @<Expand section |a-024000|, |goto restart|@>@; break; - default: cur_val=a-050000; if (cur_val>0) cur_section=cur_val; + default: cur_val=(int)a-050000; + if (cur_val>0) cur_section=(sixteen_bits)cur_val; out_char(section_number); } } @@ -594,7 +595,7 @@ static void output_defs(void);@/ static void out_char(eight_bits); @ @d C_printf(c,a) fprintf(C_file,c,a) -@d C_putc(c) putc(c,C_file) /* isn't \CEE/ wonderfully consistent? */ +@d C_putc(c) putc((int)(c),C_file) /* isn't \CEE/ wonderfully consistent? */ @c static void @@ -619,11 +620,12 @@ output_defs(void) else { a=(a-0200)*0400+*cur_byte++; if (a<024000) { /* |024000==(0250-0200)*0400| */ - cur_val=a; out_char(identifier); + cur_val=(int)a; out_char(identifier); } else if (a<050000) confusion("macro defs have strange char"); else { - cur_val=a-050000; cur_section=cur_val; out_char(section_number); + cur_val=(int)a-050000; cur_section=(sixteen_bits)cur_val; + out_char(section_number); } /* no other cases */ } @@ -723,15 +725,15 @@ case section_number: else if(cur_val<0) C_printf("/*:%d*/",-cur_val); else if (protect) { cur_byte +=4; /* skip line number and file name */ - cur_char = '\n'; + cur_char = (eight_bits)'\n'; goto restart; } else { sixteen_bits a; a=*cur_byte++ *0400; a+=*cur_byte++; /* gets the line number */ - C_printf("\n#line %d \"",a); + C_printf("\n#line %d \"",(int)a); @:line}{\.{\#line}@> - cur_val=(*cur_byte++-0200)*0400; + cur_val=(int)(*cur_byte++-0200)*0400; cur_val+=*cur_byte++; /* points to the file name */ for (j=(cur_val+name_dir)->byte_start, k=(cur_val+name_dir+1)->byte_start; j<k; j++) { @@ -783,7 +785,7 @@ static eight_bits ccode[256]; /* meaning of a char following \.{@@} */ } ccode[' ']=ccode['\t']=ccode['\n']=ccode['\v']=ccode['\r']=ccode['\f'] =ccode['*']=new_section; -ccode['@@']='@@'; ccode['=']=string; +ccode['@@']=(eight_bits)'@@'; ccode['=']=string; ccode['d']=ccode['D']=definition; ccode['f']=ccode['F']=ccode['s']=ccode['S']=format_code; ccode['c']=ccode['C']=ccode['p']=ccode['P']=begin_C; @@ -892,13 +894,12 @@ get_next(void) /* produces the next input token */ print_where=false; @<Insert the line number into |tok_mem|@>@; } - else return '\n'; + else return (eight_bits)'\n'; } - c=*loc; + c=(eight_bits)*loc; if (comment_continues || (c=='/' && (*(loc+1)=='*' || *(loc+1)=='/'))) { - skip_comment(comment_continues||*(loc+1)=='*'); + if (skip_comment(comment_continues||*(loc+1)=='*')) return '\n'; /* scan to end of comment or newline */ - if (comment_continues) return '\n'; else continue; } loc++; @@ -907,13 +908,14 @@ get_next(void) /* produces the next input token */ || ((c=='L' || c=='u' || c=='U')&&(*loc=='\'' || *loc=='"'))@| || ((c=='u' && *loc=='8')&&(*(loc+1)=='\'' || *(loc+1)=='"'))) @<Get a string@>@; - else if (isalpha(c) || isxalpha(c) || ishigh(c)) + else if (isalpha((int)c) || isxalpha(c) || ishigh(c)) @<Get an identifier@>@; else if (c=='@@') @<Get control code and possible section name@>@; else if (xisspace(c)) { if (!preprocessing || loc>limit) continue; /* we don't want a blank after a final backslash */ - else return ' '; /* ignore spaces and tabs, unless |preprocessing| */ + else return (eight_bits)' '; + /* ignore spaces and tabs, unless |preprocessing| */ } else if (c=='#' && loc==buffer+1) preprocessing=true; mistake: @<Compress two-symbol operator@>@; @@ -957,8 +959,8 @@ switch(c) { id_first=--loc; do ++loc; - while (isalpha((eight_bits)*loc) || isdigit((eight_bits)*loc) @| - || isxalpha((eight_bits)*loc) || ishigh((eight_bits)*loc)); + while (isalpha((int)*loc) || isdigit((int)*loc) @| + || isxalpha(*loc) || ishigh(*loc)); id_loc=loc; return identifier; } @@ -1000,7 +1002,7 @@ delimiters if they are protected by a backslash. We follow this convention, but do not allow the string to be longer than |longest_name|. @<Get a string@>= { - char delim = c; /* what started the string */ + char delim = (char)c; /* what started the string */ id_first = section_text+1; id_loc = section_text; *++id_loc=delim; if (delim=='L' || delim=='u' || delim=='U') { /* wide character constant */ @@ -1020,16 +1022,16 @@ convention, but do not allow the string to be longer than |longest_name|. else if (++id_loc<=section_text_end) *id_loc='\n'; /* will print as \.{"\\\\\\n"} */ } - if ((c=*loc++)==delim) { - if (++id_loc<=section_text_end) *id_loc=c; + if ((c=(eight_bits)*loc++)==delim) { + if (++id_loc<=section_text_end) *id_loc=(char)c; break; } if (c=='\\') { if (loc>=limit) continue; if (++id_loc<=section_text_end) *id_loc = '\\'; - c=*loc++; + c=(eight_bits)*loc++; } - if (++id_loc<=section_text_end) *id_loc=c; + if (++id_loc<=section_text_end) *id_loc=(char)c; } if (id_loc>=section_text_end) { fputs("\n! String too long: ",stdout); @@ -1118,13 +1120,13 @@ while (true) { @.Input ended in section name@> loc=buffer+1; break; } - c=*loc; + c=(eight_bits)*loc; @<If end of name or erroneous nesting, |break|@>@; loc++; if (k<section_text_end) k++; if (xisspace(c)) { - c=' '; if (*(k-1)==' ') k--; + c=(eight_bits)' '; if (*(k-1)==' ') k--; } -*k=c; +*k=(char)c; } if (k>=section_text_end) { fputs("\n! Section name too long: ",stdout); @@ -1136,7 +1138,7 @@ if (*k==' ' && k>section_text) k--; @ @<If end of name or erroneous nesting,...@>= if (c=='@@') { - c=*(loc+1); + c=(eight_bits)*(loc+1); if (c=='>') { loc+=2; break; } @@ -1183,7 +1185,10 @@ ANSI \CEE/ preprocessor sometimes requires it. acted, |cur_text| will point to the replacement text just generated, and |next_control| will contain the control code that terminated the activity. -@d app_repl(c) {if (tok_ptr==tok_mem_end) overflow("token"); *(tok_ptr++)=c;} +@d app_repl(c) { + if (tok_ptr==tok_mem_end) overflow("token"); + else *(tok_ptr++)=(eight_bits)c; +} @<Private...@>= static text_pointer cur_text; /* replacement text formed by |scan_repl| */ @@ -1217,9 +1222,9 @@ eight_bits t) to |0150000|; then the numeric line number; then a pointer to the file name. -@d store_id(a) a=id_lookup(id_first,id_loc,0)-name_dir;@/ +@d store_id(a) a=id_lookup(id_first,id_loc,'\0')-name_dir;@/ app_repl((a / 0400)+0200); - app_repl(a % 0400); + app_repl(a % 0400) @<Insert the line...@>= { @@ -1244,8 +1249,9 @@ case section_name: if (t!=section_name) goto done; a=cur_section_name-name_dir; app_repl((a / 0400)+0250); app_repl(a % 0400); - @<Insert the line number into |tok_mem|@>@; break; + @<Insert the line number into |tok_mem|@>@; } + break; case output_defs_code: if (t!=section_name) err_print("! Misplaced @@h"); @.Misplaced @@h@> else { @@ -1255,11 +1261,13 @@ case output_defs_code: if (t!=section_name) err_print("! Misplaced @@h"); app_repl(a % 0400); @<Insert the line number into |tok_mem|@>@; } - break; + break; case constant: case string: @<Copy a string or verbatim construction or numerical constant@>@; + break; case ord: @<Copy an ASCII constant@>@; + break; case definition: case format_code: case begin_C: if (t!=section_name) goto done; else { err_print("! @@d, @@f and @@c are ignored in C text"); continue; @@ -1296,16 +1304,16 @@ code. The \.{+k} switch will `keep' the single quotes in the output. id_first++; app_repl(*id_first++); } - app_repl(a); break; + app_repl(a); @ This section should be rewritten on machines that don't use ASCII code internally. @^ASCII code dependencies@> @<Copy an ASCII constant@>= { - int c=(eight_bits) *id_first; + int c=(int)((eight_bits) *id_first); if (c=='\\') { - c=*++id_first; + c=(int)((eight_bits) *++id_first); if (c>='0' && c<='7') { c-='0'; if (*(id_first+1)>='0' && *(id_first+1)<='7') { @@ -1324,15 +1332,15 @@ code internally. case 'a':c='\7';@+break; case '?':c='?';@+break; case 'x': - if (xisdigit(*(id_first+1))) c=*(++id_first)-'0'; + if (xisdigit(*(id_first+1))) c=(int)(*(++id_first)-'0'); else if (xisxdigit(*(id_first+1))) { ++id_first; - c=toupper((eight_bits)*id_first)-'A'+10; + c=toupper((int)*id_first)-'A'+10; } - if (xisdigit(*(id_first+1))) c=16*c+*(++id_first)-'0'; + if (xisdigit(*(id_first+1))) c=16*c+(int)(*(++id_first)-'0'); else if (xisxdigit(*(id_first+1))) { ++id_first; - c=16*c+toupper((eight_bits)*id_first)-'A'+10; + c=16*c+toupper((int)*id_first)-(int)'A'+10; } break; case '\\':c='\\';@+break; @@ -1344,12 +1352,11 @@ code internally. }@/ /* at this point |c| should have been converted to its ASCII code number */ app_repl(constant); - if (c>=100) app_repl('0'+c/100); - if (c>=10) app_repl('0'+(c/10)%10); - app_repl('0'+c%10); + if (c>=100) app_repl((int)'0'+c/100); + if (c>=10) app_repl((int)'0'+(c/10)%10); + app_repl((int)'0'+c%10); app_repl(constant); } -break; @* Scanning a section. The |scan_section| procedure starts when `\.{@@\ }' or `\.{@@*}' has been @@ -1370,7 +1377,7 @@ scan_section(void) sixteen_bits a; /* token for left-hand side of definition */ section_count++; @+ no_where=true; if (*(loc-1)=='*' && show_progress) { /* starred section */ - printf("*%d",section_count); update_terminal; + printf("*%d",(int)section_count); update_terminal; } next_control=ignore; while (true) { @@ -1491,7 +1498,7 @@ skip_limbo(void) case translit_code: @<Read in transliteration of a character@>@; break; case format_code: case '@@': break; case control_text: if (c=='q' || c=='Q') { - while ((c=skip_ahead())=='@@'); + while ((c=(char)skip_ahead())=='@@'); if (*(loc-1)!='>') err_print("! Double @@ should be used in control text"); @.Double @@ should be used...@> @@ -1530,19 +1537,19 @@ skip_limbo(void) } @ Because on some systems the difference between two pointers is a |ptrdiff_t| -but not an |int|, we use \.{\%ld} to print these quantities. +but not an |int|, we use \.{\%td} to print these quantities. @c void print_stats(void) { puts("\nMemory usage statistics:"); - printf("%ld names (out of %ld)\n", + printf("%td names (out of %ld)\n", (ptrdiff_t)(name_ptr-name_dir),(long)max_names); - printf("%ld replacement texts (out of %ld)\n", + printf("%td replacement texts (out of %ld)\n", (ptrdiff_t)(text_ptr-text_info),(long)max_texts); - printf("%ld bytes (out of %ld)\n", + printf("%td bytes (out of %ld)\n", (ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes); - printf("%ld tokens (out of %ld)\n", + printf("%td tokens (out of %ld)\n", (ptrdiff_t)(tok_ptr-tok_mem),(long)max_toks); } diff --git a/Build/source/texk/web2c/cwebdir/ctproofmac.tex b/Build/source/texk/web2c/cwebdir/ctproofmac.tex index a3016ba7322..bd8b84d7dc8 100644 --- a/Build/source/texk/web2c/cwebdir/ctproofmac.tex +++ b/Build/source/texk/web2c/cwebdir/ctproofmac.tex @@ -1,5 +1,5 @@ % standard macros for CWEB listings (in addition to plain.tex) -% Version 4.4 --- June 2021 +% Version 4.4 --- July 2021 % Modified for proofs in CTWILL \ifx\documentstyle\undefined\else\endinput\fi % LaTeX will use other macros \xdef\fmtversion{\fmtversion+CWEB4.4+PROOFS} @@ -160,7 +160,7 @@ \let\R=\lnot % logical not % \S is section sign \def\T#1{\leavevmode % octal, hex or decimal constant - \hbox{$\def\?{\kern.2em}% + \hbox{$\def\?{\kern.2em}%$% \def\$##1{\egroup_{\,\rm##1}\bgroup}% suffix to constant \def\_{\cdot 10^{\aftergroup}}% power of ten (via dirty trick) \def\%{\cdot 16^{\aftergroup}}% power of sixteen (via dirty trick) @@ -169,7 +169,7 @@ \def\Us{\note{This code is used in sections}} % xref for uses of a section \let\V=\lor % logical or \let\W=\land % logical and -\def\X#1:#2\X{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi % section name +\def\X#1:#2\X{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi %$% section name \XX$\langle\,${\let\I=\ne#2\eightrm\kern.5em#1}$\,\rangle$\XX} \def\Y{\par\yskip} \let\Z=\le diff --git a/Build/source/texk/web2c/cwebdir/ctwill-mini.ch b/Build/source/texk/web2c/cwebdir/ctwill-mini.ch index ec0aec95ed8..4448b1a3d59 100644 --- a/Build/source/texk/web2c/cwebdir/ctwill-mini.ch +++ b/Build/source/texk/web2c/cwebdir/ctwill-mini.ch @@ -354,16 +354,16 @@ Section 52. id_first=--loc; do ++loc; - while (isalpha((eight_bits)*loc) || isdigit((eight_bits)*loc) @| - || isxalpha((eight_bits)*loc) || ishigh((eight_bits)*loc)); + while (isalpha((int)*loc) || isdigit((int)*loc) @| + || isxalpha(*loc) || ishigh(*loc)); id_loc=loc; return identifier; } @y id_first=--loc;@/ do ++loc; - while (isalpha((eight_bits)*loc) || isdigit((eight_bits)*loc) @| - || isxalpha((eight_bits)*loc) || ishigh((eight_bits)*loc));@/ + while (isalpha((int)*loc) || isdigit((int)*loc) @| + || isxalpha(*loc) || ishigh(*loc));@/ id_loc=loc;@/ return identifier; } @@ -1529,17 +1529,21 @@ Section 234--235. case end_translation: return; case identifier: case res_word: @<Output an identifier@>@; break; case section_code: @<Output a section name@>@; break; - case math_rel: out_str("\\MRL{"@q}@>); + case math_rel: out_str("\\MRL{"@q}@>); /* fall through */ @.\\MRL@> case noop: case inserted: break; case cancel: case big_cancel: c=0; b=a; while (true) { a=get_output(); if (a==inserted) continue; - if ((a<indent && !(b==big_cancel&&a==' ')) || a>big_force) break; - if (a==indent) c++; - else if (a==outdent) c--; - else if (a==opt) a=get_output(); + if ((a<indent && !(b==big_cancel&&a==' ')) @| + || (a>big_force && a!=dindent)) break; + switch (a) { + case indent: c++; break; + case outdent: c--; break; + case dindent: c+=2; break; + case opt: a=get_output(); + } } @<Output saved |indent| or |outdent| tokens@>@; goto reswitch; @@ -1551,7 +1555,7 @@ Section 234--235. case indent: case outdent: case opt: case backup: case break_space: case force: case big_force: case preproc_line: @<Output a control, look ahead in case of line breaks, possibly |goto reswitch|@>@; break; - case quoted_char: out(*(cur_tok++)); + case quoted_char: out(*(cur_tok++)); /* fall through */ case qualifier: break; default: out(a); /* otherwise |a| is an ordinary character */ } @@ -1567,17 +1571,21 @@ Section 234--235. case end_translation: return; case identifier: case res_word: @<Output an identifier@>@; break; case section_code: @<Output a section name@>@; break; - case math_rel: out_str("\\MRL{"@q}@>); + case math_rel: out_str("\\MRL{"@q}@>); /* fall through */ @.\\MRL@> case noop: case inserted: break; case cancel: case big_cancel: c=0; b=a; while (true) { a=get_output(); if (a==inserted) continue; - if ((a<indent && !(b==big_cancel&&a==' ')) || a>big_force) break; - if (a==indent) c++; - else if (a==outdent) c--; - else if (a==opt) a=get_output(); + if ((a<indent && !(b==big_cancel&&a==' ')) @| + || (a>big_force && a!=dindent)) break; + switch (a) { + case indent: c++; break; + case outdent: c--; break; + case dindent: c+=2; break; + case opt: a=get_output(); + } } @<Output saved |indent| or |outdent| tokens@>@; goto reswitch; @@ -1589,7 +1597,7 @@ Section 234--235. case indent: case outdent: case opt: case backup: case break_space: case force: case big_force: case preproc_line: @<Output a control, look ahead in case of line breaks, possibly |goto reswitch|@>@; break; - case quoted_char: out(*(cur_tok++)); + case quoted_char: out(*(cur_tok++)); /* fall through */ case qualifier: break; default: out(a); /* otherwise |a| is an ordinary character */ } @@ -1765,6 +1773,12 @@ Section 269. Section 271. @x +@ During the sorting phase we shall use the |cat| and |trans| arrays from +@y +@r @ During the sorting phase we shall use the |cat| and |trans| arrays from +@z + +@x @<Rest of |trans_plus| union@>= @y @<Rest of |trans_plus| union@>= @@ -1819,11 +1833,11 @@ Section 279. @x @ @<Split the list...@>= { - eight_bits c; + int c; next_name=sort_ptr->head; @y @ @<Split the list...@>= {@+ - eight_bits c; + int c; next_name=sort_ptr->head;@/ @z @@ -1849,61 +1863,61 @@ Section 288. @x puts(_("\nMemory usage statistics:")); @.Memory usage statistics:@> - printf(_("%ld names (out of %ld)\n"), + printf(_("%td names (out of %ld)\n"), (ptrdiff_t)(name_ptr-name_dir),(long)max_names); - printf(_("%ld cross-references (out of %ld)\n"), + printf(_("%td cross-references (out of %ld)\n"), (ptrdiff_t)(xref_ptr-xmem),(long)max_refs); - printf(_("%ld bytes (out of %ld)\n"), + printf(_("%td bytes (out of %ld)\n"), (ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes); - printf(_("%ld temp meanings (out of %ld)\n"), + printf(_("%td temp meanings (out of %ld)\n"), (ptrdiff_t)(max_temp_meaning_ptr-temp_meaning_stack), (long)max_meanings); - printf(_("%ld titles (out of %ld)\n"), + printf(_("%td titles (out of %ld)\n"), (ptrdiff_t)(title_code_ptr-title_code),(long)max_titles); puts(_("Parsing:")); - printf(_("%ld scraps (out of %ld)\n"), + printf(_("%td scraps (out of %ld)\n"), (ptrdiff_t)(max_scr_ptr-scrap_info),(long)max_scraps); - printf(_("%ld texts (out of %ld)\n"), + printf(_("%td texts (out of %ld)\n"), (ptrdiff_t)(max_text_ptr-tok_start),(long)max_texts); - printf(_("%ld tokens (out of %ld)\n"), + printf(_("%td tokens (out of %ld)\n"), (ptrdiff_t)(max_tok_ptr-tok_mem),(long)max_toks); - printf(_("%ld levels (out of %ld)\n"), + printf(_("%td levels (out of %ld)\n"), (ptrdiff_t)(max_stack_ptr-stack),(long)stack_size); puts(_("Sorting:")); - printf(_("%ld levels (out of %ld)\n"), + printf(_("%td levels (out of %ld)\n"), (ptrdiff_t)(max_sort_ptr-scrap_info),(long)max_scraps); @y puts(_("\nMemory usage statistics:"));@/ @.Memory usage statistics:@> - printf(_("%ld names (out of %ld)\n"), + printf(_("%td names (out of %ld)\n"), (ptrdiff_t)(name_ptr-name_dir),@/ @t\5\5\5\5@>(long)max_names);@/ - printf(_("%ld cross-references (out of %ld)\n"), + printf(_("%td cross-references (out of %ld)\n"), (ptrdiff_t)(xref_ptr-xmem),(long)max_refs);@/ - printf(_("%ld bytes (out of %ld)\n"), + printf(_("%td bytes (out of %ld)\n"), (ptrdiff_t)(byte_ptr-byte_mem),@/ @t\5\5\5\5@>(long)max_bytes);@/ - printf(_("%ld temp meanings (out of %ld)\n"), + printf(_("%td temp meanings (out of %ld)\n"), (ptrdiff_t)(max_temp_meaning_ptr-temp_meaning_stack),@/ @t\5\5\5\5@>(long)max_meanings);@/ - printf(_("%ld titles (out of %ld)\n"), + printf(_("%td titles (out of %ld)\n"), (ptrdiff_t)(title_code_ptr-title_code),@/ @t\5\5\5\5@>(long)max_titles);@/ puts(_("Parsing:"));@/ - printf(_("%ld scraps (out of %ld)\n"), + printf(_("%td scraps (out of %ld)\n"), (ptrdiff_t)(max_scr_ptr-scrap_info),@/ @t\5\5\5\5@>(long)max_scraps);@/ - printf(_("%ld texts (out of %ld)\n"), + printf(_("%td texts (out of %ld)\n"), (ptrdiff_t)(max_text_ptr-tok_start),@/ @t\5\5\5\5@>(long)max_texts);@/ - printf(_("%ld tokens (out of %ld)\n"), + printf(_("%td tokens (out of %ld)\n"), (ptrdiff_t)(max_tok_ptr-tok_mem),@/ @t\5\5\5\5@>(long)max_toks);@/ - printf(_("%ld levels (out of %ld)\n"), + printf(_("%td levels (out of %ld)\n"), (ptrdiff_t)(max_stack_ptr-stack),@/ @t\5\5\5\5@>(long)stack_size);@/ puts(_("Sorting:"));@/ - printf(_("%ld levels (out of %ld)\n"), + printf(_("%td levels (out of %ld)\n"), (ptrdiff_t)(max_sort_ptr-scrap_info),@/ @t\5\5\5\5@>(long)max_scraps); @z diff --git a/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch b/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch index 7fe1b3585a4..7597b797aaa 100644 --- a/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch +++ b/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch @@ -35,9 +35,9 @@ @z @x -\def\title{CWEAVE (Version 4.4)} +\def\title{CWEAVE (Version 4.5)} @y -\def\title{CTWILL (Version 4.4 [\TeX~Live])} +\def\title{CTWILL (Version 4.5 [\TeX~Live])} @z @x @@ -47,9 +47,9 @@ @z @x - \centerline{(Version 4.4)} + \centerline{(Version 4.5)} @y - \centerline{(Version 4.4 [\TeX~Live])} + \centerline{(Version 4.5 [\TeX~Live])} @z @x @@ -76,7 +76,7 @@ Crusius, and others who have contributed improvements. The ``banner line'' defined here should be changed whenever \.{CWEAVE} is modified. -@d banner "This is CWEAVE (Version 4.4)" +@d banner "This is CWEAVE (Version 4.5)" @y This is the \.{CTWILL} program by D. E. Knuth, based on \.{CWEAVE} by Silvio Levy and D.~E. Knuth. It is also based on @@ -100,7 +100,7 @@ Until then, \.{CWEAVE}'s sequence of sections will be preserved. The ``banner line'' defined here should be changed whenever \.{CTWILL} is modified. The version number parallels the corresponding version of \.{CWEAVE}. -@d banner "This is CTWILL, Version 4.4" +@d banner "This is CTWILL, Version 4.5" /* will be extended by the \TeX~Live |versionstring| */ @z @@ -670,15 +670,14 @@ static token_pointer tok_loc; /* where the first identifier appears */ @x @<Cases for |exp|@>= if (cat1==lbrace || cat1==int_like || cat1==decl) { - make_underlined(pp); big_app(dindent); big_app1(pp); + make_underlined(pp); big_app1(pp); big_app(dindent); reduce(pp,1,fn_decl,0,1); } @y @<Cases for |exp|@>= if(cat1==lbrace || cat1==int_like || cat1==decl) { - make_underlined(pp); - make_ministring(0); - if (indent_param_decl) big_app(dindent); big_app1(pp); + make_underlined(pp); make_ministring(0); big_app1(pp); + if (indent_param_decl) big_app(dindent); reduce(pp,1,fn_decl,0,1); } @z @@ -879,9 +878,9 @@ if (cat1==decl_head) { @z @x - printf("\nIrreducible scrap sequence in section %d:",section_count); + printf("\nIrreducible scrap sequence in section %d:",(int)section_count); @y - printf(_("\nIrreducible scrap sequence in section %d:"),section_count); + printf(_("\nIrreducible scrap sequence in section %d:"),(int)section_count); @z @x @@ -1284,49 +1283,49 @@ out_name(cur_name,proofing); @x puts("\nMemory usage statistics:"); @.Memory usage statistics:@> - printf("%ld names (out of %ld)\n", + printf("%td names (out of %ld)\n", (ptrdiff_t)(name_ptr-name_dir),(long)max_names); - printf("%ld cross-references (out of %ld)\n", + printf("%td cross-references (out of %ld)\n", (ptrdiff_t)(xref_ptr-xmem),(long)max_refs); - printf("%ld bytes (out of %ld)\n", + printf("%td bytes (out of %ld)\n", (ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes); puts("Parsing:"); - printf("%ld scraps (out of %ld)\n", + printf("%td scraps (out of %ld)\n", (ptrdiff_t)(max_scr_ptr-scrap_info),(long)max_scraps); - printf("%ld texts (out of %ld)\n", + printf("%td texts (out of %ld)\n", (ptrdiff_t)(max_text_ptr-tok_start),(long)max_texts); - printf("%ld tokens (out of %ld)\n", + printf("%td tokens (out of %ld)\n", (ptrdiff_t)(max_tok_ptr-tok_mem),(long)max_toks); - printf("%ld levels (out of %ld)\n", + printf("%td levels (out of %ld)\n", (ptrdiff_t)(max_stack_ptr-stack),(long)stack_size); puts("Sorting:"); - printf("%ld levels (out of %ld)\n", + printf("%td levels (out of %ld)\n", (ptrdiff_t)(max_sort_ptr-scrap_info),(long)max_scraps); @y puts(_("\nMemory usage statistics:")); @.Memory usage statistics:@> - printf(_("%ld names (out of %ld)\n"), + printf(_("%td names (out of %ld)\n"), (ptrdiff_t)(name_ptr-name_dir),(long)max_names); - printf(_("%ld cross-references (out of %ld)\n"), + printf(_("%td cross-references (out of %ld)\n"), (ptrdiff_t)(xref_ptr-xmem),(long)max_refs); - printf(_("%ld bytes (out of %ld)\n"), + printf(_("%td bytes (out of %ld)\n"), (ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes); - printf(_("%ld temp meanings (out of %ld)\n"), + printf(_("%td temp meanings (out of %ld)\n"), (ptrdiff_t)(max_temp_meaning_ptr-temp_meaning_stack), (long)max_meanings); - printf(_("%ld titles (out of %ld)\n"), + printf(_("%td titles (out of %ld)\n"), (ptrdiff_t)(title_code_ptr-title_code),(long)max_titles); puts(_("Parsing:")); - printf(_("%ld scraps (out of %ld)\n"), + printf(_("%td scraps (out of %ld)\n"), (ptrdiff_t)(max_scr_ptr-scrap_info),(long)max_scraps); - printf(_("%ld texts (out of %ld)\n"), + printf(_("%td texts (out of %ld)\n"), (ptrdiff_t)(max_text_ptr-tok_start),(long)max_texts); - printf(_("%ld tokens (out of %ld)\n"), + printf(_("%td tokens (out of %ld)\n"), (ptrdiff_t)(max_tok_ptr-tok_mem),(long)max_toks); - printf(_("%ld levels (out of %ld)\n"), + printf(_("%td levels (out of %ld)\n"), (ptrdiff_t)(max_stack_ptr-stack),(long)stack_size); puts(_("Sorting:")); - printf(_("%ld levels (out of %ld)\n"), + printf(_("%td levels (out of %ld)\n"), (ptrdiff_t)(max_sort_ptr-scrap_info),(long)max_scraps); @z diff --git a/Build/source/texk/web2c/cwebdir/ctwimac.tex b/Build/source/texk/web2c/cwebdir/ctwimac.tex index 1eca52852b0..cee38a8144a 100644 --- a/Build/source/texk/web2c/cwebdir/ctwimac.tex +++ b/Build/source/texk/web2c/cwebdir/ctwimac.tex @@ -1,8 +1,8 @@ % standard macros for CWEB listings (in addition to plain.tex) -% Version 4.4 --- June 2021 +% Version 4.4 --- July 2021 % modified for pages produced by CTWILL % further modified for page size of the MMIXware book -\ifx\documentstyle\undefined\else\endinput\fi % LaTeX will use other macros +\ifx\renewenvironment\undefined\else\endinput\fi % LaTeX will use other macros \xdef\fmtversion{\fmtversion+CTWILL4.4+LNCS} \let\:=\. % preserve a way to get the dot accent @@ -17,8 +17,8 @@ \newwrite\reffile \ifx\norefs\def\else \openin\sreffile=\jobname.sref - \ifeof\sreffile \immediate\openout\reffile=\jobname.ref \sortedfalse - \message{This is the first pass!} + \ifeof\sreffile \immediate\openout\reffile=\jobname.ref + \sortedfalse \message{This is the first pass!} \else \sortedtrue \message{This is the second pass!} \fi \fi @@ -211,7 +211,7 @@ \def\6{\ifmmode\else\par % forced break \hangindent\ind\em\noindent\kern\ind\em\copy\bakk\ignorespaces\fi} \def\7{\Y\6} % forced break and a little extra space -\def\8{\hskip-\ind em\hskip 2\em} % no indentation +\def\8{\hskip-\ind\em\hskip 2\em} % no indentation \newcount\gdepth % depth of current major group, plus one \newtoks\gtitle % title of current major group @@ -228,7 +228,7 @@ \def\startsection{\titletrue \line{\smash{\titlefont\title}\quad\hrulefill}\bigskip \let\startsection=\stsec\stsec} -\def\defin#1{\global\advance\ind by 2 \1\&{#1 } } % begin `define' or `format' +\def\defin#1{\global\advance\ind by 2 \1\&{#1 }} % begin `define' or `format' \def\A{\note{See also section}} % xref for doubly defined section name \def\As{\note{See also sections}} % xref for multiply defined section name \def\B{\iftenpoint\ninepoint\fi @@ -242,7 +242,7 @@ \let\SHC\C % "// short comments" treated like "/* ordinary comments */" %\def\C#1{\5\5\quad$\triangleright\,${\cmntfont#1}$\,\triangleleft$} %\def\SHC#1{\5\5\quad$\diamond\,${\cmntfont#1}} -\def\D{\defin{\#define}} % macro definition +\def\D{\defin{{\rm\#}define}} % macro definition \let\E=\equiv % equivalence sign \def\ET{ and~} % conjunction between two section numbers \def\ETs{, and~} % conjunction between the last two of several section numbers @@ -259,7 +259,8 @@ \else\ifdim\ht\partialpage<\pageht \leftfalse\else\lefttrue\fi\fi\NNN} \outer\def\NN{\ifvoid\partialpage\leftfalse \else\ifdim\ht\partialpage<\pageht \lefttrue\else\leftfalse\fi\fi\NNN} -\outer\def\NNN#1#2#3.{\gdepth=#1\gtitle={#3}\def\secno{#2}% starred section +\outer\def\NNN#1#2#3.{% beginning of starred section + \gdepth=#1\gtitle={#3}\def\secno{#2} \ifleft \flushout \gdef\rlhead{\let\i=I\uppercase{\ignorespaces#3}} % running left headline \global\let\rrhead=\rlhead % running right headline @@ -276,7 +277,7 @@ \let\R=\lnot % logical not % \S is section sign \def\T#1{\leavevmode % octal, hex or decimal constant - \hbox{$\def\?{\kern.2em}% + \hbox{$\def\?{\kern.2em}%$% \def\$##1{\egroup_{\,\rm##1}\bgroup}% suffix to constant \def\_{\cdot 10^{\aftergroup}}% power of ten (via dirty trick) \def\%{\cdot 16^{\aftergroup}}% power of sixteen (via dirty trick) @@ -285,7 +286,7 @@ \def\Us{\note{This code is used in sections}} % xref for uses of a section \let\V=\lor % logical or \let\W=\land % logical and -\def\X#1:#2\X{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi % section name +\def\X#1:#2\X{\ifmmode\gdef\XX{\null$\null}\else\gdef\XX{}\fi %$% section name \XX$\langle\,${\let\I=\ne#2\sevenrm\kern.5em#1}$\,\rangle$\XX} \def\Y{\par\yskip} \let\Z=\le diff --git a/Build/source/texk/web2c/cwebdir/cweav-bs.ch b/Build/source/texk/web2c/cwebdir/cweav-bs.ch index c05ce06a331..e224406107e 100644 --- a/Build/source/texk/web2c/cwebdir/cweav-bs.ch +++ b/Build/source/texk/web2c/cwebdir/cweav-bs.ch @@ -20,12 +20,12 @@ This file contributed by Barry Schwartz, trashman@crud.mn.org, 28 Jun 94. The ``banner line'' defined here should be changed whenever \.{CWEAVE} is modified. -@d banner "This is CWEAVE (Version 4.4)" +@d banner "This is CWEAVE (Version 4.5)" @y The ``banner line'' defined here should be changed whenever \.{CWEAVE} is modified. -@d banner "This is CWEAVE (Version 4.4pc/big)" +@d banner "This is CWEAVE (Version 4.5pc/big)" @z diff --git a/Build/source/texk/web2c/cwebdir/cweav-pc.ch b/Build/source/texk/web2c/cwebdir/cweav-pc.ch index 0c95dcf2281..94e63a2cd36 100644 --- a/Build/source/texk/web2c/cwebdir/cweav-pc.ch +++ b/Build/source/texk/web2c/cwebdir/cweav-pc.ch @@ -11,9 +11,9 @@ that allows >64K arrays. (If you need lots more bytes, try the alternate change files that have -bs in their name instead of -pc.) @x section 1 -@d banner "This is CWEAVE (Version 4.4)" +@d banner "This is CWEAVE (Version 4.5)" @y -@d banner "This is CWEAVE (Version 4.4pc)" +@d banner "This is CWEAVE (Version 4.5pc)" @z @x section 17 diff --git a/Build/source/texk/web2c/cwebdir/cweav-ql.ch b/Build/source/texk/web2c/cwebdir/cweav-ql.ch index d10fc1d7456..3245c5d84c2 100644 --- a/Build/source/texk/web2c/cwebdir/cweav-ql.ch +++ b/Build/source/texk/web2c/cwebdir/cweav-ql.ch @@ -7,15 +7,15 @@ ex <dev_>cc;"-v -h -c =500000 cweave_c" @x -\def\title{CWEAVE (Version 4.4)} +\def\title{CWEAVE (Version 4.5)} @y -\def\title{CWEAVE (QL Version 4.4)} +\def\title{CWEAVE (QL Version 4.5)} @z @x section 1 -@d banner "This is CWEAVE (Version 4.4)" +@d banner "This is CWEAVE (Version 4.5)" @y -@d banner "This is CWEAVE (QL Version 4.4)" +@d banner "This is CWEAVE (QL Version 4.5)" @z @x diff --git a/Build/source/texk/web2c/cwebdir/cweav-vms.ch b/Build/source/texk/web2c/cwebdir/cweav-vms.ch index f443d7e3a71..09fbd23b8a1 100644 --- a/Build/source/texk/web2c/cwebdir/cweav-vms.ch +++ b/Build/source/texk/web2c/cwebdir/cweav-vms.ch @@ -13,9 +13,9 @@ modified: (also modified by Don Knuth to keep version numbers uptodate) @x section 1 (01-FEB-1992 ST) -@d banner "This is CWEAVE (Version 4.4)" +@d banner "This is CWEAVE (Version 4.5)" @y -@d banner "This is CWEAVE (VAX/VMS Version 4.4)" +@d banner "This is CWEAVE (VAX/VMS Version 4.5)" @z @x section 4 (01-FEB-1992 ST) diff --git a/Build/source/texk/web2c/cwebdir/cweav-w2c.ch b/Build/source/texk/web2c/cwebdir/cweav-w2c.ch index f870b9cd818..b7521b74de3 100644 --- a/Build/source/texk/web2c/cwebdir/cweav-w2c.ch +++ b/Build/source/texk/web2c/cwebdir/cweav-w2c.ch @@ -17,15 +17,15 @@ @q Please send comments, suggestions, etc. to tex-k@@tug.org. @> @x -\def\title{CWEAVE (Version 4.4)} +\def\title{CWEAVE (Version 4.5)} @y -\def\title{CWEAVE (Version 4.4 [\TeX~Live])} +\def\title{CWEAVE (Version 4.5 [\TeX~Live])} @z @x - \centerline{(Version 4.4)} + \centerline{(Version 4.5)} @y - \centerline{(Version 4.4 [\TeX~Live])} + \centerline{(Version 4.5 [\TeX~Live])} @z @x @@ -41,9 +41,9 @@ @z @x -@d banner "This is CWEAVE (Version 4.4)" +@d banner "This is CWEAVE (Version 4.5)" @y -@d banner "This is CWEAVE, Version 4.4" +@d banner "This is CWEAVE, Version 4.5" /* will be extended by the \TeX~Live |versionstring| */ @z @@ -302,13 +302,13 @@ print_text( /* prints a token list for debugging; not used in |main| */ @x @<Cases for |exp|@>= if (cat1==lbrace || cat1==int_like || cat1==decl) { - make_underlined(pp); big_app(dindent); big_app1(pp); + make_underlined(pp); big_app1(pp); big_app(dindent); reduce(pp,1,fn_decl,0,1); } @y @<Cases for |exp|@>= if(cat1==lbrace || cat1==int_like || cat1==decl) { - make_underlined(pp); if (indent_param_decl) big_app(dindent); big_app1(pp); + make_underlined(pp); big_app1(pp); if (indent_param_decl) big_app(dindent); reduce(pp,1,fn_decl,0,1); } @z @@ -423,9 +423,9 @@ else if (cat1==stmt) { @z @x - printf("\nIrreducible scrap sequence in section %d:",section_count); + printf("\nIrreducible scrap sequence in section %d:",(int)section_count); @y - printf(_("\nIrreducible scrap sequence in section %d:"),section_count); + printf(_("\nIrreducible scrap sequence in section %d:"),(int)section_count); @z @x @@ -591,44 +591,44 @@ finish_line(); fclose(active_file); active_file=NULL; @x puts("\nMemory usage statistics:"); @.Memory usage statistics:@> - printf("%ld names (out of %ld)\n", + printf("%td names (out of %ld)\n", (ptrdiff_t)(name_ptr-name_dir),(long)max_names); - printf("%ld cross-references (out of %ld)\n", + printf("%td cross-references (out of %ld)\n", (ptrdiff_t)(xref_ptr-xmem),(long)max_refs); - printf("%ld bytes (out of %ld)\n", + printf("%td bytes (out of %ld)\n", (ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes); puts("Parsing:"); - printf("%ld scraps (out of %ld)\n", + printf("%td scraps (out of %ld)\n", (ptrdiff_t)(max_scr_ptr-scrap_info),(long)max_scraps); - printf("%ld texts (out of %ld)\n", + printf("%td texts (out of %ld)\n", (ptrdiff_t)(max_text_ptr-tok_start),(long)max_texts); - printf("%ld tokens (out of %ld)\n", + printf("%td tokens (out of %ld)\n", (ptrdiff_t)(max_tok_ptr-tok_mem),(long)max_toks); - printf("%ld levels (out of %ld)\n", + printf("%td levels (out of %ld)\n", (ptrdiff_t)(max_stack_ptr-stack),(long)stack_size); puts("Sorting:"); - printf("%ld levels (out of %ld)\n", + printf("%td levels (out of %ld)\n", (ptrdiff_t)(max_sort_ptr-scrap_info),(long)max_scraps); @y puts(_("\nMemory usage statistics:")); @.Memory usage statistics:@> - printf(_("%ld names (out of %ld)\n"), + printf(_("%td names (out of %ld)\n"), (ptrdiff_t)(name_ptr-name_dir),(long)max_names); - printf(_("%ld cross-references (out of %ld)\n"), + printf(_("%td cross-references (out of %ld)\n"), (ptrdiff_t)(xref_ptr-xmem),(long)max_refs); - printf(_("%ld bytes (out of %ld)\n"), + printf(_("%td bytes (out of %ld)\n"), (ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes); puts(_("Parsing:")); - printf(_("%ld scraps (out of %ld)\n"), + printf(_("%td scraps (out of %ld)\n"), (ptrdiff_t)(max_scr_ptr-scrap_info),(long)max_scraps); - printf(_("%ld texts (out of %ld)\n"), + printf(_("%td texts (out of %ld)\n"), (ptrdiff_t)(max_text_ptr-tok_start),(long)max_texts); - printf(_("%ld tokens (out of %ld)\n"), + printf(_("%td tokens (out of %ld)\n"), (ptrdiff_t)(max_tok_ptr-tok_mem),(long)max_toks); - printf(_("%ld levels (out of %ld)\n"), + printf(_("%td levels (out of %ld)\n"), (ptrdiff_t)(max_stack_ptr-stack),(long)stack_size); puts(_("Sorting:")); - printf(_("%ld levels (out of %ld)\n"), + printf(_("%td levels (out of %ld)\n"), (ptrdiff_t)(max_sort_ptr-scrap_info),(long)max_scraps); @z diff --git a/Build/source/texk/web2c/cwebdir/cweav-w32.ch b/Build/source/texk/web2c/cwebdir/cweav-w32.ch index 013ca70dae3..6292149580f 100644 --- a/Build/source/texk/web2c/cwebdir/cweav-w32.ch +++ b/Build/source/texk/web2c/cwebdir/cweav-w32.ch @@ -2,9 +2,9 @@ This is the change file for CWEB's CWEAVE under Win32 (Contributed by Fabrice Popineau, February 2002) @x section 1 -@d banner "This is CWEAVE (Version 4.4)" +@d banner "This is CWEAVE (Version 4.5)" @y -@d banner "This is CWEAVE (Version 4.4win32)" +@d banner "This is CWEAVE (Version 4.5win32)" @z @x diff --git a/Build/source/texk/web2c/cwebdir/cweave.w b/Build/source/texk/web2c/cwebdir/cweave.w index ffd835e76dc..71e5ee3df8a 100644 --- a/Build/source/texk/web2c/cwebdir/cweave.w +++ b/Build/source/texk/web2c/cwebdir/cweave.w @@ -2,7 +2,7 @@ % This program by Silvio Levy and Donald E. Knuth % is based on a program by Knuth. % It is distributed WITHOUT ANY WARRANTY, express or implied. -% Version 4.4 --- June 2021 +% Version 4.5 --- July 2021 % Copyright (C) 1987,1990,1993,2000 Silvio Levy and Donald E. Knuth @@ -32,11 +32,11 @@ \def\skipxTeX{\\{skip\_\TEX/}} \def\copyxTeX{\\{copy\_\TEX/}} -\def\title{CWEAVE (Version 4.4)} +\def\title{CWEAVE (Version 4.5)} \def\topofcontents{\null\vfill \centerline{\titlefont The {\ttitlefont CWEAVE} processor} \vskip 15pt - \centerline{(Version 4.4)} + \centerline{(Version 4.5)} \vfill} \def\botofcontents{\vfill \noindent @@ -67,7 +67,7 @@ Crusius, and others who have contributed improvements. The ``banner line'' defined here should be changed whenever \.{CWEAVE} is modified. -@d banner "This is CWEAVE (Version 4.4)" +@d banner "This is CWEAVE (Version 4.5)" @c @<Include files@>@/ @@ -245,7 +245,7 @@ If one were careful, one could probably make more changes around section 115 to avoid a lot of identifier looking up. @d append_xref(c) if (xref_ptr==xmem_end) overflow("cross-reference"); - else (++xref_ptr)->num=c; + else (++xref_ptr)->num=c @d no_xref !make_xrefs @d is_tiny(p) length(p)==1 @d unindexed(a) ((a)<res_wd_end && (a)->ilk>=custom) @@ -650,7 +650,7 @@ skip_TeX(void) /* skip past pure \TEX/ code */ if (loc>limit && get_line()==false) return new_section; *(limit+1)='@@'; while (*loc!='@@' && *loc!='|') loc++; - if (*loc++ =='|') return '|'; + if (*loc++ =='|') return (eight_bits)'|'; if (loc<=limit) return ccode[(eight_bits)*(loc++)]; } } @@ -711,13 +711,13 @@ get_next(void) /* produces the next input token */ @<Check if we're at the end of a preprocessor command@>@; if (loc>limit && get_line()==false) return new_section; c=*(loc++); - if (xisdigit(c) || c=='.') @<Get a constant@>@; + if (xisdigit((int)c) || c=='.') @<Get a constant@>@; else if (c=='\'' || c=='"'@| || ((c=='L' || c=='u' || c=='U')&&(*loc=='\'' || *loc=='"'))@| || ((c=='u' && *loc=='8')&&(*(loc+1)=='\'' || *(loc+1)=='"'))@| || (c=='<' && sharp_include_line==true)) @<Get a string@>@; - else if (isalpha(c) || isxalpha(c) || ishigh(c)) + else if (isalpha((int)c) || isxalpha(c) || ishigh(c)) @<Get an identifier@>@; else if (c=='@@') @<Get control code and possible section name@>@; else if (xisspace(c)) continue; /* ignore spaces and tabs */ @@ -811,8 +811,8 @@ switch(c) { id_first=--loc; do ++loc; - while (isalpha((eight_bits)*loc) || isdigit((eight_bits)*loc) @| - || isxalpha((eight_bits)*loc) || ishigh((eight_bits)*loc)); + while (isalpha((int)*loc) || isdigit((int)*loc) @| + || isxalpha(*loc) || ishigh(*loc)); id_loc=loc; return identifier; } @@ -832,7 +832,7 @@ are pointers into the array |section_text|, not into |buffer|. @d gather_digits_while(t) while ((t) || *loc=='\'') if (*loc=='\'') { /* \CPLUSPLUS/-style digit separator */ *id_loc++=' '; loc++; /* insert a little bit of space */ - }@+else *id_loc++=*loc++; + }@+else *id_loc++=*loc++ @<Get a constant@>= { id_first=id_loc=section_text+1; @@ -857,7 +857,7 @@ get_exponent: digit_suffix: while (*loc=='u' || *loc=='U' || *loc=='l' || *loc=='L' || *loc=='f' || *loc=='F') { - *id_loc++='$'; *id_loc++=toupper((eight_bits)*loc); loc++; + *id_loc++='$'; *id_loc++=toupper((int)*loc); loc++; } return constant; } @@ -947,7 +947,7 @@ switch(ccode[(eight_bits)(c=*loc++)]) { case verbatim: @<Scan a verbatim string@>@; case ord: @<Get a string@>@; case xref_roman: case xref_wildcard: case xref_typewriter: case noop: - case TeX_string: skip_restricted(); + case TeX_string: skip_restricted(); /* fall through */ default: return ccode[(eight_bits)c]; } @@ -1085,7 +1085,7 @@ phase_one(void) { changed_section[section_count]=changing; /* it will become |true| if any line changes */ if (*(loc-1)=='*' && show_progress) { - printf("*%d",section_count); + printf("*%d",(int)section_count); update_terminal; /* print a progress report */ } @<Store cross-references in the \TEX/ part of a section@>@; @@ -1490,7 +1490,7 @@ out_section( sixteen_bits n) { char s[6]; - sprintf(s,"%d",n); out_str(s); + sprintf(s,"%d",(int)n); out_str(s); if (changed_section[n]) out_str("\\*"); @.\\*@> } @@ -2240,8 +2240,8 @@ text_pointer p) case section_flag: putchar('<'); print_section_name((name_dir+r)); putchar('>'); break; - case tok_flag: printf("[[%d]]",r); break; - case inner_tok_flag: printf("|[[%d]]|",r); break; + case tok_flag: printf("[[%d]]",(int)r); break; + case inner_tok_flag: printf("|[[%d]]|",(int)r); break; default: @<Print token |r| in symbolic form@>@; } } @@ -2267,7 +2267,7 @@ switch (r) { case quoted_char: j++; printf("[%o]",(unsigned int)*j); break; case end_translation: printf("[quit]"); break; case inserted: printf("[inserted]"); break; - default: putchar(r); + default: putchar((int)r); } @ The production rules listed above are embedded directly into \.{CWEAVE}, @@ -2642,7 +2642,7 @@ to be performed, followed by |goto found|. @<Cases for |exp|@>= if (cat1==lbrace || cat1==int_like || cat1==decl) { - make_underlined(pp); big_app(dindent); big_app1(pp); + make_underlined(pp); big_app1(pp); big_app(dindent); reduce(pp,1,fn_decl,0,1); } else if (cat1==unop) squash(pp,2,exp,-2,2); @@ -3341,7 +3341,7 @@ freeze_text; return text_ptr-1; @ @<If semi-tracing, show the irreducible scraps@>= if (lo_ptr>scrap_base && tracing==partly) { - printf("\nIrreducible scrap sequence in section %d:",section_count); + printf("\nIrreducible scrap sequence in section %d:",(int)section_count); @.Irreducible scrap sequence...@> mark_harmless; for (j=scrap_base; j<=lo_ptr; j++) { @@ -3748,8 +3748,8 @@ currently in progress. The end of output occurs when an |end_translation| token is found, so the stack is never empty except when we first begin the output process. -@d inner 0 /* value of |mode| for \CEE/ texts within \TEX/ texts */ -@d outer 1 /* value of |mode| for \CEE/ texts in sections */ +@d inner false /* value of |mode| for \CEE/ texts within \TEX/ texts */ +@d outer true /* value of |mode| for \CEE/ texts in sections */ @<Typed...@>= typedef int mode; typedef struct { @@ -3913,17 +3913,21 @@ make_output(void) /* outputs the equivalents of tokens */ case end_translation: return; case identifier: case res_word: @<Output an identifier@>@; break; case section_code: @<Output a section name@>@; break; - case math_rel: out_str("\\MRL{"@q}@>); + case math_rel: out_str("\\MRL{"@q}@>); /* fall through */ @.\\MRL@> case noop: case inserted: break; case cancel: case big_cancel: c=0; b=a; while (true) { a=get_output(); if (a==inserted) continue; - if ((a<indent && !(b==big_cancel&&a==' ')) || a>big_force) break; - if (a==indent) c++; - else if (a==outdent) c--; - else if (a==opt) a=get_output(); + if ((a<indent && !(b==big_cancel&&a==' ')) @| + || (a>big_force && a!=dindent)) break; + switch (a) { + case indent: c++; break; + case outdent: c--; break; + case dindent: c+=2; break; + case opt: a=get_output(); + } } @<Output saved |indent| or |outdent| tokens@>@; goto reswitch; @@ -3935,7 +3939,7 @@ make_output(void) /* outputs the equivalents of tokens */ case indent: case outdent: case opt: case backup: case break_space: case force: case big_force: case preproc_line: @<Output a control, look ahead in case of line breaks, possibly |goto reswitch|@>@; break; - case quoted_char: out(*(cur_tok++)); + case quoted_char: out(*(cur_tok++)); /* fall through */ case qualifier: break; default: out(a); /* otherwise |a| is an ordinary character */ } @@ -4236,7 +4240,7 @@ else { @.\\N@> {@+ char s[32];@+sprintf(s,"{%d}",sec_depth+1);@+out_str(s);@+} if (show_progress) - printf("*%d",section_count); update_terminal; /* print a progress report */ + printf("*%d",(int)section_count); update_terminal; /* print a progress report */ } out('{'); out_section(section_count); out('}'); @@ -4604,7 +4608,7 @@ for (h=hash; h<=hash_end; h++) { while (next_name) { cur_name=next_name; next_name=cur_name->link; if (cur_name->xref!=(void *)xmem) { - c=(eight_bits)((cur_name->byte_start)[0]); + c=(cur_name->byte_start)[0]; if (xisupper(c)) c=tolower(c); blink[cur_name-name_dir]=bucket[c]; bucket[c]=cur_name; } @@ -4732,14 +4736,14 @@ while (sort_ptr>scrap_info) { } @ @<Split the list...@>= { - eight_bits c; + int c; next_name=sort_ptr->head; do { cur_name=next_name; next_name=blink[cur_name-name_dir]; cur_byte=cur_name->byte_start+cur_depth; if (cur_byte==(cur_name+1)->byte_start) c=0; /* hit end of the name */ else { - c=(eight_bits) *cur_byte; + c=*cur_byte; if (xisupper(c)) c=tolower(c); } blink[cur_name-name_dir]=bucket[c]; bucket[c]=cur_name; @@ -4845,30 +4849,30 @@ name_pointer p) @ @<Output all the section names@>=section_print(root); @ Because on some systems the difference between two pointers is a |ptrdiff_t| -rather than an |int|, we use \.{\%ld} to print these quantities. +rather than an |int|, we use \.{\%td} to print these quantities. @c void print_stats(void) { puts("\nMemory usage statistics:"); @.Memory usage statistics:@> - printf("%ld names (out of %ld)\n", + printf("%td names (out of %ld)\n", (ptrdiff_t)(name_ptr-name_dir),(long)max_names); - printf("%ld cross-references (out of %ld)\n", + printf("%td cross-references (out of %ld)\n", (ptrdiff_t)(xref_ptr-xmem),(long)max_refs); - printf("%ld bytes (out of %ld)\n", + printf("%td bytes (out of %ld)\n", (ptrdiff_t)(byte_ptr-byte_mem),(long)max_bytes); puts("Parsing:"); - printf("%ld scraps (out of %ld)\n", + printf("%td scraps (out of %ld)\n", (ptrdiff_t)(max_scr_ptr-scrap_info),(long)max_scraps); - printf("%ld texts (out of %ld)\n", + printf("%td texts (out of %ld)\n", (ptrdiff_t)(max_text_ptr-tok_start),(long)max_texts); - printf("%ld tokens (out of %ld)\n", + printf("%td tokens (out of %ld)\n", (ptrdiff_t)(max_tok_ptr-tok_mem),(long)max_toks); - printf("%ld levels (out of %ld)\n", + printf("%td levels (out of %ld)\n", (ptrdiff_t)(max_stack_ptr-stack),(long)stack_size); puts("Sorting:"); - printf("%ld levels (out of %ld)\n", + printf("%td levels (out of %ld)\n", (ptrdiff_t)(max_sort_ptr-scrap_info),(long)max_scraps); } diff --git a/Build/source/texk/web2c/cwebdir/cwebmac.tex b/Build/source/texk/web2c/cwebdir/cwebmac.tex index 4673573cf76..4f93a15557d 100644 --- a/Build/source/texk/web2c/cwebdir/cwebmac.tex +++ b/Build/source/texk/web2c/cwebdir/cwebmac.tex @@ -1,7 +1,7 @@ % standard macros for CWEB listings (in addition to plain.tex) -% Version 4.4 --- June 2021 +% Version 4.5 --- July 2021 \ifx\renewenvironment\undefined\else\endinput\fi % LaTeX will use other macros -\xdef\fmtversion{\fmtversion+CWEB4.4} +\xdef\fmtversion{\fmtversion+CWEB4.5} \chardef\cwebversion=4 \chardef\cwebrevision=4 \newif\ifpdf \ifx\pdf+\pdftrue\fi diff --git a/Build/source/texk/web2c/cwebdir/cwebman-w2c.ch b/Build/source/texk/web2c/cwebdir/cwebman-w2c.ch index 6481c79debf..1b29ce9258c 100644 --- a/Build/source/texk/web2c/cwebdir/cwebman-w2c.ch +++ b/Build/source/texk/web2c/cwebdir/cwebman-w2c.ch @@ -93,17 +93,17 @@ @z @x -\def\runninghead{{\tentt CWEB} USER MANUAL (VERSION 4.4)} +\def\runninghead{{\tentt CWEB} USER MANUAL (VERSION 4.5)} @y \def\Kpathsea/{{\mc KPATHSEA\spacefactor1000}} -\def\runninghead{{\tentt CWEB} USER MANUAL (Version 4.4 [\TeX~Live])} +\def\runninghead{{\tentt CWEB} USER MANUAL (Version 4.5 [\TeX~Live])} @z @x -\vskip 18pt\centerline{(Version 4.4 --- June 2021)} +\vskip 18pt\centerline{(Version 4.5 --- July 2021)} @y -\vskip 18pt\centerline{(Version 4.4 --- June 2021)% -\footnote*{This document describes the extended \.{CWEB} (Version 4.4 [\TeX~Live]).}} +\vskip 18pt\centerline{(Version 4.5 --- July 2021)% +\footnote*{This document describes the extended \.{CWEB} (Version 4.5 [\TeX~Live]).}} @z @x @@ -314,9 +314,9 @@ And here's what the same excerpt looks like when typeset. @z @x - \.{ { }\\vskip 15pt \\centerline\{(Version 4.4)\}{ }\\vfill\}}\cr}$$ + \.{ { }\\vskip 15pt \\centerline\{(Version 4.5)\}{ }\\vfill\}}\cr}$$ @y - \.{ { }\\vskip 15pt \\centerline\{(Version 4.4)\}{ }\\vfill\}}\cr}$$ + \.{ { }\\vskip 15pt \\centerline\{(Version 4.5)\}{ }\\vfill\}}\cr}$$ @z @x diff --git a/Build/source/texk/web2c/cwebdir/cwebman.tex b/Build/source/texk/web2c/cwebdir/cwebman.tex index e7706db1648..449aad56e80 100644 --- a/Build/source/texk/web2c/cwebdir/cwebman.tex +++ b/Build/source/texk/web2c/cwebdir/cwebman.tex @@ -35,7 +35,7 @@ \def\lheader{\mainfont\the\pageno\hfill\sc\runninghead\hfill} \def\rheader{\hfill\sc\runninghead\hfill\mainfont\the\pageno} -\def\runninghead{{\tentt CWEB} USER MANUAL (VERSION 4.4)} +\def\runninghead{{\tentt CWEB} USER MANUAL (VERSION 4.5)} % This verbatim mode assumes that ! marks are !! in the text being copied. \def\verbatim{\begingroup @@ -49,7 +49,7 @@ \null\vfill \centerline{\titlefont The {\ttitlefont CWEB} System of Structured Documentation} -\vskip 18pt\centerline{(Version 4.4 --- June 2021)} +\vskip 18pt\centerline{(Version 4.5 --- July 2021)} \vskip 24pt \centerline{\authorfont Donald E. Knuth and Silvio Levy} \vfill @@ -1592,7 +1592,7 @@ $$\lpile{\.{\\def\\topofcontents\{\\null\\vfill}\cr \.{ { }\\titlefalse \% include headline on the contents page}\cr \.{ { }\\def\\rheader\{\\mainfont The \{\\tt CWEAVE\}{ }processor\\hfil\}}\cr \.{ { }\\centerline\{\\titlefont The \{\\ttitlefont CWEAVE\}{ }processor\}}\cr - \.{ { }\\vskip 15pt \\centerline\{(Version 4.4)\}{ }\\vfill\}}\cr}$$ + \.{ { }\\vskip 15pt \\centerline\{(Version 4.5)\}{ }\\vfill\}}\cr}$$ Redefining \.{\\rheader}, which is the headline for right-hand pages, suffices in this case to put the desired information at the top of the contents page. diff --git a/Build/source/texk/web2c/cwebdir/po/cweb-tl.pot b/Build/source/texk/web2c/cwebdir/po/cweb-tl.pot index 965001fc802..0d0c9276d1e 100644 --- a/Build/source/texk/web2c/cwebdir/po/cweb-tl.pot +++ b/Build/source/texk/web2c/cwebdir/po/cweb-tl.pot @@ -30,15 +30,15 @@ msgid "%s: Need one to three file arguments.\n" msgstr "" #: ctang-texlive.ch:39 -msgid "This is CTANGLE, Version 4.4" +msgid "This is CTANGLE, Version 4.5" msgstr "" #: ctwill-texlive.ch:39 -msgid "This is CTWILL, Version 4.4" +msgid "This is CTWILL, Version 4.5" msgstr "" #: cweav-texlive.ch:39 -msgid "This is CWEAVE, Version 4.4" +msgid "This is CWEAVE, Version 4.5" msgstr "" #: comm-texlive.ch:512 diff --git a/Build/source/texk/web2c/cwebdir/po/cweb.pot b/Build/source/texk/web2c/cwebdir/po/cweb.pot index c9cb7cc42c1..2eb7fcdf06c 100644 --- a/Build/source/texk/web2c/cwebdir/po/cweb.pot +++ b/Build/source/texk/web2c/cwebdir/po/cweb.pot @@ -523,15 +523,15 @@ msgid "Sorting:" msgstr "" #: ctang-i18n.ch:17 -msgid "This is CTANGLE (Version 4.4 [CWEBbin 2021.4])" +msgid "This is CTANGLE (Version 4.5 [CWEBbin 2021.5])" msgstr "" #: cweav-twill.ch:61 -msgid "This is CTWILL (Version 4.4 [CWEBbin 2021.4])" +msgid "This is CTWILL (Version 4.5 [CWEBbin 2021.5])" msgstr "" #: cweav-i18n.ch:17 cweav-twill.ch:42 -msgid "This is CWEAVE (Version 4.4 [CWEBbin 2021.4])" +msgid "This is CWEAVE (Version 4.5 [CWEBbin 2021.5])" msgstr "" #: cweav-i18n.ch:301 cweav-i18n.ch:309 diff --git a/Build/source/texk/web2c/cwebdir/po/de/cweb-tl.po b/Build/source/texk/web2c/cwebdir/po/de/cweb-tl.po index 34ea5e6042d..17e0ed20ce8 100644 --- a/Build/source/texk/web2c/cwebdir/po/de/cweb-tl.po +++ b/Build/source/texk/web2c/cwebdir/po/de/cweb-tl.po @@ -32,16 +32,16 @@ msgid "%s: Need one to three file arguments.\n" msgstr "%s: Benötige ein bis drei Dateiargumente.\n" #: ctang-texlive.ch:39 -msgid "This is CTANGLE, Version 4.4" -msgstr "Dies ist CTANGLE, Version 4.4" +msgid "This is CTANGLE, Version 4.5" +msgstr "Dies ist CTANGLE, Version 4.5" #: ctwill-texlive.ch:39 -msgid "This is CTWILL, Version 4.4" -msgstr "Dies ist CTWILL, Version 4.4" +msgid "This is CTWILL, Version 4.5" +msgstr "Dies ist CTWILL, Version 4.5" #: cweav-texlive.ch:39 -msgid "This is CWEAVE, Version 4.4" -msgstr "Dies ist CWEAVE, Version 4.4" +msgid "This is CWEAVE, Version 4.5" +msgstr "Dies ist CWEAVE, Version 4.5" #: comm-texlive.ch:512 #, c-format diff --git a/Build/source/texk/web2c/cwebdir/po/de/cweb.po b/Build/source/texk/web2c/cwebdir/po/de/cweb.po index 75b90c1efcc..d6ef8d4fbaf 100644 --- a/Build/source/texk/web2c/cwebdir/po/de/cweb.po +++ b/Build/source/texk/web2c/cwebdir/po/de/cweb.po @@ -603,16 +603,16 @@ msgid "Sorting:" msgstr "Sortieren:" #: ctang-i18n.ch:17 -msgid "This is CTANGLE (Version 4.4 [CWEBbin 2021.4])" -msgstr "Dies ist CTANGLE (Version 4.4 [CWEBbin 2021.4])" +msgid "This is CTANGLE (Version 4.5 [CWEBbin 2021.5])" +msgstr "Dies ist CTANGLE (Version 4.5 [CWEBbin 2021.5])" #: cweav-twill.ch:61 -msgid "This is CTWILL (Version 4.4 [CWEBbin 2021.4])" -msgstr "Dies ist CTWILL (Version 4.4 [CWEBbin 2021.4])" +msgid "This is CTWILL (Version 4.5 [CWEBbin 2021.5])" +msgstr "Dies ist CTWILL (Version 4.5 [CWEBbin 2021.5])" #: cweav-i18n.ch:17 cweav-twill.ch:42 -msgid "This is CWEAVE (Version 4.4 [CWEBbin 2021.4])" -msgstr "Dies ist CWEAVE (Version 4.4 [CWEBbin 2021.4])" +msgid "This is CWEAVE (Version 4.5 [CWEBbin 2021.5])" +msgstr "Dies ist CWEAVE (Version 4.5 [CWEBbin 2021.5])" #: cweav-i18n.ch:301 cweav-i18n.ch:309 msgid "buffer" diff --git a/Build/source/texk/web2c/cwebdir/po/it/cweb.po b/Build/source/texk/web2c/cwebdir/po/it/cweb.po index f12275bde81..5d1c5f5198d 100644 --- a/Build/source/texk/web2c/cwebdir/po/it/cweb.po +++ b/Build/source/texk/web2c/cwebdir/po/it/cweb.po @@ -598,16 +598,16 @@ msgid "Sorting:" msgstr "Ordinamento:" #: ctang-i18n.ch:17 -msgid "This is CTANGLE (Version 4.4 [CWEBbin 2021.4])" -msgstr "Questo è CTANGLE (Versione 4.4 [CWEBbin 2021])" +msgid "This is CTANGLE (Version 4.5 [CWEBbin 2021.5])" +msgstr "Questo è CTANGLE (Versione 4.5 [CWEBbin 2021])" #: cweav-i18n.ch:17 -msgid "This is CWEAVE (Version 4.4 [CWEBbin 2021.4])" -msgstr "Questo è CWEAVE (Versione 4.4 [CWEBbin 2021])" +msgid "This is CWEAVE (Version 4.5 [CWEBbin 2021.5])" +msgstr "Questo è CWEAVE (Versione 4.5 [CWEBbin 2021])" #: cweav-twill.ch:68 -msgid "This is CTWILL (Version 4.4 [CWEBbin 2021.4])" -msgstr "Questo è CTWILL (Versione 4.4 [CWEBbin 2021])" +msgid "This is CTWILL (Version 4.5 [CWEBbin 2021.5])" +msgstr "Questo è CTWILL (Versione 4.5 [CWEBbin 2021])" #: cweav-i18n.ch:301 cweav-i18n.ch:309 msgid "buffer" diff --git a/Build/source/texk/web2c/cwebdir/prod-twill.w b/Build/source/texk/web2c/cwebdir/prod-twill.w index fba592df5b7..3afccf18a4a 100644 --- a/Build/source/texk/web2c/cwebdir/prod-twill.w +++ b/Build/source/texk/web2c/cwebdir/prod-twill.w @@ -2,7 +2,7 @@ % This program by Silvio Levy and Donald E. Knuth % is based on a program by Knuth. % It is distributed WITHOUT ANY WARRANTY, express or implied. -% Version 3.6 --- May 2000 +% Version 4.5 --- July 2021 % @ Here is a table of all the productions. Each production that combines two or more consecutive scraps implicitly inserts a {\tt \$} diff --git a/Build/source/texk/web2c/cwebdir/prod.w b/Build/source/texk/web2c/cwebdir/prod.w index c4c75e0f4ab..975dfe51279 100644 --- a/Build/source/texk/web2c/cwebdir/prod.w +++ b/Build/source/texk/web2c/cwebdir/prod.w @@ -2,7 +2,7 @@ % This program by Silvio Levy and Donald E. Knuth % is based on a program by Knuth. % It is distributed WITHOUT ANY WARRANTY, express or implied. -% Version 3.6 --- May 2000 +% Version 4.5 --- July 2021 % @ Here is a table of all the productions. Each production that combines two or more consecutive scraps implicitly inserts a {\tt \$} diff --git a/Build/source/texk/web2c/cwebdir/texinputs/pdfctwimac.tex b/Build/source/texk/web2c/cwebdir/texinputs/pdfctwimac.tex index dd859f23886..5ef80e070c8 100644 --- a/Build/source/texk/web2c/cwebdir/texinputs/pdfctwimac.tex +++ b/Build/source/texk/web2c/cwebdir/texinputs/pdfctwimac.tex @@ -1,11 +1,11 @@ % standard macros for CWEB listings (in addition to plain.tex) -% Version 4.0 --- February 2021 +% Version 4.5 --- July 2021 % modified for pages produced by CTWILL % further modified for page size of the MMIXware book % modified for PDF output with 'tex "\let\pdf+', 'pdftex', and 'xetex' % This file is not copyrighted and can be used freely. \ifx\renewenvironment\undefined\else\endinput\fi % LaTeX will use other macros -\xdef\fmtversion{\fmtversion+CTWILL4.0+LNCS+PDF} +\xdef\fmtversion{\fmtversion+CTWILL4.5+LNCS+PDF} \newif\ifpdf \ifx\pdf+\pdftrue\fi diff --git a/Build/source/texk/web2c/man/ChangeLog b/Build/source/texk/web2c/man/ChangeLog index 06ce47d1d29..97c702c819f 100644 --- a/Build/source/texk/web2c/man/ChangeLog +++ b/Build/source/texk/web2c/man/ChangeLog @@ -1,3 +1,7 @@ +2021-07-14 Andreas Scherer <https://ascherer.github.io> + + * ctwill.man: CWEB 4.5 release. + 2021-06-06 Andreas Scherer <https://ascherer.github.io> * ctwill.man, diff --git a/Build/source/texk/web2c/man/ctwill.man b/Build/source/texk/web2c/man/ctwill.man index 1170b07a1f6..8fbd2634dfb 100644 --- a/Build/source/texk/web2c/man/ctwill.man +++ b/Build/source/texk/web2c/man/ctwill.man @@ -111,7 +111,7 @@ The present incarnation of \f[B]ctwill\f[R] and its utilities tries hard to be a drop-in replacement for the original package. There are, however, a few differences worth noting: .IP \[bu] 2 -This version is based on the most recent version of CWEB (4.4). +This version is based on the most recent version of CWEB (4.5). .IP \[bu] 2 In TeX\ Live the utility programs are prefixed with \f[B]ctwill-\f[R] and the macro files with \f[B]ct\f[R] for technical reasons. |