X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwclipbrd.c;h=79ff2a2471c9731db2cca0efb1687d6612579ddf;hb=b8ccc2d03263c833777a7c055a372501b40bc7ce;hp=66a3638102725434c07a0be2ad1cd7b8fd4b1091;hpb=05bc30b15e31c427ce208495a889e9ff36e6642b;p=xboard.git diff --git a/winboard/wclipbrd.c b/winboard/wclipbrd.c index 66a3638..79ff2a2 100644 --- a/winboard/wclipbrd.c +++ b/winboard/wclipbrd.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include "common.h" @@ -72,13 +71,13 @@ CopyGameToClipboard() struct stat st; if (!copyTemp) { - copyTemp = tmpnam(NULL); + copyTemp = tempnam(NULL, "wbcp"); } if (!copyTemp) { DisplayError("Cannot create temporary file name.",0); return; } - f = fopen(copyTemp, "w"); + f = fopen(copyTemp, "w"); if (!f) { DisplayError("Cannot open temporary file.", 0); return; @@ -225,9 +224,9 @@ PasteGameFromClipboard() return; } if (!pasteTemp) { - pasteTemp = tmpnam(NULL); + pasteTemp = tempnam(NULL, "wbpt"); } - f = fopen(pasteTemp, "wb+"); + f = fopen(pasteTemp, "w"); if (!f) { DisplayError("Unable to create temporary file.", 0); return;