*/
#include "h/mh.h"
+#include "sbr/m_name.h"
+#include "sbr/m_gmprot.h"
+#include "sbr/getarguments.h"
+#include "sbr/seq_setprev.h"
+#include "sbr/seq_setcur.h"
+#include "sbr/seq_save.h"
+#include "sbr/smatch.h"
+#include "sbr/m_convert.h"
#include "sbr/m_backup.h"
#include "sbr/getfolder.h"
#include "sbr/ext_hook.h"
continue;
case MIMESW:
- mimesw = 2;
+ mimesw = 2;
continue;
case NMIMESW:
- mimesw = 0;
+ mimesw = 0;
continue;
case AUTOMIMESW:
- mimesw = 1;
+ mimesw = 1;
continue;
case QIETSW:
*/
if (*mimesw > 0) {
- content = parse_mime(msgnam);
+ content = parse_mime(msgnam);
if (! content && *mimesw == 2)
return 0;
if (content) {
find_mime_parts(content, smsgs, &msgp);
free_content(content);
if (msgp == 1 && *mimesw == 2)
- adios (msgnam, "does not have any message/rfc822 parts");
+ adios (msgnam, "does not have any message/rfc822 parts");
if (msgp > 1) {
- *mimesw = 1;
+ *mimesw = 1;
return msgp - 1;
}
}
adios (msgnam, "unable to read message");
for (msgp = 0, pos = 0L; msgp <= MAXFOLDER;) {
- /*
+ /*
* We're either at the beginning of the whole message, or
* we're just past the delimiter of the last message.
* Swallow lines until we get to something that's not a newline
*/
if (content->c_type == CT_MESSAGE &&
- content->c_subtype == MESSAGE_RFC822) {
+ content->c_subtype == MESSAGE_RFC822) {
smsgs[*msgp].s_start = content->c_begin;
smsgs[*msgp].s_stop = content->c_end;
(*msgp)++;
*/
if (content->c_type == CT_MULTIPART) {
- m = (struct multipart *) content->c_ctparams;
+ m = (struct multipart *) content->c_ctparams;
for (part = m->mp_parts; part; part = part->mp_next)
find_mime_parts(part->mp_part, smsgs, msgp);
*/
if (inplace) {
for (i = mp->hghmsg; j > msgnum; i--, j--) {
- strncpy (f1, m_name (i), sizeof(f1));
- strncpy (f2, m_name (j), sizeof(f2));
+ strncpy (f1, m_name (i), sizeof(f1) - 1);
+ strncpy (f2, m_name (j), sizeof(f2) - 1);
if (does_exist (mp, j)) {
if (verbosw)
printf ("message %d becomes message %d\n", j, i);
die("unable to create temporary file in %s",
get_temp_dir());
}
- strncpy (f2, tempfile, sizeof(f2));
- strncpy (f1, m_name (i), sizeof(f1));
+ strncpy (f2, tempfile, sizeof(f2) - 1);
+ strncpy (f1, m_name (i), sizeof(f1) - 1);
if (verbosw && i != msgnum)
printf ("message %d of digest %d becomes message %d\n", j, msgnum, i);
fclose (out);
if (i == msgnum) {
- strncpy (f3, m_backup (f1), sizeof(f3));
+ strncpy (f3, m_backup (f1), sizeof(f3) - 1);
if (rename (f1, f3) == NOTOK)
admonish (f3, "unable to rename %s to", f1);
break;
case S4:
- fputc (c, out);
+ fputc (c, out);
break;
}
}