-/* check file macro */
-#define CHECK_FILE(X,Y) do { \
- if (stat(X,&Y) < 0) return -1; \
- if (!S_ISREG(Y.st_mode)) return -1; \
-} while (0);
-
-/* functions */
-int config_check();
-void setstatus(char *str);
-char *smprintf(char *fmt, ...);
-char *get_battery();
-char *get_cpu_temperature();
-char *get_cpu_usage();
-char *get_datetime();
-char *get_diskusage();
-char *get_ram_usage();
-char *get_volume();
-char *get_wifi_signal();
-
-/* global variables */
-static Display *dpy;
-
-/* check configured paths */
-int
-config_check()
-{
- struct stat fs;
-
- /* check all files in the config.h file */
- CHECK_FILE(batterynowfile, fs);
- CHECK_FILE(batteryfullfile, fs);
- CHECK_FILE(tempfile, fs);
-
- /* check update interval */
- if (update_interval < 1)
- return -1;
-
- /* exit successfully */
- return 0;
-}
-
-/* set statusbar (WM_NAME) */