commit af3cee4bebc3fed17c8932cc55c8cb694c250447
Author: Mattias Andrée <maandree_AT_kth.se>
AuthorDate: Wed Aug 16 18:54:18 2017 +0200
Commit: Mattias Andrée <maandree_AT_kth.se>
CommitDate: Wed Aug 16 18:54:18 2017 +0200
blind-next-frame: fix exit status on incorrect usage
Signed-off-by: Mattias Andrée <maandree_AT_kth.se>
diff --git a/src/blind-next-frame.c b/src/blind-next-frame.c
index be6c303..1d33c46 100644
--- a/src/blind-next-frame.c
+++ b/src/blind-next-frame.c
_AT_@ -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
index c51dbc9..5c1873d 100644
--- a/src/util.h
+++ b/src/util.h
_AT_@ -15,9 +15,12 @@
#define INTSTRLEN(TYPE) ((sizeof(TYPE) == 1 ? 3 : (5 * sizeof(TYPE) / 2)) + ((TYPE)-1 < 1))
#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 ? " " : "", SYNOPSIS); }
#include "util/eprintf.h"
#include "util/efflush.h"
Received on Wed Aug 16 2017 - 18:54:26 CEST
This archive was generated by hypermail 2.3.0
: Wed Aug 16 2017 - 19:00:55 CEST