From: Richard Russon Date: Wed, 2 Aug 2017 13:35:14 +0000 (+0100) Subject: move the ascii functions to the library X-Git-Tag: neomutt-20170907~56^2~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d85c3bb4febbc13b30afe833fc7306792f7b9dbc;p=neomutt move the ascii functions to the library --- diff --git a/Makefile.am b/Makefile.am index ae1a18b7e..ab4a4d6fb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -44,7 +44,7 @@ BUILT_SOURCES = conststrings.c git_ver.h keymap_alldefs.h keymap_defs.h bin_PROGRAMS = mutt $(PGPAUX_TARGET) -mutt_SOURCES = account.c addrbook.c address.h alias.c alias.h ascii.c attach.c \ +mutt_SOURCES = account.c addrbook.c address.h alias.c alias.h attach.c \ base64.c bcache.c body.h browser.c buffer.c buffy.c charset.c color.c \ commands.c complete.c compose.c compress.c content.h context.h copy.c \ curs_lib.c curs_main.c date.c edit.c editmsg.c enter.c enter_state.h \ @@ -82,7 +82,7 @@ EXTRA_mutt_SOURCES = browser.h mbyte.h mutt_idna.c mutt_idna.h \ mutt_lua.c mutt_sasl.c mutt_notmuch.c mutt_ssl.c mutt_ssl_gnutls.c \ remailer.c remailer.h resize.c sha1.c url.h utf8.c wcwidth.c -EXTRA_DIST = account.h ascii.h attach.h bcache.h browser.h buffer.h buffy.h \ +EXTRA_DIST = account.h attach.h bcache.h browser.h buffer.h buffy.h \ ChangeLog.md charset.h CODE_OF_CONDUCT.md compress.h copy.h \ COPYRIGHT extlib.c filter.h functions.h gen_defs globals.h \ group.h hash.h history.h init.h keymap.h lib.h LICENSE.md mailbox.h \ @@ -98,7 +98,7 @@ EXTRA_DIST = account.h ascii.h attach.h bcache.h browser.h buffer.h buffy.h \ EXTRA_SCRIPTS = -pgpring_SOURCES = ascii.c extlib.c lib.c md5.c pgppubring.c sha1.c +pgpring_SOURCES = extlib.c lib.c md5.c pgppubring.c sha1.c pgpring_LDADD = $(LIBOBJS) $(NCRYPT_LIBS) $(INTLLIBS) $(LIBLIB) pgpring_DEPENDENCIES = $(LIBOBJS) $(NCRYPT_DEPS) $(INTLDEPS) $(LIBLIBDEPS) diff --git a/account.c b/account.c index 3067cc211..3eedcfedc 100644 --- a/account.c +++ b/account.c @@ -27,7 +27,6 @@ #include #include "mutt.h" #include "account.h" -#include "ascii.h" #include "globals.h" #include "lib.h" #include "lib/lib.h" diff --git a/addrbook.c b/addrbook.c index a3f9814a7..4d99a8e5c 100644 --- a/addrbook.c +++ b/addrbook.c @@ -26,7 +26,6 @@ #include #include "address.h" #include "alias.h" -#include "ascii.h" #include "format_flags.h" #include "globals.h" #include "keymap.h" diff --git a/alias.c b/alias.c index 5845aeaea..c0056cde5 100644 --- a/alias.c +++ b/alias.c @@ -33,7 +33,6 @@ #include "mutt.h" #include "alias.h" #include "address.h" -#include "ascii.h" #include "charset.h" #include "envelope.h" #include "globals.h" diff --git a/attach.c b/attach.c index d4bd3874c..42a9cd63f 100644 --- a/attach.c +++ b/attach.c @@ -30,7 +30,6 @@ #include #include "mutt.h" #include "attach.h" -#include "ascii.h" #include "body.h" #include "context.h" #include "copy.h" diff --git a/charset.c b/charset.c index d9fd9ec5e..cabc2fd6b 100644 --- a/charset.c +++ b/charset.c @@ -29,7 +29,6 @@ #include #include "mutt.h" #include "charset.h" -#include "ascii.h" #include "globals.h" #include "lib.h" #include "lib/lib.h" diff --git a/color.c b/color.c index 64460ae64..a36114e92 100644 --- a/color.c +++ b/color.c @@ -27,7 +27,6 @@ #include #include #include "mutt.h" -#include "ascii.h" #include "buffer.h" #include "context.h" #include "globals.h" diff --git a/commands.c b/commands.c index 84a64ad03..bbabb499e 100644 --- a/commands.c +++ b/commands.c @@ -34,7 +34,6 @@ #include #include "mutt.h" #include "alias.h" -#include "ascii.h" #include "body.h" #include "buffer.h" #include "buffy.h" diff --git a/copy.c b/copy.c index fcc587d9c..82aa477cd 100644 --- a/copy.c +++ b/copy.c @@ -28,7 +28,6 @@ #include "mutt.h" #include "copy.h" #include "address.h" -#include "ascii.h" #include "body.h" #include "context.h" #include "envelope.h" diff --git a/from.c b/from.c index b901ecec6..14b78e651 100644 --- a/from.c +++ b/from.c @@ -26,7 +26,6 @@ #include #include #include -#include "ascii.h" #include "globals.h" #include "lib.h" #include "lib/lib.h" diff --git a/handler.c b/handler.c index fad27020b..f2b5a26f7 100644 --- a/handler.c +++ b/handler.c @@ -36,7 +36,6 @@ #include #include #include "mutt.h" -#include "ascii.h" #include "body.h" #include "charset.h" #include "copy.h" diff --git a/headers.c b/headers.c index f05d3eafa..64e467dc2 100644 --- a/headers.c +++ b/headers.c @@ -30,7 +30,6 @@ #include #include "mutt.h" #include "alias.h" -#include "ascii.h" #include "body.h" #include "context.h" #include "envelope.h" diff --git a/imap/auth.c b/imap/auth.c index 0acd10b67..c7e832f5b 100644 --- a/imap/auth.c +++ b/imap/auth.c @@ -27,7 +27,6 @@ #include "config.h" #include #include "auth.h" -#include "ascii.h" #include "globals.h" #include "lib.h" #include "lib/lib.h" diff --git a/imap/auth_sasl.c b/imap/auth_sasl.c index d5f705dee..360ed6ce6 100644 --- a/imap/auth_sasl.c +++ b/imap/auth_sasl.c @@ -30,7 +30,6 @@ #include #include "imap_private.h" #include "account.h" -#include "ascii.h" #include "auth.h" #include "globals.h" #include "lib.h" @@ -78,7 +77,7 @@ enum ImapAuthRes imap_auth_sasl(struct ImapData *idata, const char *method) if (mutt_bit_isset(idata->capabilities, AUTH_ANON) && (!idata->conn->account.user[0] || - (ascii_strncmp(idata->conn->account.user, "anonymous", 9) == 0))) + (mutt_strncmp(idata->conn->account.user, "anonymous", 9) == 0))) rc = sasl_client_start(saslconn, "AUTH=ANONYMOUS", NULL, &pc, &olen, &mech); } else if ((ascii_strcasecmp("login", method) == 0) && diff --git a/imap/command.c b/imap/command.c index 41894d483..ae547f6c9 100644 --- a/imap/command.c +++ b/imap/command.c @@ -34,7 +34,6 @@ #include #include "imap_private.h" #include "account.h" -#include "ascii.h" #include "buffer.h" #include "buffy.h" #include "context.h" @@ -615,18 +614,18 @@ static void cmd_parse_status(struct ImapData *idata, char *s) value = imap_next_word(s); count = strtol(value, &value, 10); - if (ascii_strncmp("MESSAGES", s, 8) == 0) + if (mutt_strncmp("MESSAGES", s, 8) == 0) { status->messages = count; new_msg_count = 1; } - else if (ascii_strncmp("RECENT", s, 6) == 0) + else if (mutt_strncmp("RECENT", s, 6) == 0) status->recent = count; - else if (ascii_strncmp("UIDNEXT", s, 7) == 0) + else if (mutt_strncmp("UIDNEXT", s, 7) == 0) status->uidnext = count; - else if (ascii_strncmp("UIDVALIDITY", s, 11) == 0) + else if (mutt_strncmp("UIDVALIDITY", s, 11) == 0) status->uidvalidity = count; - else if (ascii_strncmp("UNSEEN", s, 6) == 0) + else if (mutt_strncmp("UNSEEN", s, 6) == 0) status->unseen = count; s = value; @@ -906,8 +905,8 @@ int imap_cmd_step(struct ImapData *idata) idata->lastread = time(NULL); /* handle untagged messages. The caller still gets its shot afterwards. */ - if (((ascii_strncmp(idata->buf, "* ", 2) == 0) || - (ascii_strncmp(imap_next_word(idata->buf), "OK [", 4) == 0)) && + if (((mutt_strncmp(idata->buf, "* ", 2) == 0) || + (mutt_strncmp(imap_next_word(idata->buf), "OK [", 4) == 0)) && cmd_handle_untagged(idata)) return IMAP_CMD_BAD; @@ -923,7 +922,7 @@ int imap_cmd_step(struct ImapData *idata) cmd = &idata->cmds[c]; if (cmd->state == IMAP_CMD_NEW) { - if (ascii_strncmp(idata->buf, cmd->seq, SEQLEN) == 0) + if (mutt_strncmp(idata->buf, cmd->seq, SEQLEN) == 0) { if (!stillrunning) { diff --git a/imap/imap.c b/imap/imap.c index 0ddb98b24..11d347921 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -37,7 +37,6 @@ #include "mutt.h" #include "imap.h" #include "account.h" -#include "ascii.h" #include "bcache.h" #include "body.h" #include "buffer.h" @@ -102,7 +101,7 @@ int imap_access(const char *path) strfcpy(mailbox, "INBOX", sizeof(mailbox)); /* we may already be in the folder we're checking */ - if (ascii_strcmp(idata->mailbox, mx.mbox) == 0) + if (mutt_strcmp(idata->mailbox, mx.mbox) == 0) { FREE(&mx.mbox); return 0; @@ -924,7 +923,7 @@ bool imap_has_flag(struct List *flag_list, const char *flag) if (ascii_strncasecmp(flag_list->data, flag, strlen(flag_list->data)) == 0) return true; - if (ascii_strncmp(flag_list->data, "\\*", strlen(flag_list->data)) == 0) + if (mutt_strncmp(flag_list->data, "\\*", strlen(flag_list->data)) == 0) return true; flag_list = flag_list->next; diff --git a/imap/message.c b/imap/message.c index 6c62634da..a709c56f5 100644 --- a/imap/message.c +++ b/imap/message.c @@ -34,7 +34,6 @@ #include "mutt.h" #include "message.h" #include "account.h" -#include "ascii.h" #include "bcache.h" #include "body.h" #include "buffer.h" diff --git a/imap/util.c b/imap/util.c index f92543b97..c12da5777 100644 --- a/imap/util.c +++ b/imap/util.c @@ -39,7 +39,6 @@ #include "imap_private.h" #include "mutt.h" #include "account.h" -#include "ascii.h" #include "bcache.h" #include "buffer.h" #include "context.h" @@ -374,7 +373,7 @@ int imap_parse_path(const char *path, struct ImapMbox *mx) mx->account.flags |= MUTT_ACCT_PORT; if (sscanf(tmp, "/%s", tmp) == 1) { - if (ascii_strncmp(tmp, "ssl", 3) == 0) + if (mutt_strncmp(tmp, "ssl", 3) == 0) mx->account.flags |= MUTT_ACCT_SSL; else { diff --git a/init.c b/init.c index 7756e643f..9243ce89a 100644 --- a/init.c +++ b/init.c @@ -41,7 +41,6 @@ #include "init.h" #include "address.h" #include "alias.h" -#include "ascii.h" #include "buffer.h" #include "charset.h" #include "context.h" diff --git a/keymap.c b/keymap.c index 76febfced..f643bc9bb 100644 --- a/keymap.c +++ b/keymap.c @@ -28,7 +28,6 @@ #include #include #include "keymap.h" -#include "ascii.h" #include "buffer.h" #include "functions.h" #include "globals.h" diff --git a/lib/Makefile.am b/lib/Makefile.am index 19cf80412..cd7eae0b0 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -3,12 +3,12 @@ include $(top_srcdir)/flymake.am AUTOMAKE_OPTIONS = 1.6 foreign -EXTRA_DIST = lib.h +EXTRA_DIST = lib.h lib_ascii.h AM_CPPFLAGS = -I$(top_srcdir) noinst_LIBRARIES = liblib.a noinst_HEADERS = -liblib_a_SOURCES = +liblib_a_SOURCES = lib_ascii.c diff --git a/lib/lib.h b/lib/lib.h index 394687142..500bbabea 100644 --- a/lib/lib.h +++ b/lib/lib.h @@ -28,10 +28,12 @@ * The library is self-contained -- some files may depend on others in the * library, but none depends on source from outside. * + * -# @subpage ascii */ #ifndef _LIB_LIB_H #define _LIB_LIB_H +#include "lib_ascii.h" #endif /* _LIB_LIB_H */ diff --git a/ascii.c b/lib/lib_ascii.c similarity index 51% rename from ascii.c rename to lib/lib_ascii.c index 50dd09cf8..d8998e20c 100644 --- a/ascii.c +++ b/lib/lib_ascii.c @@ -20,6 +20,17 @@ * this program. If not, see . */ +/** + * @page ascii ASCII string comparison routines + * + * Simple ASCII string comparisons. + * + * | Function | Description + * | :------------------ | :--------------------------------- + * | ascii_strcasecmp() | Compare strings, ignoring the case + * | ascii_strlower() | Lowercase a string + * | ascii_strncasecmp() | Compare strings, ignoring the case + */ /* * Versions of the string comparison functions which are @@ -27,13 +38,20 @@ */ #include "config.h" +#include #include -#include "ascii.h" +#include "lib_ascii.h" +/** + * ascii_strcasecmp - Compare strings, ignoring the case + * @param a First string to compare + * @param b Second string to compare + * @retval -1 a precedes b + * @retval 0 a and b are identical + * @retval 1 b precedes a + */ int ascii_strcasecmp(const char *a, const char *b) { - int i; - if (a == b) return 0; if (a == NULL && b) @@ -43,11 +61,11 @@ int ascii_strcasecmp(const char *a, const char *b) for (;; a++, b++) { - if ((i = tolower(*a) - tolower(*b))) + int i = tolower(*a) - tolower(*b); + if (i) return i; - /* test for NUL here rather that in the for loop in order to detect unequal - * length strings (see http://dev.mutt.org/trac/ticket/3601) - */ + /* test for NUL here rather than in the for loop in order to detect unequal + * length strings */ if (!*a) break; } @@ -55,10 +73,17 @@ int ascii_strcasecmp(const char *a, const char *b) return 0; } +/** + * ascii_strncasecmp - Compare strings, ignoring the case + * @param a First string to compare + * @param b Second string to compare + * @param n Maximum number of characters to compare + * @retval -1 a precedes b + * @retval 0 a and b are identical + * @retval 1 b precedes a + */ int ascii_strncasecmp(const char *a, const char *b, int n) { - int i; - if (a == b) return 0; if (a == NULL && b) @@ -68,9 +93,27 @@ int ascii_strncasecmp(const char *a, const char *b, int n) for (int j = 0; (*a || *b) && j < n; a++, b++, j++) { - if ((i = tolower(*a) - tolower(*b))) + int i = tolower(*a) - tolower(*b); + if (i) return i; } return 0; } + +/** + * ascii_strlower - Lowercase a string + * @param s String to transform + * @retval ptr Transformed string + * + * The string is transformed in place. + */ +char *ascii_strlower(char *s) +{ + char *p = s; + + for (; *p; ++p) + *p = tolower(*p); + + return s; +} diff --git a/ascii.h b/lib/lib_ascii.h similarity index 70% rename from ascii.h rename to lib/lib_ascii.h index f6e13df09..a9ffcf006 100644 --- a/ascii.h +++ b/lib/lib_ascii.h @@ -21,31 +21,14 @@ */ /* - * Versions of the string comparison functions which are - * locale-insensitive. + * Versions of the string comparison functions which are locale-insensitive. */ -#ifndef _MUTT_ASCII_H -#define _MUTT_ASCII_H - -#include +#ifndef _LIB_ASCII_H +#define _LIB_ASCII_H int ascii_strcasecmp(const char *a, const char *b); int ascii_strncasecmp(const char *a, const char *b, int n); +char *ascii_strlower(char *s); -#define ascii_strcmp(a, b) mutt_strcmp(a, b) -#define ascii_strncmp(a, b, c) mutt_strncmp(a, b, c) - -static inline char *ascii_strlower(char *s) -{ - char *p = s; - - for (; *p; ++p) - { - *p = tolower(*p); - } - - return s; -} - -#endif /* _MUTT_ASCII_H */ +#endif /* _LIB_ASCII_H */ diff --git a/main.c b/main.c index 4cf0a93c6..f98a56b48 100644 --- a/main.c +++ b/main.c @@ -38,7 +38,6 @@ #include "mutt.h" #include "address.h" #include "alias.h" -#include "ascii.h" #include "body.h" #include "buffy.h" #include "envelope.h" diff --git a/mbyte.c b/mbyte.c index 0b015d26d..d00c60684 100644 --- a/mbyte.c +++ b/mbyte.c @@ -31,7 +31,6 @@ #include #include #include "mbyte.h" -#include "ascii.h" #include "buffer.h" #include "charset.h" #include "lib.h" diff --git a/mutt_idna.c b/mutt_idna.c index 5fa70c7da..de5fb2773 100644 --- a/mutt_idna.c +++ b/mutt_idna.c @@ -26,7 +26,6 @@ #include #include "mutt_idna.h" #include "address.h" -#include "ascii.h" #include "charset.h" #include "envelope.h" #include "globals.h" diff --git a/muttlib.c b/muttlib.c index 1d81cdba7..526a902ba 100644 --- a/muttlib.c +++ b/muttlib.c @@ -45,7 +45,6 @@ #include "mutt.h" #include "address.h" #include "alias.h" -#include "ascii.h" #include "body.h" #include "buffer.h" #include "charset.h" diff --git a/mx.c b/mx.c index 0af8250d0..a3fe7b9df 100644 --- a/mx.c +++ b/mx.c @@ -35,7 +35,6 @@ #include "mutt.h" #include "mx.h" #include "address.h" -#include "ascii.h" #include "body.h" #include "buffy.h" #include "context.h" diff --git a/ncrypt/crypt.c b/ncrypt/crypt.c index e71034c8a..f7a7fa24e 100644 --- a/ncrypt/crypt.c +++ b/ncrypt/crypt.c @@ -35,7 +35,6 @@ #include "mutt.h" #include "address.h" #include "alias.h" -#include "ascii.h" #include "body.h" #include "content.h" #include "context.h" diff --git a/ncrypt/crypt_gpgme.c b/ncrypt/crypt_gpgme.c index ed88c024d..8e2edc0b7 100644 --- a/ncrypt/crypt_gpgme.c +++ b/ncrypt/crypt_gpgme.c @@ -46,7 +46,6 @@ #include "mutt.h" #include "address.h" #include "alias.h" -#include "ascii.h" #include "body.h" #include "charset.h" #include "crypt.h" diff --git a/ncrypt/pgp.c b/ncrypt/pgp.c index 57396d2d0..07a6b42c4 100644 --- a/ncrypt/pgp.c +++ b/ncrypt/pgp.c @@ -44,7 +44,6 @@ #include "mutt.h" #include "pgp.h" #include "address.h" -#include "ascii.h" #include "body.h" #include "charset.h" #include "crypt.h" diff --git a/ncrypt/smime.c b/ncrypt/smime.c index 7fbd44017..c2ab4ed26 100644 --- a/ncrypt/smime.c +++ b/ncrypt/smime.c @@ -34,7 +34,6 @@ #include "smime.h" #include "address.h" #include "alias.h" -#include "ascii.h" #include "body.h" #include "copy.h" #include "crypt.h" diff --git a/parameter.c b/parameter.c index 42dc8a49a..c3432a1c5 100644 --- a/parameter.c +++ b/parameter.c @@ -22,7 +22,6 @@ #include "config.h" #include "parameter.h" -#include "ascii.h" void mutt_free_parameter(struct Parameter **p) { diff --git a/parse.c b/parse.c index d64f5b60e..33420d6fe 100644 --- a/parse.c +++ b/parse.c @@ -29,7 +29,6 @@ #include #include #include "mutt.h" -#include "ascii.h" #include "body.h" #include "buffer.h" #include "charset.h" diff --git a/pattern.c b/pattern.c index 0be010cd7..03bc44df5 100644 --- a/pattern.c +++ b/pattern.c @@ -39,7 +39,6 @@ #include "mutt.h" #include "pattern.h" #include "address.h" -#include "ascii.h" #include "body.h" #include "buffer.h" #include "context.h" diff --git a/po/POTFILES.in b/po/POTFILES.in index 520f9d5e1..bc3056596 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,7 +1,6 @@ account.c addrbook.c alias.c -ascii.c attach.c base64.c bcache.c @@ -62,6 +61,7 @@ init.c keymap.c keymap_alldefs.h lib.c +lib/lib_ascii.c main.c mbox.c mbyte.c diff --git a/pop_auth.c b/pop_auth.c index 5ce23acb4..59263741c 100644 --- a/pop_auth.c +++ b/pop_auth.c @@ -25,7 +25,6 @@ #include #include #include "account.h" -#include "ascii.h" #include "globals.h" #include "lib.h" #include "lib/lib.h" diff --git a/pop_lib.c b/pop_lib.c index 40c5edbcd..eba22e94e 100644 --- a/pop_lib.c +++ b/pop_lib.c @@ -30,7 +30,6 @@ #include #include "mutt.h" #include "account.h" -#include "ascii.h" #include "context.h" #include "globals.h" #include "header.h" diff --git a/postpone.c b/postpone.c index 04ec25b29..d39a0c893 100644 --- a/postpone.c +++ b/postpone.c @@ -30,7 +30,6 @@ #include #include #include "mutt.h" -#include "ascii.h" #include "body.h" #include "context.h" #include "envelope.h" diff --git a/recvattach.c b/recvattach.c index 085f8ca0f..6d590ad23 100644 --- a/recvattach.c +++ b/recvattach.c @@ -30,7 +30,6 @@ #include #include #include "mutt.h" -#include "ascii.h" #include "attach.h" #include "body.h" #include "context.h" diff --git a/remailer.c b/remailer.c index 1547634d7..40cf349d3 100644 --- a/remailer.c +++ b/remailer.c @@ -33,7 +33,6 @@ #include "mutt.h" #include "remailer.h" #include "address.h" -#include "ascii.h" #include "envelope.h" #include "filter.h" #include "format_flags.h" diff --git a/rfc1524.c b/rfc1524.c index ab735c6d5..134f54a4b 100644 --- a/rfc1524.c +++ b/rfc1524.c @@ -37,7 +37,6 @@ #include #include "mutt.h" #include "rfc1524.h" -#include "ascii.h" #include "body.h" #include "globals.h" #include "lib.h" diff --git a/rfc2047.c b/rfc2047.c index 971a83ad4..45af27f55 100644 --- a/rfc2047.c +++ b/rfc2047.c @@ -28,7 +28,6 @@ #include #include "rfc2047.h" #include "address.h" -#include "ascii.h" #include "charset.h" #include "globals.h" #include "lib.h" diff --git a/rfc3676.c b/rfc3676.c index 93e8efe55..25c55895f 100644 --- a/rfc3676.c +++ b/rfc3676.c @@ -32,7 +32,6 @@ #include #include #include "mutt.h" -#include "ascii.h" #include "body.h" #include "globals.h" #include "header.h" @@ -309,7 +308,7 @@ int rfc3676_handler(struct Body *a, struct State *s) buf_off++; /* test for signature separator */ - sigsep = (ascii_strcmp(buf + buf_off, "-- ") == 0); + sigsep = (mutt_strcmp(buf + buf_off, "-- ") == 0); /* a fixed line either has no trailing space or is the * signature separator */ @@ -381,7 +380,7 @@ void rfc3676_space_stuff(struct Header *hdr) while (fgets(buf, sizeof(buf), in)) { - if ((ascii_strncmp("From ", buf, 5) == 0) || buf[0] == ' ') + if ((mutt_strncmp("From ", buf, 5) == 0) || buf[0] == ' ') { fputc(' ', out); #ifdef DEBUG diff --git a/rfc822.c b/rfc822.c index b5d19546c..33e1b5d25 100644 --- a/rfc822.c +++ b/rfc822.c @@ -25,7 +25,6 @@ #include #include #include "rfc822.h" -#include "ascii.h" #include "lib/lib.h" #ifdef TESTING @@ -623,12 +622,12 @@ void rfc822_write_address_single(char *buf, size_t buflen, struct Address *addr, { if (!buflen) goto done; - if ((ascii_strcmp(addr->mailbox, "@") != 0) && !display) + if ((mutt_strcmp(addr->mailbox, "@") != 0) && !display) { strfcpy(pbuf, addr->mailbox, buflen); len = mutt_strlen(pbuf); } - else if ((ascii_strcmp(addr->mailbox, "@") != 0) && display) + else if ((mutt_strcmp(addr->mailbox, "@") != 0) && display) { strfcpy(pbuf, mutt_addr_for_display(addr), buflen); len = mutt_strlen(pbuf); diff --git a/send.c b/send.c index 26253fced..3f2e86aff 100644 --- a/send.c +++ b/send.c @@ -35,7 +35,6 @@ #include "mutt.h" #include "address.h" #include "alias.h" -#include "ascii.h" #include "body.h" #include "context.h" #include "copy.h" diff --git a/sendlib.c b/sendlib.c index 831edd6b8..094927966 100644 --- a/sendlib.c +++ b/sendlib.c @@ -42,7 +42,6 @@ #include #include "mutt.h" #include "address.h" -#include "ascii.h" #include "body.h" #include "buffy.h" #include "charset.h" @@ -1485,7 +1484,7 @@ static bool check_boundary(const char *boundary, struct Body *b) if (b->next && check_boundary(boundary, b->next)) return true; - if ((p = mutt_get_parameter("boundary", b->parameter)) && (ascii_strcmp(p, boundary) == 0)) + if ((p = mutt_get_parameter("boundary", b->parameter)) && (mutt_strcmp(p, boundary) == 0)) return true; return false; } diff --git a/smtp.c b/smtp.c index 73925d03c..7b9231bea 100644 --- a/smtp.c +++ b/smtp.c @@ -34,7 +34,6 @@ #include "mutt.h" #include "account.h" #include "address.h" -#include "ascii.h" #include "globals.h" #include "lib.h" #include "lib/lib.h" diff --git a/url.c b/url.c index 3ad2fef15..97faee0e4 100644 --- a/url.c +++ b/url.c @@ -30,7 +30,6 @@ #include #include "mutt.h" #include "url.h" -#include "ascii.h" #include "envelope.h" #include "globals.h" #include "lib.h"