mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-26 15:23:48 +01:00
Internat.cpp has fewer dependencies...
... after we move a function to FileNames.cpp. This frees ten files from cyclic dependencies
This commit is contained in:
@@ -120,12 +120,6 @@ public:
|
||||
static wxString FormatSize(wxLongLong size);
|
||||
static wxString FormatSize(double size);
|
||||
|
||||
/** \brief Protect against Unicode to multi-byte conversion failures
|
||||
* on Windows */
|
||||
#if defined(__WXMSW__)
|
||||
static char *VerifyFilename(const wxString &s, bool input = true);
|
||||
#endif
|
||||
|
||||
/** \brief Check a proposed file name string for illegal characters and
|
||||
* remove them
|
||||
* return true iff name is "visibly" changed (not necessarily equivalent to
|
||||
@@ -156,24 +150,6 @@ private:
|
||||
|
||||
#define _NoAcc(X) Internat::StripAccelerators(_(X))
|
||||
|
||||
// Use this macro to wrap all filenames and pathnames that get
|
||||
// passed directly to a system call, like opening a file, creating
|
||||
// a directory, checking to see that a file exists, etc...
|
||||
#if defined(__WXMSW__)
|
||||
// Note, on Windows we don't define an OSFILENAME() to prevent accidental use.
|
||||
// See VerifyFilename() for an explanation.
|
||||
#define OSINPUT(X) Internat::VerifyFilename(X, true)
|
||||
#define OSOUTPUT(X) Internat::VerifyFilename(X, false)
|
||||
#elif defined(__WXMAC__)
|
||||
#define OSFILENAME(X) ((char *) (const char *)(X).fn_str())
|
||||
#define OSINPUT(X) OSFILENAME(X)
|
||||
#define OSOUTPUT(X) OSFILENAME(X)
|
||||
#else
|
||||
#define OSFILENAME(X) ((char *) (const char *)(X).mb_str())
|
||||
#define OSINPUT(X) OSFILENAME(X)
|
||||
#define OSOUTPUT(X) OSFILENAME(X)
|
||||
#endif
|
||||
|
||||
// Convert C strings to wxString
|
||||
#define UTF8CTOWX(X) wxString((X), wxConvUTF8)
|
||||
#define LAT1CTOWX(X) wxString((X), wxConvISO8859_1)
|
||||
|
||||
Reference in New Issue
Block a user