From 4e64abbe6c52d61bb01b85c266e33e30b257ba68 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 27 Nov 2006 00:23:52 +0100 Subject: [PATCH 1/1] Use m_functions(), you'll be fresh-faced. Signed-off-by: Julien Danjou Signed-off-by: Pierre Habouzit --- buffy.c | 2 +- charset.c | 6 +++--- init.c | 2 +- lib-lib/rx.c | 4 ++-- lib-mime/rfc3676.c | 4 ++-- makedoc.c | 22 +++++++++++----------- pager.c | 2 +- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/buffy.c b/buffy.c index 27396d9..2aaa494 100644 --- a/buffy.c +++ b/buffy.c @@ -64,7 +64,7 @@ int buffy_parse_mailboxes(BUFFER *path, BUFFER *s, unsigned long data, mutt_extract_token(path, s, 0); m_strcpy(buf, sizeof(buf), path->data); - if (data == M_UNMAILBOXES && !strcmp(buf, "*")) { + if (data == M_UNMAILBOXES && !m_strcmp(buf, "*")) { buffy_array_wipe(&Incoming); return 0; } diff --git a/charset.c b/charset.c index 29aa776..89d5d74 100644 --- a/charset.c +++ b/charset.c @@ -65,7 +65,7 @@ void charset_initialize(void) m_strreplace(&Charset, "iso-8859-1"); } - Charset_is_utf8 = !strcmp(Charset, "utf-8"); + Charset_is_utf8 = !m_strcmp(Charset, "utf-8"); CharsetReplacement = Charset_is_utf8 ? 0xfffd : '?'; #ifdef HAVE_BIND_TEXTDOMAIN_CODESET @@ -121,14 +121,14 @@ int charset_is_utf8(const char *s) { char buf[SHORT_STRING]; charset_canonicalize(buf, sizeof(buf), s); - return !strcmp(buf, "utf-8"); + return !m_strcmp(buf, "utf-8"); } int charset_is_us_ascii(const char *s) { char buf[SHORT_STRING]; charset_canonicalize(buf, sizeof(buf), s); - return !strcmp(buf, "us-ascii"); + return !m_strcmp(buf, "us-ascii"); } diff --git a/init.c b/init.c index 03150af..6aad1d7 100644 --- a/init.c +++ b/init.c @@ -798,7 +798,7 @@ static int parse_unignore (BUFFER * buf, BUFFER * s, mutt_extract_token (buf, s, 0); /* don't add "*" to the unignore list */ - if (strcmp (buf->data, "*")) + if (m_strcmp (buf->data, "*")) add_to_list (&UnIgnore, buf->data); remove_from_list (&Ignore, buf->data); diff --git a/lib-lib/rx.c b/lib-lib/rx.c index 21cbd33..0edce59 100644 --- a/lib-lib/rx.c +++ b/lib-lib/rx.c @@ -125,11 +125,11 @@ int rx_list_match2(rx_t *l, const char *s, char *dst, int dlen) rx_t **rx_lookup(rx_t **l, const char *pat) { - if (!pat || !*pat) + if (m_strisempty(pat)) return NULL; while (*l) { - if (!strcmp((*l)->pattern, pat)) + if (!m_strcmp((*l)->pattern, pat)) return l; l = &(*l)->next; } diff --git a/lib-mime/rfc3676.c b/lib-mime/rfc3676.c index 68bf1f5..253c231 100644 --- a/lib-mime/rfc3676.c +++ b/lib-mime/rfc3676.c @@ -165,7 +165,7 @@ int rfc3676_handler (BODY * a, STATE * s) { * which may make the line look like fixed although it wasn't * so keep this in mind for later processing */ fixed = buf_len == 0 || buf[buf_len - 1] != ' ' || - (strcmp(buf + buf_off, "-- ") == 0); + (m_strcmp(buf + buf_off, "-- ") == 0); if (delsp && buf_len >= 1 && buf[buf_len-1] == ' ') buf[--buf_len] = '\0'; @@ -180,7 +180,7 @@ int rfc3676_handler (BODY * a, STATE * s) { } /* signature separator also flushes the previous paragraph */ - if (strcmp(buf + buf_off, "-- ") == 0 && curline && *curline) { + if (m_strcmp(buf + buf_off, "-- ") == 0 && curline && *curline) { print_flowed_line (curline, s, quotelevel); *curline = '\0'; curline_len = 1; diff --git a/makedoc.c b/makedoc.c index 69df277..f68f969 100644 --- a/makedoc.c +++ b/makedoc.c @@ -38,7 +38,7 @@ static var_t *outbuf = NULL; static int var_cmp (const void *a, const void *b) { - return (strcmp (((var_t *) a)->name, ((var_t *) b)->name)); + return (m_strcmp (((var_t *) a)->name, ((var_t *) b)->name)); } enum output_formats_t { @@ -215,15 +215,15 @@ static void makedoc (FILE * in, FILE * out) if (!(p = get_token (token, sizeof (token), buffer))) continue; - if (!strcmp (token, "/*++*/")) + if (!m_strcmp (token, "/*++*/")) active = 1; - else if (!strcmp (token, "/*--*/")) { + else if (!m_strcmp (token, "/*--*/")) { docstat = flush_doc (docstat); active = 0; } - else if (active && (!strcmp (token, "/**") || !strcmp (token, "**"))) + else if (active && (!m_strcmp (token, "/**") || !m_strcmp (token, "**"))) docstat = handle_docline (p, docstat); - else if (active && !strcmp (token, "{")) { + else if (active && !m_strcmp (token, "{")) { docstat = flush_doc (docstat); handle_confline (p); } @@ -370,7 +370,7 @@ static int buff2type (const char *s) int type; for (type = DT_NONE; types[type].machine; type++) - if (!strcmp (types[type].machine, s)) + if (!m_strcmp (types[type].machine, s)) return type; return DT_NONE; @@ -408,7 +408,7 @@ static void handle_confline (char *s) if (!(s = get_token (buff, sizeof (buff), s))) return; - if (!strcmp (buff, "|")) { + if (!m_strcmp (buff, "|")) { /* ignore subtype and comma */ if (!(s = get_token (buff, sizeof (buff), s))) return; @@ -421,14 +421,14 @@ static void handle_confline (char *s) while (1) { if (!(s = get_token (buff, sizeof (buff), s))) return; - if (!strcmp (buff, ",")) + if (!m_strcmp (buff, ",")) break; } /* option name or UL &address */ if (!(s = get_token (buff, sizeof (buff), s))) return; - if (!strcmp (buff, "UL")) + if (!m_strcmp (buff, "UL")) if (!(s = get_token (buff, sizeof (buff), s))) return; @@ -439,7 +439,7 @@ static void handle_confline (char *s) /* or UL */ if (!(s = get_token (buff, sizeof (buff), s))) return; - if (!strcmp (buff, "UL")) { + if (!m_strcmp (buff, "UL")) { if (!(s = get_token (buff, sizeof (buff), s))) return; } @@ -447,7 +447,7 @@ static void handle_confline (char *s) memset(val, 0, sizeof(val)); do { - if (!strcmp (buff, "}")) + if (!m_strcmp (buff, "}")) break; m_strcat(val, sizeof(val), buff); diff --git a/pager.c b/pager.c index 4bbf96c..982f7f3 100644 --- a/pager.c +++ b/pager.c @@ -1865,7 +1865,7 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) M_CLEAR) != 0) break; - if (!strcmp (buffer, searchbuf)) { + if (!m_strcmp (buffer, searchbuf)) { if (SearchCompiled) { /* do an implicit search-next */ if (ch == OP_SEARCH) -- 2.20.1