fab96bfad1
Man page fixes. Mostly via FreeBSD. Approving noises from bernd@ and jasper@
20 lines
644 B
Plaintext
20 lines
644 B
Plaintext
$OpenBSD: patch-tools_fax2ps_c,v 1.5 2008/10/25 09:39:29 naddy Exp $
|
|
--- tools/fax2ps.c.orig Fri Oct 24 18:41:45 2008
|
|
+++ tools/fax2ps.c Fri Oct 24 18:44:21 2008
|
|
@@ -373,11 +373,12 @@ main(int argc, char** argv)
|
|
int n;
|
|
FILE* fd;
|
|
char buf[16*1024];
|
|
+ char temp[22];
|
|
|
|
- fd = tmpfile();
|
|
+ strlcpy(temp, "/tmp/fax2psXXXXXXXXXX", sizeof(temp));
|
|
+ fd = fdopen(mkstemp(temp), "w+");
|
|
if (fd == NULL) {
|
|
- fprintf(stderr, "Could not create temporary file, exiting.\n");
|
|
- fclose(fd);
|
|
+ fprintf(stderr, "Could not create temporary file \"%s\".\n", temp);
|
|
exit(-2);
|
|
}
|
|
while ((n = read(fileno(stdin), buf, sizeof (buf))) > 0)
|