Use arg.h as much as possible and add usage() where missing

Rename eusage() to usage() as well.
This commit is contained in:
sin
2013-10-07 17:13:01 +01:00
parent 5b5f062184
commit f349dd5987
4 changed files with 29 additions and 11 deletions

View File

@@ -1,14 +1,26 @@
/* See LICENSE file for copyright and license details. */
#include <stdio.h>
#include <stdlib.h>
#include "util.h"
extern char **environ;
static void
usage(void)
{
eprintf("usage: %s [variable...]\n", argv0);
}
int
main(int argc, char **argv)
{
char *var;
ARGBEGIN {
default:
usage();
} ARGEND;
if(argc == 1) {
while(*environ)
printf("%s\n", *environ++);