X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=charset.c;h=1bc07952a32117b0e37a52d41c8f4d9265799e95;hp=3fd46286b3541cffb5a07bd9e8b5b6f445bd29fd;hb=fa7f733a61a6fe3143198791ab470ddf4d08fdbe;hpb=df70e07e24add1869bcc9b7af2277d9d0c09a281 diff --git a/charset.c b/charset.c index 3fd4628..1bc0795 100644 --- a/charset.c +++ b/charset.c @@ -1,22 +1,10 @@ /* + * Copyright notice from original mutt: * Copyright (C) 1999-2000 Thomas Roessler * - * 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 @@ -37,6 +25,10 @@ #include "mutt.h" #include "charset.h" +#include "lib/mem.h" +#include "lib/intl.h" +#include "lib/str.h" + #ifndef EILSEQ # define EILSEQ EINVAL #endif @@ -343,7 +335,7 @@ size_t mutt_iconv (iconv_t cd, ICONV_CONST char **inbuf, size_t * inbytesleft, for (t = inrepls; *t; t++) { ICONV_CONST char *ib1 = *t; - size_t ibl1 = strlen (*t); + size_t ibl1 = mutt_strlen (*t); char *ob1 = ob; size_t obl1 = obl; @@ -363,7 +355,7 @@ size_t mutt_iconv (iconv_t cd, ICONV_CONST char **inbuf, size_t * inbytesleft, outrepl = "?"; iconv (cd, 0, 0, &ob, &obl); if (obl) { - int n = strlen (outrepl); + int n = mutt_strlen (outrepl); if (n > obl) { outrepl = "?"; @@ -414,7 +406,7 @@ int mutt_convert_string (char **ps, const char *from, const char *to, else outrepl = "?"; - len = strlen (s); + len = mutt_strlen (s); ib = s, ibl = len + 1; obl = MB_LEN_MAX * ibl; ob = buf = safe_malloc (obl + 1);