slstatus

status monitor
git clone git://git.suckless.org/slstatus
Log | Files | Refs | README | LICENSE

commit 28ef0b242c32e8ae8b4df2b4b380e30bf581130f
parent f29aa9ab0656c938ad0c0d4a6136ff25bd82ebf9
Author: NRK <nrk@disroot.org>
Date:   Thu, 27 Oct 2022 02:14:53 +0600

components/*.c: include slstatus.h

this gives the compiler a chance to check weather the prototype and
definiton matches or not, which would catch issues like 3c47701.

Diffstat:
MMakefile | 2+-
Mcomponents/battery.c | 1+
Mcomponents/cpu.c | 1+
Mcomponents/datetime.c | 1+
Mcomponents/disk.c | 1+
Mcomponents/entropy.c | 1+
Mcomponents/hostname.c | 1+
Mcomponents/ip.c | 1+
Mcomponents/kernel_release.c | 1+
Mcomponents/keyboard_indicators.c | 1+
Mcomponents/keymap.c | 1+
Mcomponents/load_avg.c | 1+
Mcomponents/netspeeds.c | 1+
Mcomponents/num_files.c | 1+
Mcomponents/ram.c | 1+
Mcomponents/run_command.c | 1+
Mcomponents/separator.c | 1+
Mcomponents/swap.c | 1+
Mcomponents/temperature.c | 1+
Mcomponents/uptime.c | 1+
Mcomponents/user.c | 1+
Mcomponents/volume.c | 1+
Mcomponents/wifi.c | 1+
23 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -31,7 +31,7 @@ COM =\ all: slstatus -$(COM:=.o): config.mk $(REQ:=.h) +$(COM:=.o): config.mk $(REQ:=.h) slstatus.h slstatus.o: slstatus.c slstatus.h arg.h config.h config.mk $(REQ:=.h) .c.o: diff --git a/components/battery.c b/components/battery.c @@ -3,6 +3,7 @@ #include <string.h> #include "../util.h" +#include "../slstatus.h" #if defined(__linux__) #include <limits.h> diff --git a/components/cpu.c b/components/cpu.c @@ -4,6 +4,7 @@ #include <string.h> #include "../util.h" +#include "../slstatus.h" #if defined(__linux__) const char * diff --git a/components/datetime.c b/components/datetime.c @@ -3,6 +3,7 @@ #include <time.h> #include "../util.h" +#include "../slstatus.h" const char * datetime(const char *fmt) diff --git a/components/disk.c b/components/disk.c @@ -3,6 +3,7 @@ #include <sys/statvfs.h> #include "../util.h" +#include "../slstatus.h" const char * disk_free(const char *path) diff --git a/components/entropy.c b/components/entropy.c @@ -1,4 +1,5 @@ /* See LICENSE file for copyright and license details. */ +#include "../slstatus.h" #if defined(__linux__) #include <stdint.h> #include <stdio.h> diff --git a/components/hostname.c b/components/hostname.c @@ -3,6 +3,7 @@ #include <unistd.h> #include "../util.h" +#include "../slstatus.h" const char * hostname(void) diff --git a/components/ip.c b/components/ip.c @@ -12,6 +12,7 @@ #endif #include "../util.h" +#include "../slstatus.h" static const char * ip(const char *interface, unsigned short sa_family) diff --git a/components/kernel_release.c b/components/kernel_release.c @@ -3,6 +3,7 @@ #include <stdio.h> #include "../util.h" +#include "../slstatus.h" const char * kernel_release(void) diff --git a/components/keyboard_indicators.c b/components/keyboard_indicators.c @@ -5,6 +5,7 @@ #include <X11/Xlib.h> #include "../util.h" +#include "../slstatus.h" /* * fmt consists of uppercase or lowercase 'c' for caps lock and/or 'n' for num diff --git a/components/keymap.c b/components/keymap.c @@ -6,6 +6,7 @@ #include <X11/Xlib.h> #include "../util.h" +#include "../slstatus.h" static int valid_layout_or_variant(char *sym) diff --git a/components/load_avg.c b/components/load_avg.c @@ -3,6 +3,7 @@ #include <stdlib.h> #include "../util.h" +#include "../slstatus.h" const char * load_avg(void) diff --git a/components/netspeeds.c b/components/netspeeds.c @@ -3,6 +3,7 @@ #include <limits.h> #include "../util.h" +#include "../slstatus.h" #if defined(__linux__) #include <stdint.h> diff --git a/components/num_files.c b/components/num_files.c @@ -4,6 +4,7 @@ #include <string.h> #include "../util.h" +#include "../slstatus.h" const char * num_files(const char *path) diff --git a/components/ram.c b/components/ram.c @@ -2,6 +2,7 @@ #include <stdio.h> #include "../util.h" +#include "../slstatus.h" #if defined(__linux__) #include <stdint.h> diff --git a/components/run_command.c b/components/run_command.c @@ -3,6 +3,7 @@ #include <string.h> #include "../util.h" +#include "../slstatus.h" const char * run_command(const char *cmd) diff --git a/components/separator.c b/components/separator.c @@ -2,6 +2,7 @@ #include <stdio.h> #include "../util.h" +#include "../slstatus.h" const char * separator(const char *separator) diff --git a/components/swap.c b/components/swap.c @@ -5,6 +5,7 @@ #include <string.h> #include "../util.h" +#include "../slstatus.h" #if defined(__linux__) static int diff --git a/components/temperature.c b/components/temperature.c @@ -2,6 +2,7 @@ #include <stddef.h> #include "../util.h" +#include "../slstatus.h" #if defined(__linux__) diff --git a/components/uptime.c b/components/uptime.c @@ -4,6 +4,7 @@ #include <time.h> #include "../util.h" +#include "../slstatus.h" #if defined(CLOCK_BOOTTIME) #define UPTIME_FLAG CLOCK_BOOTTIME diff --git a/components/user.c b/components/user.c @@ -5,6 +5,7 @@ #include <unistd.h> #include "../util.h" +#include "../slstatus.h" const char * gid(void) diff --git a/components/volume.c b/components/volume.c @@ -6,6 +6,7 @@ #include <unistd.h> #include "../util.h" +#include "../slstatus.h" #if defined(__OpenBSD__) | defined(__FreeBSD__) #include <sys/queue.h> diff --git a/components/wifi.c b/components/wifi.c @@ -7,6 +7,7 @@ #include <unistd.h> #include "../util.h" +#include "../slstatus.h" #define RSSI_TO_PERC(rssi) \ rssi >= -50 ? 100 : \