Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-gnome
Path: blob/main/chinese/celvis/files/patch-tmp.c
16135 views
1
--- tmp.c.orig Thu Aug 15 04:45:57 1996
2
+++ tmp.c Thu Aug 15 05:14:50 1996
3
@@ -21,6 +21,7 @@
4
5
/* The FAIL() macro prints an error message and then exits. */
6
#define FAIL(why,arg) mode = MODE_EX; msg(why, arg); endwin(); HZ_abort(9)
7
+#define FAIL2(why,arg1,arg2) mode = MODE_EX; msg(why, arg1, arg2); endwin(); HZ_abort(9)
8
9
/* This is the name of the temp file */
10
static char tmpname[80];
11
@@ -91,7 +92,7 @@
12
if (*o_readonly || (statb.st_mode & S_IJRON))
13
#endif
14
#if OS9
15
- if we don't have write permission...
16
+ /* if we don't have write permission... */
17
#endif
18
#if ANY_UNIX
19
if (*o_readonly || !(statb.st_mode &
20
@@ -149,7 +150,7 @@
21
tmpfd = open(tmpname, O_RDWR | O_BINARY);
22
if (tmpfd < 0)
23
{
24
- FAIL("Can't create temporary file, errno=%d", errno);
25
+ FAIL2("Can't create temporary file (%s), errno=%d", tmpname, errno);
26
return 1;
27
}
28
29
30