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