X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=complete.c;h=1066b5c3a48e5fb0bbdb0c0c81c60e4543e46a8b;hp=fcb9269ff8a233a949fb30b93104e4dbca785fa4;hb=1b7e35d0720400f2566023146257c0a3bf89ce87;hpb=df70e07e24add1869bcc9b7af2277d9d0c09a281 diff --git a/complete.c b/complete.c index fcb9269..1066b5c 100644 --- a/complete.c +++ b/complete.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 @@ -29,6 +20,8 @@ #include "nntp.h" #endif +#include "lib/str.h" + #include #include #include @@ -215,14 +208,14 @@ int mutt_complete (char *s, size_t slen) /* check to see if it is a directory */ if (dirpart[0]) { strfcpy (buf, exp_dirpart, sizeof (buf)); - strfcpy (buf + strlen (buf), "/", sizeof (buf) - strlen (buf)); + strfcpy (buf + mutt_strlen (buf), "/", sizeof (buf) - mutt_strlen (buf)); } else buf[0] = 0; - strfcpy (buf + strlen (buf), filepart, sizeof (buf) - strlen (buf)); + strfcpy (buf + mutt_strlen (buf), filepart, sizeof (buf) - mutt_strlen (buf)); if (stat (buf, &st) != -1 && (st.st_mode & S_IFDIR)) - strfcpy (filepart + strlen (filepart), "/", - sizeof (filepart) - strlen (filepart)); + strfcpy (filepart + mutt_strlen (filepart), "/", + sizeof (filepart) - mutt_strlen (filepart)); init = 1; } } @@ -233,8 +226,8 @@ int mutt_complete (char *s, size_t slen) strfcpy (s, dirpart, slen); if (mutt_strcmp ("/", dirpart) != 0 && dirpart[0] != '=' && dirpart[0] != '+') - strfcpy (s + strlen (s), "/", slen - strlen (s)); - strfcpy (s + strlen (s), filepart, slen - strlen (s)); + strfcpy (s + mutt_strlen (s), "/", slen - mutt_strlen (s)); + strfcpy (s + mutt_strlen (s), filepart, slen - mutt_strlen (s)); } else strfcpy (s, filepart, slen);