diff options
| -rw-r--r-- | src/Fl_cocoa.mm | 4 | ||||
| -rw-r--r-- | src/drivers/Darwin/Fl_Darwin_System_Driver.cxx | 20 |
2 files changed, 22 insertions, 2 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index aec94e248..cd41b0ee6 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -3022,7 +3022,7 @@ void Fl_Cocoa_Window_Driver::wait_for_expose() /* * returns pointer to the filename, or null if name ends with ':' */ -const char *Fl_Darwin_System_Driver::filename_name( const char *name ) +/*const char *Fl_Darwin_System_Driver::filename_name( const char *name ) { const char *p, *q; if (!name) return (0); @@ -3037,7 +3037,7 @@ const char *Fl_Darwin_System_Driver::filename_name( const char *name ) p++; } return q; -} +}*/ /* diff --git a/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx b/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx index 5bad36062..335bbc8ec 100644 --- a/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx +++ b/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx @@ -220,6 +220,26 @@ char *Fl_Darwin_System_Driver::preference_rootnode(Fl_Preferences *prefs, Fl_Pre return filename; } +/* + * returns pointer to the filename, or null if name ends with ':' + */ +const char *Fl_Darwin_System_Driver::filename_name( const char *name ) +{ + const char *p, *q; + if (!name) return (0); + for ( p = q = name ; *p ; ) { + if ( ( p[0] == ':' ) && ( p[1] == ':' ) ) { + q = p+2; + p++; + } + else if (p[0] == '/') { + q = p + 1; + } + p++; + } + return q; +} + // // End of "$Id$". // |
