diff --git a/tasks/task_autodetect.c b/tasks/task_autodetect.c index 59d8c6dd9e..51a11d2e3d 100644 --- a/tasks/task_autodetect.c +++ b/tasks/task_autodetect.c @@ -42,6 +42,7 @@ struct autoconfig_disconnect char *msg; }; +/* TODO/FIXME - global state - perhaps move outside this file */ static bool input_autoconfigured[MAX_USERS]; static unsigned input_device_name_index[MAX_INPUT_DEVICES]; static bool input_autoconfigure_swap_override; diff --git a/tasks/task_autodetect_blissbox.c b/tasks/task_autodetect_blissbox.c index b234f2494a..61003a1ebc 100644 --- a/tasks/task_autodetect_blissbox.c +++ b/tasks/task_autodetect_blissbox.c @@ -76,7 +76,7 @@ const GUID GUID_NULL = {0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0}}; #define USB_PACKET_CTRL_LEN 5 #define USB_TIMEOUT 5000 /* timeout in ms */ -const blissbox_pad_type_t blissbox_pad_types[] = +static const blissbox_pad_type_t blissbox_pad_types[] = { {"A5200", 6}, {"A5200_TB", 50}, @@ -142,10 +142,9 @@ const blissbox_pad_type_t blissbox_pad_types[] = {NULL, 0}, /* used to mark unconnected ports, do not remove */ }; - -/* only one blissbox per machine is currently supported */ +/* TODO/FIXME - global state - perhaps move outside this file */ +/* Only one blissbox per machine is currently supported */ static const blissbox_pad_type_t *blissbox_pads[BLISSBOX_MAX_PADS] = {NULL}; - #ifdef HAVE_LIBUSB static struct libusb_device_handle *autoconfig_libusb_handle = NULL; #endif diff --git a/tasks/task_content.c b/tasks/task_content.c index 2cabffbf0f..486d928357 100644 --- a/tasks/task_content.c +++ b/tasks/task_content.c @@ -206,6 +206,7 @@ typedef struct content_state struct string_list *temporary_content; } content_state_t; +/* TODO/FIXME - global state - perhaps move outside this file */ static content_state_t content_st; #ifdef HAVE_CDROM diff --git a/tasks/task_powerstate.c b/tasks/task_powerstate.c index 02db0d7316..4d4ef44c1e 100644 --- a/tasks/task_powerstate.c +++ b/tasks/task_powerstate.c @@ -22,9 +22,6 @@ #include "../../frontend/frontend_driver.h" #include "tasks_internal.h" -static int powerstate_percent = 0; -static enum frontend_powerstate powerstate_status = FRONTEND_POWERSTATE_NONE; - typedef struct powerstate powerstate_t; struct powerstate @@ -33,6 +30,10 @@ struct powerstate int percent; }; +/* TODO/FIXME - global state - perhaps move outside this file */ +static int powerstate_percent = 0; +static enum frontend_powerstate powerstate_status = FRONTEND_POWERSTATE_NONE; + enum frontend_powerstate get_last_powerstate(int *percent) { if (percent) diff --git a/tasks/task_save.c b/tasks/task_save.c index 2cdbc37e9f..145157c7f6 100644 --- a/tasks/task_save.c +++ b/tasks/task_save.c @@ -105,16 +105,6 @@ typedef struct bool compress_files; } save_task_state_t; -typedef save_task_state_t load_task_data_t; - -/* Holds the previous saved state - * Can be restored to disk with undo_save_state(). */ -static struct save_state_buf undo_save_buf; - -/* Holds the data from before a load_state() operation - * Can be restored with undo_load_state(). */ -static struct save_state_buf undo_load_buf; - #ifdef HAVE_THREADS typedef struct autosave autosave_t; @@ -139,9 +129,23 @@ struct autosave scond_t *cond; sthread_t *thread; }; +#endif +typedef save_task_state_t load_task_data_t; + +/* Holds the previous saved state + * Can be restored to disk with undo_save_state(). */ +/* TODO/FIXME - global state - perhaps move outside this file */ +static struct save_state_buf undo_save_buf; + +/* Holds the data from before a load_state() operation + * Can be restored with undo_load_state(). */ +static struct save_state_buf undo_load_buf; + +/* TODO/FIXME - global state - perhaps move outside this file */ static struct autosave_st autosave_state; +#ifdef HAVE_THREADS /** * autosave_thread: * @data : pointer to autosave object