diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_SVG_Image.cxx | 2 | ||||
| -rw-r--r-- | src/drivers/WinAPI/Fl_WinAPI_System_Driver.H | 2 | ||||
| -rw-r--r-- | src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx | 4 | ||||
| -rw-r--r-- | src/fl_images_core.cxx | 2 | ||||
| -rw-r--r-- | src/fl_utf8.cxx | 8 |
5 files changed, 9 insertions, 9 deletions
diff --git a/src/Fl_SVG_Image.cxx b/src/Fl_SVG_Image.cxx index 45b0f74c4..d631e6a76 100644 --- a/src/Fl_SVG_Image.cxx +++ b/src/Fl_SVG_Image.cxx @@ -82,7 +82,7 @@ static char *svg_inflate(const char *fname) { struct stat b; fl_stat(fname, &b); long size = b.st_size; - int fd = fl_open_ext(fname, 0, 0); + int fd = fl_open_ext(fname, 1, 0); if (fd < 0) return NULL; gzFile gzf = gzdopen(fd, "r"); if (!gzf) return NULL; diff --git a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H index fdc686fed..6b3a1e85e 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H +++ b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.H @@ -50,7 +50,7 @@ public: virtual char *getenv(const char* v); virtual int putenv(char* v) {return _putenv(v);} virtual int open(const char* f, int oflags, int pmode); - virtual int open_ext(const char* f, int translation, int oflags, int pmode); + virtual int open_ext(const char* f, int binary, int oflags, int pmode); virtual FILE *fopen(const char* f, const char *mode); virtual int system(const char* cmd); virtual int execvp(const char *file, char *const *argv); diff --git a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx index aa1ff7e50..806a76b22 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx +++ b/src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx @@ -137,9 +137,9 @@ int Fl_WinAPI_System_Driver::open(const char* f, int oflags, int pmode) { else return _wopen(wbuf, oflags, pmode); } -int Fl_WinAPI_System_Driver::open_ext(const char* f, int translation, int oflags, int pmode) { +int Fl_WinAPI_System_Driver::open_ext(const char* f, int binary, int oflags, int pmode) { if (oflags == 0) oflags = _O_RDONLY; - oflags |= (translation ? _O_TEXT : _O_BINARY); + oflags |= (binary ? _O_BINARY : _O_TEXT); return this->open(f, oflags, pmode); } diff --git a/src/fl_images_core.cxx b/src/fl_images_core.cxx index 0aa5bc49d..06930d17c 100644 --- a/src/fl_images_core.cxx +++ b/src/fl_images_core.cxx @@ -95,7 +95,7 @@ fl_check_images(const char *name, // I - Filename #ifdef FLTK_USE_NANOSVG # if defined(HAVE_LIBZ) if (header[0] == 0x1f && header[1] == 0x8b) { // denotes gzip'ed data - int fd = fl_open_ext(name, 0, 0); + int fd = fl_open_ext(name, 1, 0); if (fd < 0) return NULL; gzFile gzf = gzdopen(fd, "r"); if (gzf) { diff --git a/src/fl_utf8.cxx b/src/fl_utf8.cxx index de6a7ee54..60d7614d6 100644 --- a/src/fl_utf8.cxx +++ b/src/fl_utf8.cxx @@ -339,20 +339,20 @@ int fl_open(const char* f, int oflags, ...) useful on the Windows platform where files are by default opened in text (translated) mode. \param fname the UTF-8 encoded filename - \param translation if zero, the file is to be accessed in untranslated (a.k.a. binary) - mode. + \param binary if non-zero, the file is to be accessed in binary (a.k.a. + untranslated) mode. \param oflags,... these arguments are as in the standard open() function. Setting \p oflags to zero opens the file for reading. \return a file descriptor upon successful completion, or -1 in case of error. */ -int fl_open_ext(const char* fname, int translation, int oflags, ...) +int fl_open_ext(const char* fname, int binary, int oflags, ...) { int pmode; va_list ap; va_start(ap, oflags); pmode = va_arg (ap, int); va_end(ap); - return Fl::system_driver()->open_ext(fname, translation, oflags, pmode); + return Fl::system_driver()->open_ext(fname, binary, oflags, pmode); } |
