TRUE not true, FALSE not false

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
2003-01-20 21:22:43 +00:00
parent cba5a276e4
commit dc259b7926
6 changed files with 213 additions and 213 deletions

View File

@@ -223,7 +223,7 @@ public:
// this method exists for backwards compatibility only, don't use // this method exists for backwards compatibility only, don't use
bool HasPendingMessages() const { return true; } bool HasPendingMessages() const { return TRUE; }
protected: protected:
// the logging functions that can be overriden // the logging functions that can be overriden

View File

@@ -141,7 +141,7 @@ protected:
int m_border; int m_border;
int m_flag; int m_flag;
// If true, then this item is considered in the layout // If TRUE, then this item is considered in the layout
// calculation. Otherwise, it is skipped over. // calculation. Otherwise, it is skipped over.
bool m_show; bool m_show;
@@ -239,7 +239,7 @@ public:
virtual bool Detach( wxSizer *sizer ); virtual bool Detach( wxSizer *sizer );
virtual bool Detach( size_t index ); virtual bool Detach( size_t index );
virtual void Clear( bool delete_windows=false ); virtual void Clear( bool delete_windows=FALSE );
virtual void DeleteWindows(); virtual void DeleteWindows();
void SetMinSize( int width, int height ) void SetMinSize( int width, int height )
@@ -289,16 +289,16 @@ public:
// Manage whether individual scene items are considered // Manage whether individual scene items are considered
// in the layout calculations or not. // in the layout calculations or not.
void Show( wxWindow *window, bool show = true ); void Show( wxWindow *window, bool show = TRUE );
void Show( wxSizer *sizer, bool show = true ); void Show( wxSizer *sizer, bool show = TRUE );
void Show( size_t index, bool show = true ); void Show( size_t index, bool show = TRUE );
void Hide( wxSizer *sizer ) void Hide( wxSizer *sizer )
{ Show( sizer, false ); } { Show( sizer, FALSE ); }
void Hide( wxWindow *window ) void Hide( wxWindow *window )
{ Show( window, false ); } { Show( window, FALSE ); }
void Hide( size_t index ) void Hide( size_t index )
{ Show( index, false ); } { Show( index, FALSE ); }
bool IsShown( wxWindow *window ) const; bool IsShown( wxWindow *window ) const;
bool IsShown( wxSizer *sizer ) const; bool IsShown( wxSizer *sizer ) const;

View File

@@ -272,9 +272,9 @@ bool wxPathList::Member (const wxString& path)
path.CompareTo (path2) == 0 path.CompareTo (path2) == 0
#endif #endif
) )
return true; return TRUE;
} }
return false; return FALSE;
} }
wxString wxPathList::FindValidPath (const wxString& file) wxString wxPathList::FindValidPath (const wxString& file)
@@ -354,23 +354,23 @@ wxIsAbsolutePath (const wxString& filename)
// "MacOS:MyText.txt" is absolute whereas "MyDir:MyText.txt" // "MacOS:MyText.txt" is absolute whereas "MyDir:MyText.txt"
// is not. Or maybe ":MyDir:MyText.txt" has to be used? RR. // is not. Or maybe ":MyDir:MyText.txt" has to be used? RR.
if (filename.Find(':') != wxNOT_FOUND && filename[0] != ':') if (filename.Find(':') != wxNOT_FOUND && filename[0] != ':')
return true ; return TRUE ;
#else #else
// Unix like or Windows // Unix like or Windows
if (filename[0] == wxT('/')) if (filename[0] == wxT('/'))
return true; return TRUE;
#endif #endif
#ifdef __VMS__ #ifdef __VMS__
if ((filename[0] == wxT('[') && filename[1] != wxT('.'))) if ((filename[0] == wxT('[') && filename[1] != wxT('.')))
return true; return TRUE;
#endif #endif
#ifdef __WINDOWS__ #ifdef __WINDOWS__
// MSDOS like // MSDOS like
if (filename[0] == wxT('\\') || (wxIsalpha (filename[0]) && filename[1] == wxT(':'))) if (filename[0] == wxT('\\') || (wxIsalpha (filename[0]) && filename[1] == wxT(':')))
return true; return TRUE;
#endif #endif
} }
return false ; return FALSE ;
} }
/* /*
@@ -549,7 +549,7 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name)
s = nm; s = nm;
d = lnm; d = lnm;
#ifdef __WXMSW__ #ifdef __WXMSW__
q = false; q = FALSE;
#else #else
q = nm[0] == wxT('\\') && nm[1] == wxT('~'); q = nm[0] == wxT('\\') && nm[1] == wxT('~');
#endif #endif
@@ -865,7 +865,7 @@ wxString wxMacFSSpec2MacFilename( const FSSpec *spec )
int j; int j;
OSErr theErr; OSErr theErr;
OSStatus theStatus; OSStatus theStatus;
Boolean isDirectory = false; Boolean isDirectory = FALSE;
Str255 theParentPath = "\p"; Str255 theParentPath = "\p";
FSSpec theParentSpec; FSSpec theParentSpec;
FSRef theParentRef; FSRef theParentRef;
@@ -1088,7 +1088,7 @@ wxConcatFiles (const wxString& file1, const wxString& file2, const wxString& fil
{ {
wxString outfile; wxString outfile;
if ( !wxGetTempFileName( wxT("cat"), outfile) ) if ( !wxGetTempFileName( wxT("cat"), outfile) )
return false; return FALSE;
FILE *fp1 = (FILE *) NULL; FILE *fp1 = (FILE *) NULL;
FILE *fp2 = (FILE *) NULL; FILE *fp2 = (FILE *) NULL;
@@ -1104,7 +1104,7 @@ wxConcatFiles (const wxString& file1, const wxString& file2, const wxString& fil
fclose (fp2); fclose (fp2);
if (fp3) if (fp3)
fclose (fp3); fclose (fp3);
return false; return FALSE;
} }
int ch; int ch;
@@ -1135,11 +1135,11 @@ wxCopyFile (const wxString& file1, const wxString& file2, bool overwrite)
wxLogSysError(_("Failed to copy the file '%s' to '%s'"), wxLogSysError(_("Failed to copy the file '%s' to '%s'"),
file1.c_str(), file2.c_str()); file1.c_str(), file2.c_str());
return false; return FALSE;
} }
#elif defined(__WXPM__) #elif defined(__WXPM__)
if ( ::DosCopy(file2, file2, overwrite ? DCPY_EXISTING : 0) != 0 ) if ( ::DosCopy(file2, file2, overwrite ? DCPY_EXISTING : 0) != 0 )
return false; return FALSE;
#else // !Win32 #else // !Win32
wxStructStat fbuf; wxStructStat fbuf;
@@ -1150,13 +1150,13 @@ wxCopyFile (const wxString& file1, const wxString& file2, bool overwrite)
// from it anyhow // from it anyhow
wxLogSysError(_("Impossible to get permissions for file '%s'"), wxLogSysError(_("Impossible to get permissions for file '%s'"),
file1.c_str()); file1.c_str());
return false; return FALSE;
} }
// open file1 for reading // open file1 for reading
wxFile fileIn(file1, wxFile::read); wxFile fileIn(file1, wxFile::read);
if ( !fileIn.IsOpened() ) if ( !fileIn.IsOpened() )
return false; return FALSE;
// remove file2, if it exists. This is needed for creating // remove file2, if it exists. This is needed for creating
// file2 with the correct permissions in the next step // file2 with the correct permissions in the next step
@@ -1164,7 +1164,7 @@ wxCopyFile (const wxString& file1, const wxString& file2, bool overwrite)
{ {
wxLogSysError(_("Impossible to overwrite the file '%s'"), wxLogSysError(_("Impossible to overwrite the file '%s'"),
file2.c_str()); file2.c_str());
return false; return FALSE;
} }
#ifdef __UNIX__ #ifdef __UNIX__
@@ -1178,7 +1178,7 @@ wxCopyFile (const wxString& file1, const wxString& file2, bool overwrite)
wxFile fileOut; wxFile fileOut;
if ( !fileOut.Create(file2, overwrite, fbuf.st_mode & 0777) ) if ( !fileOut.Create(file2, overwrite, fbuf.st_mode & 0777) )
return false; return FALSE;
#ifdef __UNIX__ #ifdef __UNIX__
/// restore the old umask /// restore the old umask
@@ -1192,21 +1192,21 @@ wxCopyFile (const wxString& file1, const wxString& file2, bool overwrite)
{ {
count = fileIn.Read(buf, WXSIZEOF(buf)); count = fileIn.Read(buf, WXSIZEOF(buf));
if ( fileIn.Error() ) if ( fileIn.Error() )
return false; return FALSE;
// end of file? // end of file?
if ( !count ) if ( !count )
break; break;
if ( fileOut.Write(buf, count) < count ) if ( fileOut.Write(buf, count) < count )
return false; return FALSE;
} }
// we can expect fileIn to be closed successfully, but we should ensure // we can expect fileIn to be closed successfully, but we should ensure
// that fileOut was closed as some write errors (disk full) might not be // that fileOut was closed as some write errors (disk full) might not be
// detected before doing this // detected before doing this
if ( !fileIn.Close() || !fileOut.Close() ) if ( !fileIn.Close() || !fileOut.Close() )
return false; return FALSE;
#if !defined(__VISAGECPP__) && !defined(__WXMAC__) || defined(__UNIX__) #if !defined(__VISAGECPP__) && !defined(__WXMAC__) || defined(__UNIX__)
// no chmod in VA. Should be some permission API for HPFS386 partitions // no chmod in VA. Should be some permission API for HPFS386 partitions
@@ -1215,12 +1215,12 @@ wxCopyFile (const wxString& file1, const wxString& file2, bool overwrite)
{ {
wxLogSysError(_("Impossible to set permissions for the file '%s'"), wxLogSysError(_("Impossible to set permissions for the file '%s'"),
file2.c_str()); file2.c_str());
return false; return FALSE;
} }
#endif // OS/2 || Mac #endif // OS/2 || Mac
#endif // __WXMSW__ && __WIN32__ #endif // __WXMSW__ && __WIN32__
return true; return TRUE;
} }
bool bool
@@ -1228,15 +1228,15 @@ wxRenameFile (const wxString& file1, const wxString& file2)
{ {
// Normal system call // Normal system call
if ( wxRename (file1, file2) == 0 ) if ( wxRename (file1, file2) == 0 )
return true; return TRUE;
// Try to copy // Try to copy
if (wxCopyFile(file1, file2)) { if (wxCopyFile(file1, file2)) {
wxRemoveFile(file1); wxRemoveFile(file1);
return true; return TRUE;
} }
// Give up // Give up
return false; return FALSE;
} }
bool wxRemoveFile(const wxString& file) bool wxRemoveFile(const wxString& file)
@@ -1286,23 +1286,23 @@ bool wxMkdir(const wxString& dir, int perm)
{ {
wxLogSysError(_("Directory '%s' couldn't be created"), dirname); wxLogSysError(_("Directory '%s' couldn't be created"), dirname);
return false; return FALSE;
} }
return true; return TRUE;
#endif // Mac/!Mac #endif // Mac/!Mac
} }
bool wxRmdir(const wxString& dir, int WXUNUSED(flags)) bool wxRmdir(const wxString& dir, int WXUNUSED(flags))
{ {
#ifdef __VMS__ #ifdef __VMS__
return false; //to be changed since rmdir exists in VMS7.x return FALSE; //to be changed since rmdir exists in VMS7.x
#elif defined(__WXPM__) #elif defined(__WXPM__)
return (::DosDeleteDir((PSZ)dir.c_str()) == 0); return (::DosDeleteDir((PSZ)dir.c_str()) == 0);
#else #else
#ifdef __SALFORDC__ #ifdef __SALFORDC__
return false; // What to do? return FALSE; // What to do?
#else #else
return (wxRmDir(OS_FILENAME(dir)) == 0); return (wxRmDir(OS_FILENAME(dir)) == 0);
#endif #endif
@@ -1438,14 +1438,14 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz)
buf = new wxChar[sz + 1]; buf = new wxChar[sz + 1];
} }
bool ok = false; bool ok = FALSE;
// for the compilers which have Unicode version of _getcwd(), call it // for the compilers which have Unicode version of _getcwd(), call it
// directly, for the others call the ANSI version and do the translation // directly, for the others call the ANSI version and do the translation
#if !wxUSE_UNICODE #if !wxUSE_UNICODE
#define cbuf buf #define cbuf buf
#else // wxUSE_UNICODE #else // wxUSE_UNICODE
bool needsANSI = true; bool needsANSI = TRUE;
#if !defined(HAVE_WGETCWD) || wxUSE_UNICODE_MSLU #if !defined(HAVE_WGETCWD) || wxUSE_UNICODE_MSLU
// This is not legal code as the compiler // This is not legal code as the compiler
@@ -1459,11 +1459,11 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz)
#if wxUSE_UNICODE_MSLU #if wxUSE_UNICODE_MSLU
if ( wxGetOsVersion() != wxWIN95 ) if ( wxGetOsVersion() != wxWIN95 )
#else #else
char *cbuf = NULL; // never really used because needsANSI will always be false char *cbuf = NULL; // never really used because needsANSI will always be FALSE
#endif #endif
{ {
ok = _wgetcwd(buf, sz) != NULL; ok = _wgetcwd(buf, sz) != NULL;
needsANSI = false; needsANSI = FALSE;
} }
#endif #endif
@@ -1492,11 +1492,11 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz)
strcpy( cbuf , res ) ; strcpy( cbuf , res ) ;
cbuf[res.length()]=0 ; cbuf[res.length()]=0 ;
ok = true; ok = TRUE;
} }
else else
{ {
ok = false; ok = FALSE;
} }
#elif defined(__VISAGECPP__) || (defined (__OS2__) && defined (__WATCOMC__)) #elif defined(__VISAGECPP__) || (defined (__OS2__) && defined (__WATCOMC__))
APIRET rc; APIRET rc;
@@ -1620,11 +1620,11 @@ bool wxEndsWithPathSeparator(const wxChar *pszFileName)
return len && wxIsPathSeparator(pszFileName[len - 1]); return len && wxIsPathSeparator(pszFileName[len - 1]);
} }
// find a file in a list of directories, returns false if not found // find a file in a list of directories, returns FALSE if not found
bool wxFindFileInPath(wxString *pStr, const wxChar *pszPath, const wxChar *pszFile) bool wxFindFileInPath(wxString *pStr, const wxChar *pszPath, const wxChar *pszFile)
{ {
// we assume that it's not empty // we assume that it's not empty
wxCHECK_MSG( !wxIsEmpty(pszFile), false, wxCHECK_MSG( !wxIsEmpty(pszFile), FALSE,
_T("empty file name in wxFindFileInPath")); _T("empty file name in wxFindFileInPath"));
// skip path separator in the beginning of the file name if present // skip path separator in the beginning of the file name if present
@@ -1659,7 +1659,7 @@ bool wxFindFileInPath(wxString *pStr, const wxChar *pszPath, const wxChar *pszFi
delete [] szPath; delete [] szPath;
return pc != NULL; // if true => we breaked from the loop return pc != NULL; // if TRUE => we breaked from the loop
} }
void WXDLLEXPORT wxSplitPath(const wxChar *pszFileName, void WXDLLEXPORT wxSplitPath(const wxChar *pszFileName,
@@ -1695,13 +1695,13 @@ bool wxIsWild( const wxString& pattern )
switch (*pat++) switch (*pat++)
{ {
case wxT('?'): case wxT('*'): case wxT('['): case wxT('{'): case wxT('?'): case wxT('*'): case wxT('['): case wxT('{'):
return true; return TRUE;
case wxT('\\'): case wxT('\\'):
if (!*pat++) if (!*pat++)
return false; return FALSE;
} }
} }
return false; return FALSE;
} }
/* /*
@@ -1733,7 +1733,7 @@ bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
{ {
/* Never match so that hidden Unix files /* Never match so that hidden Unix files
* are never found. */ * are never found. */
return false; return FALSE;
} }
for (;;) for (;;)
@@ -1750,7 +1750,7 @@ bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
{ {
m++; m++;
if (!*n++) if (!*n++)
return false; return FALSE;
} }
else else
{ {
@@ -1759,7 +1759,7 @@ bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
m++; m++;
/* Quoting "nothing" is a bad thing */ /* Quoting "nothing" is a bad thing */
if (!*m) if (!*m)
return false; return FALSE;
} }
if (!*m) if (!*m)
{ {
@@ -1769,9 +1769,9 @@ bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
* match * match
*/ */
if (!*n) if (!*n)
return true; return TRUE;
if (just) if (just)
return true; return TRUE;
just = 0; just = 0;
goto not_matched; goto not_matched;
} }
@@ -1803,7 +1803,7 @@ bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
* impossible to match it * impossible to match it
*/ */
if (!*n) if (!*n)
return false; return FALSE;
if (mp) if (mp)
{ {
m = mp; m = mp;
@@ -1825,7 +1825,7 @@ bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
count = acount; count = acount;
} }
else else
return false; return FALSE;
} }
} }
} }

View File

@@ -56,7 +56,7 @@ wxSizerItem::wxSizerItem( int width, int height, int proportion, int flag, int b
, m_proportion( proportion ) , m_proportion( proportion )
, m_border( border ) , m_border( border )
, m_flag( flag ) , m_flag( flag )
, m_show( true ) , m_show( TRUE )
, m_userData( userData ) , m_userData( userData )
{ {
SetRatio( m_size ); SetRatio( m_size );
@@ -69,7 +69,7 @@ wxSizerItem::wxSizerItem( wxWindow *window, int proportion, int flag, int border
, m_proportion( proportion ) , m_proportion( proportion )
, m_border( border ) , m_border( border )
, m_flag( flag ) , m_flag( flag )
, m_show( true ) , m_show( TRUE )
, m_userData( userData ) , m_userData( userData )
{ {
// aspect ratio calculated from initial size // aspect ratio calculated from initial size
@@ -84,7 +84,7 @@ wxSizerItem::wxSizerItem( wxSizer *sizer, int proportion, int flag, int border,
, m_proportion( proportion ) , m_proportion( proportion )
, m_border( border ) , m_border( border )
, m_flag( flag ) , m_flag( flag )
, m_show( true ) , m_show( TRUE )
, m_ratio( 0.0 ) , m_ratio( 0.0 )
, m_userData( userData ) , m_userData( userData )
{ {
@@ -277,7 +277,7 @@ int wxSizerItem::GetOption() const
wxSizer::wxSizer() wxSizer::wxSizer()
: m_minSize( wxSize( 0, 0 ) ) : m_minSize( wxSize( 0, 0 ) )
{ {
m_children.DeleteContents( true ); m_children.DeleteContents( TRUE );
} }
wxSizer::~wxSizer() wxSizer::~wxSizer()
@@ -396,18 +396,18 @@ bool wxSizer::Remove( wxSizer *sizer )
node = node->GetNext(); node = node->GetNext();
} }
return false; return FALSE;
} }
bool wxSizer::Remove( size_t index ) bool wxSizer::Remove( size_t index )
{ {
wxCHECK_MSG( index < m_children.GetCount(), wxCHECK_MSG( index < m_children.GetCount(),
false, FALSE,
_T("Remove index is out of range") ); _T("Remove index is out of range") );
wxSizerItemList::Node *node = m_children.Item( index ); wxSizerItemList::Node *node = m_children.Item( index );
wxCHECK_MSG( node, false, _T("Failed to find child node") ); wxCHECK_MSG( node, FALSE, _T("Failed to find child node") );
wxSizerItem *item = node->GetData(); wxSizerItem *item = node->GetData();
@@ -434,7 +434,7 @@ bool wxSizer::Detach( wxSizer *sizer )
node = node->GetNext(); node = node->GetNext();
} }
return false; return FALSE;
} }
bool wxSizer::Detach( wxWindow *window ) bool wxSizer::Detach( wxWindow *window )
@@ -454,18 +454,18 @@ bool wxSizer::Detach( wxWindow *window )
node = node->GetNext(); node = node->GetNext();
} }
return false; return FALSE;
} }
bool wxSizer::Detach( size_t index ) bool wxSizer::Detach( size_t index )
{ {
wxCHECK_MSG( index < m_children.GetCount(), wxCHECK_MSG( index < m_children.GetCount(),
false, FALSE,
_T("Detach index is out of range") ); _T("Detach index is out of range") );
wxSizerItemList::Node *node = m_children.Item( index ); wxSizerItemList::Node *node = m_children.Item( index );
wxCHECK_MSG( node, false, _T("Failed to find child node") ); wxCHECK_MSG( node, FALSE, _T("Failed to find child node") );
wxSizerItem *item = node->GetData(); wxSizerItem *item = node->GetData();
@@ -670,7 +670,7 @@ bool wxSizer::DoSetItemMinSize( wxWindow *window, int width, int height )
if (item->GetWindow() == window) if (item->GetWindow() == window)
{ {
item->SetInitSize( width, height ); item->SetInitSize( width, height );
return true; return TRUE;
} }
node = node->GetNext(); node = node->GetNext();
} }
@@ -686,12 +686,12 @@ bool wxSizer::DoSetItemMinSize( wxWindow *window, int width, int height )
item->GetSizer()->DoSetItemMinSize( window, width, height ) ) item->GetSizer()->DoSetItemMinSize( window, width, height ) )
{ {
// A child sizer found the requested windw, exit. // A child sizer found the requested windw, exit.
return true; return TRUE;
} }
node = node->GetNext(); node = node->GetNext();
} }
return false; return FALSE;
} }
bool wxSizer::DoSetItemMinSize( wxSizer *sizer, int width, int height ) bool wxSizer::DoSetItemMinSize( wxSizer *sizer, int width, int height )
@@ -708,7 +708,7 @@ bool wxSizer::DoSetItemMinSize( wxSizer *sizer, int width, int height )
if (item->GetSizer() == sizer) if (item->GetSizer() == sizer)
{ {
item->GetSizer()->DoSetMinSize( width, height ); item->GetSizer()->DoSetMinSize( width, height );
return true; return TRUE;
} }
node = node->GetNext(); node = node->GetNext();
} }
@@ -724,19 +724,19 @@ bool wxSizer::DoSetItemMinSize( wxSizer *sizer, int width, int height )
item->GetSizer()->DoSetItemMinSize( sizer, width, height ) ) item->GetSizer()->DoSetItemMinSize( sizer, width, height ) )
{ {
// A child found the requested sizer, exit. // A child found the requested sizer, exit.
return true; return TRUE;
} }
node = node->GetNext(); node = node->GetNext();
} }
return false; return FALSE;
} }
bool wxSizer::DoSetItemMinSize( size_t index, int width, int height ) bool wxSizer::DoSetItemMinSize( size_t index, int width, int height )
{ {
wxSizerItemList::Node *node = m_children.Item( index ); wxSizerItemList::Node *node = m_children.Item( index );
wxCHECK_MSG( node, false, _T("Failed to find child node") ); wxCHECK_MSG( node, FALSE, _T("Failed to find child node") );
wxSizerItem *item = node->GetData(); wxSizerItem *item = node->GetData();
@@ -751,7 +751,7 @@ bool wxSizer::DoSetItemMinSize( size_t index, int width, int height )
item->SetInitSize( width, height ); item->SetInitSize( width, height );
} }
return true; return TRUE;
} }
void wxSizer::Show( wxWindow *window, bool show ) void wxSizer::Show( wxWindow *window, bool show )
@@ -824,7 +824,7 @@ bool wxSizer::IsShown( wxWindow *window ) const
wxFAIL_MSG( _T("IsShown failed to find sizer item") ); wxFAIL_MSG( _T("IsShown failed to find sizer item") );
return false; return FALSE;
} }
bool wxSizer::IsShown( wxSizer *sizer ) const bool wxSizer::IsShown( wxSizer *sizer ) const
@@ -843,13 +843,13 @@ bool wxSizer::IsShown( wxSizer *sizer ) const
wxFAIL_MSG( _T("IsShown failed to find sizer item") ); wxFAIL_MSG( _T("IsShown failed to find sizer item") );
return false; return FALSE;
} }
bool wxSizer::IsShown( size_t index ) const bool wxSizer::IsShown( size_t index ) const
{ {
wxCHECK_MSG( index < m_children.GetCount(), wxCHECK_MSG( index < m_children.GetCount(),
false, FALSE,
_T("IsShown index is out of range") ); _T("IsShown index is out of range") );
return m_children.Item( index )->GetData()->IsShown(); return m_children.Item( index )->GetData()->IsShown();

View File

@@ -87,7 +87,7 @@ bool wxTextValidator::Copy(const wxTextValidator& val)
m_excludeList.Add(s); m_excludeList.Add(s);
node = node->GetNext(); node = node->GetNext();
} }
return true; return TRUE;
} }
wxTextValidator::~wxTextValidator() wxTextValidator::~wxTextValidator()
@@ -100,9 +100,9 @@ static bool wxIsAlpha(const wxString& val)
for ( i = 0; i < (int)val.Length(); i++) for ( i = 0; i < (int)val.Length(); i++)
{ {
if (!wxIsalpha(val[i])) if (!wxIsalpha(val[i]))
return false; return FALSE;
} }
return true; return TRUE;
} }
static bool wxIsAlphaNumeric(const wxString& val) static bool wxIsAlphaNumeric(const wxString& val)
@@ -111,9 +111,9 @@ static bool wxIsAlphaNumeric(const wxString& val)
for ( i = 0; i < (int)val.Length(); i++) for ( i = 0; i < (int)val.Length(); i++)
{ {
if (!wxIsalnum(val[i])) if (!wxIsalnum(val[i]))
return false; return FALSE;
} }
return true; return TRUE;
} }
// Called when the value in the window must be validated. // Called when the value in the window must be validated.
@@ -121,17 +121,17 @@ static bool wxIsAlphaNumeric(const wxString& val)
bool wxTextValidator::Validate(wxWindow *parent) bool wxTextValidator::Validate(wxWindow *parent)
{ {
if( !CheckValidator() ) if( !CheckValidator() )
return false; return FALSE;
wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ; wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ;
// If window is disabled, simply return // If window is disabled, simply return
if ( !control->IsEnabled() ) if ( !control->IsEnabled() )
return true; return TRUE;
wxString val(control->GetValue()); wxString val(control->GetValue());
bool ok = true; bool ok = TRUE;
// NB: this format string should contian exactly one '%s' // NB: this format string should contian exactly one '%s'
wxString errormsg; wxString errormsg;
@@ -149,25 +149,25 @@ bool wxTextValidator::Validate(wxWindow *parent)
} }
else if ( (m_validatorStyle & wxFILTER_ASCII) && !val.IsAscii() ) else if ( (m_validatorStyle & wxFILTER_ASCII) && !val.IsAscii() )
{ {
ok = false; ok = FALSE;
errormsg = _("'%s' should only contain ASCII characters."); errormsg = _("'%s' should only contain ASCII characters.");
} }
else if ( (m_validatorStyle & wxFILTER_ALPHA) && !wxIsAlpha(val) ) else if ( (m_validatorStyle & wxFILTER_ALPHA) && !wxIsAlpha(val) )
{ {
ok = false; ok = FALSE;
errormsg = _("'%s' should only contain alphabetic characters."); errormsg = _("'%s' should only contain alphabetic characters.");
} }
else if ( (m_validatorStyle & wxFILTER_ALPHANUMERIC) && !wxIsAlphaNumeric(val)) else if ( (m_validatorStyle & wxFILTER_ALPHANUMERIC) && !wxIsAlphaNumeric(val))
{ {
ok = false; ok = FALSE;
errormsg = _("'%s' should only contain alphabetic or numeric characters."); errormsg = _("'%s' should only contain alphabetic or numeric characters.");
} }
else if ( (m_validatorStyle & wxFILTER_NUMERIC) && !wxIsNumeric(val)) else if ( (m_validatorStyle & wxFILTER_NUMERIC) && !wxIsNumeric(val))
{ {
ok = false; ok = FALSE;
errormsg = _("'%s' should be numeric."); errormsg = _("'%s' should be numeric.");
} }
@@ -175,13 +175,13 @@ bool wxTextValidator::Validate(wxWindow *parent)
{ {
//it's only ok to have the members of the list //it's only ok to have the members of the list
errormsg = _("'%s' is invalid"); errormsg = _("'%s' is invalid");
ok = false; ok = FALSE;
} }
else if ( (m_validatorStyle & wxFILTER_EXCLUDE_CHAR_LIST) && !IsNotInCharExcludeList(val)) else if ( (m_validatorStyle & wxFILTER_EXCLUDE_CHAR_LIST) && !IsNotInCharExcludeList(val))
{ {
// it's only ok to have non-members of the list // it's only ok to have non-members of the list
errormsg = _("'%s' is invalid"); errormsg = _("'%s' is invalid");
ok = false; ok = FALSE;
} }
if ( !ok ) if ( !ok )
@@ -204,24 +204,24 @@ bool wxTextValidator::Validate(wxWindow *parent)
bool wxTextValidator::TransferToWindow(void) bool wxTextValidator::TransferToWindow(void)
{ {
if( !CheckValidator() ) if( !CheckValidator() )
return false; return FALSE;
wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ; wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ;
control->SetValue(* m_stringValue) ; control->SetValue(* m_stringValue) ;
return true; return TRUE;
} }
// Called to transfer data to the window // Called to transfer data to the window
bool wxTextValidator::TransferFromWindow(void) bool wxTextValidator::TransferFromWindow(void)
{ {
if( !CheckValidator() ) if( !CheckValidator() )
return false; return FALSE;
wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ; wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ;
* m_stringValue = control->GetValue() ; * m_stringValue = control->GetValue() ;
return true; return TRUE;
} }
void wxTextValidator::SetIncludeList(const wxStringList& list) void wxTextValidator::SetIncludeList(const wxStringList& list)
@@ -305,9 +305,9 @@ static bool wxIsNumeric(const wxString& val)
// use wxSystemSettings or other to do better localisation // use wxSystemSettings or other to do better localisation
if ((!isdigit(val[i])) && (val[i] != '.') && (val[i] != ',')) if ((!isdigit(val[i])) && (val[i] != '.') && (val[i] != ','))
if(!((i == 0) && (val[i] == '-'))) if(!((i == 0) && (val[i] == '-')))
return false; return FALSE;
} }
return true; return TRUE;
} }
bool wxTextValidator::IsInCharIncludeList(const wxString& val) bool wxTextValidator::IsInCharIncludeList(const wxString& val)
@@ -316,9 +316,9 @@ bool wxTextValidator::IsInCharIncludeList(const wxString& val)
for ( i = 0; i < val.Length(); i++) for ( i = 0; i < val.Length(); i++)
{ {
if (!m_includeList.Member((wxString) val[i])) if (!m_includeList.Member((wxString) val[i]))
return false; return FALSE;
} }
return true; return TRUE;
} }
bool wxTextValidator::IsNotInCharExcludeList(const wxString& val) bool wxTextValidator::IsNotInCharExcludeList(const wxString& val)
@@ -327,9 +327,9 @@ bool wxTextValidator::IsNotInCharExcludeList(const wxString& val)
for ( i = 0; i < val.Length(); i++) for ( i = 0; i < val.Length(); i++)
{ {
if (m_excludeList.Member((wxString) val[i])) if (m_excludeList.Member((wxString) val[i]))
return false; return FALSE;
} }
return true; return TRUE;
} }
#endif #endif

View File

@@ -150,12 +150,12 @@ bool wxVariantDataList::Eq(wxVariantData& data) const
wxVariant* var1 = (wxVariant*) node1->GetData(); wxVariant* var1 = (wxVariant*) node1->GetData();
wxVariant* var2 = (wxVariant*) node2->GetData(); wxVariant* var2 = (wxVariant*) node2->GetData();
if ((*var1) != (*var2)) if ((*var1) != (*var2))
return false; return FALSE;
node1 = node1->GetNext(); node1 = node1->GetNext();
node2 = node2->GetNext(); node2 = node2->GetNext();
} }
if (node1 || node2) return false; if (node1 || node2) return FALSE;
return true; return TRUE;
} }
#if wxUSE_STD_IOSTREAM #if wxUSE_STD_IOSTREAM
@@ -164,7 +164,7 @@ bool wxVariantDataList::Write(wxSTD ostream& str) const
wxString s; wxString s;
Write(s); Write(s);
str << (const char*) s.mb_str(); str << (const char*) s.mb_str();
return true; return TRUE;
} }
#endif #endif
@@ -182,7 +182,7 @@ bool wxVariantDataList::Write(wxString& str) const
node = node->GetNext(); node = node->GetNext();
} }
return true; return TRUE;
} }
#if wxUSE_STD_IOSTREAM #if wxUSE_STD_IOSTREAM
@@ -190,7 +190,7 @@ bool wxVariantDataList::Read(wxSTD istream& WXUNUSED(str))
{ {
wxFAIL_MSG(wxT("Unimplemented")); wxFAIL_MSG(wxT("Unimplemented"));
// TODO // TODO
return false; return FALSE;
} }
#endif #endif
@@ -198,7 +198,7 @@ bool wxVariantDataList::Read(wxString& WXUNUSED(str))
{ {
wxFAIL_MSG(wxT("Unimplemented")); wxFAIL_MSG(wxT("Unimplemented"));
// TODO // TODO
return false; return FALSE;
} }
/* /*
@@ -259,12 +259,12 @@ bool wxVariantDataStringList::Eq(wxVariantData& data) const
wxString str1 ( node1->GetData() ); wxString str1 ( node1->GetData() );
wxString str2 ( node2->GetData() ); wxString str2 ( node2->GetData() );
if (str1 != str2) if (str1 != str2)
return false; return FALSE;
node1 = node1->GetNext(); node1 = node1->GetNext();
node2 = node2->GetNext(); node2 = node2->GetNext();
} }
if (node1 || node2) return false; if (node1 || node2) return FALSE;
return true; return TRUE;
} }
#if wxUSE_STD_IOSTREAM #if wxUSE_STD_IOSTREAM
@@ -273,7 +273,7 @@ bool wxVariantDataStringList::Write(wxSTD ostream& str) const
wxString s; wxString s;
Write(s); Write(s);
str << (const char*) s.mb_str(); str << (const char*) s.mb_str();
return true; return TRUE;
} }
#endif #endif
@@ -290,7 +290,7 @@ bool wxVariantDataStringList::Write(wxString& str) const
node = node->GetNext(); node = node->GetNext();
} }
return true; return TRUE;
} }
#if wxUSE_STD_IOSTREAM #if wxUSE_STD_IOSTREAM
@@ -298,7 +298,7 @@ bool wxVariantDataStringList::Read(wxSTD istream& WXUNUSED(str))
{ {
wxFAIL_MSG(wxT("Unimplemented")); wxFAIL_MSG(wxT("Unimplemented"));
// TODO // TODO
return false; return FALSE;
} }
#endif #endif
@@ -306,7 +306,7 @@ bool wxVariantDataStringList::Read(wxString& WXUNUSED(str))
{ {
wxFAIL_MSG(wxT("Unimplemented")); wxFAIL_MSG(wxT("Unimplemented"));
// TODO // TODO
return false; return FALSE;
} }
/* /*
@@ -369,21 +369,21 @@ bool wxVariantDataLong::Write(wxSTD ostream& str) const
wxString s; wxString s;
Write(s); Write(s);
str << (const char*) s.mb_str(); str << (const char*) s.mb_str();
return true; return TRUE;
} }
#endif #endif
bool wxVariantDataLong::Write(wxString& str) const bool wxVariantDataLong::Write(wxString& str) const
{ {
str.Printf(wxT("%ld"), m_value); str.Printf(wxT("%ld"), m_value);
return true; return TRUE;
} }
#if wxUSE_STD_IOSTREAM #if wxUSE_STD_IOSTREAM
bool wxVariantDataLong::Read(wxSTD istream& str) bool wxVariantDataLong::Read(wxSTD istream& str)
{ {
str >> m_value; str >> m_value;
return true; return TRUE;
} }
#endif #endif
@@ -393,21 +393,21 @@ bool wxVariantDataLong::Write(wxOutputStream& str) const
wxTextOutputStream s(str); wxTextOutputStream s(str);
s.Write32((size_t)m_value); s.Write32((size_t)m_value);
return true; return TRUE;
} }
bool wxVariantDataLong::Read(wxInputStream& str) bool wxVariantDataLong::Read(wxInputStream& str)
{ {
wxTextInputStream s(str); wxTextInputStream s(str);
m_value = s.Read32(); m_value = s.Read32();
return true; return TRUE;
} }
#endif // wxUSE_STREAMS #endif // wxUSE_STREAMS
bool wxVariantDataLong::Read(wxString& str) bool wxVariantDataLong::Read(wxString& str)
{ {
m_value = wxAtol((const wxChar*) str); m_value = wxAtol((const wxChar*) str);
return true; return TRUE;
} }
/* /*
@@ -470,21 +470,21 @@ bool wxVariantDataReal::Write(wxSTD ostream& str) const
wxString s; wxString s;
Write(s); Write(s);
str << (const char*) s.mb_str(); str << (const char*) s.mb_str();
return true; return TRUE;
} }
#endif #endif
bool wxVariantDataReal::Write(wxString& str) const bool wxVariantDataReal::Write(wxString& str) const
{ {
str.Printf(wxT("%.4f"), m_value); str.Printf(wxT("%.4f"), m_value);
return true; return TRUE;
} }
#if wxUSE_STD_IOSTREAM #if wxUSE_STD_IOSTREAM
bool wxVariantDataReal::Read(wxSTD istream& str) bool wxVariantDataReal::Read(wxSTD istream& str)
{ {
str >> m_value; str >> m_value;
return true; return TRUE;
} }
#endif #endif
@@ -493,21 +493,21 @@ bool wxVariantDataReal::Write(wxOutputStream& str) const
{ {
wxTextOutputStream s(str); wxTextOutputStream s(str);
s.WriteDouble((double)m_value); s.WriteDouble((double)m_value);
return true; return TRUE;
} }
bool wxVariantDataReal::Read(wxInputStream& str) bool wxVariantDataReal::Read(wxInputStream& str)
{ {
wxTextInputStream s(str); wxTextInputStream s(str);
m_value = (float)s.ReadDouble(); m_value = (float)s.ReadDouble();
return true; return TRUE;
} }
#endif // wxUSE_STREAMS #endif // wxUSE_STREAMS
bool wxVariantDataReal::Read(wxString& str) bool wxVariantDataReal::Read(wxString& str)
{ {
m_value = wxAtof((const wxChar*) str); m_value = wxAtof((const wxChar*) str);
return true; return TRUE;
} }
#ifdef HAVE_BOOL #ifdef HAVE_BOOL
@@ -571,14 +571,14 @@ bool wxVariantDataBool::Write(wxSTD ostream& str) const
wxString s; wxString s;
Write(s); Write(s);
str << (const char*) s.mb_str(); str << (const char*) s.mb_str();
return true; return TRUE;
} }
#endif #endif
bool wxVariantDataBool::Write(wxString& str) const bool wxVariantDataBool::Write(wxString& str) const
{ {
str.Printf(wxT("%d"), (int) m_value); str.Printf(wxT("%d"), (int) m_value);
return true; return TRUE;
} }
#if wxUSE_STD_IOSTREAM #if wxUSE_STD_IOSTREAM
@@ -586,7 +586,7 @@ bool wxVariantDataBool::Read(wxSTD istream& WXUNUSED(str))
{ {
wxFAIL_MSG(wxT("Unimplemented")); wxFAIL_MSG(wxT("Unimplemented"));
// str >> (long) m_value; // str >> (long) m_value;
return false; return FALSE;
} }
#endif #endif
@@ -596,7 +596,7 @@ bool wxVariantDataBool::Write(wxOutputStream& str) const
wxTextOutputStream s(str); wxTextOutputStream s(str);
s.Write8(m_value); s.Write8(m_value);
return true; return TRUE;
} }
bool wxVariantDataBool::Read(wxInputStream& str) bool wxVariantDataBool::Read(wxInputStream& str)
@@ -604,14 +604,14 @@ bool wxVariantDataBool::Read(wxInputStream& str)
wxTextInputStream s(str); wxTextInputStream s(str);
m_value = s.Read8() != 0; m_value = s.Read8() != 0;
return true; return TRUE;
} }
#endif // wxUSE_STREAMS #endif // wxUSE_STREAMS
bool wxVariantDataBool::Read(wxString& str) bool wxVariantDataBool::Read(wxString& str)
{ {
m_value = (wxAtol((const wxChar*) str) != 0); m_value = (wxAtol((const wxChar*) str) != 0);
return true; return TRUE;
} }
#endif // HAVE_BOOL #endif // HAVE_BOOL
@@ -673,14 +673,14 @@ bool wxVariantDataChar::Write(wxSTD ostream& str) const
wxString s; wxString s;
Write(s); Write(s);
str << (const char*) s.mb_str(); str << (const char*) s.mb_str();
return true; return TRUE;
} }
#endif #endif
bool wxVariantDataChar::Write(wxString& str) const bool wxVariantDataChar::Write(wxString& str) const
{ {
str.Printf(wxT("%c"), m_value); str.Printf(wxT("%c"), m_value);
return true; return TRUE;
} }
#if wxUSE_STD_IOSTREAM #if wxUSE_STD_IOSTREAM
@@ -688,7 +688,7 @@ bool wxVariantDataChar::Read(wxSTD istream& WXUNUSED(str))
{ {
wxFAIL_MSG(wxT("Unimplemented")); wxFAIL_MSG(wxT("Unimplemented"));
// str >> m_value; // str >> m_value;
return false; return FALSE;
} }
#endif #endif
@@ -698,7 +698,7 @@ bool wxVariantDataChar::Write(wxOutputStream& str) const
wxTextOutputStream s(str); wxTextOutputStream s(str);
s.Write8(m_value); s.Write8(m_value);
return true; return TRUE;
} }
bool wxVariantDataChar::Read(wxInputStream& str) bool wxVariantDataChar::Read(wxInputStream& str)
@@ -706,14 +706,14 @@ bool wxVariantDataChar::Read(wxInputStream& str)
wxTextInputStream s(str); wxTextInputStream s(str);
m_value = s.Read8(); m_value = s.Read8();
return true; return TRUE;
} }
#endif // wxUSE_STREAMS #endif // wxUSE_STREAMS
bool wxVariantDataChar::Read(wxString& str) bool wxVariantDataChar::Read(wxString& str)
{ {
m_value = str[(size_t)0]; m_value = str[(size_t)0];
return true; return TRUE;
} }
/* /*
@@ -781,21 +781,21 @@ bool wxVariantDataString::Eq(wxVariantData& data) const
bool wxVariantDataString::Write(wxSTD ostream& str) const bool wxVariantDataString::Write(wxSTD ostream& str) const
{ {
str << (const char*) m_value.mb_str(); str << (const char*) m_value.mb_str();
return true; return TRUE;
} }
#endif #endif
bool wxVariantDataString::Write(wxString& str) const bool wxVariantDataString::Write(wxString& str) const
{ {
str = m_value; str = m_value;
return true; return TRUE;
} }
#if wxUSE_STD_IOSTREAM #if wxUSE_STD_IOSTREAM
bool wxVariantDataString::Read(wxSTD istream& str) bool wxVariantDataString::Read(wxSTD istream& str)
{ {
str >> m_value; str >> m_value;
return true; return TRUE;
} }
#endif #endif
@@ -805,7 +805,7 @@ bool wxVariantDataString::Write(wxOutputStream& str) const
// why doesn't wxOutputStream::operator<< take "const wxString&" // why doesn't wxOutputStream::operator<< take "const wxString&"
wxTextOutputStream s(str); wxTextOutputStream s(str);
s.WriteString(m_value); s.WriteString(m_value);
return true; return TRUE;
} }
bool wxVariantDataString::Read(wxInputStream& str) bool wxVariantDataString::Read(wxInputStream& str)
@@ -813,14 +813,14 @@ bool wxVariantDataString::Read(wxInputStream& str)
wxTextInputStream s(str); wxTextInputStream s(str);
m_value = s.ReadString(); m_value = s.ReadString();
return true; return TRUE;
} }
#endif // wxUSE_STREAMS #endif // wxUSE_STREAMS
bool wxVariantDataString::Read(wxString& str) bool wxVariantDataString::Read(wxString& str)
{ {
m_value = str; m_value = str;
return true; return TRUE;
} }
#if defined(__BORLANDC__) && defined(__WIN16__) #if defined(__BORLANDC__) && defined(__WIN16__)
@@ -889,7 +889,7 @@ bool wxVariantDataTime::Write(wxSTD ostream& str) const
wxString s; wxString s;
Write(s); Write(s);
str << (const char*) s.mb_str(); str << (const char*) s.mb_str();
return true; return TRUE;
} }
#endif #endif
@@ -897,21 +897,21 @@ bool wxVariantDataTime::Write(wxString& str) const
{ {
wxChar*s = m_value.FormatTime(); wxChar*s = m_value.FormatTime();
str = s; str = s;
return true; return TRUE;
} }
#if wxUSE_STD_IOSTREAM #if wxUSE_STD_IOSTREAM
bool wxVariantDataTime::Read(wxSTD istream& WXUNUSED(str)) bool wxVariantDataTime::Read(wxSTD istream& WXUNUSED(str))
{ {
// Not implemented // Not implemented
return false; return FALSE;
} }
#endif #endif
bool wxVariantDataTime::Read(wxString& WXUNUSED(str)) bool wxVariantDataTime::Read(wxString& WXUNUSED(str))
{ {
// Not implemented // Not implemented
return false; return FALSE;
} }
/* /*
@@ -971,28 +971,28 @@ bool wxVariantDataDate::Write(wxSTD ostream& str) const
wxString s; wxString s;
Write(s); Write(s);
str << (const char*) s.mb_str(); str << (const char*) s.mb_str();
return true; return TRUE;
} }
#endif #endif
bool wxVariantDataDate::Write(wxString& str) const bool wxVariantDataDate::Write(wxString& str) const
{ {
str = m_value.FormatDate(); str = m_value.FormatDate();
return true; return TRUE;
} }
#if wxUSE_STD_IOSTREAM #if wxUSE_STD_IOSTREAM
bool wxVariantDataDate::Read(wxSTD istream& WXUNUSED(str)) bool wxVariantDataDate::Read(wxSTD istream& WXUNUSED(str))
{ {
// Not implemented // Not implemented
return false; return FALSE;
} }
#endif #endif
bool wxVariantDataDate::Read(wxString& WXUNUSED(str)) bool wxVariantDataDate::Read(wxString& WXUNUSED(str))
{ {
// Not implemented // Not implemented
return false; return FALSE;
} }
#endif #endif
// wxUSE_TIMEDATE // wxUSE_TIMEDATE
@@ -1056,28 +1056,28 @@ bool wxVariantDataVoidPtr::Write(wxSTD ostream& str) const
wxString s; wxString s;
Write(s); Write(s);
str << (const char*) s.mb_str(); str << (const char*) s.mb_str();
return true; return TRUE;
} }
#endif #endif
bool wxVariantDataVoidPtr::Write(wxString& str) const bool wxVariantDataVoidPtr::Write(wxString& str) const
{ {
str.Printf(wxT("%ld"), (long) m_value); str.Printf(wxT("%ld"), (long) m_value);
return true; return TRUE;
} }
#if wxUSE_STD_IOSTREAM #if wxUSE_STD_IOSTREAM
bool wxVariantDataVoidPtr::Read(wxSTD istream& WXUNUSED(str)) bool wxVariantDataVoidPtr::Read(wxSTD istream& WXUNUSED(str))
{ {
// Not implemented // Not implemented
return false; return FALSE;
} }
#endif #endif
bool wxVariantDataVoidPtr::Read(wxString& WXUNUSED(str)) bool wxVariantDataVoidPtr::Read(wxString& WXUNUSED(str))
{ {
// Not implemented // Not implemented
return false; return FALSE;
} }
/* /*
@@ -1148,7 +1148,7 @@ bool wxVariantDataDateTime::Eq(wxVariantData& data) const
bool wxVariantDataDateTime::Write(wxSTD ostream& str) const bool wxVariantDataDateTime::Write(wxSTD ostream& str) const
{ {
// Not implemented // Not implemented
return false; return FALSE;
} }
#endif #endif
@@ -1156,7 +1156,7 @@ bool wxVariantDataDateTime::Write(wxSTD ostream& str) const
bool wxVariantDataDateTime::Write(wxString& str) const bool wxVariantDataDateTime::Write(wxString& str) const
{ {
str = m_value.Format(); str = m_value.Format();
return true; return TRUE;
} }
@@ -1164,7 +1164,7 @@ bool wxVariantDataDateTime::Write(wxString& str) const
bool wxVariantDataDateTime::Read(wxSTD istream& WXUNUSED(str)) bool wxVariantDataDateTime::Read(wxSTD istream& WXUNUSED(str))
{ {
// Not implemented // Not implemented
return false; return FALSE;
} }
#endif #endif
@@ -1172,8 +1172,8 @@ bool wxVariantDataDateTime::Read(wxSTD istream& WXUNUSED(str))
bool wxVariantDataDateTime::Read(wxString& str) bool wxVariantDataDateTime::Read(wxString& str)
{ {
if(! m_value.ParseDateTime(str)) if(! m_value.ParseDateTime(str))
return false; return FALSE;
return true; return TRUE;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -1234,7 +1234,7 @@ bool wxVariantDataArrayString::Eq(wxVariantData& data) const
bool wxVariantDataArrayString::Write(wxSTD ostream& str) const bool wxVariantDataArrayString::Write(wxSTD ostream& str) const
{ {
// Not implemented // Not implemented
return false; return FALSE;
} }
#endif #endif
@@ -1250,7 +1250,7 @@ bool wxVariantDataArrayString::Write(wxString& str) const
str += m_value[n]; str += m_value[n];
} }
return true; return TRUE;
} }
@@ -1258,7 +1258,7 @@ bool wxVariantDataArrayString::Write(wxString& str) const
bool wxVariantDataArrayString::Read(wxSTD istream& WXUNUSED(str)) bool wxVariantDataArrayString::Read(wxSTD istream& WXUNUSED(str))
{ {
// Not implemented // Not implemented
return false; return FALSE;
} }
#endif #endif
@@ -1271,7 +1271,7 @@ bool wxVariantDataArrayString::Read(wxString& str)
m_value.Add(tk.GetNextToken()); m_value.Add(tk.GetNextToken());
} }
return true; return TRUE;
} }
@@ -1472,7 +1472,7 @@ bool wxVariant::operator== (double value) const
{ {
double thisValue; double thisValue;
if (!Convert(&thisValue)) if (!Convert(&thisValue))
return false; return FALSE;
else else
return (value == thisValue); return (value == thisValue);
} }
@@ -1500,7 +1500,7 @@ bool wxVariant::operator== (long value) const
{ {
long thisValue; long thisValue;
if (!Convert(&thisValue)) if (!Convert(&thisValue))
return false; return FALSE;
else else
return (value == thisValue); return (value == thisValue);
} }
@@ -1528,7 +1528,7 @@ bool wxVariant::operator== (char value) const
{ {
char thisValue; char thisValue;
if (!Convert(&thisValue)) if (!Convert(&thisValue))
return false; return FALSE;
else else
return (value == thisValue); return (value == thisValue);
} }
@@ -1557,7 +1557,7 @@ bool wxVariant::operator== (bool value) const
{ {
bool thisValue; bool thisValue;
if (!Convert(&thisValue)) if (!Convert(&thisValue))
return false; return FALSE;
else else
return (value == thisValue); return (value == thisValue);
} }
@@ -1586,7 +1586,7 @@ bool wxVariant::operator== (const wxString& value) const
{ {
wxString thisValue; wxString thisValue;
if (!Convert(&thisValue)) if (!Convert(&thisValue))
return false; return FALSE;
return value == thisValue; return value == thisValue;
} }
@@ -1684,7 +1684,7 @@ bool wxVariant::operator== (const wxTime& value) const
{ {
wxTime thisValue; wxTime thisValue;
if (!Convert(&thisValue)) if (!Convert(&thisValue))
return false; return FALSE;
return value == thisValue; return value == thisValue;
} }
@@ -1712,7 +1712,7 @@ bool wxVariant::operator== (const wxDate& value) const
{ {
wxDate thisValue; wxDate thisValue;
if (!Convert(&thisValue)) if (!Convert(&thisValue))
return false; return FALSE;
return (value == thisValue); return (value == thisValue);
} }
@@ -1765,7 +1765,7 @@ bool wxVariant::operator== (const wxDateTime& value) const
{ {
wxDateTime thisValue; wxDateTime thisValue;
if (!Convert(&thisValue)) if (!Convert(&thisValue))
return false; return FALSE;
return value.IsEqualTo(thisValue); return value.IsEqualTo(thisValue);
} }
@@ -1819,7 +1819,7 @@ bool wxVariant::operator==(const wxArrayString& WXUNUSED(value)) const
{ {
wxFAIL_MSG( _T("TODO") ); wxFAIL_MSG( _T("TODO") );
return false; return FALSE;
} }
bool wxVariant::operator!=(const wxArrayString& value) const bool wxVariant::operator!=(const wxArrayString& value) const
@@ -2078,7 +2078,7 @@ void wxVariant::Insert(const wxVariant& value)
list.Insert(new wxVariant(value)); list.Insert(new wxVariant(value));
} }
// Returns true if the variant is a member of the list // Returns TRUE if the variant is a member of the list
bool wxVariant::Member(const wxVariant& value) const bool wxVariant::Member(const wxVariant& value) const
{ {
wxList& list = GetList(); wxList& list = GetList();
@@ -2088,10 +2088,10 @@ bool wxVariant::Member(const wxVariant& value) const
{ {
wxVariant* other = (wxVariant*) node->GetData(); wxVariant* other = (wxVariant*) node->GetData();
if (value == *other) if (value == *other)
return true; return TRUE;
node = node->GetNext(); node = node->GetNext();
} }
return false; return FALSE;
} }
// Deletes the nth element of the list // Deletes the nth element of the list
@@ -2104,7 +2104,7 @@ bool wxVariant::Delete(int item)
wxVariant* variant = (wxVariant*) node->GetData(); wxVariant* variant = (wxVariant*) node->GetData();
delete variant; delete variant;
delete node; delete node;
return true; return TRUE;
} }
// Clear list // Clear list
@@ -2140,9 +2140,9 @@ bool wxVariant::Convert(long* value) const
else if (type == wxT("string")) else if (type == wxT("string"))
*value = wxAtol((const wxChar*) ((wxVariantDataString*)GetData())->GetValue()); *value = wxAtol((const wxChar*) ((wxVariantDataString*)GetData())->GetValue());
else else
return false; return FALSE;
return true; return TRUE;
} }
bool wxVariant::Convert(bool* value) const bool wxVariant::Convert(bool* value) const
@@ -2160,17 +2160,17 @@ bool wxVariant::Convert(bool* value) const
{ {
wxString val(((wxVariantDataString*)GetData())->GetValue()); wxString val(((wxVariantDataString*)GetData())->GetValue());
val.MakeLower(); val.MakeLower();
if (val == wxT("true") || val == wxT("yes")) if (val == wxT("TRUE") || val == wxT("yes"))
*value = true; *value = TRUE;
else if (val == wxT("false") || val == wxT("no")) else if (val == wxT("FALSE") || val == wxT("no"))
*value = false; *value = FALSE;
else else
return false; return FALSE;
} }
else else
return false; return FALSE;
return true; return TRUE;
} }
bool wxVariant::Convert(double* value) const bool wxVariant::Convert(double* value) const
@@ -2187,9 +2187,9 @@ bool wxVariant::Convert(double* value) const
else if (type == wxT("string")) else if (type == wxT("string"))
*value = (double) wxAtof((const wxChar*) ((wxVariantDataString*)GetData())->GetValue()); *value = (double) wxAtof((const wxChar*) ((wxVariantDataString*)GetData())->GetValue());
else else
return false; return FALSE;
return true; return TRUE;
} }
bool wxVariant::Convert(char* value) const bool wxVariant::Convert(char* value) const
@@ -2204,15 +2204,15 @@ bool wxVariant::Convert(char* value) const
*value = (char) (((wxVariantDataBool*)GetData())->GetValue()); *value = (char) (((wxVariantDataBool*)GetData())->GetValue());
#endif #endif
else else
return false; return FALSE;
return true; return TRUE;
} }
bool wxVariant::Convert(wxString* value) const bool wxVariant::Convert(wxString* value) const
{ {
*value = MakeString(); *value = MakeString();
return true; return TRUE;
} }
// For some reason, Watcom C++ can't link variant.cpp with time/date classes compiled // For some reason, Watcom C++ can't link variant.cpp with time/date classes compiled
@@ -2225,9 +2225,9 @@ bool wxVariant::Convert(wxTime* value) const
else if (type == wxT("date")) else if (type == wxT("date"))
*value = wxTime(((wxVariantDataDate*)GetData())->GetValue()); *value = wxTime(((wxVariantDataDate*)GetData())->GetValue());
else else
return false; return FALSE;
return true; return TRUE;
} }
bool wxVariant::Convert(wxDate* value) const bool wxVariant::Convert(wxDate* value) const
@@ -2236,9 +2236,9 @@ bool wxVariant::Convert(wxDate* value) const
if (type == wxT("date")) if (type == wxT("date"))
*value = ((wxVariantDataDate*)GetData())->GetValue(); *value = ((wxVariantDataDate*)GetData())->GetValue();
else else
return false; return FALSE;
return true; return TRUE;
} }
#endif // wxUSE_TIMEDATE #endif // wxUSE_TIMEDATE
@@ -2248,7 +2248,7 @@ bool wxVariant::Convert(wxDateTime* value) const
if (type == wxT("datetime")) if (type == wxT("datetime"))
{ {
*value = ((wxVariantDataDateTime*)GetData())->GetValue(); *value = ((wxVariantDataDateTime*)GetData())->GetValue();
return true; return TRUE;
} }
// Fallback to string conversion // Fallback to string conversion
wxString val; wxString val;