1
0
Fork 0

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