X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fslocal.c;h=9d468025e5e7e0fc87091524d1fcb7239c4b0a8a;hb=7d3201b86a4f310a8c185a9c40f0bb516f6402f1;hp=c0f0922db1a7a7fbadf896ae9bb73f4e68c24873;hpb=403bc56ffdf4679f5159d926c5774ad042c55ac9;p=mmh diff --git a/uip/slocal.c b/uip/slocal.c index c0f0922..9d46802 100644 --- a/uip/slocal.c +++ b/uip/slocal.c @@ -59,11 +59,11 @@ static struct swit switches[] = { #define VERBSW 8 { "verbose", 0 }, #define NVERBSW 9 - { "noverbose", 0 }, + { "noverbose", 2 }, #define DEBUGSW 10 { "debug", 0 }, #define VERSIONSW 11 - { "version", 0 }, + { "Version", 0 }, #define HELPSW 12 { "help", 0 }, { NULL, 0 } @@ -174,9 +174,7 @@ main(int argc, char **argv) char mailbox[BUFSIZ], tmpfil[BUFSIZ]; char **argp, **arguments; -#ifdef LOCALE setlocale(LC_ALL, ""); -#endif invo_name = mhbasename(*argv); /* foil search of user profile/context */ @@ -319,7 +317,7 @@ main(int argc, char **argv) if (!(now = dlocaltimenow())) { adios(NULL, "unable to ascertain local time"); } - snprintf(ddate, sizeof(ddate), "Delivery-Date: %s\n", dtimenow(0)); + snprintf(ddate, sizeof(ddate), "Delivery-Date: %s\n", dtimenow()); /* ** Copy the message to a temporary file @@ -1107,6 +1105,7 @@ get_sender(char *envelope, char **sender) i = strlen("From "); strncpy(buffer, envelope + i, sizeof(buffer)); + buffer[sizeof buffer -1] = '\0'; /* ensure termination */ if ((cp = strchr(buffer, '\n'))) { *cp = '\0'; cp -= 24;