X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/e8eb3afba50cbec8d1aeabcf85a06084977d54cd..5ed8cd671b27e1388c0c7e881805775a8e5b353a:/uip/mhparam.c diff --git a/uip/mhparam.c b/uip/mhparam.c index c52410c0..17705bc8 100644 --- a/uip/mhparam.c +++ b/uip/mhparam.c @@ -1,6 +1,4 @@ - -/* - * mhparam.c -- print mh_profile values +/* mhparam.c -- print mh_profile values * * Originally contributed by * Jeffrey C Honig @@ -12,6 +10,7 @@ #include #include +#include #define MHPARAM_SWITCHES \ X("components", 0, COMPSW) \ @@ -196,10 +195,10 @@ main(int argc, char **argv) struct node *np; if (compp) - advise(NULL, "profile-components ignored with -all"); + inform("profile-components ignored with -all"); if (components >= 0) - advise(NULL, "-%scomponents ignored with -all", + inform("-%scomponents ignored with -all", components ? "" : "no"); /* Print all entries in context/profile list. That does not @@ -207,7 +206,9 @@ main(int argc, char **argv) for (np = m_defs; np; np = np->n_next) printf("%s: %s\n", np->n_name, np->n_field); - } else if (debug) { + } + + if (debug) { struct proc *ps; /* In case datalocking was set in profile. */ @@ -228,9 +229,11 @@ main(int argc, char **argv) * value (as determined after context is read). */ for (ps = procs; ps->p_name; ps++) - printf ("%s: %s\n", ps->p_name, *ps->p_field ? *ps->p_field : ""); + printf ("%s: %s\n", ps->p_name, FENDNULL(*ps->p_field)); + + } - } else { + if (! all) { if (components < 0) components = compp > 1;