diff options
| author | Manolo Gouy <Manolo> | 2016-04-10 18:36:47 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-04-10 18:36:47 +0000 |
| commit | 99b3c6813aa7ecf32696e6e83a52a39254f537e4 (patch) | |
| tree | 10290591bb6882304b13fe1ba1a7ba2e31e48d2c /src/Fl_File_Input.cxx | |
| parent | c3f1877fd111d9d708ef03470e6723d7ce2e24a1 (diff) | |
Rewrite Fl_File_Input.cxx under the driver model.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11575 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_File_Input.cxx')
| -rw-r--r-- | src/Fl_File_Input.cxx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/Fl_File_Input.cxx b/src/Fl_File_Input.cxx index 8d1584468..be343d9b6 100644 --- a/src/Fl_File_Input.cxx +++ b/src/Fl_File_Input.cxx @@ -18,6 +18,7 @@ // #include <FL/Fl.H> +#include <FL/Fl_System_Driver.H> #include <FL/Fl_File_Input.H> #include <FL/Fl_Window.H> #include <FL/fl_draw.H> @@ -112,10 +113,7 @@ void Fl_File_Input::update_buttons() { start && i < (int)(sizeof(buttons_) / sizeof(buttons_[0]) - 1); start = end, i ++) { // printf(" start = \"%s\"\n", start); - if ((end = strchr(start, '/')) == NULL) -#if defined(WIN32) || defined(__EMX__) - if ((end = strchr(start, '\\')) == NULL) -#endif // WIN32 || __EMX__ + if ((end = Fl::system_driver()->next_dir_sep(start)) == NULL) break; end ++; @@ -261,10 +259,7 @@ Fl_File_Input::handle_button(int event) // I - Event for (start = newvalue, end = start; start && i >= 0; start = end, i --) { // printf(" start = \"%s\"\n", start); - if ((end = strchr(start, '/')) == NULL) -#if defined(WIN32) || defined(__EMX__) - if ((end = strchr(start, '\\')) == NULL) -#endif // WIN32 || __EMX__ + if ((end = (char*)Fl::system_driver()->next_dir_sep(start)) == NULL) break; end ++; |
