diff options
| author | Manolo Gouy <Manolo> | 2016-08-31 17:01:27 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-08-31 17:01:27 +0000 |
| commit | 89954986bbb2fcba385d3813dde43b70224b1795 (patch) | |
| tree | ef8ae26bfc21ac357a57da0b76d0b77552b7fc3c | |
| parent | e5486b24d1f7ff83bf1a8792b4c98c9ad03b3809 (diff) | |
Remove another instance of the USING_XCODE preprocessor variable
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11912 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | test/demo.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/demo.cxx b/test/demo.cxx index 17cd920b2..6ba07b543 100644 --- a/test/demo.cxx +++ b/test/demo.cxx @@ -306,13 +306,11 @@ void dobut(Fl_Widget *, long arg) CFStringGetCString(cc_app_path, app_path, 2048, kCFStringEncodingUTF8); CFRelease(cc_app_path); if (*app_path) { - char *n = strrchr(app_path, '/'); - if (n) { -#if defined USING_XCODE - *n = 0; -#endif - chdir(app_path); + if (memcmp(app_path + strlen(app_path) - 4, ".app", 4) == 0) { + char *n = strrchr(app_path, '/'); + if (n) *n = 0; } + chdir(app_path); } char *name = new char[strlen(cmd) + 5]; |
