aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <dbphillipsnz@gmail.com>2015-09-09 16:28:25 +1200
committerDavid Phillips <dbphillipsnz@gmail.com>2015-09-09 16:28:25 +1200
commit8e947db6be8e79607ecddaa9bafbd7f29940a187 (patch)
tree7bd18e80f847b03bca633c490d857f28a9a5bbc6
parent7e9478d19c15703f0b4f83bfddf2830d37633e31 (diff)
downloadparamano-8e947db6be8e79607ecddaa9bafbd7f29940a187.tar.xz
Changed header include policy to increase build time
-rw-r--r--Makefile2
-rw-r--r--bat_tray.c9
-rw-r--r--common.c5
-rw-r--r--config_file.c5
-rw-r--r--config_file.h3
-rw-r--r--defaults.c5
-rw-r--r--defaults.h2
-rw-r--r--getcore.c6
-rw-r--r--getfreq.c9
-rw-r--r--getfreq.h2
-rw-r--r--getgov.c8
-rw-r--r--getgov.h2
-rw-r--r--paramano.c17
-rw-r--r--paramano.h21
-rw-r--r--paramano_set.c8
-rw-r--r--paramano_set_interface.c7
-rw-r--r--tray.c15
-rw-r--r--tray.h2
18 files changed, 95 insertions, 33 deletions
diff --git a/Makefile b/Makefile
index 822f319..0dc7028 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/bat_tray.c b/bat_tray.c
index 81435c2..f7c4a4c 100644
--- a/bat_tray.c
+++ b/bat_tray.c
@@ -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];
diff --git a/common.c b/common.c
index 953a33b..9cca098 100644
--- a/common.c
+++ b/common.c
@@ -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;
diff --git a/defaults.c b/defaults.c
index d9ff21d..9119622 100644
--- a/defaults.c
+++ b/defaults.c
@@ -16,7 +16,10 @@
* <http://www.gnu.org/licenses/>. *
************************************************************************/
-#include "paramano.h"
+#include "defaults.h"
+
+#include <stddef.h>
+#include <stdio.h>
void defaults_init()
{
diff --git a/defaults.h b/defaults.h
index 519c082..2a4515b 100644
--- a/defaults.h
+++ b/defaults.h
@@ -19,6 +19,8 @@
#ifndef DEFAULTS_H
#define DEFAULTS_H
+#include <stdbool.h>
+
char* DEFAULT_GOV;
char* DEFAULT_FREQ;
char* DEFAULT_PROG;
diff --git a/getcore.c b/getcore.c
index 2c25c75..2b2637b 100644
--- a/getcore.c
+++ b/getcore.c
@@ -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;
diff --git a/getfreq.c b/getfreq.c
index 3ff6245..4ded3be 100644
--- a/getfreq.c
+++ b/getfreq.c
@@ -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
diff --git a/getfreq.h b/getfreq.h
index 5ec9d35..f13a9e9 100644
--- a/getfreq.h
+++ b/getfreq.h
@@ -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);
diff --git a/getgov.c b/getgov.c
index f75e6c9..e366f41 100644
--- a/getgov.c
+++ b/getgov.c
@@ -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];
diff --git a/getgov.h b/getgov.h
index 9339d20..5a5d8d8 100644
--- a/getgov.h
+++ b/getgov.h
@@ -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);
diff --git a/paramano.c b/paramano.c
index b3f75d2..fe8bdac 100644
--- a/paramano.c
+++ b/paramano.c
@@ -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
/***********************************************************************
diff --git a/paramano.h b/paramano.h
index 9686a2e..5227aa0 100644
--- a/paramano.h
+++ b/paramano.h
@@ -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)
{
diff --git a/tray.c b/tray.c
index dafda1f..d4eed31 100644
--- a/tray.c
+++ b/tray.c
@@ -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];
diff --git a/tray.h b/tray.h
index 8560017..3c519a6 100644
--- a/tray.h
+++ b/tray.h
@@ -19,6 +19,8 @@
#ifndef TRAY_H
#define TRAY_H
+#include <stdbool.h>
+
void tray_set_defaults();
void tray_init();
void tray_show();