aboutsummaryrefslogtreecommitdiff
path: root/Linux_C_12/cpicture_121.c
diff options
context:
space:
mode:
Diffstat (limited to 'Linux_C_12/cpicture_121.c')
-rw-r--r--Linux_C_12/cpicture_121.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/Linux_C_12/cpicture_121.c b/Linux_C_12/cpicture_121.c
index 4b08fea..07f85f3 100644
--- a/Linux_C_12/cpicture_121.c
+++ b/Linux_C_12/cpicture_121.c
@@ -11,6 +11,7 @@
#include "util_121.h"
#include <pango/pango.h>
#include <pango/pangoft2.h>
+#include <errno.h>
#include "cpicture_121.h"
#include "cCrossCall_121.h"
#include "cCrossCallWindows_121.h"
@@ -1172,13 +1173,16 @@ void WinCreateBitmap (CLEAN_STRING data, GdkDrawable *inDraw,OS ios,
printf("WinCreateBitmap\n");
- char* tempfile = "/tmp/bitmapXXXXXX";
- int tempfh = mkstemp(tempfile);
+ char tempfile[23];
+ rscopy(tempfile, "/tmp/bitmap.XXXXXX.bmp");
+ int tempfh = mkstemps(tempfile,4);
+ int errsv = errno;
if (tempfh == -1) {
- printf("Couldn't create temporary file.\n");
+ printf("Couldn't create temporary file - %d\n", errsv);
exit(1);
}
write(tempfh, cdata, CleanStringLength(data));
+ free(cdata);
InitGTK();
*bitmap = gdk_pixbuf_new_from_file(tempfile, &err);