components/*.c: include slstatus.h
authorNRK <nrk@disroot.org>
Wed, 26 Oct 2022 20:14:53 +0000 (02:14 +0600)
committerdrkhsh <me@drkhsh.at>
Wed, 26 Oct 2022 21:32:07 +0000 (23:32 +0200)
this gives the compiler a chance to check weather the prototype and
definiton matches or not, which would catch issues like 3c47701.

23 files changed:
Makefile
components/battery.c
components/cpu.c
components/datetime.c
components/disk.c
components/entropy.c
components/hostname.c
components/ip.c
components/kernel_release.c
components/keyboard_indicators.c
components/keymap.c
components/load_avg.c
components/netspeeds.c
components/num_files.c
components/ram.c
components/run_command.c
components/separator.c
components/swap.c
components/temperature.c
components/uptime.c
components/user.c
components/volume.c
components/wifi.c

index 2f93b870a91bb5c2bcebeb55f8731a5ede764690..542b1f0563eead0f26ba43eff4ddaf8c356cb90b 100644 (file)
--- 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:
index a36132d52331e03cd81adbf1c79ac303473e29fc..b7a2ec6030edd7485248d48cf6d7cc737a393b98 100644 (file)
@@ -3,6 +3,7 @@
 #include <string.h>
 
 #include "../util.h"
+#include "../slstatus.h"
 
 #if defined(__linux__)
        #include <limits.h>
index 9e280031d6c9d7f58914eb4e9d7a7d0bdbcd1fda..a5fabf8a8555e5247521ee3aec0e2304ca1967fe 100644 (file)
@@ -4,6 +4,7 @@
 #include <string.h>
 
 #include "../util.h"
+#include "../slstatus.h"
 
 #if defined(__linux__)
        const char *
index c3efae33ff37bd8b02abb08b05ca66f0e8a2b786..cf9fbbaa742025116ba3736a1e7db070b613304d 100644 (file)
@@ -3,6 +3,7 @@
 #include <time.h>
 
 #include "../util.h"
+#include "../slstatus.h"
 
 const char *
 datetime(const char *fmt)
index 15a221bab342e96c1a897e66cf78ae305cea20be..64e2105b86b1d00f8efdd8b58525d4667875114d 100644 (file)
@@ -3,6 +3,7 @@
 #include <sys/statvfs.h>
 
 #include "../util.h"
+#include "../slstatus.h"
 
 const char *
 disk_free(const char *path)
index 2a485de1730ffca107be29cfff598a9854ccc7fb..cf60bc3261587a841fc7800d943e3cae0fdd3918 100644 (file)
@@ -1,4 +1,5 @@
 /* See LICENSE file for copyright and license details. */
+#include "../slstatus.h"
 #if defined(__linux__)
        #include <stdint.h>
        #include <stdio.h>
index 23da6771b63a185e11e3a2ffc4b38af5773b0cc7..8627a8850be939218225743d6e3cdab76637aab4 100644 (file)
@@ -3,6 +3,7 @@
 #include <unistd.h>
 
 #include "../util.h"
+#include "../slstatus.h"
 
 const char *
 hostname(void)
index 70724ebd4fc3831abd73acf18c92ca2bc29f56b9..6d1da68f7ca7edaba9bf10ee2c69d4148e4fff5b 100644 (file)
@@ -12,6 +12,7 @@
 #endif
 
 #include "../util.h"
+#include "../slstatus.h"
 
 static const char *
 ip(const char *interface, unsigned short sa_family)
index 045730127fb8b7f0fc6d019d5506082670612b8b..76a3827754778229db76eeb760537647f13c922d 100644 (file)
@@ -3,6 +3,7 @@
 #include <stdio.h>
 
 #include "../util.h"
+#include "../slstatus.h"
 
 const char *
 kernel_release(void)
index b35eba1cc2dbad2bde4816adaf1e8e776da9ed34..5f482e85d48d725f897921600b1cdf88ff9c354b 100644 (file)
@@ -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
index ddf7a15a891dbf92860e49a720dd9c1fbf8673c4..87036dbb48666249f142bf429e9f21b54af0910c 100644 (file)
@@ -6,6 +6,7 @@
 #include <X11/Xlib.h>
 
 #include "../util.h"
+#include "../slstatus.h"
 
 static int
 valid_layout_or_variant(char *sym)
index 5c2e252ea50579fa8b761f7390128d596514a1d8..2b523e7e19fde7b4e6766313feaa395208b2cc6e 100644 (file)
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 
 #include "../util.h"
+#include "../slstatus.h"
 
 const char *
 load_avg(void)
index 0029177fe352dd82565c87f35d126aa7c9e8810d..f7bac2e492301c46abac26ad730969193409d25d 100644 (file)
@@ -3,6 +3,7 @@
 #include <limits.h>
 
 #include "../util.h"
+#include "../slstatus.h"
 
 #if defined(__linux__)
        #include <stdint.h>
index fb55df922587f98b051c46af653ba1e8f9bb1c74..3911da7e464f4bfa35dff1953b24806387eda3aa 100644 (file)
@@ -4,6 +4,7 @@
 #include <string.h>
 
 #include "../util.h"
+#include "../slstatus.h"
 
 const char *
 num_files(const char *path)
index 6040e5659355a1d719cb2138dfd741492e498f22..3fa78afddb60aa08ff0517c9f2458cd9f66b63a8 100644 (file)
@@ -2,6 +2,7 @@
 #include <stdio.h>
 
 #include "../util.h"
+#include "../slstatus.h"
 
 #if defined(__linux__)
        #include <stdint.h>
index e00b4786e659116b042f64a467fd50e410cb723e..be7d9e2bfc510c6b572fdad5e3a4d4b33276d08e 100644 (file)
@@ -3,6 +3,7 @@
 #include <string.h>
 
 #include "../util.h"
+#include "../slstatus.h"
 
 const char *
 run_command(const char *cmd)
index 40fec5292768ad629fad760222a3750e25b14cd0..39a594ae5b7062c9b42441a45400ebb18465b6b0 100644 (file)
@@ -2,6 +2,7 @@
 #include <stdio.h>
 
 #include "../util.h"
+#include "../slstatus.h"
 
 const char *
 separator(const char *separator)
index 2509db1260cdfb1e424bebd0908505acd21abac2..98983eed1cfb15981c3b448c54687d36e9d473ee 100644 (file)
@@ -5,6 +5,7 @@
 #include <string.h>
 
 #include "../util.h"
+#include "../slstatus.h"
 
 #if defined(__linux__)
        static int
index 8e1f222a5178cca002120d7478e6c8f510987f98..306a09f16524f0d579b48a3bfa47ad29a1cc0185 100644 (file)
@@ -2,6 +2,7 @@
 #include <stddef.h>
 
 #include "../util.h"
+#include "../slstatus.h"
 
 
 #if defined(__linux__)
index 7c23c98dc23238a898bb737d3e79391334d61276..fc3d204757927f82f0591c82d24fdea1e6b99b32 100644 (file)
@@ -4,6 +4,7 @@
 #include <time.h>
 
 #include "../util.h"
+#include "../slstatus.h"
 
 #if defined(CLOCK_BOOTTIME)
        #define UPTIME_FLAG CLOCK_BOOTTIME
index 71a0c9d9a3bd3ddb4bc9ac4559cddc810f6736f8..fbe681467cc6e62e17f31912ea53dede7f7f9ee8 100644 (file)
@@ -5,6 +5,7 @@
 #include <unistd.h>
 
 #include "../util.h"
+#include "../slstatus.h"
 
 const char *
 gid(void)
index c94f87246dc8bf14a316aeae7088680a5114b9eb..5c850118224bb40380cdbdc224d27574e321503a 100644 (file)
@@ -6,6 +6,7 @@
 #include <unistd.h>
 
 #include "../util.h"
+#include "../slstatus.h"
 
 #if defined(__OpenBSD__) | defined(__FreeBSD__)
        #include <sys/queue.h>
index 92c252e47f61e576ccd9dbb07aa09cb90a943603..b9957abffc5217ee58f6f250db7cca2697d9cfe2 100644 (file)
@@ -7,6 +7,7 @@
 #include <unistd.h>
 
 #include "../util.h"
+#include "../slstatus.h"
 
 #define RSSI_TO_PERC(rssi) \
                        rssi >= -50 ? 100 : \