summaryrefslogtreecommitdiff
path: root/fluid
diff options
context:
space:
mode:
Diffstat (limited to 'fluid')
-rw-r--r--fluid/Fl_Function_Type.cxx2
-rw-r--r--fluid/Fluid_Image.cxx4
-rw-r--r--fluid/code.cxx6
-rw-r--r--fluid/file.cxx4
-rw-r--r--fluid/fluid.cxx13
5 files changed, 15 insertions, 14 deletions
diff --git a/fluid/Fl_Function_Type.cxx b/fluid/Fl_Function_Type.cxx
index e1749f596..614f783b8 100644
--- a/fluid/Fl_Function_Type.cxx
+++ b/fluid/Fl_Function_Type.cxx
@@ -879,7 +879,7 @@ void Fl_Data_Type::write_code1() {
int nData = -1;
// path should be set correctly already
if (filename_ && !write_sourceview) {
- FILE *f = fopen(filename_, "rb");
+ FILE *f = fl_fopen(filename_, "rb");
if (!f) {
message = "Can't include binary file. Can't open";
} else {
diff --git a/fluid/Fluid_Image.cxx b/fluid/Fluid_Image.cxx
index 244dc812e..4fa3bf308 100644
--- a/fluid/Fluid_Image.cxx
+++ b/fluid/Fluid_Image.cxx
@@ -111,7 +111,7 @@ void Fluid_Image::write_static() {
write_c("static unsigned char %s[] =\n",
unique_id(this, "idata", fl_filename_name(name()), 0));
- FILE *f = fopen(name(), "rb");
+ FILE *f = fl_fopen(name(), "rb");
if (!f) {
// message = "Can't include binary file. Can't open";
} else {
@@ -180,7 +180,7 @@ Fluid_Image* Fluid_Image::find(const char *iname) {
// no, so now see if the file exists:
goto_source_dir();
- FILE *f = fopen(iname,"rb");
+ FILE *f = fl_fopen(iname,"rb");
if (!f) {
read_error("%s : %s",iname,strerror(errno));
leave_source_dir();
diff --git a/fluid/code.cxx b/fluid/code.cxx
index 2e55d9f7a..c235e25d1 100644
--- a/fluid/code.cxx
+++ b/fluid/code.cxx
@@ -354,13 +354,13 @@ int write_code(const char *s, const char *t) {
current_widget_class = 0L;
if (!s) code_file = stdout;
else {
- FILE *f = fopen(s, filemode);
+ FILE *f = fl_fopen(s, filemode);
if (!f) return 0;
code_file = f;
}
if (!t) header_file = stdout;
else {
- FILE *f = fopen(t, filemode);
+ FILE *f = fl_fopen(t, filemode);
if (!f) {fclose(code_file); return 0;}
header_file = f;
}
@@ -468,7 +468,7 @@ int write_code(const char *s, const char *t) {
}
int write_strings(const char *sfile) {
- FILE *fp = fopen(sfile, "w");
+ FILE *fp = fl_fopen(sfile, "w");
Fl_Type *p;
Fl_Widget_Type *w;
int i;
diff --git a/fluid/file.cxx b/fluid/file.cxx
index d5168a7ee..beee3f4da 100644
--- a/fluid/file.cxx
+++ b/fluid/file.cxx
@@ -43,7 +43,7 @@ static FILE *fout;
int open_write(const char *s) {
if (!s) {fout = stdout; return 1;}
- FILE *f = fopen(s,"w");
+ FILE *f = fl_fopen(s,"w");
if (!f) return 0;
fout = f;
return 1;
@@ -135,7 +135,7 @@ static const char *fname;
int open_read(const char *s) {
lineno = 1;
if (!s) {fin = stdin; fname = "stdin"; return 1;}
- FILE *f = fopen(s,"r");
+ FILE *f = fl_fopen(s,"r");
if (!f) return 0;
fin = f;
fname = s;
diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx
index e9f13b271..3ecdd293f 100644
--- a/fluid/fluid.cxx
+++ b/fluid/fluid.cxx
@@ -326,7 +326,7 @@ void save_template_cb(Fl_Widget *, void *) {
FILE *fp;
- if ((fp = fopen(filename, "wb")) == NULL) {
+ if ((fp = fl_fopen(filename, "wb")) == NULL) {
delete[] pixels;
fl_alert("Error writing %s: %s", filename, strerror(errno));
return;
@@ -354,7 +354,7 @@ void save_template_cb(Fl_Widget *, void *) {
# if 0 // The original PPM output code...
strcpy(ext, ".ppm");
- fp = fopen(filename, "wb");
+ fp = fl_fopen(filename, "wb");
fprintf(fp, "P6\n%d %d 255\n", w, h);
fwrite(pixels, w * h, 3, fp);
fclose(fp);
@@ -595,7 +595,7 @@ void new_cb(Fl_Widget *, void *v) {
char line[1024], *ptr, *next;
FILE *infile, *outfile;
- if ((infile = fopen(tname, "r")) == NULL) {
+ if ((infile = fl_fopen(tname, "r")) == NULL) {
fl_alert("Error reading template file \"%s\":\n%s", tname,
strerror(errno));
set_modflag(0);
@@ -603,7 +603,7 @@ void new_cb(Fl_Widget *, void *v) {
return;
}
- if ((outfile = fopen(cutfname(1), "w")) == NULL) {
+ if ((outfile = fl_fopen(cutfname(1), "w")) == NULL) {
fl_alert("Error writing buffer file \"%s\":\n%s", cutfname(1),
strerror(errno));
fclose(infile);
@@ -1252,7 +1252,7 @@ void print_cb(Fl_Return_Button *, void *) {
"Replace", NULL, outname) == 0) outname = NULL;
}
- if (outname) outfile = fopen(outname, "w");
+ if (outname) outfile = fl_fopen(outname, "w");
else outfile = NULL;
}
@@ -1909,8 +1909,9 @@ public:
Fl_Process() {_fpt= NULL;}
~Fl_Process() {if (_fpt) close();}
+ // FIXME: popen needs the utf8 equivalen fl_popen
FILE * popen (const char *cmd, const char *mode="r");
- //not necessary here: FILE * fopen (const char *file, const char *mode="r");
+ //not necessary here: FILE * fl_fopen (const char *file, const char *mode="r");
int close();
FILE * desc() const { return _fpt;} // non null if file is open