No need for semicolon after ARGEND

This is also the style used in Plan 9.
This commit is contained in:
sin 2015-11-01 10:16:49 +00:00
parent 27f9163d2e
commit 2366164de7
61 changed files with 61 additions and 61 deletions

2
cal.c
View File

@ -182,7 +182,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (nmons == 0) { if (nmons == 0) {
if (argc == 1) { if (argc == 1) {

2
cat.c
View File

@ -24,7 +24,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (!argc) { if (!argc) {
concat(stdin, "<stdin>", stdout, "<stdout>"); concat(stdin, "<stdin>", stdout, "<stdout>");

View File

@ -61,7 +61,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (argc < 2) if (argc < 2)
usage(); usage();

View File

@ -67,7 +67,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (argc < 2) if (argc < 2)
usage(); usage();

2
cmp.c
View File

@ -27,7 +27,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (argc != 2 || (lflag && sflag)) if (argc != 2 || (lflag && sflag))
usage(); usage();

2
cols.c
View File

@ -35,7 +35,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (!cflag) { if (!cflag) {
if ((p = getenv("COLUMNS"))) if ((p = getenv("COLUMNS")))

2
comm.c
View File

@ -44,7 +44,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (argc != 2) if (argc != 2)
usage(); usage();

2
cp.c
View File

@ -40,7 +40,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (argc < 2) if (argc < 2)
usage(); usage();

2
cron.c
View File

@ -426,7 +426,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (argc > 0) if (argc > 0)
usage(); usage();

2
cut.c
View File

@ -178,7 +178,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (!mode) if (!mode)
usage(); usage();

2
date.c
View File

@ -31,7 +31,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (argc) { if (argc) {
if (argc != 1 || argv[0][0] != '+') if (argc != 1 || argv[0][0] != '+')

2
du.c
View File

@ -89,7 +89,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if ((aflag && sflag) || (dflag && sflag)) if ((aflag && sflag) || (dflag && sflag))
usage(); usage();

2
env.c
View File

@ -30,7 +30,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
for (; *argv && strchr(*argv, '='); argc--, argv++) for (; *argv && strchr(*argv, '='); argc--, argv++)
putenv(*argv); putenv(*argv);

View File

@ -103,7 +103,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
tablistlen = parselist(tl); tablistlen = parselist(tl);

2
find.c
View File

@ -1006,7 +1006,7 @@ main(int argc, char **argv)
case 'H': gflags.l = !(gflags.h = 1); break; case 'H': gflags.l = !(gflags.h = 1); break;
case 'L': gflags.h = !(gflags.l = 1); break; case 'L': gflags.h = !(gflags.l = 1); break;
default : usage(); default : usage();
} ARGEND; } ARGEND
paths = argv; paths = argv;

View File

@ -39,7 +39,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (argc < 2) if (argc < 2)
usage(); usage();

2
fold.c
View File

@ -90,7 +90,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (!argc) { if (!argc) {
fold(stdin, "<stdin>"); fold(stdin, "<stdin>");

View File

@ -270,7 +270,7 @@ main(int argc, char *argv[])
/* ignore */ /* ignore */
EARGF(usage()); EARGF(usage());
break; break;
} ARGEND; } ARGEND
if (argc == 1) { if (argc == 1) {
/* sysconf */ /* sysconf */

2
grep.c
View File

@ -236,7 +236,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (argc == 0 && !eflag && !fflag) if (argc == 0 && !eflag && !fflag)
usage(); /* no pattern */ usage(); /* no pattern */

2
head.c
View File

@ -44,7 +44,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (!argc) { if (!argc) {
head(stdin, "<stdin>", n); head(stdin, "<stdin>", n);

2
join.c
View File

@ -511,7 +511,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (sep) if (sep)
seplen = unescape(sep); seplen = unescape(sep);

2
ln.c
View File

@ -39,7 +39,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (!argc) if (!argc)
usage(); usage();

View File

@ -65,7 +65,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
openlog(tag ? tag : getlogin(), logflags, 0); openlog(tag ? tag : getlogin(), logflags, 0);

2
ls.c
View File

@ -432,7 +432,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
switch (argc) { switch (argc) {
case 0: /* fallthrough */ case 0: /* fallthrough */

View File

@ -33,7 +33,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
ret |= cryptfunc(argc, argv, &md5_ops, md, sizeof(md)); ret |= cryptfunc(argc, argv, &md5_ops, md, sizeof(md));
ret |= fshut(stdin, "<stdin>") | fshut(stdout, "<stdout>"); ret |= fshut(stdin, "<stdin>") | fshut(stdout, "<stdout>");

View File

@ -29,7 +29,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (!argc) if (!argc)
usage(); usage();

View File

@ -25,7 +25,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (!argc) if (!argc)
usage(); usage();

View File

@ -40,7 +40,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (argc > 1) if (argc > 1)
usage(); usage();

2
mv.c
View File

@ -45,7 +45,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (argc < 2) if (argc < 2)
usage(); usage();

2
nice.c
View File

@ -25,7 +25,7 @@ main(int argc, char *argv[])
default: default:
usage(); usage();
break; break;
} ARGEND; } ARGEND
if (!argc) if (!argc)
usage(); usage();

2
nl.c
View File

@ -183,7 +183,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (argc > 1) if (argc > 1)
usage(); usage();

2
od.c
View File

@ -258,7 +258,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
/* line length is lcm of type lengths and >= 16 by doubling */ /* line length is lcm of type lengths and >= 16 by doubling */
TAILQ_FOREACH(t, &head, entry) TAILQ_FOREACH(t, &head, entry)

View File

@ -100,7 +100,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (!argc) if (!argc)
usage(); usage();

2
pwd.c
View File

@ -40,7 +40,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (!getcwd(cwd, sizeof(cwd))) if (!getcwd(cwd, sizeof(cwd)))
eprintf("getcwd:"); eprintf("getcwd:");

View File

@ -35,7 +35,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (argc != 1) if (argc != 1)
usage(); usage();

View File

@ -56,7 +56,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (!argc || !adj) if (!argc || !adj)
usage(); usage();

2
rm.c
View File

@ -24,7 +24,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (!argc) { if (!argc) {
if (!(r.flags & SILENT)) if (!(r.flags & SILENT))

View File

@ -23,7 +23,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (!argc) if (!argc)
usage(); usage();

2
sed.c
View File

@ -1706,7 +1706,7 @@ main(int argc, char *argv[])
script = 1; script = 1;
break; break;
default : usage(); default : usage();
} ARGEND; } ARGEND
/* no script to run */ /* no script to run */
if (!script && !argc) if (!script && !argc)

2
seq.c
View File

@ -98,7 +98,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
switch (argc) { switch (argc) {
case 3: case 3:

View File

@ -32,7 +32,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
ret |= cryptfunc(argc, argv, &sha1_ops, md, sizeof(md)); ret |= cryptfunc(argc, argv, &sha1_ops, md, sizeof(md));
ret |= fshut(stdin, "<stdin>") | fshut(stdout, "<stdout>"); ret |= fshut(stdin, "<stdin>") | fshut(stdout, "<stdout>");

View File

@ -32,7 +32,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
ret |= cryptfunc(argc, argv, &sha256_ops, md, sizeof(md)); ret |= cryptfunc(argc, argv, &sha256_ops, md, sizeof(md));
ret |= fshut(stdin, "<stdin>") | fshut(stdout, "<stdout>"); ret |= fshut(stdin, "<stdin>") | fshut(stdout, "<stdout>");

View File

@ -32,7 +32,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
ret |= cryptfunc(argc, argv, &sha512_ops, md, sizeof(md)); ret |= cryptfunc(argc, argv, &sha512_ops, md, sizeof(md));
ret |= fshut(stdin, "<stdin>") | fshut(stdout, "<stdout>"); ret |= fshut(stdin, "<stdin>") | fshut(stdout, "<stdout>");

2
sort.c
View File

@ -291,7 +291,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
/* -b shall only apply to custom key definitions */ /* -b shall only apply to custom key definitions */
if (TAILQ_EMPTY(&kdhead) && global_flags) if (TAILQ_EMPTY(&kdhead) && global_flags)

View File

@ -73,7 +73,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (*argv) if (*argv)
file = *argv++; file = *argv++;

View File

@ -74,7 +74,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (!argc) { if (!argc) {
strings(stdin, "<stdin>", len); strings(stdin, "<stdin>", len);

2
tail.c
View File

@ -106,7 +106,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (!argc) if (!argc)
tail(stdin, "<stdin>", n); tail(stdin, "<stdin>", n);

2
tar.c
View File

@ -523,7 +523,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (!mode) if (!mode)
usage(); usage();

2
tee.c
View File

@ -27,7 +27,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (iflag && signal(SIGINT, SIG_IGN) == SIG_ERR) if (iflag && signal(SIGINT, SIG_IGN) == SIG_ERR)
eprintf("signal:"); eprintf("signal:");

2
tftp.c
View File

@ -269,7 +269,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (!host || !argc) if (!host || !argc)
usage(); usage();

2
time.c
View File

@ -28,7 +28,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (!argc) if (!argc)
usage(); usage();

View File

@ -147,7 +147,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (!argc) if (!argc)
usage(); usage();

2
tr.c
View File

@ -189,7 +189,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (!argc || argc > 2 || (argc == 1 && dflag == sflag)) if (!argc || argc > 2 || (argc == 1 && dflag == sflag))
usage(); usage();

View File

@ -38,7 +38,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (uname(&u) < 0) if (uname(&u) < 0)
eprintf("uname:"); eprintf("uname:");

View File

@ -146,7 +146,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
tablistlen = parselist(tl); tablistlen = parselist(tl);

2
uniq.c
View File

@ -118,7 +118,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (argc > 2) if (argc > 2)
usage(); usage();

View File

@ -242,7 +242,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (argc > 1) if (argc > 1)
usage(); usage();

View File

@ -110,7 +110,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (!argc || argc > 2) if (!argc || argc > 2)
usage(); usage();

2
wc.c
View File

@ -80,7 +80,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (!argc) { if (!argc) {
wc(stdin, NULL); wc(stdin, NULL);

View File

@ -69,7 +69,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
if (!argc) if (!argc)
usage(); usage();

View File

@ -226,7 +226,7 @@ main(int argc, char *argv[])
break; break;
default: default:
usage(); usage();
} ARGEND; } ARGEND
do { do {
argsz = 0; i = 0; a = 0; argsz = 0; i = 0; a = 0;