From fb38d1cfda00a3bb865328f646b08935ba5699ac Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Tue, 22 Oct 2013 09:09:53 +0000 Subject: 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 --- examples/nativefilechooser-simple-app.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') 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"); -- cgit v1.2.3