These are the changes I had made in my source tree between 4.2.6 and
[xboard.git] / winboard / wclipbrd.c
index 66a3638..79ff2a2 100644 (file)
@@ -27,7 +27,6 @@
 #include <stdio.h>\r
 #include <stdlib.h>\r
 #include <malloc.h>\r
-#include <io.h>\r
 #include <sys/stat.h>\r
 \r
 #include "common.h"\r
@@ -72,13 +71,13 @@ CopyGameToClipboard()
   struct stat st;\r
 \r
   if (!copyTemp) {\r
-    copyTemp = tmpnam(NULL);\r
+    copyTemp = tempnam(NULL, "wbcp");\r
   }\r
   if (!copyTemp) {\r
       DisplayError("Cannot create temporary file name.",0);\r
       return;\r
   }\r
-  f = fopen(copyTemp, "w"); \r
+  f = fopen(copyTemp, "w");\r
   if (!f) {\r
     DisplayError("Cannot open temporary file.", 0);\r
     return;\r
@@ -225,9 +224,9 @@ PasteGameFromClipboard()
     return;\r
   }\r
   if (!pasteTemp) {\r
-    pasteTemp = tmpnam(NULL);\r
+    pasteTemp = tempnam(NULL, "wbpt");\r
   }\r
-  f = fopen(pasteTemp, "wb+");\r
+  f = fopen(pasteTemp, "w");\r
   if (!f) {\r
     DisplayError("Unable to create temporary file.", 0);\r
     return;\r