summaryrefslogtreecommitdiff
path: root/src/Fl_File_Input.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_File_Input.cxx')
-rw-r--r--src/Fl_File_Input.cxx11
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 ++;