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
This commit is contained in:
Manolo Gouy 2013-10-22 09:09:53 +00:00
parent 45d7ae0a4c
commit fb38d1cfda
1 changed files with 2 additions and 2 deletions

View File

@ -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");