From fd600aa2396cc7fa0d4cd020cd318fbe6ef6e9b4 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Tue, 29 Mar 2016 19:41:14 +0000 Subject: Rewrite fl_utf8.cxx under the driver model. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11467 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/drivers/Darwin/Fl_Darwin_System_Driver.H | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/drivers/Darwin') diff --git a/src/drivers/Darwin/Fl_Darwin_System_Driver.H b/src/drivers/Darwin/Fl_Darwin_System_Driver.H index fdf34c5e0..bafa422d2 100644 --- a/src/drivers/Darwin/Fl_Darwin_System_Driver.H +++ b/src/drivers/Darwin/Fl_Darwin_System_Driver.H @@ -26,6 +26,9 @@ #define FL_DARWIN_SYSTEM_DRIVER_H #include +#include +#include +#include /* Move everything here that manages the system interface. @@ -45,6 +48,20 @@ public: virtual int arg_and_value(const char *name, const char *value); virtual int compose(int &del); virtual int dnd(int use_selection); + virtual int mkdir(const char* f, int mode) {return ::mkdir(f, mode);} + virtual int open(const char* f, int oflags, int pmode) { + return pmode == -1 ? ::open(f, oflags) : ::open(f, oflags, pmode); + } + virtual FILE *fopen(const char* f, const char *mode) {return ::fopen(f, mode);} + virtual int system(const char* cmd) {return ::system(cmd);} + virtual int execvp(const char *file, char *const *argv) {return ::execvp(file, argv);} + virtual int chmod(const char* f, int mode) {return ::chmod(f, mode);} + virtual int access(const char* f, int mode) { return ::access(f, mode);} + virtual int stat(const char* f, struct stat *b) { return ::stat(f, b);} + virtual char *getcwd(char* b, int l) {return ::getcwd(b, l);} + virtual int unlink(const char* f) {return ::unlink(f);} + virtual int rmdir(const char* f) {return ::rmdir(f);} + virtual int rename(const char* f, const char *n) {return ::rename(f, n);} }; #endif // FL_DARWIN_SYSTEM_DRIVER_H -- cgit v1.2.3