diff options
author | Roland McGrath <roland@redhat.com> | 1992-05-11 18:11:40 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 1992-05-11 18:11:40 +0000 |
commit | cfe0c54e8c3908cb32ef032310a39198b9da6d3a (patch) | |
tree | 5606d15e566b74edf5307a03f4de70d79ef6bcdf /main.c | |
parent | 81db471695ed6b46fd60f34040bf20fc35ad5c30 (diff) | |
download | gunmake-cfe0c54e8c3908cb32ef032310a39198b9da6d3a.tar.gz |
Formerly main.c.~42~
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -1037,7 +1037,8 @@ decode_switches (argc, argv) *p++ = '-'; /* Non-option args are returned in order. */ for (i = 0; switches[i].c != '\0'; ++i) { - long_options[i].name = switches[i].long_name; + long_options[i].name = (switches[i].long_name == 0 ? "" : + switches[i].long_name); *p++ = switches[i].c; switch (switches[i].type) { @@ -1091,8 +1092,8 @@ decode_switches (argc, argv) } else for (cs = switches; cs->c != '\0'; ++cs) - { - if (cs->c == c) + if (cs->c == c) + { switch (cs->type) { default: @@ -1158,9 +1159,9 @@ positive integral argument", break; } - /* We've found the switch. Stop looking. */ - break; - } + /* We've found the switch. Stop looking. */ + break; + } } if (other_args != 0) |