X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Finc.c;h=07440b123f3cd5e56f668dc28abcbbd45ba5c0dd;hb=bfad64befb4d6696fdfb63b119666eec4bac6fb3;hp=edb288f135689d4d9b8994dab94ad7868d0cc5ac;hpb=7e5bac1a416e400bd3c8941b1c312577f2d9e9e4;p=mmh diff --git a/uip/inc.c b/uip/inc.c index edb288f..07440b1 100644 --- a/uip/inc.c +++ b/uip/inc.c @@ -89,9 +89,11 @@ static struct swit switches[] = { { "snoop", -5 }, #define SASLSW 20 { "sasl", SASLminc(-4) }, -#define SASLMECHSW 21 +#define NOSASLSW 21 + { "nosasl", SASLminc(-6) }, +#define SASLMECHSW 22 { "saslmech", SASLminc(-8) }, -#define PROXYSW 22 +#define PROXYSW 23 { "proxy command", 0 }, { NULL, 0 } }; @@ -202,7 +204,7 @@ main (int argc, char **argv) struct msgs *mp = NULL; struct stat st, s1; FILE *aud = NULL; - char b[MAXPATHLEN + 1]; + char b[PATH_MAX + 1]; char *maildir_copy = NULL; /* copy of mail directory because the static gets overwritten */ int nmsgs, nbytes; @@ -245,9 +247,6 @@ main (int argc, char **argv) if (pophost && *pophost) host = pophost; - if ((cp = getenv ("MHPOPDEBUG")) && *cp) - snoop++; - while ((cp = *argp++)) { if (*cp == '-') { switch (smatch (++cp, switches)) { @@ -260,10 +259,10 @@ main (int argc, char **argv) case HELPSW: snprintf (buf, sizeof(buf), "%s [+folder] [switches]", invo_name); print_help (buf, switches, 1); - done (1); + done (0); case VERSIONSW: print_version(invo_name); - done (1); + done (0); case AUDSW: if (!(cp = *argp++) || *cp == '-') @@ -338,7 +337,7 @@ main (int argc, char **argv) continue; case PORTSW: - if (!(host = *argp++) || *port == '-') + if (!(port = *argp++) || *port == '-') adios (NULL, "missing argument to %s", argp[-2]); continue; @@ -362,6 +361,9 @@ main (int argc, char **argv) case SASLSW: sasl++; continue; + case NOSASLSW: + sasl = 0; + continue; case SASLMECHSW: if (!(saslmech = *argp++) || *saslmech == '-') @@ -732,19 +734,6 @@ go_to_it: 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)) { @@ -973,39 +962,6 @@ go_to_it: } -#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) {