Path: blob/main/chinese/celvis/files/patch-tmp.c
16135 views
--- tmp.c.orig Thu Aug 15 04:45:57 19961+++ tmp.c Thu Aug 15 05:14:50 19962@@ -21,6 +21,7 @@34/* The FAIL() macro prints an error message and then exits. */5#define FAIL(why,arg) mode = MODE_EX; msg(why, arg); endwin(); HZ_abort(9)6+#define FAIL2(why,arg1,arg2) mode = MODE_EX; msg(why, arg1, arg2); endwin(); HZ_abort(9)78/* This is the name of the temp file */9static char tmpname[80];10@@ -91,7 +92,7 @@11if (*o_readonly || (statb.st_mode & S_IJRON))12#endif13#if OS914- if we don't have write permission...15+ /* if we don't have write permission... */16#endif17#if ANY_UNIX18if (*o_readonly || !(statb.st_mode &19@@ -149,7 +150,7 @@20tmpfd = open(tmpname, O_RDWR | O_BINARY);21if (tmpfd < 0)22{23- FAIL("Can't create temporary file, errno=%d", errno);24+ FAIL2("Can't create temporary file (%s), errno=%d", tmpname, errno);25return 1;26}27282930