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.
This commit is contained in:
NRK 2022-10-27 02:14:53 +06:00 committed by drkhsh
parent f29aa9ab06
commit 28ef0b242c
23 changed files with 23 additions and 1 deletions

View File

@ -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:

View File

@ -3,6 +3,7 @@
#include <string.h>
#include "../util.h"
#include "../slstatus.h"
#if defined(__linux__)
#include <limits.h>

View File

@ -4,6 +4,7 @@
#include <string.h>
#include "../util.h"
#include "../slstatus.h"
#if defined(__linux__)
const char *

View File

@ -3,6 +3,7 @@
#include <time.h>
#include "../util.h"
#include "../slstatus.h"
const char *
datetime(const char *fmt)

View File

@ -3,6 +3,7 @@
#include <sys/statvfs.h>
#include "../util.h"
#include "../slstatus.h"
const char *
disk_free(const char *path)

View 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>

View File

@ -3,6 +3,7 @@
#include <unistd.h>
#include "../util.h"
#include "../slstatus.h"
const char *
hostname(void)

View File

@ -12,6 +12,7 @@
#endif
#include "../util.h"
#include "../slstatus.h"
static const char *
ip(const char *interface, unsigned short sa_family)

View File

@ -3,6 +3,7 @@
#include <stdio.h>
#include "../util.h"
#include "../slstatus.h"
const char *
kernel_release(void)

View 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

View File

@ -6,6 +6,7 @@
#include <X11/Xlib.h>
#include "../util.h"
#include "../slstatus.h"
static int
valid_layout_or_variant(char *sym)

View File

@ -3,6 +3,7 @@
#include <stdlib.h>
#include "../util.h"
#include "../slstatus.h"
const char *
load_avg(void)

View File

@ -3,6 +3,7 @@
#include <limits.h>
#include "../util.h"
#include "../slstatus.h"
#if defined(__linux__)
#include <stdint.h>

View File

@ -4,6 +4,7 @@
#include <string.h>
#include "../util.h"
#include "../slstatus.h"
const char *
num_files(const char *path)

View File

@ -2,6 +2,7 @@
#include <stdio.h>
#include "../util.h"
#include "../slstatus.h"
#if defined(__linux__)
#include <stdint.h>

View File

@ -3,6 +3,7 @@
#include <string.h>
#include "../util.h"
#include "../slstatus.h"
const char *
run_command(const char *cmd)

View File

@ -2,6 +2,7 @@
#include <stdio.h>
#include "../util.h"
#include "../slstatus.h"
const char *
separator(const char *separator)

View File

@ -5,6 +5,7 @@
#include <string.h>
#include "../util.h"
#include "../slstatus.h"
#if defined(__linux__)
static int

View File

@ -2,6 +2,7 @@
#include <stddef.h>
#include "../util.h"
#include "../slstatus.h"
#if defined(__linux__)

View File

@ -4,6 +4,7 @@
#include <time.h>
#include "../util.h"
#include "../slstatus.h"
#if defined(CLOCK_BOOTTIME)
#define UPTIME_FLAG CLOCK_BOOTTIME

View File

@ -5,6 +5,7 @@
#include <unistd.h>
#include "../util.h"
#include "../slstatus.h"
const char *
gid(void)

View File

@ -6,6 +6,7 @@
#include <unistd.h>
#include "../util.h"
#include "../slstatus.h"
#if defined(__OpenBSD__) | defined(__FreeBSD__)
#include <sys/queue.h>

View File

@ -7,6 +7,7 @@
#include <unistd.h>
#include "../util.h"
#include "../slstatus.h"
#define RSSI_TO_PERC(rssi) \
rssi >= -50 ? 100 : \