diff --git a/Makefile.am b/Makefile.am
index 7e250c8912..4d9d598a9b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,10 +8,10 @@ SUBDIRS = RSAEuro db lib api apps client sched tools test py zip unzip
# dist-hook below gets rid of CVS directories.
EXTRA_DIST = \
- mac_build win_build \
+ win_build \
doc \
stripchart \
- INSTALL
+ INSTALL
py:
[ "$(srcdir)" != . ] && rm -f $@ && $(LN_S) $(srcdir)/$@ $@
diff --git a/Makefile.in b/Makefile.in
index 2529c92df5..448231cfe4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -151,10 +151,10 @@ SUBDIRS = RSAEuro db lib api apps client sched tools test py zip unzip
# Putting a directory name recursively copies the entire contents - the
# dist-hook below gets rid of CVS directories.
EXTRA_DIST = \
- mac_build win_build \
+ win_build \
doc \
stripchart \
- INSTALL
+ INSTALL
UNIX2DOS = unix2dos
diff --git a/aclocal.m4 b/aclocal.m4
index d816c1c4c9..47d24afb71 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1104,8 +1104,8 @@ AC_DEFUN([SAH_HEADER_STDCXX],[
#
# Revision Log:
# $Log$
-# Revision 1.86 2004/05/05 01:30:22 rwalton
-# boinc_core_release_3_03
+# Revision 1.87 2004/05/05 18:41:20 davea
+# *** empty log message ***
#
# Revision 1.1 2003/12/11 18:38:24 korpela
# Added checked macro files into boinc
diff --git a/client/main.C b/client/main.C
index e24c4fdeec..1e00550d7f 100644
--- a/client/main.C
+++ b/client/main.C
@@ -46,6 +46,7 @@
#include "prefs.h"
#include "util.h"
#include "client_msgs.h"
+#include "main.h"
// dummies
void create_curtain(){}
@@ -156,16 +157,30 @@ int add_new_project() {
}
#ifdef WIN32
+void quit_client() {
+ msg_printf(NULL, MSG_INFO, "Exiting - user request");
+ gstate.quit_activities();
+ gstate.requested_exit = true;
+}
+
+void suspend_client() {
+ msg_printf(NULL, MSG_INFO, "Suspending activity - user request");
+ gstate.active_tasks.suspend_all();
+}
+
+void resume_client() {
+ msg_printf(NULL, MSG_INFO, "Resuming activity - user request");
+ gstate.active_tasks.unsuspend_all();
+}
+
BOOL WINAPI ConsoleControlHandler ( DWORD dwCtrlType ){
BOOL bReturnStatus = FALSE;
switch( dwCtrlType ){
case CTRL_C_EVENT:
if(gstate.activities_suspended) {
- gstate.active_tasks.unsuspend_all();
- msg_printf(NULL, MSG_INFO, "Resuming activity");
+ resume_client();
} else {
- msg_printf(NULL, MSG_INFO, "Suspending activity - user request");
- gstate.active_tasks.suspend_all();
+ suspend_client();
}
bReturnStatus = TRUE;
break;
@@ -173,9 +188,7 @@ BOOL WINAPI ConsoleControlHandler ( DWORD dwCtrlType ){
case CTRL_CLOSE_EVENT:
case CTRL_LOGOFF_EVENT:
case CTRL_SHUTDOWN_EVENT:
- msg_printf(NULL, MSG_INFO, "Exiting - user request");
- gstate.quit_activities();
- gstate.requested_exit = true;
+ quit_client();
bReturnStatus = TRUE;
break;
}
diff --git a/client/main.h b/client/main.h
new file mode 100644
index 0000000000..edac0f98b4
--- /dev/null
+++ b/client/main.h
@@ -0,0 +1,6 @@
+#ifdef _WIN32
+extern int boinc_main_loop(int argc, char** argv);
+extern void quit_client();
+extern void susp_client();
+extern void resume_client();
+#endif
diff --git a/client/win/win_service.cpp b/client/win/win_service.cpp
index 427a9f873d..cf17785682 100644
--- a/client/win/win_service.cpp
+++ b/client/win/win_service.cpp
@@ -23,8 +23,9 @@
#include "stdafx.h"
#include "diagnostics.h"
-#include "win_service.h"
#include "util.h"
+#include "main.h"
+#include "win_service.h"
// internal variables
@@ -34,13 +35,6 @@ DWORD dwErr = 0;
TCHAR szErr[1024];
-// define the execution engine start point
-extern int boinc_main_loop(int argc, char** argv);
-extern void quit_client(int a);
-extern void susp_client(int a);
-extern void resume_client(int a);
-
-
// Define API's that are going to be used through LoadLibrary calls.
typedef WINADVAPI BOOL (WINAPI *PROCCHANGESERVICECONFIG2)(SC_HANDLE, DWORD, LPCVOID);
@@ -142,7 +136,7 @@ VOID WINAPI service_ctrl(DWORD dwCtrlCode)
case SERVICE_CONTROL_STOP:
case SERVICE_CONTROL_SHUTDOWN:
ReportStatus(SERVICE_STOP_PENDING, ERROR_SUCCESS, 10000);
- quit_client(NULL);
+ quit_client();
ReportStatus(SERVICE_STOPPED, ERROR_SUCCESS, 10000);
return;
@@ -150,7 +144,7 @@ VOID WINAPI service_ctrl(DWORD dwCtrlCode)
//
case SERVICE_CONTROL_PAUSE:
ReportStatus(SERVICE_PAUSE_PENDING, ERROR_SUCCESS, 10000);
- susp_client(NULL);
+ susp_client();
ReportStatus(SERVICE_PAUSED, ERROR_SUCCESS, 10000);
return;
@@ -158,7 +152,7 @@ VOID WINAPI service_ctrl(DWORD dwCtrlCode)
//
case SERVICE_CONTROL_CONTINUE:
ReportStatus(SERVICE_CONTINUE_PENDING, ERROR_SUCCESS, 10000);
- resume_client(NULL);
+ resume_client();
ReportStatus(SERVICE_RUNNING, ERROR_SUCCESS, 10000);
return;
@@ -562,4 +556,4 @@ void CmdUninstallService()
}
-#endif
\ No newline at end of file
+#endif
diff --git a/configure b/configure
index 77b5e93055..e6ac221906 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.ac Revision: 1.83 .
+# From configure.ac Revision: 1.84 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.57 for BOINC 3.03.
#
diff --git a/win_build/boinc_cli.vcproj b/win_build/boinc_cli.vcproj
index d075c7b868..4443dbf4c7 100644
--- a/win_build/boinc_cli.vcproj
+++ b/win_build/boinc_cli.vcproj
@@ -1097,6 +1097,9 @@
+
+