X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/184b5d99a5382cd7a19888c85aff11f8a21af2f6..ad5c34f309074eefe625b82e1203eec5b91247f5:/include/wx/filefn.h?ds=sidebyside diff --git a/include/wx/filefn.h b/include/wx/filefn.h index e5a12a873a..ba6b8c7f24 100644 --- a/include/wx/filefn.h +++ b/include/wx/filefn.h @@ -23,12 +23,24 @@ // ---------------------------------------------------------------------------- // define off_t +#ifndef __WXMAC__ #include +#else +typedef long off_t; +#endif #ifdef _MSC_VER #define off_t _off_t #endif +#if defined(__BORLANDC__) && defined(__WIN16__) +typedef long off_t; +#endif + +#if defined(__SC__) +typedef long off_t; +#endif + const off_t wxInvalidOffset = (off_t)-1; typedef enum { @@ -37,6 +49,8 @@ typedef enum { wxFromEnd } wxSeekMode; +WXDLLEXPORT_DATA(extern const char*) wxEmptyString; + // ---------------------------------------------------------------------------- // functions // ---------------------------------------------------------------------------- @@ -71,6 +85,11 @@ WXDLLEXPORT void wxDos2UnixFilename(char *s); WXDLLEXPORT void wxUnix2DosFilename(char *s); #define Unix2DosFilename wxUnix2DosFilename +#ifdef __WXMAC__ + WXDLLEXPORT void wxMacPathToFSSpec( const char *path , FSSpec *spec ) ; + WXDLLEXPORT void wxMac2UnixFilename(char *s); + WXDLLEXPORT void wxUnix2MacFilename(char *s); +#endif // Strip the extension, in situ WXDLLEXPORT void wxStripExtension(char *buffer); WXDLLEXPORT void wxStripExtension(wxString& buffer); @@ -85,7 +104,7 @@ WXDLLEXPORT char* wxExpandPath(char *dest, const char *path); // and make (if under the home tree) relative to home // [caller must copy-- volatile] WXDLLEXPORT char* wxContractPath (const wxString& filename, - const wxString& envname = "", const wxString& user = ""); + const wxString& envname = wxEmptyString, const wxString& user = wxEmptyString); // Destructive removal of /./ and /../ stuff WXDLLEXPORT char* wxRealPath(char *path); @@ -186,21 +205,22 @@ WXDLLEXPORT bool wxFindFileInPath(wxString *pStr, const char *pszPath, const cha // ---------------------------------------------------------------------------- // Path searching -class WXDLLEXPORT wxPathList: public wxStringList +class WXDLLEXPORT wxPathList : public wxStringList { - DECLARE_DYNAMIC_CLASS(wxPathList) - - public: - void AddEnvList(const wxString& envVariable); // Adds all paths in environment variable - void Add(const wxString& path); - wxString FindValidPath(const wxString& filename); // Find the first full path - // for which the file exists - wxString FindAbsoluteValidPath(const wxString& filename); // Find the first full path - // for which the file exists; ensure it's an absolute - // path that gets returned. - void EnsureFileAccessible(const wxString& path); // Given full path and filename, - // add path to list - bool Member(const wxString& path); +public: + void AddEnvList(const wxString& envVariable); // Adds all paths in environment variable + void Add(const wxString& path); + wxString FindValidPath(const wxString& filename); // Find the first full path + // for which the file exists + wxString FindAbsoluteValidPath(const wxString& filename); // Find the first full path + // for which the file exists; ensure it's an absolute + // path that gets returned. + void EnsureFileAccessible(const wxString& path); // Given full path and filename, + // add path to list + bool Member(const wxString& path); + +private: + DECLARE_DYNAMIC_CLASS(wxPathList) }; #endif