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
This commit is contained in:
Manolo Gouy 2018-05-12 17:01:33 +00:00
parent 4c45bec127
commit aba87e8bb0
2 changed files with 22 additions and 2 deletions

View File

@ -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;
}
}*/
/*

View File

@ -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$".
//