projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Drop register storage class
[mmh]
/
uip
/
mhparam.c
diff --git
a/uip/mhparam.c
b/uip/mhparam.c
index
1d95377
..
76fe427
100644
(file)
--- a/
uip/mhparam.c
+++ b/
uip/mhparam.c
@@
-10,6
+10,7
@@
*/
#include <h/mh.h>
*/
#include <h/mh.h>
+#include <sysexits.h>
static struct swit switches[] = {
#define COMPSW 0
static struct swit switches[] = {
#define COMPSW 0
@@
-140,18
+141,17
@@
main(int argc, char **argv)
switch (smatch(++cp, switches)) {
case AMBIGSW:
ambigsw(cp, switches);
switch (smatch(++cp, switches)) {
case AMBIGSW:
ambigsw(cp, switches);
- /*sysexits.h EX_USAGE*/
- exit(1);
+ exit(EX_USAGE);
case UNKWNSW:
case UNKWNSW:
- adios(NULL, "-%s unknown", cp);
+ adios(EX_USAGE, NULL, "-%s unknown", cp);
case HELPSW:
snprintf(buf, sizeof(buf), "%s [profile-components] [switches]", invo_name);
print_help(buf, switches, 1);
case HELPSW:
snprintf(buf, sizeof(buf), "%s [profile-components] [switches]", invo_name);
print_help(buf, switches, 1);
- exit(0);
+ exit(argc == 2 ? EX_OK : EX_USAGE);
case VERSIONSW:
print_version(invo_name);
case VERSIONSW:
print_version(invo_name);
- exit(0);
+ exit(argc == 2 ? EX_OK : EX_USAGE);
case COMPSW:
components = 1;
case COMPSW:
components = 1;
@@
-204,7
+204,7
@@
main(int argc, char **argv)
components = compp > 1;
for (i = 0; i < compp; i++) {
components = compp > 1;
for (i = 0; i < compp; i++) {
- register char *value;
+ char *value;
value = context_find(comps[i]);
if (!value)
value = context_find(comps[i]);
if (!value)