#endif
#ifdef __WINDOWS__
-#if !defined( __GNUWIN32__ ) && !defined( __MWERKS__ )
+#if !defined( __GNUWIN32__ ) && !defined( __MWERKS__ ) && !defined(__SALFORDC__)
#include <direct.h>
#include <dos.h>
#endif
#endif
#ifdef __GNUWIN32__
+#ifndef __TWIN32__
#include <sys/unistd.h>
+#endif
+
#define stricmp strcasecmp
#endif
#include <dir.h>
#endif
+#ifdef __SALFORDC__
+#include <dir.h>
+#include <unix.h>
+#endif
+
#include "wx/setup.h"
+#include "wx/log.h"
// No, Cygwin doesn't appear to have fnmatch.h after all.
#if defined(HAVE_FNMATCH_H)
char buf[_MAXPATHLEN];
strcpy(buf, wxBuffer);
- char *filename = IsAbsolutePath (buf) ? wxFileNameFromPath (buf) : (char *)buf;
+ char *filename = (char*) NULL; /* shut up buggy egcs warning */
+ filename = IsAbsolutePath (buf) ? wxFileNameFromPath (buf) : (char *)buf;
for (wxNode * node = First (); node; node = node->Next ())
{
return TRUE;
return FALSE ;
#else
+
+#ifdef __SALFORDC__
+ struct _stat stbuf;
+#else
struct stat stbuf;
+#endif
- if (filename && stat ((char *)(const char *)filename, &stbuf) == 0)
+ if ((filename != "") && stat ((char *)(const char *)filename, &stbuf) == 0)
return TRUE;
return FALSE;
#endif
strncmp(dest, val, len) == 0)
{
strcpy(wxBuffer, "~");
- if (user && *user)
- strcat(wxBuffer, user);
+ if (user != "")
+ strcat(wxBuffer, (const char*) user);
#ifdef __WXMSW__
// strcat(wxBuffer, "\\");
#else
return wxString(path + 2);
#endif
}
- return wxString("");
+ // Yes, this should return the path, not an empty string, otherwise
+ // we get "thing.txt" -> "".
+ return path1;
}
// Return just the directory, or NULL if no directory
wxUnix2MacFilename( gwxMacFileName ) ;
return (rmdir(WXSTRINGCAST gwxMacFileName) == 0);
#else
+
+#ifdef __SALFORDC__
+ return FALSE; // What to do?
+#else
return (rmdir(WXSTRINGCAST dir) == 0);
#endif
+
+#endif
}
#if 0
if ( wxEndsWithPathSeparator(pszPathName) && pszPathName[1] != '\0' )
strPath.Last() = '\0';
+#ifdef __SALFORDC__
+ struct _stat st;
+#else
struct stat st;
- return stat(strPath, &st) == 0 && (st.st_mode & S_IFDIR);
+#endif
+
+ return stat((char*) (const char*) strPath, &st) == 0 && (st.st_mode & S_IFDIR);
}
// Get a temporary filename, opening and closing the file.
return buf;
}
}
- cerr << _("wxWindows: error finding temporary file name.\n");
+ wxLogError( _("wxWindows: error finding temporary file name.\n") );
if (buf) buf[0] = 0;
return (char *) NULL;
#endif