summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/cwebdir
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/cwebdir')
-rw-r--r--Build/source/texk/web2c/cwebdir/ChangeLog7
-rw-r--r--Build/source/texk/web2c/cwebdir/comm-w2c.ch9
-rw-r--r--Build/source/texk/web2c/cwebdir/ctang-w2c.ch5
-rw-r--r--Build/source/texk/web2c/cwebdir/ctwill-w2c.ch2
-rw-r--r--Build/source/texk/web2c/cwebdir/cweav-w2c.ch2
5 files changed, 23 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/cwebdir/ChangeLog b/Build/source/texk/web2c/cwebdir/ChangeLog
index 62f30474c33..ea272b92180 100644
--- a/Build/source/texk/web2c/cwebdir/ChangeLog
+++ b/Build/source/texk/web2c/cwebdir/ChangeLog
@@ -1,6 +1,13 @@
2020-06-07 Andreas Scherer <https://ascherer.github.io>
* comm-w2c.ch,
+ * ctang-w2c.ch,
+ * cweav-w2c.ch,
+ * ctwill-w2c.ch: Check accessibility to designated output files.
+
+2020-06-07 Andreas Scherer <https://ascherer.github.io>
+
+ * comm-w2c.ch,
* comm-w2c.h,
* ctang-w2c.ch,
* cweav-w2c.ch,
diff --git a/Build/source/texk/web2c/cwebdir/comm-w2c.ch b/Build/source/texk/web2c/cwebdir/comm-w2c.ch
index 805d90d6af9..3fe2ac1bf62 100644
--- a/Build/source/texk/web2c/cwebdir/comm-w2c.ch
+++ b/Build/source/texk/web2c/cwebdir/comm-w2c.ch
@@ -869,7 +869,7 @@ fatal(
@x
if (*s) printf(s);
@y
- if (*s) fputs(s,stdout);
+ if (*s) err_print(s);
@z
@x
@@ -1129,6 +1129,10 @@ else {
@ @<Scan arguments and open output files@>=
scan_args();
if (program==ctangle) {
+ if ((C_file=fopen(C_file_name,"a"))==NULL)
+ fatal(_("! Cannot open output file "), C_file_name);
+@.Cannot open output file@>
+ else fclose(C_file); /* Test accessability */
strcpy(check_file_name,C_file_name);
if(check_file_name[0]!='\0') {
char *dot_pos=strrchr(check_file_name,'.');
@@ -1140,6 +1144,9 @@ if (program==ctangle) {
@.Cannot open output file@>
}
else {
+ if ((tex_file=fopen(tex_file_name,"a"))==NULL)
+ fatal(_("! Cannot open output file "), tex_file_name);
+ else fclose(tex_file); /* Test accessability */
strcpy(check_file_name,tex_file_name);
if(check_file_name[0]!='\0') {
char *dot_pos=strrchr(check_file_name,'.');
diff --git a/Build/source/texk/web2c/cwebdir/ctang-w2c.ch b/Build/source/texk/web2c/cwebdir/ctang-w2c.ch
index 6bacb8d0982..a137092b111 100644
--- a/Build/source/texk/web2c/cwebdir/ctang-w2c.ch
+++ b/Build/source/texk/web2c/cwebdir/ctang-w2c.ch
@@ -312,9 +312,12 @@ fclose(C_file); C_file=NULL;
for (an_output_file=end_output_files; an_output_file>cur_out_file;) {
an_output_file--;
sprint_section_name(output_file_name,*an_output_file);
+ if ((C_file=fopen(output_file_name,"a"))==NULL)
+ fatal(_("! Cannot open output file "),output_file_name);
+@.Cannot open output file@>
+ else fclose(C_file); /* Test accessability */
if((C_file=fopen(check_file_name,"wb"))==NULL)
fatal(_("! Cannot open output file "),check_file_name);
-@.Cannot open output file@>
if (show_progress) { printf("\n(%s)",output_file_name); update_terminal; }
cur_line=1;
stack_ptr=stack+1;
diff --git a/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch b/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch
index 29bb9f093a4..59e0cf6ea76 100644
--- a/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch
+++ b/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch
@@ -349,8 +349,10 @@ char **av@t\2\2@>) /* argument values */
@x
@d max_scraps 2000 /* number of tokens in \CEE/ texts being parsed */
+@d stack_size 400 /* number of simultaneous output levels */
@y
@d max_scraps 10000 /* number of tokens in \CEE/ texts being parsed */
+@d stack_size 2000 /* number of simultaneous output levels */
@z
@x
diff --git a/Build/source/texk/web2c/cwebdir/cweav-w2c.ch b/Build/source/texk/web2c/cwebdir/cweav-w2c.ch
index fded6e677b5..db419d81db4 100644
--- a/Build/source/texk/web2c/cwebdir/cweav-w2c.ch
+++ b/Build/source/texk/web2c/cwebdir/cweav-w2c.ch
@@ -125,8 +125,10 @@ char **av@t\2\2@>) /* argument values */
@x
@d max_scraps 2000 /* number of tokens in \CEE/ texts being parsed */
+@d stack_size 400 /* number of simultaneous output levels */
@y
@d max_scraps 10000 /* number of tokens in \CEE/ texts being parsed */
+@d stack_size 2000 /* number of simultaneous output levels */
@z
@x