From 3ada99c2031964a3c0bbe3d2a1a9b58ba309463d Mon Sep 17 00:00:00 2001 From: Shun Terabayashi Date: Sun, 4 Oct 2020 14:41:35 +0900 Subject: Refactroring headers * Add include guards * include glib.h in headers --- src/include/gui.h | 5 +++++ src/include/msr.h | 7 +++++++ src/include/os.h | 7 +++++++ src/include/sysfs.h | 7 +++++++ src/include/zenmonitor.h | 7 +++++++ src/include/zenpower.h | 7 +++++++ 6 files changed, 40 insertions(+) diff --git a/src/include/gui.h b/src/include/gui.h index 0bc2501..96ca7f8 100644 --- a/src/include/gui.h +++ b/src/include/gui.h @@ -1 +1,6 @@ +#ifndef __ZENMONITOR_GUI_H__ +#define __ZENMONITOR_GUI_H__ + int start_gui(); + +#endif /* __ZENMONITOR_GUI_H__ */ diff --git a/src/include/msr.h b/src/include/msr.h index 664a5ee..887e6e8 100644 --- a/src/include/msr.h +++ b/src/include/msr.h @@ -1,4 +1,11 @@ +#ifndef __ZENMONITOR_MSR_H__ +#define __ZENMONITOR_MSR_H__ + +#include + gboolean msr_init(); void msr_update(); void msr_clear_minmax(); GSList* msr_get_sensors(); + +#endif /* __ZENMONITOR_MSR_H__ */ diff --git a/src/include/os.h b/src/include/os.h index 9d35850..41db073 100644 --- a/src/include/os.h +++ b/src/include/os.h @@ -1,4 +1,11 @@ +#ifndef __ZENMONITOR_OS_H__ +#define __ZENMONITOR_OS_H__ + +#include + gboolean os_init(void); void os_update(void); void os_clear_minmax(void); GSList* os_get_sensors(void); + +#endif /* __ZENMONITOR_OS_H__ */ diff --git a/src/include/sysfs.h b/src/include/sysfs.h index 59ab701..949bb09 100644 --- a/src/include/sysfs.h +++ b/src/include/sysfs.h @@ -1,3 +1,8 @@ +#ifndef __ZENMONITOR_SYSFS_H__ +#define __ZENMONITOR_SYSFS_H__ + +#include + #define SYSFS_DIR_CPUS "/sys/devices/system/cpu" struct cpudev { @@ -6,3 +11,5 @@ struct cpudev { }; struct cpudev * get_cpu_dev_ids(void); + +#endif /* __ZENMONITOR_SYSFS_H__ */ diff --git a/src/include/zenmonitor.h b/src/include/zenmonitor.h index 43a6e3f..eba68c0 100644 --- a/src/include/zenmonitor.h +++ b/src/include/zenmonitor.h @@ -1,3 +1,8 @@ +#ifndef __ZENMONITOR_ZENMONITOR_H__ +#define __ZENMONITOR_ZENMONITOR_H__ + +#include + #define ERROR_VALUE -999.0 #define VERSION "1.4.2" @@ -28,3 +33,5 @@ gboolean check_zen(); gchar *cpu_model(); guint get_core_count(); extern gboolean display_coreid; + +#endif /* __ZENMONITOR_ZENMONITOR_H__ */ diff --git a/src/include/zenpower.h b/src/include/zenpower.h index 54978d6..a07cbe8 100644 --- a/src/include/zenpower.h +++ b/src/include/zenpower.h @@ -1,4 +1,11 @@ +#ifndef __ZENMONITOR_ZENPOWER_H__ +#define __ZENMONITOR_ZENPOWER_H__ + +#include + gboolean zenpower_init(); GSList* zenpower_get_sensors(); void zenpower_update(); void zenpower_clear_minmax(); + +#endif /* __ZENMONITOR_ZENPOWER_H__ */ -- cgit v1.2.3-70-g09d2