From f9cfe1378d6a98ea08f5dc412223b646deeabdaf Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sun, 15 Oct 2017 12:34:24 +0000 Subject: Rename fl_open_ext() parameter 'translation' to 'binary'. The default (0) is 'text' mode, non-zero is 'binary' mode on platforms that distinguish text and binary mode. Currently Windows is the only supported platform that needs this. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12500 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_System_Driver.H | 7 ++++++- FL/fl_utf8.h | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'FL') diff --git a/FL/Fl_System_Driver.H b/FL/Fl_System_Driver.H index dfdd4c3e3..e49306a96 100644 --- a/FL/Fl_System_Driver.H +++ b/FL/Fl_System_Driver.H @@ -87,7 +87,12 @@ public: virtual char *getenv(const char* v) {return NULL;} virtual int putenv(char* v) {return -1;} virtual int open(const char* f, int oflags, int pmode) {return -1;} - virtual int open_ext(const char* f, int translation, int oflags, int pmode) {return this->open(f, oflags, pmode);} + + // Note: the default implementation ignores the 'binary' argument. + // Some platforms (notably Windows) may use this argument. + virtual int open_ext(const char* f, int binary, int oflags, int pmode) { + return this->open(f, oflags, pmode); + } virtual FILE *fopen(const char* f, const char *mode); virtual int system(const char* cmd) {return -1;} virtual int execvp(const char *file, char *const *argv) {return -1;} diff --git a/FL/fl_utf8.h b/FL/fl_utf8.h index 2b1623138..68ebf3f05 100644 --- a/FL/fl_utf8.h +++ b/FL/fl_utf8.h @@ -177,7 +177,7 @@ FL_EXPORT int fl_execvp(const char *file, char *const *argv); /* OD: Portable UTF-8 aware open wrapper */ FL_EXPORT int fl_open(const char* f, int o, ...); -FL_EXPORT int fl_open_ext(const char* fname, int translation, int oflags, ...); +FL_EXPORT int fl_open_ext(const char* fname, int binary, int oflags, ...); /* OD: Portable UTF-8 aware unlink wrapper */ FL_EXPORT int fl_unlink(const char *fname); -- cgit v1.2.3