From 488c5d94d7fc969aa9ace08e38038c6bf0d1e952 Mon Sep 17 00:00:00 2001 From: Andreas Scherer Date: Sun, 7 Jun 2020 10:41:27 +0000 Subject: [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 --- Build/source/texk/web2c/cwebdir/comm-w2c.ch | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Build/source/texk/web2c/cwebdir/comm-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_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,'.'); -- cgit v1.2.3