Export hook strings.
authorIain Patterson <me@iain.cx>
Fri, 22 Jul 2016 13:25:37 +0000 (14:25 +0100)
committerIain Patterson <me@iain.cx>
Thu, 28 Jul 2016 15:44:27 +0000 (16:44 +0100)
gui.cpp
hook.cpp
settings.cpp

diff --git a/gui.cpp b/gui.cpp
index 148314c..d07af68 100644 (file)
--- a/gui.cpp
+++ b/gui.cpp
@@ -1,9 +1,10 @@
 #include "nssm.h"\r
 \r
+extern const TCHAR *hook_event_strings[];\r
+extern const TCHAR *hook_action_strings[];\r
+\r
 static enum { NSSM_TAB_APPLICATION, NSSM_TAB_DETAILS, NSSM_TAB_LOGON, NSSM_TAB_DEPENDENCIES, NSSM_TAB_PROCESS, NSSM_TAB_SHUTDOWN, NSSM_TAB_EXIT, NSSM_TAB_IO, NSSM_TAB_ROTATION, NSSM_TAB_ENVIRONMENT, NSSM_TAB_HOOKS, NSSM_NUM_TABS } nssm_tabs;\r
 static HWND tablist[NSSM_NUM_TABS];\r
-static const TCHAR *hook_event_strings[] = { NSSM_HOOK_EVENT_START, NSSM_HOOK_EVENT_STOP, NSSM_HOOK_EVENT_EXIT, NSSM_HOOK_EVENT_POWER, NSSM_HOOK_EVENT_ROTATE, NULL };\r
-static const TCHAR *hook_action_strings[] = { NSSM_HOOK_ACTION_PRE, NSSM_HOOK_ACTION_POST, NSSM_HOOK_ACTION_CHANGE, NSSM_HOOK_ACTION_RESUME, NULL };\r
 static int selected_tab;\r
 \r
 static HWND dialog(const TCHAR *templ, HWND parent, DLGPROC function, LPARAM l) {\r
index dc9e02f..6671d3b 100644 (file)
--- a/hook.cpp
+++ b/hook.cpp
@@ -9,6 +9,9 @@ typedef struct {
   kill_t k;\r
 } hook_t;\r
 \r
+const TCHAR *hook_event_strings[] = { NSSM_HOOK_EVENT_START, NSSM_HOOK_EVENT_STOP, NSSM_HOOK_EVENT_EXIT, NSSM_HOOK_EVENT_POWER, NSSM_HOOK_EVENT_ROTATE, NULL };\r
+const TCHAR *hook_action_strings[] = { NSSM_HOOK_ACTION_PRE, NSSM_HOOK_ACTION_POST, NSSM_HOOK_ACTION_CHANGE, NSSM_HOOK_ACTION_RESUME, NULL };\r
+\r
 static unsigned long WINAPI await_hook(void *arg) {\r
   hook_t *hook = (hook_t *) arg;\r
   if (! hook) return NSSM_HOOK_STATUS_ERROR;\r
index d978909..a144f3c 100644 (file)
@@ -7,6 +7,8 @@
 extern const TCHAR *exit_action_strings[];\r
 extern const TCHAR *startup_strings[];\r
 extern const TCHAR *priority_strings[];\r
+extern const TCHAR *hook_event_strings[];\r
+extern const TCHAR *hook_action_strings[];\r
 \r
 /* Does the parameter refer to the default value of the setting? */\r
 static inline int is_default(const TCHAR *value) {\r