summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/cwebboot.cin
diff options
context:
space:
mode:
authorAndreas Scherer <andreas_tex@freenet.de>2020-04-10 11:14:07 +0000
committerAndreas Scherer <andreas_tex@freenet.de>2020-04-10 11:14:07 +0000
commit9ebef863fbd274ccc04480e1f12b7ce385c739c8 (patch)
treea1ce3d49bc55a3f819f5cae68eaa5abc0bcbf686 /Build/source/texk/web2c/cwebboot.cin
parentffb1a15162aabae2a564f442f4041b4f4f1766d7 (diff)
[CWEB] Add new command-line option '-t'.
If disabled with '-t', the temporary output is ignored unconditionally and the final output is (re-)created irrespective of changes between runs. (Default is '+t' for CWEB={ctangle,cweave,ctwill}.) git-svn-id: svn://tug.org/texlive/trunk@54639 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/cwebboot.cin')
-rw-r--r--Build/source/texk/web2c/cwebboot.cin93
1 files changed, 48 insertions, 45 deletions
diff --git a/Build/source/texk/web2c/cwebboot.cin b/Build/source/texk/web2c/cwebboot.cin
index 8cc8f6937b2..602dfaf071a 100644
--- a/Build/source/texk/web2c/cwebboot.cin
+++ b/Build/source/texk/web2c/cwebboot.cin
@@ -17,21 +17,21 @@
#include <stdlib.h>
/*:22*//*81:*/
-#line 1118 "cwebdir/comm-w2c.ch"
+#line 1120 "cwebdir/comm-w2c.ch"
#include <string.h>
#line 1417 "cwebdir/common.w"
-#line 1125 "cwebdir/comm-w2c.ch"
+#line 1127 "cwebdir/comm-w2c.ch"
/*:81*//*85:*/
-#line 1164 "cwebdir/comm-w2c.ch"
+#line 1166 "cwebdir/comm-w2c.ch"
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
/*:85*//*88:*/
-#line 1206 "cwebdir/comm-w2c.ch"
+#line 1208 "cwebdir/comm-w2c.ch"
#ifndef HAVE_GETTEXT
#define HAVE_GETTEXT 0
@@ -48,7 +48,7 @@
#endif
/*:88*//*90:*/
-#line 1296 "cwebdir/comm-w2c.ch"
+#line 1298 "cwebdir/comm-w2c.ch"
typedef bool boolean;
#define HAVE_BOOLEAN
@@ -160,6 +160,7 @@ err_print(_("! Include file name too long") ) ;goto restart;} \
#define show_progress flags['p']
#define show_stats flags['s']
#define show_happiness flags['h']
+#define temporary_output flags['t']
#define make_xrefs flags['x'] \
#define flag_change (**argv!='-')
@@ -291,10 +292,10 @@ char**argv;
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 863 "cwebdir/comm-w2c.ch"
+#line 864 "cwebdir/comm-w2c.ch"
char scn_file_name[max_file_name_length];
char check_file_name[max_file_name_length];
-#line 870 "cwebdir/comm-w2c.ch"
+#line 871 "cwebdir/comm-w2c.ch"
boolean flags[128];
const char*use_language= "";
#line 1228 "cwebdir/common.w"
@@ -305,15 +306,15 @@ const char*use_language= "";
FILE*C_file;
FILE*tex_file;
FILE*idx_file;
-#line 1051 "cwebdir/comm-w2c.ch"
+#line 1053 "cwebdir/comm-w2c.ch"
FILE*scn_file;
FILE*check_file;
-#line 1058 "cwebdir/comm-w2c.ch"
+#line 1060 "cwebdir/comm-w2c.ch"
FILE*active_file;
char*found_filename;
#line 1376 "cwebdir/common.w"
-#line 1075 "cwebdir/comm-w2c.ch"
+#line 1077 "cwebdir/comm-w2c.ch"
/*:77*/
#line 61 "cwebdir/common.w"
@@ -328,7 +329,7 @@ char change_buffer[buf_size];
char*change_limit;
/*:11*//*86:*/
-#line 1180 "cwebdir/comm-w2c.ch"
+#line 1182 "cwebdir/comm-w2c.ch"
char cb_banner[max_banner];
string texmf_locale;
@@ -395,12 +396,12 @@ extern void overflow(const char*);
/*:63*//*69:*/
#line 1251 "cwebdir/common.w"
-#line 891 "cwebdir/comm-w2c.ch"
+#line 893 "cwebdir/comm-w2c.ch"
static void scan_args(void);
#line 1253 "cwebdir/common.w"
/*:69*//*83:*/
-#line 1140 "cwebdir/comm-w2c.ch"
+#line 1142 "cwebdir/comm-w2c.ch"
boolean get_line(void);
name_pointer id_lookup(const char*,const char*,char);
@@ -413,7 +414,7 @@ void reset_input(void);
void sprint_section_name(char*,name_pointer);
/*:83*//*84:*/
-#line 1153 "cwebdir/comm-w2c.ch"
+#line 1155 "cwebdir/comm-w2c.ch"
static boolean input_ln(FILE*);
static int web_strcmp(char*,int,char*,int);
@@ -423,7 +424,7 @@ static void check_change(void);
static void prime_the_change_buffer(void);
/*:84*//*98:*/
-#line 1397 "cwebdir/comm-w2c.ch"
+#line 1399 "cwebdir/comm-w2c.ch"
static void cb_usage(const_string str);
static void cb_usagehelp(const_string*message,const_string bug_email);
@@ -463,7 +464,7 @@ root= NULL;
#line 72 "cwebdir/comm-w2c.ch"
/*91:*/
-#line 1311 "cwebdir/comm-w2c.ch"
+#line 1313 "cwebdir/comm-w2c.ch"
kpse_set_program_name(argv[0],"cweb");
@@ -471,7 +472,7 @@ kpse_set_program_name(argv[0],"cweb");
#line 73 "cwebdir/comm-w2c.ch"
/*89:*/
-#line 1262 "cwebdir/comm-w2c.ch"
+#line 1264 "cwebdir/comm-w2c.ch"
setlocale(LC_MESSAGES,setlocale(LC_CTYPE,""));
texmf_locale= kpse_var_expand("${TEXMFLOCALEDIR}");
@@ -492,13 +493,15 @@ textdomain("cweb");
/*68:*/
#line 1233 "cwebdir/common.w"
+#line 878 "cwebdir/comm-w2c.ch"
+temporary_output= 1;
#line 1235 "cwebdir/common.w"
/*:68*/
#line 75 "cwebdir/comm-w2c.ch"
/*78:*/
-#line 1075 "cwebdir/comm-w2c.ch"
+#line 1077 "cwebdir/comm-w2c.ch"
scan_args();
if(program==ctangle){
@@ -1345,7 +1348,7 @@ puts(_("(That was a fatal error, my friend.)"));
#line 774 "cwebdir/comm-w2c.ch"
/*87:*/
-#line 1191 "cwebdir/comm-w2c.ch"
+#line 1193 "cwebdir/comm-w2c.ch"
if(C_file)fclose(C_file);
if(tex_file)fclose(tex_file);
@@ -1396,7 +1399,7 @@ printf(_("\n! Sorry, %s capacity exceeded"),t);fatal("","");
/*:65*//*70:*/
#line 1254 "cwebdir/common.w"
-#line 898 "cwebdir/comm-w2c.ch"
+#line 900 "cwebdir/comm-w2c.ch"
static void
scan_args(void)
#line 1257 "cwebdir/common.w"
@@ -1408,7 +1411,7 @@ boolean found_web= 0,found_change= 0,found_out= 0;
#line 1264 "cwebdir/common.w"
-#line 910 "cwebdir/comm-w2c.ch"
+#line 912 "cwebdir/comm-w2c.ch"
#if defined DEV_NULL
strncpy(change_file_name,DEV_NULL,max_file_name_length-2);
@@ -1423,25 +1426,25 @@ strcpy(change_file_name,"/dev/null");
while(--argc> 0){
#line 1266 "cwebdir/common.w"
if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*74:*/
-#line 988 "cwebdir/comm-w2c.ch"
+#line 990 "cwebdir/comm-w2c.ch"
{
if(strcmp("-help",*argv)==0||strcmp("--help",*argv)==0)
/*94:*/
-#line 1336 "cwebdir/comm-w2c.ch"
+#line 1338 "cwebdir/comm-w2c.ch"
cb_usagehelp(program==ctangle?CTANGLEHELP:
program==cweave?CWEAVEHELP:CTWILLHELP,NULL);
/*:94*/
-#line 992 "cwebdir/comm-w2c.ch"
+#line 994 "cwebdir/comm-w2c.ch"
if(strcmp("-version",*argv)==0||strcmp("--version",*argv)==0)
/*96:*/
-#line 1378 "cwebdir/comm-w2c.ch"
+#line 1380 "cwebdir/comm-w2c.ch"
printversionandexit(cb_banner,
program==ctwill?"Donald E. Knuth":"Silvio Levy and Donald E. Knuth",
@@ -1449,7 +1452,7 @@ NULL,"Contemporary development on https://github.com/ascherer/cwebbin.\n");
/*:96*/
-#line 995 "cwebdir/comm-w2c.ch"
+#line 997 "cwebdir/comm-w2c.ch"
if(strcmp("-verbose",*argv)==0||strcmp("--verbose",*argv)==0)
@@ -1468,14 +1471,14 @@ if(*dot_pos=='d'){
if(sscanf(++dot_pos,"%u",&kpathsea_debug)!=1)/*75:*/
#line 1352 "cwebdir/common.w"
-#line 1038 "cwebdir/comm-w2c.ch"
+#line 1040 "cwebdir/comm-w2c.ch"
cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill");
#line 1363 "cwebdir/common.w"
-#line 1045 "cwebdir/comm-w2c.ch"
+#line 1047 "cwebdir/comm-w2c.ch"
/*:75*/
-#line 1010 "cwebdir/comm-w2c.ch"
+#line 1012 "cwebdir/comm-w2c.ch"
while(isdigit(*dot_pos))dot_pos++;
dot_pos--;
@@ -1484,7 +1487,7 @@ if(*dot_pos=='l'){
use_language= ++dot_pos;
break;
}else
-#line 1023 "cwebdir/comm-w2c.ch"
+#line 1025 "cwebdir/comm-w2c.ch"
flags[(eight_bits)*dot_pos]= flag_change;
#line 1350 "cwebdir/common.w"
}
@@ -1494,7 +1497,7 @@ break;
else{
s= name_pos= *argv;dot_pos= NULL;
-#line 931 "cwebdir/comm-w2c.ch"
+#line 933 "cwebdir/comm-w2c.ch"
while(*s){
if(*s=='.')dot_pos= s++;
else if(*s==DIR_SEPARATOR||*s==DEVICE_SEPARATOR||*s=='/')
@@ -1509,7 +1512,7 @@ if(!found_web)/*71:*/
{
if(s-*argv> max_file_name_length-5)
/*76:*/
-#line 1045 "cwebdir/comm-w2c.ch"
+#line 1047 "cwebdir/comm-w2c.ch"
fatal(_("! Filename too long\n"),*argv);
#line 1365 "cwebdir/common.w"
@@ -1538,12 +1541,12 @@ else if(!found_change)/*72:*/
#line 1310 "cwebdir/common.w"
{
-#line 963 "cwebdir/comm-w2c.ch"
+#line 965 "cwebdir/comm-w2c.ch"
if(strcmp(*argv,"-")!=0){
#line 1314 "cwebdir/common.w"
if(s-*argv> max_file_name_length-4)
/*76:*/
-#line 1045 "cwebdir/comm-w2c.ch"
+#line 1047 "cwebdir/comm-w2c.ch"
fatal(_("! Filename too long\n"),*argv);
#line 1365 "cwebdir/common.w"
@@ -1554,7 +1557,7 @@ fatal(_("! Filename too long\n"),*argv);
if(dot_pos==NULL)
sprintf(change_file_name,"%s.ch",*argv);
else strcpy(change_file_name,*argv);
-#line 970 "cwebdir/comm-w2c.ch"
+#line 972 "cwebdir/comm-w2c.ch"
}
found_change= 1;
#line 1321 "cwebdir/common.w"
@@ -1569,7 +1572,7 @@ else if(!found_out)/*73:*/
{
if(s-*argv> max_file_name_length-5)
/*76:*/
-#line 1045 "cwebdir/comm-w2c.ch"
+#line 1047 "cwebdir/comm-w2c.ch"
fatal(_("! Filename too long\n"),*argv);
#line 1365 "cwebdir/common.w"
@@ -1585,7 +1588,7 @@ sprintf(C_file_name,"%s.c",*argv);
}else{
strcpy(tex_file_name,*argv);
strcpy(C_file_name,*argv);
-#line 977 "cwebdir/comm-w2c.ch"
+#line 979 "cwebdir/comm-w2c.ch"
if(make_xrefs){
#line 1336 "cwebdir/common.w"
*dot_pos= 0;
@@ -1596,19 +1599,19 @@ sprintf(scn_file_name,"%s.scn",*argv);
found_out= 1;
}
-#line 987 "cwebdir/comm-w2c.ch"
+#line 989 "cwebdir/comm-w2c.ch"
/*:73*/
#line 1277 "cwebdir/common.w"
else/*75:*/
#line 1352 "cwebdir/common.w"
-#line 1038 "cwebdir/comm-w2c.ch"
+#line 1040 "cwebdir/comm-w2c.ch"
cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill");
#line 1363 "cwebdir/common.w"
-#line 1045 "cwebdir/comm-w2c.ch"
+#line 1047 "cwebdir/comm-w2c.ch"
/*:75*/
#line 1278 "cwebdir/common.w"
;
@@ -1617,21 +1620,21 @@ else/*75:*/
if(!found_web)/*75:*/
#line 1352 "cwebdir/common.w"
-#line 1038 "cwebdir/comm-w2c.ch"
+#line 1040 "cwebdir/comm-w2c.ch"
cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill");
#line 1363 "cwebdir/common.w"
-#line 1045 "cwebdir/comm-w2c.ch"
+#line 1047 "cwebdir/comm-w2c.ch"
/*:75*/
#line 1281 "cwebdir/common.w"
;
#line 1283 "cwebdir/common.w"
}
-#line 950 "cwebdir/comm-w2c.ch"
+#line 952 "cwebdir/comm-w2c.ch"
/*:70*//*95:*/
-#line 1344 "cwebdir/comm-w2c.ch"
+#line 1346 "cwebdir/comm-w2c.ch"
static void cb_usage(const_string str)
{
@@ -1664,7 +1667,7 @@ history= spotless;exit(wrap_up());
}
/*:95*//*97:*/
-#line 1386 "cwebdir/comm-w2c.ch"
+#line 1388 "cwebdir/comm-w2c.ch"
void cb_show_banner(void)
{