Introduction
Introduction Statistics Contact Development Disclaimer Help
blind-next-frame: fix exit status on incorrect usage - blind - suckless command…
git clone git://git.suckless.org/blind
Log
Files
Refs
README
LICENSE
---
commit af3cee4bebc3fed17c8932cc55c8cb694c250447
parent 38e538e53941c94e4acdfccc2aa933e5f936cce1
Author: Mattias Andrée <[email protected]>
Date: Wed, 16 Aug 2017 18:54:18 +0200
blind-next-frame: fix exit status on incorrect usage
Signed-off-by: Mattias Andrée <[email protected]>
Diffstat:
M src/blind-next-frame.c | 2 +-
M src/util.h | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/blind-next-frame.c b/src/blind-next-frame.c
@@ -1,7 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include "common.h"
-USAGE("[-f frames] width height pixel-format ...")
+NUSAGE(2, "[-f frames] width height pixel-format ...")
int
main(int argc, char *argv[])
diff --git a/src/util.h b/src/util.h
@@ -15,9 +15,12 @@
#define INTSTRLEN(TYPE) ((sizeof(TYPE) == 1 ? 3 : (5 * sizeof(TYPE) / 2)) + …
#define USAGE(SYNOPSIS)\
+ NUSAGE(1, SYNOPSIS)
+
+#define NUSAGE(STATUS, SYNOPSIS)\
ATTRIBUTE_NORETURN\
static void usage(void)\
- { eprintf("usage: %s%s%s\n", argv0, *SYNOPSIS ? " " : "", SYNOPSIS); }
+ { enprintf((STATUS), "usage: %s%s%s\n", argv0, *SYNOPSIS ? " " : "", S…
#include "util/eprintf.h"
#include "util/efflush.h"
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.