summaryrefslogtreecommitdiff
path: root/buf.c
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeffrey.armstrong@approximatrix.com>2016-06-14 20:53:27 -0400
committerJeffrey Armstrong <jeffrey.armstrong@approximatrix.com>2016-06-14 20:53:27 -0400
commit8c15427214095ab11697a7505e168ada0e33cdbf (patch)
tree9ebf97eb587587039df5290b20eb3778c0b6ef17 /buf.c
parent6d6bb88a0215b87a4a47ed86a84ae3c75d399962 (diff)
downloadsedt-8c15427214095ab11697a7505e168ada0e33cdbf.tar.gz
sedt-8c15427214095ab11697a7505e168ada0e33cdbf.zip
Fixed building with modern curses. Added Watcom makefile for Linux only.
Diffstat (limited to 'buf.c')
-rw-r--r--buf.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/buf.c b/buf.c
index dde84bf..70a7c5c 100644
--- a/buf.c
+++ b/buf.c
@@ -312,6 +312,7 @@ void Fast Blockwrite(struct fcb_t *F,char *B,int P)
void Fast Out_Buf(struct Buffer *B)
{int M;
char *P;
+ int temp_fid;
#if defined(DOS) | defined(NT) | defined(OS2)
struct Memory far *M_P;
#else
@@ -367,7 +368,9 @@ void Fast Out_Buf(struct Buffer *B)
strcpy(Overflow.File_Name,"");
#endif
strcat(Overflow.File_Name,"seXXXXXX");
- mktemp(Overflow.File_Name);
+ temp_fid = mkstemp(Overflow.File_Name);
+ if(temp_fid >= 0)
+ close(temp_fid);
#else
#if defined(MPE)
strcpy(Overflow.File_Name,"temp.sed");
@@ -379,7 +382,9 @@ void Fast Out_Buf(struct Buffer *B)
strcat(Overflow.File_Name,"seXXXXXX");
} else
strcpy(Overflow.File_Name,"seXXXXXX");
- mktemp(Overflow.File_Name);
+ temp_fid = mkstemp(Overflow.File_Name);
+ if(temp_fid >= 0)
+ close(temp_fid);
#endif
#endif
#endif