* show.c -- show/list messages
*
* $Id$
+ *
+ * This code is Copyright (c) 2002, by the authors of nmh. See the
+ * COPYRIGHT file in the root directory of the nmh distribution for
+ * complete copyright information.
*/
#include <h/mh.h>
#include <h/mime.h>
+#include <h/utils.h>
static struct swit switches[] = {
#define CHECKMIMESW 0
*/
static int is_nontext(char *);
+/* prototype from mhlsbr.c */
+int mhl (int, char **);
+
#define SHOW 0
#define NEXT 1
#define PREV 2
/* read user profile/context */
context_read();
- if (!strcasecmp (invo_name, "next")) {
+ if (!mh_strcasecmp (invo_name, "next")) {
mode = NEXT;
- } else if (!strcasecmp (invo_name, "prev")) {
+ } else if (!mh_strcasecmp (invo_name, "prev")) {
mode = PREV;
}
arguments = getarguments (invo_name, argc, argv, 1);
/*
* Check Content-Type field
*/
- if (!strcasecmp (name, TYPE_FIELD)) {
+ if (!mh_strcasecmp (name, TYPE_FIELD)) {
int passno;
char c;
if (!*bp)
goto invalid;
if (passno > 1) {
- if ((result = (strcasecmp (bp, "plain") != 0)))
+ if ((result = (mh_strcasecmp (bp, "plain") != 0)))
goto out;
*dp = c;
for (dp++; isspace (*dp); dp++)
*bp = '\0';
} else {
for (bp = dp; *bp; bp++)
- if (isspace (*bp)) {
+ if (!istoken (*bp)) {
*bp = '\0';
break;
}
/* Check the character set */
result = !check_charset (dp, strlen (dp));
} else {
- if (!(result = (strcasecmp (bp, "text") != 0))) {
+ if (!(result = (mh_strcasecmp (bp, "text") != 0))) {
*dp = c;
bp = dp;
passno = 2;
/*
* Check Content-Transfer-Encoding field
*/
- if (!strcasecmp (name, ENCODING_FIELD)) {
+ if (!mh_strcasecmp (name, ENCODING_FIELD)) {
cp = add (buf, NULL);
while (state == FLDPLUS) {
state = m_getfld (state, name, buf, sizeof(buf), fp);
for (dp = bp; istoken (*dp); dp++)
continue;
*dp = '\0';
- result = (strcasecmp (bp, "7bit")
- && strcasecmp (bp, "8bit")
- && strcasecmp (bp, "binary"));
+ result = (mh_strcasecmp (bp, "7bit")
+ && mh_strcasecmp (bp, "8bit")
+ && mh_strcasecmp (bp, "binary"));
free (cp);
if (result) {