summaryrefslogtreecommitdiff
path: root/splash
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2019-01-03 21:11:49 +0100
committerChristian Persch <chpe@src.gnome.org>2019-01-03 21:11:49 +0100
commite1e4457a235f6107c09d32994fc628efa9e7bd0e (patch)
tree7a8135d6f8bbb10c34721981f45e4083812185e2 /splash
parent1e99a1eeb3a144facf45165df9f457796c045daa (diff)
all: Use the openFile fopen wrapper from gfile.h
Use the openFile wrapper instead of calling fopen directly in the libraries.
Diffstat (limited to 'splash')
-rw-r--r--splash/SplashBitmap.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/splash/SplashBitmap.cc b/splash/SplashBitmap.cc
index 856fa084..7ce8b6f9 100644
--- a/splash/SplashBitmap.cc
+++ b/splash/SplashBitmap.cc
@@ -36,6 +36,7 @@
#include <string.h>
#include <stdlib.h>
#include <limits.h>
+#include "goo/gfile.h"
#include "goo/gmem.h"
#include "SplashErrorCodes.h"
#include "SplashBitmap.h"
@@ -165,7 +166,7 @@ SplashError SplashBitmap::writePNMFile(char *fileName) {
FILE *f;
SplashError e;
- if (!(f = fopen(fileName, "wb"))) {
+ if (!(f = openFile(fileName, "wb"))) {
return splashErrOpenFile;
}
@@ -262,7 +263,7 @@ SplashError SplashBitmap::writeAlphaPGMFile(char *fileName) {
if (!alpha) {
return splashErrModeMismatch;
}
- if (!(f = fopen(fileName, "wb"))) {
+ if (!(f = openFile(fileName, "wb"))) {
return splashErrOpenFile;
}
fprintf(f, "P5\n%d %d\n255\n", width, height);
@@ -338,7 +339,7 @@ SplashError SplashBitmap::writeImgFile(SplashImageFileFormat format, const char
FILE *f;
SplashError e;
- if (!(f = fopen(fileName, "wb"))) {
+ if (!(f = openFile(fileName, "wb"))) {
return splashErrOpenFile;
}