projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace done with exit at uip
[mmh]
/
uip
/
whom.c
diff --git
a/uip/whom.c
b/uip/whom.c
index
0451699
..
fb77ab3
100644
(file)
--- a/
uip/whom.c
+++ b/
uip/whom.c
@@
-85,7
+85,7
@@
main(int argc, char **argv)
switch (smatch(++cp, switches)) {
case AMBIGSW:
ambigsw(cp, switches);
switch (smatch(++cp, switches)) {
case AMBIGSW:
ambigsw(cp, switches);
- done(1);
+ exit(1);
case UNKWNSW:
adios(NULL, "-%s unknown", cp);
case UNKWNSW:
adios(NULL, "-%s unknown", cp);
@@
-95,10
+95,10
@@
main(int argc, char **argv)
"%s [switches] file ...",
invo_name);
print_help(buf, switches, 1);
"%s [switches] file ...",
invo_name);
print_help(buf, switches, 1);
- done(1);
+ exit(0);
case VERSIONSW:
print_version(invo_name);
case VERSIONSW:
print_version(invo_name);
- done(1);
+ exit(0);
case TOCCSW:
toccsw = 1;
case TOCCSW:
toccsw = 1;
@@
-153,10
+153,6
@@
main(int argc, char **argv)
free(cmd);
naddrs += n;
free(cmd);
naddrs += n;
- if (toccsw && bccsw) {
- puts(separator);
- }
-
cmd = add("ali -list", NULL);
if ((n=printbcc()) && alisw) {
if (!(in = popen(cmd, "r"))) {
cmd = add("ali -list", NULL);
if ((n=printbcc()) && alisw) {
if (!(in = popen(cmd, "r"))) {
@@
-177,7
+173,7
@@
static int
process(char *file)
{
int state, compnum;
process(char *file)
{
int state, compnum;
- char *cp;
+ char *cp = NULL;
char buf[BUFSIZ], name[NAMESZ];
FILE *in;
char buf[BUFSIZ], name[NAMESZ];
FILE *in;
@@
-314,6
+310,9
@@
printbcc(void)
continue;
}
if (mp->m_type & HBCC) {
continue;
}
if (mp->m_type & HBCC) {
+ if (!naddrs && toccsw) {
+ puts(separator);
+ }
naddrs++;
printone(mp);
}
naddrs++;
printone(mp);
}