X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=query.c;h=9390bcf05b994793b94752c06d4ce3c26e30ab25;hp=b9a4003233ea4b3b2be44232809fda8cb0cc45be;hb=7ea0c50703a93a8fb4f0dd05fc4e023cfc9ffd36;hpb=df70e07e24add1869bcc9b7af2277d9d0c09a281 diff --git a/query.c b/query.c index b9a4003..9390bcf 100644 --- a/query.c +++ b/query.c @@ -1,19 +1,10 @@ /* + * Copyright notice from original mutt: * Copyright (C) 1996-2000 Michael R. Elkins - * - * 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 @@ -26,6 +17,10 @@ #include "mapping.h" #include "sort.h" +#include "lib/mem.h" +#include "lib/intl.h" +#include "lib/str.h" + #include #include #include @@ -194,7 +189,7 @@ static void query_entry (char *s, size_t slen, MUTTMENU * m, int num) mutt_format_string (buf2, sizeof (buf2), FirstColumn + 2, FirstColumn + 2, 0, ' ', table[num].data->name, - mutt_strlen (table[num].data->name), 0); + safe_strlen (table[num].data->name), 0); snprintf (s, slen, " %c %3d %s %-*.*s %s", table[num].tagged ? '*' : ' ', @@ -453,7 +448,7 @@ static void query_menu (char *buf, size_t buflen, QUERY * results, int retbuf) mutt_addrlist_to_local (tmpa); tagged = 1; rfc822_write_address (buf, buflen, tmpa, 0); - curpos = mutt_strlen (buf); + curpos = safe_strlen (buf); rfc822_free_address (&tmpa); } else if (curpos + 2 < buflen) { @@ -463,7 +458,7 @@ static void query_menu (char *buf, size_t buflen, QUERY * results, int retbuf) strcat (buf, ", "); /* __STRCAT_CHECKED__ */ rfc822_write_address ((char *) buf + curpos + 1, buflen - curpos - 1, tmpa, 0); - curpos = mutt_strlen (buf); + curpos = safe_strlen (buf); rfc822_free_address (&tmpa); } }