#include <dirent.h>
#endif
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
#ifndef __GNUWIN32__
#include <direct.h>
#include <dos.h>
#include <dir.h>
#endif
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
#include "windows.h"
#endif
void wxPathList::AddEnvList (const wxString& envVariable)
{
static const char PATH_TOKS[] =
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
" ;"; // Don't seperate with colon in DOS (used for drive)
#else
" :;";
{
wxString path2((char *) node->Data ());
if (
-#if defined(__WINDOWS__) || defined(__VMS__)
+#if defined(__WXMSW__) || defined(__VMS__)
// Case INDEPENDENT
path.CompareTo (path2, wxString::ignoreCase) == 0
#else
if (ch != '\\' && ch != '/')
strcat (wxBuffer, "/");
strcat (wxBuffer, filename);
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
Unix2DosFilename (wxBuffer);
#endif
if (wxFileExists (wxBuffer))
lastCh = buf[len-1];
if (lastCh != '/' && lastCh != '\\')
{
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
strcat(buf, "\\");
#else
strcat(buf, "/");
#ifdef __VMS__
|| (filename[0] == '[' && filename[1] != '.')
#endif
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
/* MSDOS */
|| filename[0] == '\\' || (isalpha (filename[0]) && filename[1] == ':')
#endif
// Destructive removal of /./ and /../ stuff
char *wxRealPath (char *path)
{
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
static const char SEP = '\\';
Unix2DosFilename(path);
#else
path[0] = SEP;
path[1] = '\0';
}
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
/* Check that path[2] is NULL! */
else if (path[1] == ':' && !path[2])
{
buf[0] = '\0';
wxGetWorkingDirectory(buf, sizeof(buf)/sizeof(char));
char ch = buf[strlen(buf) - 1];
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
if (ch != '\\' && ch != '/')
strcat(buf, "\\");
#else
trimchars[2] = '\t';
trimchars[3] = 0;
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
const char SEP = '\\';
#else
const char SEP = '/';
s = nm;
d = lnm;
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
q = FALSE;
#else
q = nm[0] == '\\' && nm[1] == '~';
/* Expand inline environment variables */
while ((*d++ = *s)) {
-#ifndef __WINDOWS__
+#ifndef __WXMSW__
if (*s == '\\') {
if ((*(d - 1) = *++s)) {
s++;
break;
} else
#endif
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
if (*s++ == '$' && (*s == '{' || *s == ')'))
#else
if (*s++ == '$')
return NULL;
strcpy (dest, WXSTRINGCAST filename);
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
Unix2DosFilename(dest);
#endif
strcpy(wxBuffer, "~");
if (user && *user)
strcat(wxBuffer, user);
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
// strcat(wxBuffer, "\\");
#else
// strcat(wxBuffer, "/");
#endif
return tcp + 1;
} /* while */
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
if (isalpha (*path) && *(path + 1) == ':')
return path + 2;
#endif
#endif
return wxString(tcp + 1);
} /* while */
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
if (isalpha (*path) && *(path + 1) == ':')
return wxString(path + 2);
#endif
else i --;
}
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
// Try Drive specifier
if (isalpha (buf[0]) && buf[1] == ':')
{
else i --;
}
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
// Try Drive specifier
if (isalpha (buf[0]) && buf[1] == ':')
{
{
if (*s == '\\')
*s = '/';
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
else
*s = wxToLower (*s); // Case INDEPENDENT
#endif
wxUnix2DosFilename (char *s)
{
// Yes, I really mean this to happen under DOS only! JACS
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
if (s)
while (*s)
{
{
#ifdef __VMS__
return FALSE;
-#elif (defined(__GNUWIN32__) && !defined(__MINGW32__)) || !defined(__WINDOWS__)
+#elif (defined(__GNUWIN32__) && !defined(__MINGW32__)) || !defined(__WXMSW__)
return (mkdir (WXSTRINGCAST dir, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) == 0);
#else
return (mkdir(WXSTRINGCAST dir) == 0);
{
#ifdef __VMS__
return FALSE;
-#elif !defined(__WINDOWS__)
+#elif !defined(__WXMSW__)
struct stat sbuf;
return (stat(dir, &sbuf) != -1) && S_ISDIR(sbuf.st_mode) ? TRUE : FALSE;
#else
// Get a temporary filename, opening and closing the file.
char *wxGetTempFileName(const wxString& prefix, char *buf)
{
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
#ifndef __WIN32__
char tmp[144];
return NULL;
}
-#elif defined(__WINDOWS__)
+#elif defined(__WXMSW__)
#ifdef __WIN32__
HANDLE wxFileStrucHandle = INVALID_HANDLE_VALUE;
}
#endif
- // __WINDOWS__
+ // __WXMSW__
// Get current working directory.
// If buf is NULL, allocates space using new, else
{
#ifdef __UNIX__
return (chdir(d) == 0);
-#elif defined(__WINDOWS__)
+#elif defined(__WXMSW__)
#ifdef __WIN32__
return (bool)(SetCurrentDirectory(d) != 0);