Introduction
Introduction Statistics Contact Development Disclaimer Help
chvt: usage using argv0 - ubase - suckless linux base utils
git clone git://git.suckless.org/ubase
Log
Files
Refs
README
LICENSE
---
commit f0cfd58e932e01a7aad5d923aa4e558a02ff404e
parent a46944add9146303500834b2c5d336694bd04a72
Author: Hiltjo Posthuma <[email protected]>
Date: Mon, 2 Feb 2015 19:56:17 +0100
chvt: usage using argv0
Diffstat:
M chvt.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/chvt.c b/chvt.c
@@ -25,7 +25,7 @@ static char *vts[] = {
static void
usage(void)
{
- eprintf("usage: chvt N\n");
+ eprintf("usage: %s N\n", argv0);
}
int
@@ -35,6 +35,9 @@ main(int argc, char *argv[])
int fd;
char c;
+ ARGBEGIN {
+ } ARGEND;
+
if (argc != 2 || strspn(argv[1], "1234567890") != strlen(argv[1]))
usage();
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.