aboutsummaryrefslogtreecommitdiffstats
path: root/src/vu-write-head.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-01-11 09:11:51 +0100
committerMattias Andrée <maandree@kth.se>2017-01-11 09:11:51 +0100
commitb7a82c980fe7e0c1f9029b55be97422428d65d5a (patch)
tree67bedc856eb1f72a2daa8ef8347b904269b06df5 /src/vu-write-head.c
parentvu-crop: add -t (diff)
downloadblind-b7a82c980fe7e0c1f9029b55be97422428d65d5a.tar.gz
blind-b7a82c980fe7e0c1f9029b55be97422428d65d5a.tar.bz2
blind-b7a82c980fe7e0c1f9029b55be97422428d65d5a.tar.xz
Clean up code
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--src/vu-write-head.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/src/vu-write-head.c b/src/vu-write-head.c
index 55170c0..9e7c4a3 100644
--- a/src/vu-write-head.c
+++ b/src/vu-write-head.c
@@ -1,29 +1,16 @@
/* See LICENSE file for copyright and license details. */
-#include "arg.h"
#include "util.h"
-static void
-usage(void)
-{
- eprintf("usage: %s parameters ...\n", argv0);
-}
+USAGE("parameters ...")
int
main(int argc, char *argv[])
{
- int i;
-
- ARGBEGIN {
- default:
- usage();
- } ARGEND;
-
- if (!argc)
- usage();
+ ENOFLAGS(!argc);
- printf("%s", argv[0]);
- for (i = 0; i < argc; i++)
- printf(" %s", argv[i]);
+ printf("%s", *argv++);
+ while (*argv)
+ printf(" %s", *argv++);
printf("\n%cuivf", 0);
efshut(stdout, "<stdout>");