radical re-formatting 0/3: Alphabetic headers
Except stated otherwise in comment. Fixes coding style. Formatting commits suck, incoherent coding style sucks more. https://suckless.org/coding_style/
This commit is contained in:
parent
826a5dc862
commit
0696635bcb
20 changed files with 29 additions and 29 deletions
|
@ -2,8 +2,8 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "../util.h"
|
|
||||||
#include "../slstatus.h"
|
#include "../slstatus.h"
|
||||||
|
#include "../util.h"
|
||||||
|
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "../util.h"
|
|
||||||
#include "../slstatus.h"
|
#include "../slstatus.h"
|
||||||
|
#include "../util.h"
|
||||||
|
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
#define CPU_FREQ "/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq"
|
#define CPU_FREQ "/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq"
|
||||||
|
@ -110,9 +110,9 @@
|
||||||
b[CP_INTR])) / sum);
|
b[CP_INTR])) / sum);
|
||||||
}
|
}
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__)
|
||||||
|
#include <devstat.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
#include <devstat.h>
|
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
cpu_freq(const char *unused)
|
cpu_freq(const char *unused)
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "../util.h"
|
|
||||||
#include "../slstatus.h"
|
#include "../slstatus.h"
|
||||||
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
datetime(const char *fmt)
|
datetime(const char *fmt)
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/statvfs.h>
|
#include <sys/statvfs.h>
|
||||||
|
|
||||||
#include "../util.h"
|
|
||||||
#include "../slstatus.h"
|
#include "../slstatus.h"
|
||||||
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
disk_free(const char *path)
|
disk_free(const char *path)
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "../util.h"
|
|
||||||
#include "../slstatus.h"
|
#include "../slstatus.h"
|
||||||
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
hostname(const char *unused)
|
hostname(const char *unused)
|
||||||
|
|
|
@ -4,15 +4,15 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#if defined(__OpenBSD__)
|
#if defined(__OpenBSD__)
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
#include <sys/types.h>
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__)
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../util.h"
|
|
||||||
#include "../slstatus.h"
|
#include "../slstatus.h"
|
||||||
|
#include "../util.h"
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
ip(const char *interface, unsigned short sa_family)
|
ip(const char *interface, unsigned short sa_family)
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
/* See LICENSE file for copyright and license details. */
|
/* See LICENSE file for copyright and license details. */
|
||||||
#include <sys/utsname.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <sys/utsname.h>
|
||||||
|
|
||||||
#include "../util.h"
|
|
||||||
#include "../slstatus.h"
|
#include "../slstatus.h"
|
||||||
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
kernel_release(const char *unused)
|
kernel_release(const char *unused)
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
|
||||||
#include "../util.h"
|
|
||||||
#include "../slstatus.h"
|
#include "../slstatus.h"
|
||||||
|
#include "../util.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* fmt consists of uppercase or lowercase 'c' for caps lock and/or 'n' for num
|
* fmt consists of uppercase or lowercase 'c' for caps lock and/or 'n' for num
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
#include <X11/XKBlib.h>
|
#include <X11/XKBlib.h>
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
|
||||||
#include "../util.h"
|
|
||||||
#include "../slstatus.h"
|
#include "../slstatus.h"
|
||||||
|
#include "../util.h"
|
||||||
|
|
||||||
static int
|
static int
|
||||||
valid_layout_or_variant(char *sym)
|
valid_layout_or_variant(char *sym)
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "../util.h"
|
|
||||||
#include "../slstatus.h"
|
#include "../slstatus.h"
|
||||||
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
load_avg(const char *unused)
|
load_avg(const char *unused)
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
/* See LICENSE file for copyright and license details. */
|
/* See LICENSE file for copyright and license details. */
|
||||||
#include <stdio.h>
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "../util.h"
|
|
||||||
#include "../slstatus.h"
|
#include "../slstatus.h"
|
||||||
|
#include "../util.h"
|
||||||
|
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
@ -57,11 +57,11 @@
|
||||||
1024);
|
1024);
|
||||||
}
|
}
|
||||||
#elif defined(__OpenBSD__) | defined(__FreeBSD__)
|
#elif defined(__OpenBSD__) | defined(__FreeBSD__)
|
||||||
#include <string.h>
|
|
||||||
#include <ifaddrs.h>
|
#include <ifaddrs.h>
|
||||||
|
#include <net/if.h>
|
||||||
|
#include <string.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <net/if.h>
|
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
netspeed_rx(const char *interface)
|
netspeed_rx(const char *interface)
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "../util.h"
|
|
||||||
#include "../slstatus.h"
|
#include "../slstatus.h"
|
||||||
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
num_files(const char *path)
|
num_files(const char *path)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/* See LICENSE file for copyright and license details. */
|
/* See LICENSE file for copyright and license details. */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "../util.h"
|
|
||||||
#include "../slstatus.h"
|
#include "../slstatus.h"
|
||||||
|
#include "../util.h"
|
||||||
|
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "../util.h"
|
|
||||||
#include "../slstatus.h"
|
#include "../slstatus.h"
|
||||||
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
run_command(const char *cmd)
|
run_command(const char *cmd)
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "../util.h"
|
|
||||||
#include "../slstatus.h"
|
#include "../slstatus.h"
|
||||||
|
#include "../util.h"
|
||||||
|
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
static int
|
static int
|
||||||
|
@ -199,11 +199,11 @@
|
||||||
return fmt_human(used * 1024, 1024);
|
return fmt_human(used * 1024, 1024);
|
||||||
}
|
}
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__)
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <kvm.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <fcntl.h>
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <kvm.h>
|
|
||||||
|
|
||||||
static int getswapinfo(struct kvm_swap *swap_info, size_t size)
|
static int getswapinfo(struct kvm_swap *swap_info, size_t size)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
/* See LICENSE file for copyright and license details. */
|
/* See LICENSE file for copyright and license details. */
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#include "../util.h"
|
|
||||||
#include "../slstatus.h"
|
#include "../slstatus.h"
|
||||||
|
#include "../util.h"
|
||||||
|
|
||||||
|
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "../util.h"
|
|
||||||
#include "../slstatus.h"
|
#include "../slstatus.h"
|
||||||
|
#include "../util.h"
|
||||||
|
|
||||||
#if defined(CLOCK_BOOTTIME)
|
#if defined(CLOCK_BOOTTIME)
|
||||||
#define UPTIME_FLAG CLOCK_BOOTTIME
|
#define UPTIME_FLAG CLOCK_BOOTTIME
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "../util.h"
|
|
||||||
#include "../slstatus.h"
|
#include "../slstatus.h"
|
||||||
|
#include "../util.h"
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
gid(const char *unused)
|
gid(const char *unused)
|
||||||
|
|
|
@ -5,14 +5,14 @@
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "../util.h"
|
|
||||||
#include "../slstatus.h"
|
#include "../slstatus.h"
|
||||||
|
#include "../util.h"
|
||||||
|
|
||||||
#if defined(__OpenBSD__) | defined(__FreeBSD__)
|
#if defined(__OpenBSD__) | defined(__FreeBSD__)
|
||||||
#include <sys/queue.h>
|
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
#include <sndio.h>
|
#include <sndio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <sys/queue.h>
|
||||||
|
|
||||||
struct control {
|
struct control {
|
||||||
LIST_ENTRY(control) next;
|
LIST_ENTRY(control) next;
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "../util.h"
|
|
||||||
#include "../slstatus.h"
|
#include "../slstatus.h"
|
||||||
|
#include "../util.h"
|
||||||
|
|
||||||
#define RSSI_TO_PERC(rssi) \
|
#define RSSI_TO_PERC(rssi) \
|
||||||
rssi >= -50 ? 100 : \
|
rssi >= -50 ? 100 : \
|
||||||
|
|
Loading…
Reference in a new issue