#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
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
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