/* Force string to be exactly the right width */
int w = mutt_strwidth (buf);
- int s = strlen (buf);
+ int s = mutt_strlen (buf);
width = MIN(buflen, width);
if (w < width)
{
}
/* compute length of Maildir without trailing separator */
- size_t maildirlen = strlen (Maildir);
- if (SidebarDelimChars && strchr (SidebarDelimChars, Maildir[maildirlen - 1]))
+ size_t maildirlen = mutt_strlen (Maildir);
+ if (maildirlen &&
+ SidebarDelimChars &&
+ strchr (SidebarDelimChars, Maildir[maildirlen - 1]))
maildirlen--;
/* check whether Maildir is a prefix of the current folder's path */
short maildir_is_prefix = 0;
- if ((strlen (b->path) > maildirlen) && (strncmp (Maildir, b->path, maildirlen) == 0))
+ if ((mutt_strlen (b->path) > maildirlen) && (mutt_strncmp (Maildir, b->path, maildirlen) == 0))
maildir_is_prefix = 1;
/* calculate depth of current folder and generate its display name with indented spaces */
{
/* disregard a trailing separator, so strlen() - 2 */
sidebar_folder_name = b->path;
- for (i = strlen (sidebar_folder_name) - 2; i >= 0; i--)
+ for (i = mutt_strlen (sidebar_folder_name) - 2; i >= 0; i--)
{
if (SidebarDelimChars &&
strchr (SidebarDelimChars, sidebar_folder_name[i]))
const char *tmp_folder_name;
int lastsep = 0;
tmp_folder_name = b->path + maildirlen + 1;
- int tmplen = (int) strlen (tmp_folder_name) - 1;
+ int tmplen = (int) mutt_strlen (tmp_folder_name) - 1;
for (i = 0; i < tmplen; i++)
{
if (SidebarDelimChars && strchr (SidebarDelimChars, tmp_folder_name[i]))
{
if (option (OPTSIDEBARSHORTPATH))
tmp_folder_name += lastsep; /* basename */
- int sfn_len = strlen (tmp_folder_name) +
- sidebar_folder_depth*strlen (NONULL(SidebarIndentString)) + 1;
+ int sfn_len = mutt_strlen (tmp_folder_name) +
+ sidebar_folder_depth*mutt_strlen (SidebarIndentString) + 1;
sidebar_folder_name = safe_malloc (sfn_len);
sidebar_folder_name[0]=0;
for (i=0; i < sidebar_folder_depth; i++)