X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fmhmail.c;h=6c5039c63b25003209ae990994982fd968316183;hb=0ecdc197e9a9a4d2bb6dce395dea152fbc728b6b;hp=e5868609584aea49e60068d837bb5d189f77fb0d;hpb=5dd6771b28c257af405d7248639ed0e3bcdce38b;p=mmh diff --git a/uip/mhmail.c b/uip/mhmail.c index e586860..6c5039c 100644 --- a/uip/mhmail.c +++ b/uip/mhmail.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include @@ -37,14 +38,15 @@ static char tmpfil[BUFSIZ]; /* * static prototypes */ -static RETSIGTYPE intrser (int); +static void intrser (int); int main (int argc, char **argv) { pid_t child_id; - int status, i, iscc = 0, nvec; + int status, iscc = 0, nvec; + size_t i; int queued = 0, resent = 0, somebody; char *cp, *tolist = NULL, *cclist = NULL, *subject = NULL; char *from = NULL, *body = NULL, **argp, **arguments; @@ -83,10 +85,10 @@ main (int argc, char **argv) snprintf (buf, sizeof(buf), "%s [addrs ... [switches]]", invo_name); print_help (buf, switches, 0); - done (1); + done (0); case VERSIONSW: print_version(invo_name); - done (1); + done (0); case FROMSW: if (!(from = *argp++) || *from == '-') @@ -139,6 +141,8 @@ main (int argc, char **argv) fprintf (out, "%sSubject: %s\n", resent ? "Resent-" : "", subject); if (from) fprintf (out, "%sFrom: %s\n", resent ? "Resent-" : "", from); + else + fprintf (out, "From: %s\n", getlocalmbox ()); if (!resent) fputs ("\n", out); @@ -197,14 +201,9 @@ main (int argc, char **argv) } -static RETSIGTYPE +static void intrser (int i) { -#ifndef RELIABLE_SIGNALS - if (i) - SIGNAL (i, SIG_IGN); -#endif - unlink (tmpfil); done (i != 0 ? 1 : 0); }