From dc259b792613550edda31cc6202b42e172e2a240 Mon Sep 17 00:00:00 2001 From: David Webster Date: Mon, 20 Jan 2003 21:22:43 +0000 Subject: [PATCH] TRUE not true, FALSE not false git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/log.h | 2 +- include/wx/sizer.h | 22 ++--- src/common/filefn.cpp | 112 +++++++++++------------ src/common/sizer.cpp | 46 +++++----- src/common/valtext.cpp | 48 +++++----- src/common/variant.cpp | 196 ++++++++++++++++++++--------------------- 6 files changed, 213 insertions(+), 213 deletions(-) diff --git a/include/wx/log.h b/include/wx/log.h index a08916b1cb..321b0c96f3 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -223,7 +223,7 @@ public: // this method exists for backwards compatibility only, don't use - bool HasPendingMessages() const { return true; } + bool HasPendingMessages() const { return TRUE; } protected: // the logging functions that can be overriden diff --git a/include/wx/sizer.h b/include/wx/sizer.h index 5d04854407..b46b5ec1b7 100644 --- a/include/wx/sizer.h +++ b/include/wx/sizer.h @@ -61,7 +61,7 @@ public: wxObject* userData ); ~wxSizerItem(); - + virtual void DeleteWindows(); // Enable deleting the SizerItem without destroying the contained sizer. @@ -141,8 +141,8 @@ protected: int m_border; int m_flag; - // If true, then this item is considered in the layout - // calculation. Otherwise, it is skipped over. + // If TRUE, then this item is considered in the layout + // calculation. Otherwise, it is skipped over. bool m_show; // Aspect ratio can always be calculated from m_size, @@ -239,7 +239,7 @@ public: virtual bool Detach( wxSizer *sizer ); virtual bool Detach( size_t index ); - virtual void Clear( bool delete_windows=false ); + virtual void Clear( bool delete_windows=FALSE ); virtual void DeleteWindows(); void SetMinSize( int width, int height ) @@ -289,21 +289,21 @@ public: // Manage whether individual scene items are considered // in the layout calculations or not. - void Show( wxWindow *window, bool show = true ); - void Show( wxSizer *sizer, bool show = true ); - void Show( size_t index, bool show = true ); + void Show( wxWindow *window, bool show = TRUE ); + void Show( wxSizer *sizer, bool show = TRUE ); + void Show( size_t index, bool show = TRUE ); void Hide( wxSizer *sizer ) - { Show( sizer, false ); } + { Show( sizer, FALSE ); } void Hide( wxWindow *window ) - { Show( window, false ); } + { Show( window, FALSE ); } void Hide( size_t index ) - { Show( index, false ); } + { Show( index, FALSE ); } bool IsShown( wxWindow *window ) const; bool IsShown( wxSizer *sizer ) const; bool IsShown( size_t index ) const; - + // Recursively call wxWindow::Show () on all sizer items. void ShowItems (bool show); diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 2d99f34d50..fe708cb0a4 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -272,9 +272,9 @@ bool wxPathList::Member (const wxString& path) path.CompareTo (path2) == 0 #endif ) - return true; + return TRUE; } - return false; + return FALSE; } wxString wxPathList::FindValidPath (const wxString& file) @@ -354,23 +354,23 @@ wxIsAbsolutePath (const wxString& filename) // "MacOS:MyText.txt" is absolute whereas "MyDir:MyText.txt" // is not. Or maybe ":MyDir:MyText.txt" has to be used? RR. if (filename.Find(':') != wxNOT_FOUND && filename[0] != ':') - return true ; + return TRUE ; #else // Unix like or Windows if (filename[0] == wxT('/')) - return true; + return TRUE; #endif #ifdef __VMS__ if ((filename[0] == wxT('[') && filename[1] != wxT('.'))) - return true; + return TRUE; #endif #ifdef __WINDOWS__ // MSDOS like if (filename[0] == wxT('\\') || (wxIsalpha (filename[0]) && filename[1] == wxT(':'))) - return true; + return TRUE; #endif } - return false ; + return FALSE ; } /* @@ -549,7 +549,7 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name) s = nm; d = lnm; #ifdef __WXMSW__ - q = false; + q = FALSE; #else q = nm[0] == wxT('\\') && nm[1] == wxT('~'); #endif @@ -865,7 +865,7 @@ wxString wxMacFSSpec2MacFilename( const FSSpec *spec ) int j; OSErr theErr; OSStatus theStatus; - Boolean isDirectory = false; + Boolean isDirectory = FALSE; Str255 theParentPath = "\p"; FSSpec theParentSpec; FSRef theParentRef; @@ -1088,7 +1088,7 @@ wxConcatFiles (const wxString& file1, const wxString& file2, const wxString& fil { wxString outfile; if ( !wxGetTempFileName( wxT("cat"), outfile) ) - return false; + return FALSE; FILE *fp1 = (FILE *) NULL; FILE *fp2 = (FILE *) NULL; @@ -1104,7 +1104,7 @@ wxConcatFiles (const wxString& file1, const wxString& file2, const wxString& fil fclose (fp2); if (fp3) fclose (fp3); - return false; + return FALSE; } int ch; @@ -1135,11 +1135,11 @@ wxCopyFile (const wxString& file1, const wxString& file2, bool overwrite) wxLogSysError(_("Failed to copy the file '%s' to '%s'"), file1.c_str(), file2.c_str()); - return false; + return FALSE; } #elif defined(__WXPM__) if ( ::DosCopy(file2, file2, overwrite ? DCPY_EXISTING : 0) != 0 ) - return false; + return FALSE; #else // !Win32 wxStructStat fbuf; @@ -1150,13 +1150,13 @@ wxCopyFile (const wxString& file1, const wxString& file2, bool overwrite) // from it anyhow wxLogSysError(_("Impossible to get permissions for file '%s'"), file1.c_str()); - return false; + return FALSE; } // open file1 for reading wxFile fileIn(file1, wxFile::read); if ( !fileIn.IsOpened() ) - return false; + return FALSE; // remove file2, if it exists. This is needed for creating // 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'"), file2.c_str()); - return false; + return FALSE; } #ifdef __UNIX__ @@ -1175,10 +1175,10 @@ wxCopyFile (const wxString& file1, const wxString& file2, bool overwrite) // create file2 with the same permissions than file1 and open it for // writing - + wxFile fileOut; if ( !fileOut.Create(file2, overwrite, fbuf.st_mode & 0777) ) - return false; + return FALSE; #ifdef __UNIX__ /// restore the old umask @@ -1192,21 +1192,21 @@ wxCopyFile (const wxString& file1, const wxString& file2, bool overwrite) { count = fileIn.Read(buf, WXSIZEOF(buf)); if ( fileIn.Error() ) - return false; + return FALSE; // end of file? if ( !count ) break; if ( fileOut.Write(buf, count) < count ) - return false; + return FALSE; } // 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 // detected before doing this if ( !fileIn.Close() || !fileOut.Close() ) - return false; + return FALSE; #if !defined(__VISAGECPP__) && !defined(__WXMAC__) || defined(__UNIX__) // 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'"), file2.c_str()); - return false; + return FALSE; } #endif // OS/2 || Mac #endif // __WXMSW__ && __WIN32__ - return true; + return TRUE; } bool @@ -1228,15 +1228,15 @@ wxRenameFile (const wxString& file1, const wxString& file2) { // Normal system call if ( wxRename (file1, file2) == 0 ) - return true; + return TRUE; // Try to copy if (wxCopyFile(file1, file2)) { wxRemoveFile(file1); - return true; + return TRUE; } // Give up - return false; + return FALSE; } bool wxRemoveFile(const wxString& file) @@ -1286,23 +1286,23 @@ bool wxMkdir(const wxString& dir, int perm) { wxLogSysError(_("Directory '%s' couldn't be created"), dirname); - return false; + return FALSE; } - return true; + return TRUE; #endif // Mac/!Mac } bool wxRmdir(const wxString& dir, int WXUNUSED(flags)) { #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__) return (::DosDeleteDir((PSZ)dir.c_str()) == 0); #else #ifdef __SALFORDC__ - return false; // What to do? + return FALSE; // What to do? #else return (wxRmDir(OS_FILENAME(dir)) == 0); #endif @@ -1438,17 +1438,17 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz) buf = new wxChar[sz + 1]; } - bool ok = false; + bool ok = FALSE; // for the compilers which have Unicode version of _getcwd(), call it // directly, for the others call the ANSI version and do the translation #if !wxUSE_UNICODE #define cbuf buf #else // wxUSE_UNICODE - bool needsANSI = true; + bool needsANSI = TRUE; #if !defined(HAVE_WGETCWD) || wxUSE_UNICODE_MSLU - // This is not legal code as the compiler + // This is not legal code as the compiler // is allowed destroy the wxCharBuffer. // wxCharBuffer c_buffer(sz); // char *cbuf = (char*)(const char*)c_buffer; @@ -1459,11 +1459,11 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz) #if wxUSE_UNICODE_MSLU if ( wxGetOsVersion() != wxWIN95 ) #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 { ok = _wgetcwd(buf, sz) != NULL; - needsANSI = false; + needsANSI = FALSE; } #endif @@ -1492,11 +1492,11 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz) strcpy( cbuf , res ) ; cbuf[res.length()]=0 ; - ok = true; + ok = TRUE; } else { - ok = false; + ok = FALSE; } #elif defined(__VISAGECPP__) || (defined (__OS2__) && defined (__WATCOMC__)) APIRET rc; @@ -1559,7 +1559,7 @@ wxString wxGetCwd() wxGetWorkingDirectory(buffer, _MAXPATHLEN); wxString str( buffer ); delete [] buffer; - + return str; } @@ -1620,11 +1620,11 @@ bool wxEndsWithPathSeparator(const wxChar *pszFileName) 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) { // we assume that it's not empty - wxCHECK_MSG( !wxIsEmpty(pszFile), false, + wxCHECK_MSG( !wxIsEmpty(pszFile), FALSE, _T("empty file name in wxFindFileInPath")); // 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; - 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, @@ -1677,7 +1677,7 @@ time_t WXDLLEXPORT wxFileModificationTime(const wxString& filename) { wxStructStat buf; wxStat( filename, &buf); - + return buf.st_mtime; } @@ -1690,18 +1690,18 @@ bool wxIsWild( const wxString& pattern ) { wxString tmp = pattern; wxChar *pat = WXSTRINGCAST(tmp); - while (*pat) + while (*pat) { - switch (*pat++) + switch (*pat++) { case wxT('?'): case wxT('*'): case wxT('['): case wxT('{'): - return true; + return TRUE; case wxT('\\'): if (!*pat++) - return false; + return FALSE; } } - return false; + return FALSE; } /* @@ -1717,7 +1717,7 @@ bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special ) /* Match if both are empty. */ return pat.empty(); } - + const wxChar *m = pat.c_str(), *n = text.c_str(), *ma = NULL, @@ -1731,9 +1731,9 @@ bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special ) if (dot_special && (*n == wxT('.'))) { - /* Never match so that hidden Unix files + /* Never match so that hidden Unix files * are never found. */ - return false; + return FALSE; } for (;;) @@ -1750,7 +1750,7 @@ bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special ) { m++; if (!*n++) - return false; + return FALSE; } else { @@ -1759,7 +1759,7 @@ bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special ) m++; /* Quoting "nothing" is a bad thing */ if (!*m) - return false; + return FALSE; } if (!*m) { @@ -1769,9 +1769,9 @@ bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special ) * match */ if (!*n) - return true; + return TRUE; if (just) - return true; + return TRUE; just = 0; goto not_matched; } @@ -1803,7 +1803,7 @@ bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special ) * impossible to match it */ if (!*n) - return false; + return FALSE; if (mp) { m = mp; @@ -1825,7 +1825,7 @@ bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special ) count = acount; } else - return false; + return FALSE; } } } diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index 44d9630a62..c83a90caa1 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -56,7 +56,7 @@ wxSizerItem::wxSizerItem( int width, int height, int proportion, int flag, int b , m_proportion( proportion ) , m_border( border ) , m_flag( flag ) - , m_show( true ) + , m_show( TRUE ) , m_userData( userData ) { SetRatio( m_size ); @@ -69,7 +69,7 @@ wxSizerItem::wxSizerItem( wxWindow *window, int proportion, int flag, int border , m_proportion( proportion ) , m_border( border ) , m_flag( flag ) - , m_show( true ) + , m_show( TRUE ) , m_userData( userData ) { // aspect ratio calculated from initial size @@ -84,7 +84,7 @@ wxSizerItem::wxSizerItem( wxSizer *sizer, int proportion, int flag, int border, , m_proportion( proportion ) , m_border( border ) , m_flag( flag ) - , m_show( true ) + , m_show( TRUE ) , m_ratio( 0.0 ) , m_userData( userData ) { @@ -277,7 +277,7 @@ int wxSizerItem::GetOption() const wxSizer::wxSizer() : m_minSize( wxSize( 0, 0 ) ) { - m_children.DeleteContents( true ); + m_children.DeleteContents( TRUE ); } wxSizer::~wxSizer() @@ -396,18 +396,18 @@ bool wxSizer::Remove( wxSizer *sizer ) node = node->GetNext(); } - return false; + return FALSE; } bool wxSizer::Remove( size_t index ) { wxCHECK_MSG( index < m_children.GetCount(), - false, + FALSE, _T("Remove index is out of range") ); 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(); @@ -434,7 +434,7 @@ bool wxSizer::Detach( wxSizer *sizer ) node = node->GetNext(); } - return false; + return FALSE; } bool wxSizer::Detach( wxWindow *window ) @@ -454,18 +454,18 @@ bool wxSizer::Detach( wxWindow *window ) node = node->GetNext(); } - return false; + return FALSE; } bool wxSizer::Detach( size_t index ) { wxCHECK_MSG( index < m_children.GetCount(), - false, + FALSE, _T("Detach index is out of range") ); 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(); @@ -670,7 +670,7 @@ bool wxSizer::DoSetItemMinSize( wxWindow *window, int width, int height ) if (item->GetWindow() == window) { item->SetInitSize( width, height ); - return true; + return TRUE; } node = node->GetNext(); } @@ -686,12 +686,12 @@ bool wxSizer::DoSetItemMinSize( wxWindow *window, int width, int height ) item->GetSizer()->DoSetItemMinSize( window, width, height ) ) { // A child sizer found the requested windw, exit. - return true; + return TRUE; } node = node->GetNext(); } - return false; + return FALSE; } 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) { item->GetSizer()->DoSetMinSize( width, height ); - return true; + return TRUE; } node = node->GetNext(); } @@ -724,19 +724,19 @@ bool wxSizer::DoSetItemMinSize( wxSizer *sizer, int width, int height ) item->GetSizer()->DoSetItemMinSize( sizer, width, height ) ) { // A child found the requested sizer, exit. - return true; + return TRUE; } node = node->GetNext(); } - return false; + return FALSE; } bool wxSizer::DoSetItemMinSize( size_t index, int width, int height ) { 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(); @@ -751,7 +751,7 @@ bool wxSizer::DoSetItemMinSize( size_t index, int width, int height ) item->SetInitSize( width, height ); } - return true; + return TRUE; } void wxSizer::Show( wxWindow *window, bool show ) @@ -814,7 +814,7 @@ bool wxSizer::IsShown( wxWindow *window ) const while (node) { wxSizerItem *item = node->GetData(); - + if (item->GetWindow() == window) { return item->IsShown(); @@ -824,7 +824,7 @@ bool wxSizer::IsShown( wxWindow *window ) const wxFAIL_MSG( _T("IsShown failed to find sizer item") ); - return false; + return FALSE; } 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") ); - return false; + return FALSE; } bool wxSizer::IsShown( size_t index ) const { wxCHECK_MSG( index < m_children.GetCount(), - false, + FALSE, _T("IsShown index is out of range") ); return m_children.Item( index )->GetData()->IsShown(); diff --git a/src/common/valtext.cpp b/src/common/valtext.cpp index 687e677852..2f943f906f 100644 --- a/src/common/valtext.cpp +++ b/src/common/valtext.cpp @@ -87,7 +87,7 @@ bool wxTextValidator::Copy(const wxTextValidator& val) m_excludeList.Add(s); node = node->GetNext(); } - return true; + return TRUE; } wxTextValidator::~wxTextValidator() @@ -100,9 +100,9 @@ static bool wxIsAlpha(const wxString& val) for ( i = 0; i < (int)val.Length(); i++) { if (!wxIsalpha(val[i])) - return false; + return FALSE; } - return true; + return TRUE; } static bool wxIsAlphaNumeric(const wxString& val) @@ -111,9 +111,9 @@ static bool wxIsAlphaNumeric(const wxString& val) for ( i = 0; i < (int)val.Length(); i++) { if (!wxIsalnum(val[i])) - return false; + return FALSE; } - return true; + return TRUE; } // 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) { if( !CheckValidator() ) - return false; + return FALSE; wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ; // If window is disabled, simply return if ( !control->IsEnabled() ) - return true; + return TRUE; wxString val(control->GetValue()); - bool ok = true; + bool ok = TRUE; // NB: this format string should contian exactly one '%s' wxString errormsg; @@ -149,25 +149,25 @@ bool wxTextValidator::Validate(wxWindow *parent) } else if ( (m_validatorStyle & wxFILTER_ASCII) && !val.IsAscii() ) { - ok = false; + ok = FALSE; errormsg = _("'%s' should only contain ASCII characters."); } else if ( (m_validatorStyle & wxFILTER_ALPHA) && !wxIsAlpha(val) ) { - ok = false; + ok = FALSE; errormsg = _("'%s' should only contain alphabetic characters."); } else if ( (m_validatorStyle & wxFILTER_ALPHANUMERIC) && !wxIsAlphaNumeric(val)) { - ok = false; + ok = FALSE; errormsg = _("'%s' should only contain alphabetic or numeric characters."); } else if ( (m_validatorStyle & wxFILTER_NUMERIC) && !wxIsNumeric(val)) { - ok = false; + ok = FALSE; 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 errormsg = _("'%s' is invalid"); - ok = false; + ok = FALSE; } else if ( (m_validatorStyle & wxFILTER_EXCLUDE_CHAR_LIST) && !IsNotInCharExcludeList(val)) { // it's only ok to have non-members of the list errormsg = _("'%s' is invalid"); - ok = false; + ok = FALSE; } if ( !ok ) @@ -204,24 +204,24 @@ bool wxTextValidator::Validate(wxWindow *parent) bool wxTextValidator::TransferToWindow(void) { if( !CheckValidator() ) - return false; + return FALSE; wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ; control->SetValue(* m_stringValue) ; - return true; + return TRUE; } // Called to transfer data to the window bool wxTextValidator::TransferFromWindow(void) { if( !CheckValidator() ) - return false; + return FALSE; wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ; * m_stringValue = control->GetValue() ; - return true; + return TRUE; } void wxTextValidator::SetIncludeList(const wxStringList& list) @@ -305,9 +305,9 @@ static bool wxIsNumeric(const wxString& val) // use wxSystemSettings or other to do better localisation if ((!isdigit(val[i])) && (val[i] != '.') && (val[i] != ',')) if(!((i == 0) && (val[i] == '-'))) - return false; + return FALSE; } - return true; + return TRUE; } bool wxTextValidator::IsInCharIncludeList(const wxString& val) @@ -316,9 +316,9 @@ bool wxTextValidator::IsInCharIncludeList(const wxString& val) for ( i = 0; i < val.Length(); i++) { if (!m_includeList.Member((wxString) val[i])) - return false; + return FALSE; } - return true; + return TRUE; } bool wxTextValidator::IsNotInCharExcludeList(const wxString& val) @@ -327,9 +327,9 @@ bool wxTextValidator::IsNotInCharExcludeList(const wxString& val) for ( i = 0; i < val.Length(); i++) { if (m_excludeList.Member((wxString) val[i])) - return false; + return FALSE; } - return true; + return TRUE; } #endif diff --git a/src/common/variant.cpp b/src/common/variant.cpp index c38fef7a8d..52a4e270d5 100644 --- a/src/common/variant.cpp +++ b/src/common/variant.cpp @@ -150,12 +150,12 @@ bool wxVariantDataList::Eq(wxVariantData& data) const wxVariant* var1 = (wxVariant*) node1->GetData(); wxVariant* var2 = (wxVariant*) node2->GetData(); if ((*var1) != (*var2)) - return false; + return FALSE; node1 = node1->GetNext(); node2 = node2->GetNext(); } - if (node1 || node2) return false; - return true; + if (node1 || node2) return FALSE; + return TRUE; } #if wxUSE_STD_IOSTREAM @@ -164,7 +164,7 @@ bool wxVariantDataList::Write(wxSTD ostream& str) const wxString s; Write(s); str << (const char*) s.mb_str(); - return true; + return TRUE; } #endif @@ -182,7 +182,7 @@ bool wxVariantDataList::Write(wxString& str) const node = node->GetNext(); } - return true; + return TRUE; } #if wxUSE_STD_IOSTREAM @@ -190,7 +190,7 @@ bool wxVariantDataList::Read(wxSTD istream& WXUNUSED(str)) { wxFAIL_MSG(wxT("Unimplemented")); // TODO - return false; + return FALSE; } #endif @@ -198,7 +198,7 @@ bool wxVariantDataList::Read(wxString& WXUNUSED(str)) { wxFAIL_MSG(wxT("Unimplemented")); // TODO - return false; + return FALSE; } /* @@ -259,12 +259,12 @@ bool wxVariantDataStringList::Eq(wxVariantData& data) const wxString str1 ( node1->GetData() ); wxString str2 ( node2->GetData() ); if (str1 != str2) - return false; + return FALSE; node1 = node1->GetNext(); node2 = node2->GetNext(); } - if (node1 || node2) return false; - return true; + if (node1 || node2) return FALSE; + return TRUE; } #if wxUSE_STD_IOSTREAM @@ -273,7 +273,7 @@ bool wxVariantDataStringList::Write(wxSTD ostream& str) const wxString s; Write(s); str << (const char*) s.mb_str(); - return true; + return TRUE; } #endif @@ -290,7 +290,7 @@ bool wxVariantDataStringList::Write(wxString& str) const node = node->GetNext(); } - return true; + return TRUE; } #if wxUSE_STD_IOSTREAM @@ -298,7 +298,7 @@ bool wxVariantDataStringList::Read(wxSTD istream& WXUNUSED(str)) { wxFAIL_MSG(wxT("Unimplemented")); // TODO - return false; + return FALSE; } #endif @@ -306,7 +306,7 @@ bool wxVariantDataStringList::Read(wxString& WXUNUSED(str)) { wxFAIL_MSG(wxT("Unimplemented")); // TODO - return false; + return FALSE; } /* @@ -369,21 +369,21 @@ bool wxVariantDataLong::Write(wxSTD ostream& str) const wxString s; Write(s); str << (const char*) s.mb_str(); - return true; + return TRUE; } #endif bool wxVariantDataLong::Write(wxString& str) const { str.Printf(wxT("%ld"), m_value); - return true; + return TRUE; } #if wxUSE_STD_IOSTREAM bool wxVariantDataLong::Read(wxSTD istream& str) { str >> m_value; - return true; + return TRUE; } #endif @@ -393,21 +393,21 @@ bool wxVariantDataLong::Write(wxOutputStream& str) const wxTextOutputStream s(str); s.Write32((size_t)m_value); - return true; + return TRUE; } bool wxVariantDataLong::Read(wxInputStream& str) { wxTextInputStream s(str); m_value = s.Read32(); - return true; + return TRUE; } #endif // wxUSE_STREAMS bool wxVariantDataLong::Read(wxString& str) { m_value = wxAtol((const wxChar*) str); - return true; + return TRUE; } /* @@ -470,21 +470,21 @@ bool wxVariantDataReal::Write(wxSTD ostream& str) const wxString s; Write(s); str << (const char*) s.mb_str(); - return true; + return TRUE; } #endif bool wxVariantDataReal::Write(wxString& str) const { str.Printf(wxT("%.4f"), m_value); - return true; + return TRUE; } #if wxUSE_STD_IOSTREAM bool wxVariantDataReal::Read(wxSTD istream& str) { str >> m_value; - return true; + return TRUE; } #endif @@ -493,21 +493,21 @@ bool wxVariantDataReal::Write(wxOutputStream& str) const { wxTextOutputStream s(str); s.WriteDouble((double)m_value); - return true; + return TRUE; } bool wxVariantDataReal::Read(wxInputStream& str) { wxTextInputStream s(str); m_value = (float)s.ReadDouble(); - return true; + return TRUE; } #endif // wxUSE_STREAMS bool wxVariantDataReal::Read(wxString& str) { m_value = wxAtof((const wxChar*) str); - return true; + return TRUE; } #ifdef HAVE_BOOL @@ -571,14 +571,14 @@ bool wxVariantDataBool::Write(wxSTD ostream& str) const wxString s; Write(s); str << (const char*) s.mb_str(); - return true; + return TRUE; } #endif bool wxVariantDataBool::Write(wxString& str) const { str.Printf(wxT("%d"), (int) m_value); - return true; + return TRUE; } #if wxUSE_STD_IOSTREAM @@ -586,7 +586,7 @@ bool wxVariantDataBool::Read(wxSTD istream& WXUNUSED(str)) { wxFAIL_MSG(wxT("Unimplemented")); // str >> (long) m_value; - return false; + return FALSE; } #endif @@ -596,7 +596,7 @@ bool wxVariantDataBool::Write(wxOutputStream& str) const wxTextOutputStream s(str); s.Write8(m_value); - return true; + return TRUE; } bool wxVariantDataBool::Read(wxInputStream& str) @@ -604,14 +604,14 @@ bool wxVariantDataBool::Read(wxInputStream& str) wxTextInputStream s(str); m_value = s.Read8() != 0; - return true; + return TRUE; } #endif // wxUSE_STREAMS bool wxVariantDataBool::Read(wxString& str) { m_value = (wxAtol((const wxChar*) str) != 0); - return true; + return TRUE; } #endif // HAVE_BOOL @@ -673,14 +673,14 @@ bool wxVariantDataChar::Write(wxSTD ostream& str) const wxString s; Write(s); str << (const char*) s.mb_str(); - return true; + return TRUE; } #endif bool wxVariantDataChar::Write(wxString& str) const { str.Printf(wxT("%c"), m_value); - return true; + return TRUE; } #if wxUSE_STD_IOSTREAM @@ -688,7 +688,7 @@ bool wxVariantDataChar::Read(wxSTD istream& WXUNUSED(str)) { wxFAIL_MSG(wxT("Unimplemented")); // str >> m_value; - return false; + return FALSE; } #endif @@ -698,7 +698,7 @@ bool wxVariantDataChar::Write(wxOutputStream& str) const wxTextOutputStream s(str); s.Write8(m_value); - return true; + return TRUE; } bool wxVariantDataChar::Read(wxInputStream& str) @@ -706,14 +706,14 @@ bool wxVariantDataChar::Read(wxInputStream& str) wxTextInputStream s(str); m_value = s.Read8(); - return true; + return TRUE; } #endif // wxUSE_STREAMS bool wxVariantDataChar::Read(wxString& str) { 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 { str << (const char*) m_value.mb_str(); - return true; + return TRUE; } #endif bool wxVariantDataString::Write(wxString& str) const { str = m_value; - return true; + return TRUE; } #if wxUSE_STD_IOSTREAM bool wxVariantDataString::Read(wxSTD istream& str) { str >> m_value; - return true; + return TRUE; } #endif @@ -805,7 +805,7 @@ bool wxVariantDataString::Write(wxOutputStream& str) const // why doesn't wxOutputStream::operator<< take "const wxString&" wxTextOutputStream s(str); s.WriteString(m_value); - return true; + return TRUE; } bool wxVariantDataString::Read(wxInputStream& str) @@ -813,14 +813,14 @@ bool wxVariantDataString::Read(wxInputStream& str) wxTextInputStream s(str); m_value = s.ReadString(); - return true; + return TRUE; } #endif // wxUSE_STREAMS bool wxVariantDataString::Read(wxString& str) { m_value = str; - return true; + return TRUE; } #if defined(__BORLANDC__) && defined(__WIN16__) @@ -889,7 +889,7 @@ bool wxVariantDataTime::Write(wxSTD ostream& str) const wxString s; Write(s); str << (const char*) s.mb_str(); - return true; + return TRUE; } #endif @@ -897,21 +897,21 @@ bool wxVariantDataTime::Write(wxString& str) const { wxChar*s = m_value.FormatTime(); str = s; - return true; + return TRUE; } #if wxUSE_STD_IOSTREAM bool wxVariantDataTime::Read(wxSTD istream& WXUNUSED(str)) { // Not implemented - return false; + return FALSE; } #endif bool wxVariantDataTime::Read(wxString& WXUNUSED(str)) { // Not implemented - return false; + return FALSE; } /* @@ -971,28 +971,28 @@ bool wxVariantDataDate::Write(wxSTD ostream& str) const wxString s; Write(s); str << (const char*) s.mb_str(); - return true; + return TRUE; } #endif bool wxVariantDataDate::Write(wxString& str) const { str = m_value.FormatDate(); - return true; + return TRUE; } #if wxUSE_STD_IOSTREAM bool wxVariantDataDate::Read(wxSTD istream& WXUNUSED(str)) { // Not implemented - return false; + return FALSE; } #endif bool wxVariantDataDate::Read(wxString& WXUNUSED(str)) { // Not implemented - return false; + return FALSE; } #endif // wxUSE_TIMEDATE @@ -1056,28 +1056,28 @@ bool wxVariantDataVoidPtr::Write(wxSTD ostream& str) const wxString s; Write(s); str << (const char*) s.mb_str(); - return true; + return TRUE; } #endif bool wxVariantDataVoidPtr::Write(wxString& str) const { str.Printf(wxT("%ld"), (long) m_value); - return true; + return TRUE; } #if wxUSE_STD_IOSTREAM bool wxVariantDataVoidPtr::Read(wxSTD istream& WXUNUSED(str)) { // Not implemented - return false; + return FALSE; } #endif bool wxVariantDataVoidPtr::Read(wxString& WXUNUSED(str)) { // Not implemented - return false; + return FALSE; } /* @@ -1148,7 +1148,7 @@ bool wxVariantDataDateTime::Eq(wxVariantData& data) const bool wxVariantDataDateTime::Write(wxSTD ostream& str) const { // Not implemented - return false; + return FALSE; } #endif @@ -1156,7 +1156,7 @@ bool wxVariantDataDateTime::Write(wxSTD ostream& str) const bool wxVariantDataDateTime::Write(wxString& str) const { 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)) { // Not implemented - return false; + return FALSE; } #endif @@ -1172,8 +1172,8 @@ bool wxVariantDataDateTime::Read(wxSTD istream& WXUNUSED(str)) bool wxVariantDataDateTime::Read(wxString& str) { if(! m_value.ParseDateTime(str)) - return false; - return true; + return FALSE; + return TRUE; } // ---------------------------------------------------------------------------- @@ -1234,7 +1234,7 @@ bool wxVariantDataArrayString::Eq(wxVariantData& data) const bool wxVariantDataArrayString::Write(wxSTD ostream& str) const { // Not implemented - return false; + return FALSE; } #endif @@ -1250,7 +1250,7 @@ bool wxVariantDataArrayString::Write(wxString& str) const 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)) { // Not implemented - return false; + return FALSE; } #endif @@ -1271,7 +1271,7 @@ bool wxVariantDataArrayString::Read(wxString& str) m_value.Add(tk.GetNextToken()); } - return true; + return TRUE; } @@ -1472,7 +1472,7 @@ bool wxVariant::operator== (double value) const { double thisValue; if (!Convert(&thisValue)) - return false; + return FALSE; else return (value == thisValue); } @@ -1500,7 +1500,7 @@ bool wxVariant::operator== (long value) const { long thisValue; if (!Convert(&thisValue)) - return false; + return FALSE; else return (value == thisValue); } @@ -1528,7 +1528,7 @@ bool wxVariant::operator== (char value) const { char thisValue; if (!Convert(&thisValue)) - return false; + return FALSE; else return (value == thisValue); } @@ -1557,7 +1557,7 @@ bool wxVariant::operator== (bool value) const { bool thisValue; if (!Convert(&thisValue)) - return false; + return FALSE; else return (value == thisValue); } @@ -1586,7 +1586,7 @@ bool wxVariant::operator== (const wxString& value) const { wxString thisValue; if (!Convert(&thisValue)) - return false; + return FALSE; return value == thisValue; } @@ -1684,7 +1684,7 @@ bool wxVariant::operator== (const wxTime& value) const { wxTime thisValue; if (!Convert(&thisValue)) - return false; + return FALSE; return value == thisValue; } @@ -1712,7 +1712,7 @@ bool wxVariant::operator== (const wxDate& value) const { wxDate thisValue; if (!Convert(&thisValue)) - return false; + return FALSE; return (value == thisValue); } @@ -1765,7 +1765,7 @@ bool wxVariant::operator== (const wxDateTime& value) const { wxDateTime thisValue; if (!Convert(&thisValue)) - return false; + return FALSE; return value.IsEqualTo(thisValue); } @@ -1819,7 +1819,7 @@ bool wxVariant::operator==(const wxArrayString& WXUNUSED(value)) const { wxFAIL_MSG( _T("TODO") ); - return false; + return FALSE; } bool wxVariant::operator!=(const wxArrayString& value) const @@ -2078,7 +2078,7 @@ void wxVariant::Insert(const 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 { wxList& list = GetList(); @@ -2088,10 +2088,10 @@ bool wxVariant::Member(const wxVariant& value) const { wxVariant* other = (wxVariant*) node->GetData(); if (value == *other) - return true; + return TRUE; node = node->GetNext(); } - return false; + return FALSE; } // Deletes the nth element of the list @@ -2104,7 +2104,7 @@ bool wxVariant::Delete(int item) wxVariant* variant = (wxVariant*) node->GetData(); delete variant; delete node; - return true; + return TRUE; } // Clear list @@ -2140,9 +2140,9 @@ bool wxVariant::Convert(long* value) const else if (type == wxT("string")) *value = wxAtol((const wxChar*) ((wxVariantDataString*)GetData())->GetValue()); else - return false; + return FALSE; - return true; + return TRUE; } bool wxVariant::Convert(bool* value) const @@ -2160,17 +2160,17 @@ bool wxVariant::Convert(bool* value) const { wxString val(((wxVariantDataString*)GetData())->GetValue()); val.MakeLower(); - if (val == wxT("true") || val == wxT("yes")) - *value = true; - else if (val == wxT("false") || val == wxT("no")) - *value = false; + if (val == wxT("TRUE") || val == wxT("yes")) + *value = TRUE; + else if (val == wxT("FALSE") || val == wxT("no")) + *value = FALSE; else - return false; + return FALSE; } else - return false; + return FALSE; - return true; + return TRUE; } bool wxVariant::Convert(double* value) const @@ -2187,9 +2187,9 @@ bool wxVariant::Convert(double* value) const else if (type == wxT("string")) *value = (double) wxAtof((const wxChar*) ((wxVariantDataString*)GetData())->GetValue()); else - return false; + return FALSE; - return true; + return TRUE; } bool wxVariant::Convert(char* value) const @@ -2204,15 +2204,15 @@ bool wxVariant::Convert(char* value) const *value = (char) (((wxVariantDataBool*)GetData())->GetValue()); #endif else - return false; + return FALSE; - return true; + return TRUE; } bool wxVariant::Convert(wxString* value) const { *value = MakeString(); - return true; + return TRUE; } // 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")) *value = wxTime(((wxVariantDataDate*)GetData())->GetValue()); else - return false; + return FALSE; - return true; + return TRUE; } bool wxVariant::Convert(wxDate* value) const @@ -2236,9 +2236,9 @@ bool wxVariant::Convert(wxDate* value) const if (type == wxT("date")) *value = ((wxVariantDataDate*)GetData())->GetValue(); else - return false; + return FALSE; - return true; + return TRUE; } #endif // wxUSE_TIMEDATE @@ -2248,8 +2248,8 @@ bool wxVariant::Convert(wxDateTime* value) const if (type == wxT("datetime")) { *value = ((wxVariantDataDateTime*)GetData())->GetValue(); - return true; - } + return TRUE; + } // Fallback to string conversion wxString val; return Convert(&val) && (value->ParseDate(val)); -- 2.47.2