@@ -22,6 +22,11 @@
#include <stdio.h>
#undef _GNU_SOURCE
#endif
+#include <string.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/param.h>
#include <mntent.h>
#include <sys/stat.h>
@@ -13,6 +13,10 @@
* - initial API and implementation
*******************************************************************************/
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <ncurses.h>
#include "powerdebug.h"
#include "regulator.h"
#include "display.h"
@@ -15,7 +15,11 @@
#include <getopt.h>
#include <stdbool.h>
-#include <math.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <ncurses.h>
#include "regulator.h"
#include "display.h"
#include "clocks.h"
@@ -13,32 +13,10 @@
* - initial API and implementation
*******************************************************************************/
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <dirent.h>
-#include <getopt.h>
-#include <errno.h>
-#include <ncurses.h>
-
#define VERSION "0.4.1"
-#define TOTAL_FEATURE_WINS 3 /* Regulator, Clock and Sensor (for now) */
-enum {CLOCK, REGULATOR, SENSOR};
-enum {CLOCK_SELECTED = 1, REFRESH_WINDOW};
+enum { CLOCK, REGULATOR, SENSOR };
extern void find_parents_for_clock(char *clkname, int complete);
-extern int display_print_line(int window, int line, char *str,
- int bold, void *data);
-
-extern int display_refresh_pad(int window);
-extern int display_reset_cursor(int window);
-extern void *display_get_row_data(int window);
-extern int clock_toggle_expanded(void);
-extern int regulator_display(void);
-extern void print_sensor_header(void);
-extern void print_clock_header(void);
-extern void print_regulator_header(void);
@@ -18,6 +18,8 @@
#include "regulator.h"
#define SYSFS_REGULATOR "/sys/class/regulator"
+#define VALUE_MAX 16
+
#define _GNU_SOURCE
#include <stdio.h>
#undef _GNU_SOURCE
@@ -13,7 +13,6 @@
* - initial API and implementation
*******************************************************************************/
-#define VALUE_MAX 16
-
+extern int regulator_display(void);
extern int regulator_init(void);
extern int regulator_dump(void);
Make some cleanup around the headers. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> --- clocks.c | 5 +++++ display.c | 4 ++++ powerdebug.c | 6 +++++- powerdebug.h | 24 +----------------------- regulator.c | 2 ++ regulator.h | 3 +-- 6 files changed, 18 insertions(+), 26 deletions(-)