#endif
#include "h/mh.h"
+#include "sbr/fmt_new.h"
+#include "sbr/dtime.h"
+#include "scansbr.h"
#include "sbr/m_name.h"
#include "sbr/m_gmprot.h"
#include "sbr/getarguments.h"
#include "h/utils.h"
#include <fcntl.h>
#include "h/dropsbr.h"
-#include "h/popsbr.h"
+#include "popsbr.h"
#include "h/fmt_scan.h"
-#include "h/scansbr.h"
#include "h/signals.h"
#include "h/tws.h"
#include "h/mts.h"
FILE *aud = NULL;
char b[PATH_MAX + 1];
char *maildir_copy = NULL; /* copy of mail directory because the static gets overwritten */
+ charstring_t scanl = NULL;
int nmsgs, nbytes;
char *MAILHOST_env_variable;
hghnum = msgnum = mp->hghmsg;
for (i = 1; i <= nmsgs; i++) {
- charstring_t scanl = NULL;
msgnum++;
cp = mh_xstrdup(m_name (msgnum));
fflush (stdout);
break;
}
- charstring_free (scanl);
+
+ if (scanl)
+ charstring_clear (scanl);
if (ferror(pf) || fclose (pf)) {
int e = errno;
scan_finished();
}
+ charstring_free (scanl);
+ scanl = NULL;
+
if (pop_quit () == NOTOK)
die("%s", response);
scan_detect_mbox_style (in); /* the MAGIC invocation... */
hghnum = msgnum = mp->hghmsg;
for (;;) {
- charstring_t scanl = NULL;
-
/* create scanline for new message */
switch (incerr = scan (in, msgnum + 1, msgnum + 1, nfs, width,
msgnum == hghnum && chgflag, 1, NULL, 0L, noisy,
if (noisy)
fflush (stdout);
+ charstring_clear (scanl);
msgnum++;
continue;
}
- charstring_free (scanl);
/* If we get here there was some sort of error from scan(),
* so stop processing anything more from the spool.
*/
break;
}
+ charstring_free (scanl);
+ scanl = NULL;
} else {
/* Mail from Maildir. */
hghnum = msgnum = mp->hghmsg;
for (i = 0; i < num_maildir_entries; i++) {
- charstring_t scanl = NULL;
-
msgnum++;
sp = Maildir[i].filename;
fflush (stdout);
break;
}
- charstring_free (scanl);
+ charstring_clear (scanl);
if (ferror(pf) || fclose (pf)) {
int e = errno;
scan_finished();
}
free (Maildir); /* From now on Maildir is just a flag - don't dref! */
+ charstring_free (scanl);
+ scanl = NULL;
}
scan_finished ();