diff options
author | Andreas Scherer <andreas_tex@freenet.de> | 2020-06-07 10:41:27 +0000 |
---|---|---|
committer | Andreas Scherer <andreas_tex@freenet.de> | 2020-06-07 10:41:27 +0000 |
commit | 488c5d94d7fc969aa9ace08e38038c6bf0d1e952 (patch) | |
tree | 2c04b1c2f91f9f2d0c7bd98f53ff7d1309969e5c /Build/source/texk/web2c/cwebdir/comm-w2c.ch | |
parent | 07b951d93d2e788efc557389632cbf90862c1e1f (diff) |
[CWEB] Check accessibility to designated output files.
Increase 'stack_size' along 'max_scraps'.
git-svn-id: svn://tug.org/texlive/trunk@55463 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/cwebdir/comm-w2c.ch')
-rw-r--r-- | Build/source/texk/web2c/cwebdir/comm-w2c.ch | 9 |
1 files changed, 8 insertions, 1 deletions
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,'.'); |