#define _MAXPATHLEN 500
-extern char *wxBuffer;
+extern wxChar *wxBuffer;
#ifdef __WXMAC__
#include "fspcompa.h"
#endif
-#if !USE_SHARED_LIBRARIES
IMPLEMENT_DYNAMIC_CLASS(wxPathList, wxStringList)
-#endif
// ----------------------------------------------------------------------------
// private globals
return wxRealPath(buf);
}
-
/* Contract Paths to be build upon an environment variable
component:
void
#if defined(__WXMSW__) || defined(__WXPM__)
-wxUnix2DosFilename (char *s)
+wxUnix2DosFilename (wxChar *s)
#else
-wxUnix2DosFilename (char *WXUNUSED(s) )
+wxUnix2DosFilename (wxChar *WXUNUSED(s) )
#endif
{
// Yes, I really mean this to happen under DOS only! JACS
(fp2 = fopen (wxUnix2MacFilename( file2 ), "rb")) == NULL ||
(fp3 = fopen (wxUnix2MacFilename( outfile ), "wb")) == NULL)
#else
- if ((fp1 = fopen (WXSTRINGCAST file1, "rb")) == NULL ||
- (fp2 = fopen (WXSTRINGCAST file2, "rb")) == NULL ||
- (fp3 = fopen (outfile, "wb")) == NULL)
+ if ((fp1 = wxFopen (WXSTRINGCAST file1, wxT("rb"))) == NULL ||
+ (fp2 = wxFopen (WXSTRINGCAST file2, wxT("rb"))) == NULL ||
+ (fp3 = wxFopen (outfile, wxT("wb"))) == NULL)
#endif
{
if (fp1)
return FALSE;
if ((fd2 = fopen (wxUnix2MacFilename( file2 ), "wb")) == NULL)
#else
- if ((fd1 = fopen (WXSTRINGCAST file1, "rb")) == NULL)
+ if ((fd1 = wxFopen (WXSTRINGCAST file1, wxT("rb"))) == NULL)
return FALSE;
- if ((fd2 = fopen (WXSTRINGCAST file2, "wb")) == NULL)
+ if ((fd2 = wxFopen (WXSTRINGCAST file2, wxT("wb"))) == NULL)
#endif
{
fclose (fd1);
bool wxRmdir(const wxString& dir, int WXUNUSED(flags))
{
#ifdef __VMS__
- return FALSE;
+ return FALSE; //to be changed since rmdir exists in VMS7.x
#elif defined( __WXMAC__ )
return (rmdir(wxUnix2MacFilename( dir )) == 0);
#else
bool wxDirExists(const wxString& dir)
{
#ifdef __VMS__
- return FALSE;
+ return FALSE; //To be changed since stat exists in VMS7.x
#elif !defined(__WXMSW__)
struct stat sbuf;
return (stat(dir.fn_str(), &sbuf) != -1) && S_ISDIR(sbuf.st_mode) ? TRUE : FALSE;
#endif
}
+bool wxGetTempFileName(const wxString& prefix, wxString& buf)
+{
+ wxChar buf2[512];
+ if (wxGetTempFileName(prefix, buf2) != (wxChar*) NULL)
+ {
+ buf = buf2;
+ return TRUE;
+ }
+ else
+ return FALSE;
+}
+
// Get first file name matching given wild card.
#ifdef __UNIX__
// Get first file name matching given wild card.
// Flags are reserved for future use.
-#ifndef __VMS__
+#if !defined( __VMS__ ) || ( __VMS_VER >= 70000000 )
static DIR *gs_dirStream = (DIR *) NULL;
static wxString gs_strFileSpec;
static int gs_findFlags = 0;
{
wxString result;
-#ifndef __VMS__
+#if !defined( __VMS__ ) || ( __VMS_VER >= 70000000 )
if (gs_dirStream)
closedir(gs_dirStream); // edz 941103: better housekeping
{
result = wxFindNextFile();
}
-#endif // !VMS
+#endif // !VMS6.x or earlier
return result;
}
{
wxString result;
-#ifndef __VMS__
+#if !defined( __VMS__ ) || ( __VMS_VER >= 70000000 )
wxCHECK_MSG( gs_dirStream, result, wxT("must call wxFindFirstFile first") );
// Find path only so we can concatenate
nextDir != NULL;
nextDir = readdir(gs_dirStream) )
{
- if (wxMatchWild(name, nextDir->d_name))
+ if (wxMatchWild(name, nextDir->d_name, FALSE) && // RR: added FALSE to find hidden files
+ strcmp(nextDir->d_name, ".") &&
+ strcmp(nextDir->d_name, "..") )
{
result.Empty();
if ( !path.IsEmpty() )
closedir(gs_dirStream);
gs_dirStream = (DIR *) NULL;
-#endif // !VMS
+#endif // !VMS6.2 or earlier
return result;
}