X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fslocal.c;h=869fa17f81a3a4ca51816059451d6e597e44af33;hb=bfad64befb4d6696fdfb63b119666eec4bac6fb3;hp=5026d82ccd6cb8bdddb0f68aee8baa35a131efab;hpb=7ba29497ff3f164e2a507eda35e81f1cb0658c74;p=mmh diff --git a/uip/slocal.c b/uip/slocal.c index 5026d82..869fa17 100644 --- a/uip/slocal.c +++ b/uip/slocal.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include @@ -51,7 +51,9 @@ #include NDBM_HEADER #endif +#ifdef HAVE_GETUTXENT #include +#endif /* HAVE_GETUTXENT */ static struct swit switches[] = { #define ADDRSW 0 @@ -220,13 +222,12 @@ main (int argc, char **argv) adios (NULL, "-%s unknown", cp); case HELPSW: - snprintf (buf, sizeof(buf), - "%s [switches] [address info sender]", invo_name); + snprintf (buf, sizeof(buf), "%s [switches]", invo_name); print_help (buf, switches, 0); - done (1); + done (0); case VERSIONSW: print_version(invo_name); - done (1); + done (0); case ADDRSW: if (!(addr = *argp++))/* allow -xyz arguments */ @@ -282,20 +283,8 @@ main (int argc, char **argv) debug++; continue; } - } - - switch (argp - (argv + 1)) { - case 1: - addr = cp; - break; - - case 2: - info = cp; - break; - - case 3: - sender = cp; - break; + } else { + adios (NULL, "only switch arguments are supported"); } } @@ -930,6 +919,7 @@ lookup (struct pair *pairs, char *key) static int logged_in (void) { +#if HAVE_GETUTXENT struct utmpx *utp; if (utmped) @@ -948,6 +938,7 @@ logged_in (void) } endutxent(); +#endif /* HAVE_GETUTXENT */ return (utmped = NOTOK); } @@ -1053,18 +1044,6 @@ usr_folder (int fd, char *string) /* use rcvstore to put message in folder */ status = usr_pipe (fd, "rcvstore", rcvstoreproc, vec, 1); -#if 0 - /* - * Currently, verbose status messages are handled by usr_pipe(). - */ - if (verbose) { - if (status == 0) - verbose_printf (", success.\n"); - else - verbose_printf (", failed.\n"); - } -#endif - return status; } @@ -1123,7 +1102,7 @@ usr_pipe (int fd, char *cmd, char *pgm, char **vec, int suppress) default: /* parent process */ - if (! m_setjmp (myctx)) { + if (! setjmp (myctx)) { SIGNAL (SIGALRM, alrmser); bytes = fstat (fd, &st) != -1 ? (int) st.st_size : 100; @@ -1286,13 +1265,6 @@ you_lose: /* get copy of envelope information ("From " line) */ envelope = getcpy (buffer); -#if 0 - /* First go ahead and put "From " line in message */ - fputs (buffer, ffp); - if (ferror (ffp)) - goto fputs_error; -#endif - /* Put the delivery date in message */ fputs (ddate, ffp); if (ferror (ffp))