X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=imap%2Futf7.c;h=bc5571a5bf001ae66d1b800f9285dbb60ccd5315;hp=690182b34e6bdd7f982764c5aca1d0c492cc829c;hb=fb514a63a7f58b76577fb30bfa260ad1b9239c41;hpb=df70e07e24add1869bcc9b7af2277d9d0c09a281 diff --git a/imap/utf7.c b/imap/utf7.c index 690182b..bc5571a 100644 --- a/imap/utf7.c +++ b/imap/utf7.c @@ -1,19 +1,10 @@ /* + * Copyright notice from original mutt: * Copyright (C) 2000 Edmund Grimley Evans - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * + * This file is part of mutt-ng, see http://www.muttng.org/. + * It's licensed under the GNU General Public License, + * please see the file GPL in the top level source directory. */ #if HAVE_CONFIG_H @@ -24,6 +15,8 @@ #include "charset.h" #include "imap_private.h" +#include "lib/mem.h" + static int Index_64[128] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -242,7 +235,7 @@ void imap_utf7_encode (char **s) char *t = safe_strdup (*s); if (!mutt_convert_string (&t, Charset, "UTF-8", 0)) - utf8_to_utf7 (t, strlen (t), s, 0); + utf8_to_utf7 (t, mutt_strlen (t), s, 0); FREE (&t); } } @@ -250,7 +243,7 @@ void imap_utf7_encode (char **s) void imap_utf7_decode (char **s) { if (Charset) { - char *t = utf7_to_utf8 (*s, strlen (*s), 0, 0); + char *t = utf7_to_utf8 (*s, mutt_strlen (*s), 0, 0); if (t && !mutt_convert_string (&t, "UTF-8", Charset, 0)) { FREE (s);