summaryrefslogtreecommitdiff
path: root/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2018-05-12 17:01:33 +0000
committerManolo Gouy <Manolo>2018-05-12 17:01:33 +0000
commitaba87e8bb072e39aafd2e4b8eb24e18226d285a4 (patch)
tree74646a8e04629d1a9ce207661a3e9b1f3ebe79cd /src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
parent4c45bec12705345621f074922a4eb25c47f39b48 (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
Diffstat (limited to 'src/drivers/Darwin/Fl_Darwin_System_Driver.cxx')
-rw-r--r--src/drivers/Darwin/Fl_Darwin_System_Driver.cxx20
1 files changed, 20 insertions, 0 deletions
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$".
//