mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-04 22:33:27 +00:00
02585bd39c
gate is a simple and unobtrusive line-oriented text editor. PR: 19905 Submitted by: Christopher N. Harrell <cnh@ivmg.net> Reviewed by: sobomax
20 lines
503 B
Plaintext
20 lines
503 B
Plaintext
--- proc.c.orig Mon Jul 17 23:13:54 2000
|
|
+++ proc.c Mon Jul 17 23:14:26 2000
|
|
@@ -57,13 +57,14 @@
|
|
char tmpname[20];
|
|
FILE *cfp;
|
|
long oldt;
|
|
+int fd;
|
|
|
|
/* We could use a call to make_copy() here, but this method survives
|
|
* interupts better
|
|
*/
|
|
strcpy(tmpname, "/tmp/gateXXXXXX");
|
|
- mktemp(tmpname);
|
|
- if ((cfp= fopen(tmpname,"w+")) == NULL)
|
|
+ fd = mkstemp(tmpname);
|
|
+ if ((cfp= fdopen(fd,"w+")) == NULL)
|
|
{
|
|
printf("Cannot open file %s.\n",tmpname);
|
|
return(NULL);
|