diff options
author | David Phillips <dbphillipsnz@gmail.com> | 2015-09-09 16:28:25 +1200 |
---|---|---|
committer | David Phillips <dbphillipsnz@gmail.com> | 2015-09-09 16:28:25 +1200 |
commit | 8e947db6be8e79607ecddaa9bafbd7f29940a187 (patch) | |
tree | 7bd18e80f847b03bca633c490d857f28a9a5bbc6 | |
parent | 7e9478d19c15703f0b4f83bfddf2830d37633e31 (diff) | |
download | paramano-8e947db6be8e79607ecddaa9bafbd7f29940a187.tar.xz |
Changed header include policy to increase build time
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | bat_tray.c | 9 | ||||
-rw-r--r-- | common.c | 5 | ||||
-rw-r--r-- | config_file.c | 5 | ||||
-rw-r--r-- | config_file.h | 3 | ||||
-rw-r--r-- | defaults.c | 5 | ||||
-rw-r--r-- | defaults.h | 2 | ||||
-rw-r--r-- | getcore.c | 6 | ||||
-rw-r--r-- | getfreq.c | 9 | ||||
-rw-r--r-- | getfreq.h | 2 | ||||
-rw-r--r-- | getgov.c | 8 | ||||
-rw-r--r-- | getgov.h | 2 | ||||
-rw-r--r-- | paramano.c | 17 | ||||
-rw-r--r-- | paramano.h | 21 | ||||
-rw-r--r-- | paramano_set.c | 8 | ||||
-rw-r--r-- | paramano_set_interface.c | 7 | ||||
-rw-r--r-- | tray.c | 15 | ||||
-rw-r--r-- | tray.h | 2 |
18 files changed, 95 insertions, 33 deletions
@@ -4,6 +4,7 @@ BINDIR=$(PREFIX)/bin SYSCONFDIR=/etc SHAREDIR=$(PREFIX)/share LOCALEDIR=$(SHAREDIR)/locale +POWER_DIR="/sys/class/power_supply/" # External program/support programs SUDO=$(BINDIR)/sudo @@ -22,6 +23,7 @@ DEFS += -DPREFIX=\"$(PREFIX)\" \ -DPARAMANO_CONF=\"$(PARAMANO_CONF)\" \ -DLOCALEDIR=\"$(LOCALEDIR)\" \ -DSHAREDIR=\"$(SHAREDIR)\" \ + -DPOWERDIR=\"$(POWER_DIR)\" \ -DROOT_UID=$(ROOT_UID) \ -D_GNU_SOURCE @@ -17,7 +17,14 @@ ************************************************************************/ -#include "paramano.h" +#include "bat_tray.h" +#include "common.h" +#include "defaults.h" + +#include <gtk/gtk.h> +#include <stdbool.h> +#include <string.h> +#include <libintl.h> static GtkStatusIcon* tray; static char tooltip_text[1024]; @@ -16,8 +16,11 @@ * <http://www.gnu.org/licenses/>. * ************************************************************************/ -#include "paramano.h" +#include "common.h" +#include <stdio.h> +#include <stdlib.h> +#include <string.h> #include <stdarg.h> /*********************************************************************** diff --git a/config_file.c b/config_file.c index 2faeaa3..17e3005 100644 --- a/config_file.c +++ b/config_file.c @@ -16,7 +16,10 @@ * <http://www.gnu.org/licenses/>. * ************************************************************************/ -#include "paramano.h" +#include "config_file.h" + +#include <gtk/gtk.h> +#include <glib.h> gboolean config_open(struct config_file* config_file) { diff --git a/config_file.h b/config_file.h index 61ef74b..c9d964a 100644 --- a/config_file.h +++ b/config_file.h @@ -19,6 +19,9 @@ #ifndef CONFIG_FILE_H #define CONFIG_FILE_H +#include <glib.h> +#include <gtk/gtk.h> + struct config_file { GKeyFile* key_file; @@ -16,7 +16,10 @@ * <http://www.gnu.org/licenses/>. * ************************************************************************/ -#include "paramano.h" +#include "defaults.h" + +#include <stddef.h> +#include <stdio.h> void defaults_init() { @@ -19,6 +19,8 @@ #ifndef DEFAULTS_H #define DEFAULTS_H +#include <stdbool.h> + char* DEFAULT_GOV; char* DEFAULT_FREQ; char* DEFAULT_PROG; @@ -16,7 +16,11 @@ * <http://www.gnu.org/licenses/>. * ************************************************************************/ -#include "paramano.h" +#include "getcore.h" + +#include <stdio.h> +#include <stdbool.h> +#include <unistd.h> static unsigned int cores; @@ -16,7 +16,14 @@ * <http://www.gnu.org/licenses/>. * ************************************************************************/ -#include "paramano.h" +#include "getfreq.h" +#include "getcore.h" +#include "common.h" + +#include <stddef.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> #define MAX_CORES 1000 #define MAX_FREQS 50 @@ -19,6 +19,8 @@ #ifndef GETFREQ_H #define GETFREQ_H +#include <stddef.h> + void gf_init(); int gf_current(int core); int gf_available(int core, char* out, int size); @@ -16,7 +16,13 @@ * <http://www.gnu.org/licenses/>. * ************************************************************************/ -#include "paramano.h" +#include "getgov.h" +#include "getcore.h" +#include "common.h" + +#include <stdio.h> +#include <string.h> +#include <glib.h> /* [CORE][GOVERNOR NUMBER] */ static char governors[999][50][13]; @@ -19,6 +19,8 @@ #ifndef GETGOV_H #define GETGOV_H +#include <stdbool.h> + void gg_init(); bool gg_current(int core, char* out, int size); bool gg_available(int core, char* out, int size); @@ -17,6 +17,23 @@ ************************************************************************/ #include "paramano.h" +#include "getcore.h" +#include "getgov.h" +#include "getfreq.h" +#include "tray.h" +#include "bat_tray.h" +#include "defaults.h" +#include "config_file.h" +#include "common.h" + +#include <gtk/gtk.h> +#include <unistd.h> // getuid, getgid +#include <stdio.h> // printf, FILE, fopen, etc +#include <stdlib.h> // free etc +#include <stdbool.h> // boolean types +#include <string.h> // strlen +#include <libintl.h> // gettext +#include <locale.h> // LC_ALL etc /*********************************************************************** @@ -19,27 +19,6 @@ #ifndef PARAMANO_H #define PARAMANO_H -#define POWERDIR "/sys/class/power_supply/" - -#include <gtk/gtk.h> -#include <unistd.h> // getuid, getgid -#include <stdio.h> // printf, FILE, fopen, etc -#include <stdlib.h> // free etc -#include <stdbool.h> // boolean types -#include <string.h> // strlen -#include <libintl.h> // gettext -#include <locale.h> // LC_ALL etc - -#include "tray.h" -#include "bat_tray.h" -#include "getfreq.h" -#include "getcore.h" -#include "getgov.h" -#include "config_file.h" -#include "defaults.h" -#include "common.h" -#include "paramano_set_interface.h" - void config_init(); #endif /* ifndef PARAMANO_H */ diff --git a/paramano_set.c b/paramano_set.c index b902a84..e94f9ec 100644 --- a/paramano_set.c +++ b/paramano_set.c @@ -16,8 +16,12 @@ * <http://www.gnu.org/licenses/>. * ************************************************************************/ - -#include "paramano.h" +#include <stdio.h> +#include <stdlib.h> +#include <libintl.h> +#include <locale.h> +#include <getopt.h> +#include <unistd.h> #define set_freq_max(freq, core) write_str_to_file("scaling_max_freq", freq, core) #define set_freq_min(freq, core) write_str_to_file("scaling_min_freq", freq, core) diff --git a/paramano_set_interface.c b/paramano_set_interface.c index 2806253..9ac3cb4 100644 --- a/paramano_set_interface.c +++ b/paramano_set_interface.c @@ -16,7 +16,12 @@ * <http://www.gnu.org/licenses/>. * ************************************************************************/ -#include "paramano.h" +#include "paramano_set_interface.h" +#include "common.h" + +#include <unistd.h> +#include <stdio.h> +#include <stdlib.h> void si_gov(char* gov, int core) { @@ -16,8 +16,19 @@ * <http://www.gnu.org/licenses/>. * ************************************************************************/ -#include "paramano.h" - +#include "tray.h" +#include "getcore.h" +#include "getfreq.h" +#include "getgov.h" +#include "bat_tray.h" +#include "defaults.h" +#include "paramano_set_interface.h" + +#include <stdbool.h> +#include <stdlib.h> +#include <string.h> +#include <libintl.h> +#include <gtk/gtk.h> static GtkStatusIcon* tray; static char tooltip_text[1024]; @@ -19,6 +19,8 @@ #ifndef TRAY_H #define TRAY_H +#include <stdbool.h> + void tray_set_defaults(); void tray_init(); void tray_show(); |