#include <h/dropsbr.h>
#include <h/rcvmail.h>
#include <h/signals.h>
-#include <h/m_setjmp.h>
+#include <setjmp.h>
#include <h/tws.h>
#include <h/mts.h>
#include <h/utils.h>
#include NDBM_HEADER
#endif
+#ifdef HAVE_GETUTXENT
#include <utmpx.h>
+#endif /* HAVE_GETUTXENT */
static struct swit switches[] = {
#define ADDRSW 0
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 */
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");
}
}
static int
logged_in (void)
{
+#if HAVE_GETUTXENT
struct utmpx *utp;
if (utmped)
}
endutxent();
+#endif /* HAVE_GETUTXENT */
return (utmped = NOTOK);
}
/* 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;
}
default:
/* parent process */
- if (! m_setjmp (myctx)) {
+ if (! setjmp (myctx)) {
SIGNAL (SIGALRM, alrmser);
bytes = fstat (fd, &st) != -1 ? (int) st.st_size : 100;
/* 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))