From 288ed8988e349fc04e47b4138029c5bf9cda3f2e Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 30 Mar 2016 13:59:55 +0000 Subject: Rewrite fl_utf.c under the driver model: the file disappears and its content is moved to fl_utf8.cxx All functions of fl_utf.c keep their C API in fl_utf8.cxx git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11472 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_System_Driver.H | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'FL') diff --git a/FL/Fl_System_Driver.H b/FL/Fl_System_Driver.H index a6ba67298..0588a3b89 100644 --- a/FL/Fl_System_Driver.H +++ b/FL/Fl_System_Driver.H @@ -96,6 +96,7 @@ public: // the selected text during the D&D operation virtual int dnd(int use_selection = 0) {return 0;} + // implement these to support cross-platform file operations virtual char *utf2mbcs(const char *s) {return (char*)s;} virtual char *getenv(const char* v); virtual int open(const char* f, int oflags, int pmode) {return -1;} @@ -110,6 +111,14 @@ public: virtual int mkdir(const char* f, int mode) {return -1;} virtual int rmdir(const char* f) {return -1;} virtual int rename(const char* f, const char *n) {return -1;} + + // the default implementation of these utf8... functions should be enough + virtual unsigned utf8towc(const char* src, unsigned srclen, wchar_t* dst, unsigned dstlen); + virtual unsigned utf8fromwc(char* dst, unsigned dstlen, const wchar_t* src, unsigned srclen); + virtual int utf8locale(); + virtual unsigned utf8to_mb(const char* src, unsigned srclen, char* dst, unsigned dstlen); + virtual unsigned utf8from_mb(char* dst, unsigned dstlen, const char* src, unsigned srclen); + }; #endif // FL_SYSTEM_DRIVER_H -- cgit v1.2.3