summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2013-10-22 09:09:53 +0000
committerManolo Gouy <Manolo>2013-10-22 09:09:53 +0000
commitfb38d1cfda00a3bb865328f646b08935ba5699ac (patch)
tree47d371861f219438d9f56bdd6a707de68f067bd7
parent45d7ae0a4c81491b7d9a554dbd637538f54190a5 (diff)
Replaced fopen() by fl_fopen() calls so the app works correctly under MSWindows with non ASCII filenames.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10005 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--examples/nativefilechooser-simple-app.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/nativefilechooser-simple-app.cxx b/examples/nativefilechooser-simple-app.cxx
index e22aa40ac..cb35bcfd6 100644
--- a/examples/nativefilechooser-simple-app.cxx
+++ b/examples/nativefilechooser-simple-app.cxx
@@ -31,7 +31,7 @@ class Application : public Fl_Window {
Fl_Native_File_Chooser *fc;
// Does file exist?
int exist(const char *filename) {
- FILE *fp = fopen(filename, "r");
+ FILE *fp = fl_fopen(filename, "r");
if (fp) { fclose(fp); return(1); }
else { return(0); }
}
@@ -46,7 +46,7 @@ class Application : public Fl_Window {
void save(const char *filename) {
printf("Saving '%s'\n", filename);
if ( !exist(filename) ) {
- FILE *fp = fopen(filename, "w"); // create file if it doesn't exist
+ FILE *fp = fl_fopen(filename, "w"); // create file if it doesn't exist
if ( fp ) {
// A real app would do something useful here.
fprintf(fp, "Hello world.\n");