Applied patch #875647, fixes an unused variable warning reported by Borland; Some minor changes such as tab removal, TRUE/FALSE->true/false.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25138 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Dimitri Schoolwerth
2004-01-13 02:02:54 +00:00
parent 7fcf27da12
commit 03a90749df

View File

@@ -71,9 +71,9 @@ bool hvApp::OnInit()
wxString service, windowName, book[10], titleFormat, argStr; wxString service, windowName, book[10], titleFormat, argStr;
int bookCount = 0; int bookCount = 0;
int i; int i;
bool hasService = FALSE; bool hasService = false;
bool hasWindowName = FALSE; bool hasWindowName = false;
bool createServer = FALSE; bool createServer = false;
#if hvUSE_IPC #if hvUSE_IPC
m_server = NULL; m_server = NULL;
@@ -97,15 +97,16 @@ bool hvApp::OnInit()
{ {
argStr = argv[i]; argStr = argv[i];
if ( argStr.Find( wxT(".hhp") ) >= 0 || if ( argStr.Find( wxT(".hhp") ) >= 0
argStr.Find( wxT(".htb") ) >= 0 || || argStr.Find( wxT(".htb") ) >= 0
argStr.Find( wxT(".zip") ) >= 0 ) { || argStr.Find( wxT(".zip") ) >= 0 )
{
book[bookCount] = argStr; book[bookCount] = argStr;
bookCount++; bookCount++;
} }
else if ( argStr == wxT("--server") ) else if ( argStr == wxT("--server") )
{ {
createServer = TRUE; createServer = true;
#if defined(__WXMSW__) #if defined(__WXMSW__)
service = wxT("generic_helpservice"); service = wxT("generic_helpservice");
#elif defined(__UNIX__) #elif defined(__UNIX__)
@@ -117,13 +118,13 @@ bool hvApp::OnInit()
else if ( !hasService ) else if ( !hasService )
{ {
service = argStr; service = argStr;
hasService = TRUE; hasService = true;
createServer = TRUE; createServer = true;
} }
else if ( !hasWindowName ) else if ( !hasWindowName )
{ {
windowName = argStr; windowName = argStr;
hasWindowName = TRUE; hasWindowName = true;
} }
else if ( argStr.Find( wxT("--Style") ) >= 0 ) else if ( argStr.Find( wxT("--Style") ) >= 0 )
{ {
@@ -167,19 +168,21 @@ bool hvApp::OnInit()
#if hvUSE_IPC #if hvUSE_IPC
if ( createServer ) { if ( createServer )
{
// Create a new server // Create a new server
m_server = new hvServer; m_server = new hvServer;
if ( !m_server->Create(service) ) { if ( !m_server->Create(service) )
{
wxString wxm = wxT("Server Create failed - service: "); wxString wxm = wxT("Server Create failed - service: ");
wxString xxm = wxm << service; wxString xxm = wxm << service;
wxLogError( xxm ); wxLogError( xxm );
//if MSW quits here, probably another copy already exists //if MSW quits here, probably another copy already exists
return FALSE; return false;
} }
createServer = FALSE; createServer = false;
wxUnusedVar(createServer);
} }
#endif // hvUSE_IPC #endif // hvUSE_IPC
@@ -195,7 +198,9 @@ bool hvApp::OnInit()
m_helpController = new wxHtmlHelpController( istyle ); m_helpController = new wxHtmlHelpController( istyle );
if ( !hasWindowName ) if ( !hasWindowName )
{
titleFormat = wxT("Help: %s") ; titleFormat = wxT("Help: %s") ;
}
else else
{ {
//remove underscores //remove underscores
@@ -217,7 +222,7 @@ bool hvApp::OnInit()
m_helpController->DisplayContents(); m_helpController->DisplayContents();
return TRUE; return true;
} }
@@ -260,7 +265,7 @@ bool hvApp::OpenBook(wxHtmlHelpController* controller)
wxOPEN | wxFILE_MUST_EXIST, wxOPEN | wxFILE_MUST_EXIST,
NULL); NULL);
if (!s.IsEmpty()) if ( !s.empty() )
{ {
wxString ext = s.Right(4).Lower(); wxString ext = s.Right(4).Lower();
if (ext == _T(".zip") || ext == _T(".htb") || ext == _T(".hhp")) if (ext == _T(".zip") || ext == _T(".htb") || ext == _T(".hhp"))
@@ -268,10 +273,11 @@ bool hvApp::OpenBook(wxHtmlHelpController* controller)
wxBusyCursor bcur; wxBusyCursor bcur;
wxFileName fileName(s); wxFileName fileName(s);
controller->AddBook(fileName); controller->AddBook(fileName);
return TRUE; return true;
} }
} }
return FALSE;
return false;
} }
#ifdef __WXMAC__ #ifdef __WXMAC__
@@ -431,10 +437,12 @@ bool hvConnection::OnExecute(const wxString& WXUNUSED(topic),
long i; long i;
wxString argStr = data; wxString argStr = data;
wxString numb = argStr.AfterLast(wxT('g')); wxString numb = argStr.AfterLast(wxT('g'));
if ( !(numb.ToLong(&i) ) ) { if ( !(numb.ToLong(&i) ) )
{
wxLogError( wxT("Integer conversion failed for --intstring") ); wxLogError( wxT("Integer conversion failed for --intstring") );
} }
else { else
{
wxGetApp().GetHelpController()->Display(int(i)); wxGetApp().GetHelpController()->Display(int(i));
} }
} }
@@ -443,7 +451,7 @@ bool hvConnection::OnExecute(const wxString& WXUNUSED(topic),
wxGetApp().GetHelpController()->Display(data); wxGetApp().GetHelpController()->Display(data);
} }
return TRUE; return true;
} }
bool hvConnection::OnPoke(const wxString& WXUNUSED(topic), bool hvConnection::OnPoke(const wxString& WXUNUSED(topic),
@@ -495,7 +503,7 @@ bool hvConnection::OnPoke(const wxString& WXUNUSED(topic),
} }
} }
return TRUE; return true;
} }
wxChar *hvConnection::OnRequest(const wxString& WXUNUSED(topic), wxChar *hvConnection::OnRequest(const wxString& WXUNUSED(topic),
@@ -509,8 +517,7 @@ wxChar *hvConnection::OnRequest(const wxString& WXUNUSED(topic),
bool hvConnection::OnStartAdvise(const wxString& WXUNUSED(topic), bool hvConnection::OnStartAdvise(const wxString& WXUNUSED(topic),
const wxString& WXUNUSED(item)) const wxString& WXUNUSED(item))
{ {
return TRUE; return true;
} }
#endif #endif // #if hvUSE_IPC
// hvUSE_IPC