texlive[75066] Build/source/texk/web2c: [CWEB] Recreate 'common' boot

commits+ascherer at tug.org commits+ascherer at tug.org
Wed Apr 30 12:02:59 CEST 2025


Revision: 75066
          https://tug.org/svn/texlive?view=revision&revision=75066
Author:   ascherer
Date:     2025-04-30 12:02:59 +0200 (Wed, 30 Apr 2025)
Log Message:
-----------
[CWEB] Recreate 'common' boot source.

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/ChangeLog
    trunk/Build/source/texk/web2c/cwebboot.cin

Modified: trunk/Build/source/texk/web2c/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/ChangeLog	2025-04-30 09:36:13 UTC (rev 75065)
+++ trunk/Build/source/texk/web2c/ChangeLog	2025-04-30 10:02:59 UTC (rev 75066)
@@ -1,5 +1,6 @@
 2025-04-30  Andreas Scherer  <https://ascherer.github.io>
 
+	* cwebboot.cin,
 	* help.h: Restore 'verbose' diagnostics in CWEB.
 
 2025-04-18  Andreas Scherer  <https://ascherer.github.io>

Modified: trunk/Build/source/texk/web2c/cwebboot.cin
===================================================================
--- trunk/Build/source/texk/web2c/cwebboot.cin	2025-04-30 09:36:13 UTC (rev 75065)
+++ trunk/Build/source/texk/web2c/cwebboot.cin	2025-04-30 10:02:59 UTC (rev 75066)
@@ -26,20 +26,20 @@
 #line 71 "cwebdir/comm-w2c.h"
 
 /*:4*//*91:*/
-#line 739 "cwebdir/comm-w2c.ch"
+#line 699 "cwebdir/comm-w2c.ch"
 
 #if HAVE_GETTEXT
 #include <locale.h>  
 #else
-#line 743 "cwebdir/comm-w2c.ch"
+#line 703 "cwebdir/comm-w2c.ch"
 #define setlocale(a,b) ""
 #define bindtextdomain(a,b) ""
 #define textdomain(a) ""
 #endif
-#line 747 "cwebdir/comm-w2c.ch"
+#line 707 "cwebdir/comm-w2c.ch"
 
 /*:91*//*93:*/
-#line 786 "cwebdir/comm-w2c.ch"
+#line 746 "cwebdir/comm-w2c.ch"
 
 #include <kpathsea/kpathsea.h>  
 
@@ -47,7 +47,7 @@
 #include <lib/lib.h>  
 
 /*:93*//*96:*/
-#line 823 "cwebdir/comm-w2c.ch"
+#line 783 "cwebdir/comm-w2c.ch"
 
 #define CWEB
 #include "help.h" 
@@ -136,10 +136,6 @@
 #define prefix 3
 #define extension 4
 #define bad_extension 5
-#define RETURN_OK 0
-#define RETURN_WARN 5
-#define RETURN_ERROR 10
-#define RETURN_FAIL 20
 #define flag_change (**argv!='-')
 #define max_banner 50
 #define PATH_SEPARATOR separators[0]
@@ -353,7 +349,7 @@
 char C_file_name[max_file_name_length];
 char tex_file_name[max_file_name_length];
 char idx_file_name[max_file_name_length];
-#line 456 "cwebdir/comm-w2c.ch"
+#line 422 "cwebdir/comm-w2c.ch"
 char scn_file_name[max_file_name_length];
 char check_file_name[max_file_name_length];
 #line 1131 "cwebdir/common.w"
@@ -366,20 +362,20 @@
 FILE*tex_file;
 FILE*idx_file;
 FILE*scn_file;
-#line 584 "cwebdir/comm-w2c.ch"
+#line 544 "cwebdir/comm-w2c.ch"
 FILE*active_file;
 FILE*check_file;
 #line 1273 "cwebdir/common.w"
 
-#line 601 "cwebdir/comm-w2c.ch"
+#line 561 "cwebdir/comm-w2c.ch"
 /*:83*//*86:*/
-#line 629 "cwebdir/comm-w2c.ch"
+#line 589 "cwebdir/comm-w2c.ch"
 
 const char*use_language= "";
 
 
 /*:86*//*87:*/
-#line 642 "cwebdir/comm-w2c.ch"
+#line 602 "cwebdir/comm-w2c.ch"
 
 char cb_banner[max_banner];
 string texmf_locale;
@@ -386,7 +382,7 @@
 #ifndef SEPARATORS
 #define SEPARATORS "://"
 #endif
-#line 648 "cwebdir/comm-w2c.ch"
+#line 608 "cwebdir/comm-w2c.ch"
  char separators[]= SEPARATORS;
 
 /*:87*/
@@ -457,9 +453,9 @@
 #line 1184 "cwebdir/common.w"
 static void scan_args(void);
 
-#line 514 "cwebdir/comm-w2c.ch"
+#line 474 "cwebdir/comm-w2c.ch"
 /*:76*//*98:*/
-#line 836 "cwebdir/comm-w2c.ch"
+#line 796 "cwebdir/comm-w2c.ch"
 
 static void cb_usage(const_string str);
 static void cb_usagehelp(const_string*message);
@@ -487,7 +483,7 @@
 #line 78 "cwebdir/comm-w2c.ch"
 
 /*94:*/
-#line 798 "cwebdir/comm-w2c.ch"
+#line 758 "cwebdir/comm-w2c.ch"
 
 kpse_set_program_name(argv[0],"cweb");
 
@@ -496,7 +492,7 @@
 
 #line 85 "cwebdir/comm-w2c.ch"
 /*92:*/
-#line 748 "cwebdir/comm-w2c.ch"
+#line 708 "cwebdir/comm-w2c.ch"
 
 setlocale(LC_MESSAGES,setlocale(LC_CTYPE,""));
 texmf_locale= kpse_var_expand("${TEXMFLOCALEDIR}");
@@ -517,9 +513,7 @@
 /*74:*/
 #line 1137 "cwebdir/common.w"
 
-#line 463 "cwebdir/comm-w2c.ch"
-make_xrefs= true;
-#line 1139 "cwebdir/common.w"
+show_banner= show_happiness= show_progress= make_xrefs= true;
 
 /*:74*/
 #line 86 "cwebdir/comm-w2c.ch"
@@ -526,12 +520,12 @@
 
 #line 101 "cwebdir/common.w"
 /*84:*/
-#line 601 "cwebdir/comm-w2c.ch"
+#line 561 "cwebdir/comm-w2c.ch"
 
 scan_args();
 if(program==ctangle){
 if(check_for_change)/*88:*/
-#line 659 "cwebdir/comm-w2c.ch"
+#line 619 "cwebdir/comm-w2c.ch"
 {
 if((C_file= fopen(C_file_name,"a"))==NULL)
 fatal(_("! Cannot open output file "),C_file_name);
@@ -548,7 +542,7 @@
 }
 
 /*:88*/
-#line 604 "cwebdir/comm-w2c.ch"
+#line 564 "cwebdir/comm-w2c.ch"
 
 else if((C_file= fopen(C_file_name,"wb"))==NULL)
 fatal(_("! Cannot open output file "),C_file_name);
@@ -556,7 +550,7 @@
 }
 else{
 if(check_for_change)/*89:*/
-#line 674 "cwebdir/comm-w2c.ch"
+#line 634 "cwebdir/comm-w2c.ch"
 {
 if((tex_file= fopen(tex_file_name,"a"))==NULL)
 fatal(_("! Cannot open output file "),tex_file_name);
@@ -573,7 +567,7 @@
 }
 
 /*:89*/
-#line 610 "cwebdir/comm-w2c.ch"
+#line 570 "cwebdir/comm-w2c.ch"
 
 else if((tex_file= fopen(tex_file_name,"wb"))==NULL)
 fatal(_("! Cannot open output file "),tex_file_name);
@@ -580,7 +574,7 @@
 }
 #line 1285 "cwebdir/common.w"
 
-#line 619 "cwebdir/comm-w2c.ch"
+#line 579 "cwebdir/comm-w2c.ch"
 /*:84*/
 #line 101 "cwebdir/common.w"
 
@@ -1314,12 +1308,12 @@
 if(show_progress||show_happiness||history!=spotless)new_line();
 if(show_stats)
 print_stats();
-#line 403 "cwebdir/comm-w2c.ch"
+#line 381 "cwebdir/comm-w2c.ch"
 /*69:*/
 #line 1073 "cwebdir/common.w"
 
 switch(history){
-#line 429 "cwebdir/comm-w2c.ch"
+#line 395 "cwebdir/comm-w2c.ch"
 case spotless:
 if(show_happiness)puts(_("(No errors were found.)"));break;
 case harmless_message:
@@ -1332,10 +1326,10 @@
 }
 
 /*:69*/
-#line 403 "cwebdir/comm-w2c.ch"
+#line 381 "cwebdir/comm-w2c.ch"
 
 /*90:*/
-#line 692 "cwebdir/comm-w2c.ch"
+#line 652 "cwebdir/comm-w2c.ch"
 
 if(C_file)fclose(C_file);
 if(tex_file)fclose(tex_file);
@@ -1344,17 +1338,12 @@
 remove(check_file_name);
 
 /*:90*/
-#line 404 "cwebdir/comm-w2c.ch"
+#line 382 "cwebdir/comm-w2c.ch"
 
-#line 411 "cwebdir/comm-w2c.ch"
-switch(history){
-case spotless:return RETURN_OK;
-case harmless_message:return RETURN_WARN;
-case error_message:return RETURN_ERROR;
-case fatal_message:default:return RETURN_FAIL;
+#line 1069 "cwebdir/common.w"
+if(history> harmless_message)return EXIT_FAILURE;
+else return EXIT_SUCCESS;
 }
-#line 1071 "cwebdir/common.w"
-}
 
 /*:68*//*70:*/
 #line 1091 "cwebdir/common.w"
@@ -1373,7 +1362,7 @@
 overflow(
 const char*t)
 {
-#line 442 "cwebdir/comm-w2c.ch"
+#line 408 "cwebdir/comm-w2c.ch"
 printf(_("\n! Sorry, %s capacity exceeded"),t);fatal("","");
 #line 1107 "cwebdir/common.w"
 }
@@ -1391,17 +1380,17 @@
 bool found_web= false,found_change= false,found_out= false;
 
 
-#line 486 "cwebdir/comm-w2c.ch"
+#line 446 "cwebdir/comm-w2c.ch"
 strcpy(change_file_name,"/dev/null");
 #if defined DEV_NULL
 strncpy(change_file_name,DEV_NULL,max_file_name_length-2);
 change_file_name[max_file_name_length-2]= '\0';
 #elif defined _DEV_NULL
-#line 491 "cwebdir/comm-w2c.ch"
+#line 451 "cwebdir/comm-w2c.ch"
  strncpy(change_file_name,_DEV_NULL,max_file_name_length-2);
 change_file_name[max_file_name_length-2]= '\0';
 #endif
-#line 494 "cwebdir/comm-w2c.ch"
+#line 454 "cwebdir/comm-w2c.ch"
 
 #line 1166 "cwebdir/common.w"
  while(--argc> 0){
@@ -1408,12 +1397,12 @@
 if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*80:*/
 #line 1245 "cwebdir/common.w"
 
-#line 527 "cwebdir/comm-w2c.ch"
+#line 487 "cwebdir/comm-w2c.ch"
 {
 if(strcmp("-help",*argv)==0||strcmp("--help",*argv)==0)
 
 /*97:*/
-#line 827 "cwebdir/comm-w2c.ch"
+#line 787 "cwebdir/comm-w2c.ch"
 
 cb_usagehelp(program==ctangle?CTANGLEHELP:
 program==cweave?CWEAVEHELP:CTWILLHELP);
@@ -1420,12 +1409,12 @@
 
 
 /*:97*/
-#line 530 "cwebdir/comm-w2c.ch"
+#line 490 "cwebdir/comm-w2c.ch"
 
 if(strcmp("-version",*argv)==0||strcmp("--version",*argv)==0)
 
 /*100:*/
-#line 873 "cwebdir/comm-w2c.ch"
+#line 833 "cwebdir/comm-w2c.ch"
 
 printversionandexit(cb_banner,
 program==ctwill?"Donald E. Knuth":"Silvio Levy and Donald E. Knuth",
@@ -1433,7 +1422,7 @@
 
 
 /*:100*/
-#line 533 "cwebdir/comm-w2c.ch"
+#line 493 "cwebdir/comm-w2c.ch"
 
 if(strcmp("-verbose",*argv)==0||strcmp("--verbose",*argv)==0)
 
@@ -1447,15 +1436,15 @@
 case'q':show_banner= show_progress= show_happiness= false;continue;
 case'd':
 if(sscanf(++dot_pos,"%u",&kpathsea_debug)!=1)/*81:*/
-#line 570 "cwebdir/comm-w2c.ch"
+#line 530 "cwebdir/comm-w2c.ch"
 
 cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill");
 
 #line 1260 "cwebdir/common.w"
 
-#line 578 "cwebdir/comm-w2c.ch"
+#line 538 "cwebdir/comm-w2c.ch"
 /*:81*/
-#line 545 "cwebdir/comm-w2c.ch"
+#line 505 "cwebdir/comm-w2c.ch"
 
 while(isdigit(*dot_pos))dot_pos++;
 dot_pos--;
@@ -1468,7 +1457,7 @@
 }
 #line 1248 "cwebdir/common.w"
 
-#line 570 "cwebdir/comm-w2c.ch"
+#line 530 "cwebdir/comm-w2c.ch"
 /*:80*/
 #line 1167 "cwebdir/common.w"
 
@@ -1475,7 +1464,7 @@
 else{
 s= name_pos= *argv;dot_pos= NULL;
 while(*s)
-#line 502 "cwebdir/comm-w2c.ch"
+#line 462 "cwebdir/comm-w2c.ch"
 if(*s=='.')dot_pos= s++;
 else if(*s==DIR_SEPARATOR||*s==DEVICE_SEPARATOR||*s=='/')
 dot_pos= NULL,name_pos= ++s;
@@ -1488,7 +1477,7 @@
 {
 if(s-*argv> max_file_name_length-5)
 /*82:*/
-#line 578 "cwebdir/comm-w2c.ch"
+#line 538 "cwebdir/comm-w2c.ch"
 fatal(_("! Filename too long\n"),*argv);
 #line 1262 "cwebdir/common.w"
 
@@ -1522,7 +1511,7 @@
 if(strcmp(*argv,"-")!=0){
 if(s-*argv> max_file_name_length-4)
 /*82:*/
-#line 578 "cwebdir/comm-w2c.ch"
+#line 538 "cwebdir/comm-w2c.ch"
 fatal(_("! Filename too long\n"),*argv);
 #line 1262 "cwebdir/common.w"
 
@@ -1546,7 +1535,7 @@
 {
 if(s-*argv> max_file_name_length-5)
 /*82:*/
-#line 578 "cwebdir/comm-w2c.ch"
+#line 538 "cwebdir/comm-w2c.ch"
 fatal(_("! Filename too long\n"),*argv);
 #line 1262 "cwebdir/common.w"
 
@@ -1573,13 +1562,13 @@
 #line 1177 "cwebdir/common.w"
 
 else/*81:*/
-#line 570 "cwebdir/comm-w2c.ch"
+#line 530 "cwebdir/comm-w2c.ch"
 
 cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill");
 
 #line 1260 "cwebdir/common.w"
 
-#line 578 "cwebdir/comm-w2c.ch"
+#line 538 "cwebdir/comm-w2c.ch"
 /*:81*/
 #line 1178 "cwebdir/common.w"
 
@@ -1586,13 +1575,13 @@
 }
 }
 if(!found_web)/*81:*/
-#line 570 "cwebdir/comm-w2c.ch"
+#line 530 "cwebdir/comm-w2c.ch"
 
 cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill");
 
 #line 1260 "cwebdir/common.w"
 
-#line 578 "cwebdir/comm-w2c.ch"
+#line 538 "cwebdir/comm-w2c.ch"
 /*:81*/
 #line 1181 "cwebdir/common.w"
 
@@ -1599,7 +1588,7 @@
 }
 
 /*:75*//*99:*/
-#line 840 "cwebdir/comm-w2c.ch"
+#line 800 "cwebdir/comm-w2c.ch"
 
 static void cb_usage(const_string str)
 {
@@ -1631,7 +1620,7 @@
 }
 
 /*:99*//*101:*/
-#line 881 "cwebdir/comm-w2c.ch"
+#line 841 "cwebdir/comm-w2c.ch"
 
 void cb_show_banner(void)
 {



More information about the tex-live-commits mailing list.