anything useful, so there are a few #if 0's remaining.
twscopy (struct tws *tb, struct tws *tw)
{
*tb = *tw; /* struct copy */
-
-#if 0
- tb->tw_sec = tw->tw_sec;
- tb->tw_min = tw->tw_min;
- tb->tw_hour = tw->tw_hour;
- tb->tw_mday = tw->tw_mday;
- tb->tw_mon = tw->tw_mon;
- tb->tw_year = tw->tw_year;
- tb->tw_wday = tw->tw_wday;
- tb->tw_yday = tw->tw_yday;
- tb->tw_zone = tw->tw_zone;
- tb->tw_clock = tw->tw_clock;
- tb->tw_flags = tw->tw_flags;
-#endif
}
static void initialize_readline(void);
static char ansbuf[BUFSIZ];
-#if 0
-static sigjmp_buf sigenv;
-
-/*
- * static prototypes
- */
-static void intrser (int);
-
-
-char **
-getans (char *prompt, struct swit *ansp)
-{
- int i;
- SIGNAL_HANDLER istat = NULL;
- char *cp, **cpp;
-
- if (!(sigsetjmp(sigenv, 1))) {
- istat = SIGNAL (SIGINT, intrser);
- } else {
- SIGNAL (SIGINT, istat);
- return NULL;
- }
-
- for (;;) {
- printf ("%s", prompt);
- fflush (stdout);
- cp = ansbuf;
- while ((i = getchar ()) != '\n') {
- if (i == EOF) {
- /*
- * If we get an EOF, return
- */
- if (feof(stdin))
- siglongjmp (sigenv, 1);
-
- /*
- * For errors, if we get an EINTR that means that we got
- * a signal and we should retry. If we get another error,
- * then just return.
- */
-
- else if (ferror(stdin)) {
- if (errno == EINTR) {
- clearerr(stdin);
- continue;
- }
- fprintf(stderr, "\nError %s during read\n",
- strerror(errno));
- siglongjmp (sigenv, 1);
- } else {
- /*
- * Just for completeness's sake ...
- */
-
- fprintf(stderr, "\nUnknown problem in getchar()\n");
- siglongjmp (sigenv, 1);
- }
- }
- if (cp < &ansbuf[sizeof ansbuf - 1])
- *cp++ = i;
- }
- *cp = '\0';
- if (ansbuf[0] == '?' || cp == ansbuf) {
- printf ("Options are:\n");
- print_sw (ALL, ansp, "", stdout);
- continue;
- }
- cpp = brkstring (ansbuf, " ", NULL);
- switch (smatch (*cpp, ansp)) {
- case AMBIGSW:
- ambigsw (*cpp, ansp);
- continue;
- case UNKWNSW:
- printf (" -%s unknown. Hit <CR> for help.\n", *cpp);
- continue;
- default:
- SIGNAL (SIGINT, istat);
- return cpp;
- }
- }
-}
-
-
-static void
-intrser (int i)
-{
- NMH_UNUSED (i);
-
- /*
- * should this be siglongjmp?
- */
- siglongjmp (sigenv, 1);
-}
-#endif
/*
* getans, but with readline support
}
mnfree (mp);
-#if 0
- printf ("%s: ", s);
- print_aka (vp ? vp : s, list, pos += strlen (s) + 1);
-#else
print_aka (vp ? vp : s, list, 0);
-#endif
if (vp)
free (vp);
break;
}
-#if 0
- /* copy file from spool to tmp file */
- tmpfilenam = m_scratch ("", invo_name);
- if ((fd = creat (tmpfilenam, m_gmprot ())) == NOTOK)
- adios (tmpfilenam, "unable to create");
- chmod (tmpfilenam, m_gmprot ());
- if (!(in2 = fdopen (fd, "r+")))
- adios (tmpfilenam, "unable to access");
- cpymsg (in, in2);
-
- /* link message into folder */
- newmsg = folder_addmsg(mp, tmpfilenam);
-#endif
/* create scanline for new message */
switch (incerr = scan (in, msgnum + 1, msgnum + 1, nfs, width,
msgnum == hghnum && chgflag, 1, NULL, 0L, noisy)) {
}
-#if 0
-
-/*
- * Copy message message from spool into
- * temporary file. Massage the "From " line
- * while copying.
- */
-
-cpymsg (FILE *in, FILE *out)
-{
- int state;
- char *tmpbuf, name[NAMESZ];
-
- for (;;) {
- state = m_getfld (state, name, tmpbuf, rlwidth, in);
- switch (state) {
- case FLD:
- case FLDPLUS:
- break;
- case BODY:
- break;
- case LENERR:
- case FMTERR:
- break;
- case FILEEOF:
- break;
- default:
- }
- }
-}
-#endif /* if 0 */
-
-
static void
inc_done (int status)
{
switch (ct->c_encoding) {
case CE_7BIT:
/* Nothing to output */
-#if 0
- np = add (ENCODING_FIELD, NULL);
- vp = concat (" ", "7bit", "\n", NULL);
- add_header (ct, np, vp);
-#endif
break;
case CE_8BIT:
return;
}
-/* THIS NEEDS TO BE FIXED */
-#if 0
- if (ct->c_ceopenfnx == openMail) {
- advise (NULL, "a radish may no know Greek, but I do...");
- return;
- }
-#endif
-
if (find_cache (NULL, wcachesw != CACHE_NEVER ? wcachesw : CACHE_ASK,
&cachetype, ct->c_id, cachefile, sizeof(cachefile))
== NOTOK) {
return OK;
return show_switch (p, serial, alternate);
-
-#if 0
- content_error (NULL, p, "don't know how to display content");
- return NOTOK;
-#endif
}
msgnum += (revflag ? -1 : 1)) {
if (is_selected(mp, msgnum)) {
if ((in = fopen (cp = m_name (msgnum), "r")) == NULL) {
-#if 0
- if (errno != EACCES)
-#endif
admonish (cp, "unable to open message");
-#if 0
- else
- printf ("%*d unreadable\n", DMAXFOLDER, msgnum);
-#endif
continue;
}
adios (NULL, "scan() botch (%d)", state);
case SCNEOF:
-#if 0
- printf ("%*d empty\n", DMAXFOLDER, msgnum);
-#else
advise (NULL, "message %d: empty", msgnum);
-#endif
break;
}
hdrflag = 0;
/* 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;
}
/* 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))