int draftsw = 0, headersw = 1;
int nshow = 0, checkmime = 1, mime;
int isdf = 0, mode = SHOW, msgnum;
int draftsw = 0, headersw = 1;
int nshow = 0, checkmime = 1, mime;
int isdf = 0, mode = SHOW, msgnum;
- char *cp, *maildir, *file = NULL, *folder = NULL, *proc;
+ char *cp, *maildir, *file = NULL, *folder = NULL, *proc, *program;
char buf[BUFSIZ], **argp, **arguments;
struct msgs *mp = NULL;
struct msgs_array msgs = { 0, 0, NULL };
struct msgs_array vec = { 0, 0, NULL };
char buf[BUFSIZ], **argp, **arguments;
struct msgs *mp = NULL;
struct msgs_array msgs = { 0, 0, NULL };
struct msgs_array vec = { 0, 0, NULL };
- app_msgarg(&vec, NULL); /* placeholder, filled later with proc name */
-
- /* read user profile/context */
- context_read();
-
- if (!mh_strcasecmp (invo_name, "next")) {
+ if (!strcasecmp (invo_name, "next")) {
mode = PREV;
}
arguments = getarguments (invo_name, argc, argv, 1);
mode = PREV;
}
arguments = getarguments (invo_name, argc, argv, 1);
adios (maildir, "unable to change directory to");
/* read folder and create message structure */
adios (maildir, "unable to change directory to");
/* read folder and create message structure */
adios (NULL, "unable to read folder %s", folder);
/* check for empty folder */
adios (NULL, "unable to read folder %s", folder);
/* check for empty folder */
context_replace (pfolder, folder); /* update current folder */
context_save (); /* save the context file */
context_replace (pfolder, folder); /* update current folder */
context_save (); /* save the context file */
- if (headersw && vec.size == 2)
- printf ("(Message %s:%s)\n", folder, vec.msgs[1]);
+ if (headersw && vec.size == 1)
+ printf ("(Message %s:%s)\n", folder, vec.msgs[0]);
}
} else if (strcmp (r1bindex (proc, '/'), "mhl") == 0) {
/* If "mhl", then run it internally */
}
} else if (strcmp (r1bindex (proc, '/'), "mhl") == 0) {
/* If "mhl", then run it internally */
adios (proc, "unable to exec");
return 0; /* dead code to satisfy the compiler */
}
adios (proc, "unable to exec");
return 0; /* dead code to satisfy the compiler */
}
- for (state = FLD;;) {
- switch (state = m_getfld (state, name, buf, sizeof(buf), fp)) {
+ for (;;) {
+ int bufsz = sizeof buf;
+ switch (state = m_getfld (&gstate, name, buf, &bufsz, fp)) {
- state = m_getfld (state, name, buf, sizeof(buf), fp);
+ bufsz = sizeof buf;
+ state = m_getfld (&gstate, name, buf, &bufsz, fp);
continue;
if (*dp) {
if ((result = !uprf (dp, "charset")))
goto out;
dp += sizeof("charset") - 1;
continue;
if (*dp) {
if ((result = !uprf (dp, "charset")))
goto out;
dp += sizeof("charset") - 1;
/* Check the character set */
result = !check_charset (dp, strlen (dp));
} else {
/* Check the character set */
result = !check_charset (dp, strlen (dp));
} else {
- state = m_getfld (state, name, buf, sizeof(buf), fp);
+ bufsz = sizeof buf;
+ state = m_getfld (&gstate, name, buf, &bufsz, fp);
- result = (mh_strcasecmp (bp, "7bit")
- && mh_strcasecmp (bp, "8bit")
- && mh_strcasecmp (bp, "binary"));
+ result = (strcasecmp (bp, "7bit")
+ && strcasecmp (bp, "8bit")
+ && strcasecmp (bp, "binary"));
- while (state == FLDPLUS)
- state = m_getfld (state, name, buf, sizeof(buf), fp);
+ while (state == FLDPLUS) {
+ bufsz = sizeof buf;
+ state = m_getfld (&gstate, name, buf, &bufsz, fp);
+ }