diff options
| author | Bill Spitzak <spitzak@gmail.com> | 2000-04-04 17:57:05 +0000 |
|---|---|---|
| committer | Bill Spitzak <spitzak@gmail.com> | 2000-04-04 17:57:05 +0000 |
| commit | 328a8f8f0dd777bb9a124e6701bf1595b5aff96e (patch) | |
| tree | c5c21271c8280ca526502e9d8bc5568abae3eb68 /src/filename_expand.cxx | |
| parent | 6f42bc1a58242305e554cb66b84c570fbcdc5738 (diff) | |
Fixes for Cygwin POSIX emulation layer from Norman Vine.
Requires the symbol __CYGWIN__ to be defined, appears to disable the
special meaning of backslash and colon in file names.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1056 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/filename_expand.cxx')
| -rw-r--r-- | src/filename_expand.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/filename_expand.cxx b/src/filename_expand.cxx index 384d656cb..3b1329d66 100644 --- a/src/filename_expand.cxx +++ b/src/filename_expand.cxx @@ -1,5 +1,5 @@ // -// "$Id: filename_expand.cxx,v 1.4 1999/01/07 19:17:34 mike Exp $" +// "$Id: filename_expand.cxx,v 1.4.2.1 2000/04/04 17:57:03 bill Exp $" // // Filename expansion routines for the Fast Light Tool Kit (FLTK). // @@ -31,13 +31,13 @@ #include <FL/filename.H> #include <stdlib.h> #include <string.h> -#ifdef WIN32 +#if defined(WIN32) && !defined(__CYGWIN__) #else # include <unistd.h> # include <pwd.h> #endif -#if defined(WIN32) || defined(__EMX__) +#if defined(WIN32) || defined(__EMX__) && !defined(__CYGWIN__) static inline int isdirsep(char c) {return c=='/' || c=='\\';} #else #define isdirsep(c) ((c)=='/') @@ -76,7 +76,7 @@ int filename_expand(char *to,const char *from) { if (value) { // substitutions that start with slash delete everything before them: if (isdirsep(value[0])) start = a; -#if defined(WIN32) || defined(__EMX__) +#if defined(WIN32) || defined(__EMX__) && !defined(__CYGWIN__) // also if it starts with "A:" if (value[0] && value[1]==':') start = a; #endif @@ -87,7 +87,7 @@ int filename_expand(char *to,const char *from) { ret++; } else { a = e+1; -#if defined(WIN32) || defined(__EMX__) +#if defined(WIN32) || defined(__EMX__) && !defined(__CYGWIN__) if (*e == '\\') {*e = '/'; ret++;} // ha ha! #endif } @@ -97,5 +97,5 @@ int filename_expand(char *to,const char *from) { } // -// End of "$Id: filename_expand.cxx,v 1.4 1999/01/07 19:17:34 mike Exp $". +// End of "$Id: filename_expand.cxx,v 1.4.2.1 2000/04/04 17:57:03 bill Exp $". // |
