diff options
| author | Manolo Gouy <Manolo> | 2018-05-12 17:01:33 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2018-05-12 17:01:33 +0000 |
| commit | aba87e8bb072e39aafd2e4b8eb24e18226d285a4 (patch) | |
| tree | 74646a8e04629d1a9ce207661a3e9b1f3ebe79cd | |
| parent | 4c45bec12705345621f074922a4eb25c47f39b48 (diff) | |
MacOS: move some code from file Fl_cocoa.mm to file Fl_Darwin_System_Driver.cxx
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12918 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -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$". // |
