From b4d29b9c6d6905dba36ecdf86eb2afa9b4fe5460 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 3 Aug 2009 21:46:16 +0000 Subject: [PATCH] - minor code cleanup svn path=/trunk/boinc/; revision=18805 --- client/sysmon_win.cpp | 12 ++++++------ client/sysmon_win.h | 20 +++++++++----------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/client/sysmon_win.cpp b/client/sysmon_win.cpp index 233312f841..04799f1399 100644 --- a/client/sysmon_win.cpp +++ b/client/sysmon_win.cpp @@ -45,7 +45,7 @@ static DWORD g_WindowsMonitorSystemThreadID = NULL; // // Quit operations -void quit_client() { +static void quit_client() { gstate.requested_exit = true; while (1) { boinc_sleep(1.0); @@ -54,7 +54,7 @@ void quit_client() { } // Suspend client operations -void suspend_client(bool wait) { +static void suspend_client(bool wait) { gstate.requested_suspend = true; if (wait) { while (1) { @@ -65,12 +65,12 @@ void suspend_client(bool wait) { } // Resume client operations -void resume_client() { +static void resume_client() { gstate.requested_resume = true; } // Process console messages sent by the system -BOOL WINAPI ConsoleControlHandler( DWORD dwCtrlType ){ +static BOOL WINAPI ConsoleControlHandler( DWORD dwCtrlType ){ BOOL bReturnStatus = FALSE; BOINCTRACE("***** Console Event Detected *****\n"); switch( dwCtrlType ){ @@ -97,7 +97,7 @@ BOOL WINAPI ConsoleControlHandler( DWORD dwCtrlType ){ } // Trap events on Windows so we can clean ourselves up. -LRESULT CALLBACK WindowsMonitorSystemWndProc( +static LRESULT CALLBACK WindowsMonitorSystemWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) { switch(uMsg) { @@ -154,7 +154,7 @@ LRESULT CALLBACK WindowsMonitorSystemWndProc( } // Create a thread to monitor system events -DWORD WINAPI WindowsMonitorSystemThread( LPVOID ) { +static DWORD WINAPI WindowsMonitorSystemThread( LPVOID ) { HWND hwndMain; WNDCLASS wc; MSG msg; diff --git a/client/sysmon_win.h b/client/sysmon_win.h index 4fb82aabec..62f4fd8225 100644 --- a/client/sysmon_win.h +++ b/client/sysmon_win.h @@ -24,11 +24,9 @@ extern "C" { #endif -int initialize_system_monitor(int argc, char** argv); -int initialize_service_dispatcher(int argc, char** argv); - -int cleanup_system_monitor(); - +extern int initialize_system_monitor(int argc, char** argv); +extern int initialize_service_dispatcher(int argc, char** argv); +extern int cleanup_system_monitor(); // Internal name of the service #define SZSERVICENAME "BOINC" @@ -46,12 +44,12 @@ int cleanup_system_monitor(); SERVICE_ACCEPT_SHUTDOWN ) // Service Control Manager Routines -VOID WINAPI BOINCServiceMain(DWORD dwArgc, LPTSTR *lpszArgv); -VOID WINAPI BOINCServiceCtrl(DWORD dwCtrlCode); -BOOL ReportStatus(DWORD dwCurrentState, DWORD dwWin32ExitCode, DWORD dwWaitHint); -VOID LogEventErrorMessage(LPTSTR lpszMsg); -VOID LogEventWarningMessage(LPTSTR lpszMsg); -VOID LogEventInfoMessage(LPTSTR lpszMsg); +extern VOID WINAPI BOINCServiceMain(DWORD dwArgc, LPTSTR *lpszArgv); +extern VOID WINAPI BOINCServiceCtrl(DWORD dwCtrlCode); +extern BOOL ReportStatus(DWORD dwCurrentState, DWORD dwWin32ExitCode, DWORD dwWaitHint); +extern VOID LogEventErrorMessage(LPTSTR lpszMsg); +extern VOID LogEventWarningMessage(LPTSTR lpszMsg); +extern VOID LogEventInfoMessage(LPTSTR lpszMsg); #ifdef __cplusplus }