summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli H. Fardan <raiz@firemail.cc>2016-09-18 22:27:04 +0300
committerAli H. Fardan <raiz@firemail.cc>2016-09-18 22:27:04 +0300
commitf4a383382cdd4a1aba1bb3f731e14ba85e6d0b4a (patch)
tree834c5af1d86d387b0bf3709a8e797ae94472febb
parentfd36f65cc7bd3c506ec57ac8af0c905187952e52 (diff)
several changes
-rw-r--r--config.mk5
-rw-r--r--slstatus.16
-rw-r--r--slstatus.c17
3 files changed, 14 insertions, 14 deletions
diff --git a/config.mk b/config.mk
index 75463df..12415a0 100644
--- a/config.mk
+++ b/config.mk
@@ -1,7 +1,3 @@
-# See LICENSE file for copyright and license details.
-
-VERSION = 2.0
-
PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man
@@ -11,7 +7,6 @@ X11LIB = /usr/X11R6/lib
INCS = -I. -I/usr/include -I${X11INC}
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lasound
-CPPFLAGS = -DVERSION=\"${VERSION}\" -D_GNU_SOURCE
# -Wno-unused-function for routines not activated by user
CFLAGS = -std=c99 -pedantic -Wno-unused-function -Wall -Wextra -Os ${INCS} ${CPPFLAGS}
LDFLAGS = ${LIBS}
diff --git a/slstatus.1 b/slstatus.1
index 9234b18..aaeb42d 100644
--- a/slstatus.1
+++ b/slstatus.1
@@ -5,14 +5,14 @@ slstatus \- suckless status
.B slstatus
.RB [ \-dhov ]
.SH DESCRIPTION
-slstatus is a suckless and lightweight status monitor for window managers that use WM_NAME as statusbar (e.g. DWM) or any other status bars if they support reading/piping from slstatus. It is written in pure C without any extern programs being executed and only reads from files most of the time. slstatus is meant to be a better alternative to Bash scripts (inefficient) and Conky (bloated and written in C++).
+slstatus is a suckless and lightweight status monitor for window managers that use WM_NAME as statusbar (e.g. DWM) or any other status bars as long as they support reading from stdin. It is written in pure C without any extern programs being executed and only reads from files most of the time. slstatus is meant to be a better alternative to Bash scripts (inefficient) and Conky (bloated and written in C++).
.SH OPTIONS
.TP
.B \-d
-runs slstatus as daemon in background
+run slstatus as daemon in background
.TP
.B \-h
-displays usage
+display help
.TP
.B \-o
output to console instead of WM_NAME
diff --git a/slstatus.c b/slstatus.c
index 49b14de..34fd951 100644
--- a/slstatus.c
+++ b/slstatus.c
@@ -1,4 +1,11 @@
-/* See LICENSE file for copyright and license details. */
+/*
+ * Copyright (C) 2016, drkhsh
+ * Copyright (C) 2016, Ali H. Fardan (Raiz) <raiz@firemail.cc>
+ * see LICENSE for copyright details
+ */
+
+#define _GNU_SOURCE
+#define VERSION "2.0"
#include <alsa/asoundlib.h>
#include <err.h>
@@ -88,10 +95,8 @@ smprintf(const char *fmt, ...)
va_end(ap);
ret = malloc(++len);
- if (ret == NULL) {
- warn("Malloc failed.");
- return "n/a";
- }
+ if (ret == NULL)
+ err(1, "malloc");
va_start(ap, fmt);
vsnprintf(ret, len, fmt, ap);
@@ -613,7 +618,7 @@ main(int argc, char *argv[])
oflag = 1;
break;
case 'v':
- printf("%s version %s (c) 2016 slstatus engineers\n", argv0, VERSION);
+ printf("slstatus %s (C) 2016 slstatus engineers\n", VERSION);
return 0;
default:
usage();