From: markus schnalke Date: Wed, 14 Jan 2015 06:53:31 +0000 (+0100) Subject: Remove verbosity for -noverbose; cleanup in code layout and message texts X-Git-Tag: mmh-0.2-RC1~77 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=3c2d2abb007c8d97c6a09d9be0e70367518afe30;p=mmh Remove verbosity for -noverbose; cleanup in code layout and message texts We shouldn't print information messages if we run non-verbosely. In this case, the message appeared not to be helpful because it suggests to re-run the command with `-verbose' ... but sending the message again is usually not possible, not wanted or would produce different results. This is a cleanup of Philipp's patch. --- diff --git a/uip/send.c b/uip/send.c index 3ca6772..c2c9f17 100644 --- a/uip/send.c +++ b/uip/send.c @@ -24,8 +24,7 @@ #include int debugsw = 0; /* global */ -int verbosesw = 0; -char *altmsg = NULL; +char *altmsg = NULL; char *annotext = NULL; char *distfile = NULL; @@ -118,9 +117,7 @@ main(int argc, char **argv) debugsw++; /* fall */ case VERBSW: - verbosesw += 2; case NVERBSW: - verbosesw--; vec[vecp++] = --cp; continue; } @@ -653,12 +650,9 @@ sendaux(char **vec, int vecp, char *drft, struct stat *st) if (annotext) { anno(st); } - } - else { + } else { + /* spost failed */ advise(NULL, "%s", strexit(status)); - if (verbosesw <= 0) { - advise(NULL, "Try using -v to get better output"); - } if (distfile) { unlink(drft); if (rename(backup, drft) == NOTOK) { @@ -722,13 +716,13 @@ strexit(int status) return "spost or sendmail killed by signal"; } if (!WIFEXITED(status)) { - return "sendmail stopt for unknown reasen, message not deliverd to anyone"; + return "message not delivered to anyone"; } switch (WEXITSTATUS(status)) { - case EX_TEMPFAIL: - return "Temporary error, maby the MTA hase queued the Mail"; - default: - return "sendmail stopt for unknown reasen, message not deliverd to anyone"; + case EX_TEMPFAIL: + return "Temporary error, maybe the MTA has queued the message"; + default: + return "message not delivered to anyone"; } }