struct folder_file *pa = (struct folder_file *) a;
struct folder_file *pb = (struct folder_file *) b;
- int r = safe_strcoll (pa->name, pb->name);
+ int r = str_coll (pa->name, pb->name);
return ((BrowserSort & SORT_REVERSE) ? -r : r);
}
}
(state->entry)[state->entrylen].new = new;
- (state->entry)[state->entrylen].name = safe_strdup (name);
- (state->entry)[state->entrylen].desc = safe_strdup (name);
+ (state->entry)[state->entrylen].name = str_dup (name);
+ (state->entry)[state->entrylen].desc = str_dup (name);
#ifdef USE_IMAP
(state->entry)[state->entrylen].imap = 0;
#endif
if (!(data = (NNTP_DATA *) tmp->data))
continue;
if (prefix && *prefix && strncmp (prefix, data->group,
- mutt_strlen (prefix)) != 0)
+ str_len (prefix)) != 0)
continue;
if (!((regexec (Mask.rx, data->group, 0, NULL, 0) == 0) ^ Mask.not))
continue;
init_state (state, menu);
while ((de = readdir (dp)) != NULL) {
- if (mutt_strcmp (de->d_name, ".") == 0)
+ if (str_cmp (de->d_name, ".") == 0)
continue; /* we don't need . */
if (prefix && *prefix
- && safe_strncmp (prefix, de->d_name, mutt_strlen (prefix)) != 0)
+ && str_ncmp (prefix, de->d_name, str_len (prefix)) != 0)
continue;
if (!((regexec (Mask.rx, de->d_name, 0, NULL, 0) == 0) ^ Mask.not))
continue;
}
else {
#endif
- for (i = mutt_strlen (f) - 1; i > 0 && f[i] != '/'; i--);
+ for (i = str_len (f) - 1; i > 0 && f[i] != '/'; i--);
if (i > 0) {
if (f[0] == '/') {
if (i > sizeof (LastDir) - 1)
}
else {
getcwd (LastDir, sizeof (LastDir));
- safe_strcat (LastDir, sizeof (LastDir), "/");
- safe_strncat (LastDir, sizeof (LastDir), f, i);
+ str_cat (LastDir, sizeof (LastDir), "/");
+ str_ncat (LastDir, sizeof (LastDir), f, i);
}
}
else {
/* save the old directory */
strfcpy (OldLastDir, LastDir, sizeof (OldLastDir));
- if (mutt_strcmp (state.entry[menu->current].name, "..") == 0) {
- if (mutt_strcmp ("..", LastDir + mutt_strlen (LastDir) - 2) == 0)
+ if (str_cmp (state.entry[menu->current].name, "..") == 0) {
+ if (str_cmp ("..", LastDir + str_len (LastDir) - 2) == 0)
strcat (LastDir, "/.."); /* __STRCAT_CHECKED__ */
else {
char *p = strrchr (LastDir + 1, '/');
strfcpy (LastDir, state.entry[menu->current].name,
sizeof (LastDir));
/* tack on delimiter here */
- n = mutt_strlen (LastDir) + 1;
+ n = str_len (LastDir) + 1;
/* special case "" needs no delimiter */
url_parse_ciss (&url, state.entry[menu->current].name);
if (ff.tagged) {
mutt_concat_path (full, LastDir, ff.name, sizeof (full));
mutt_expand_path (full, sizeof (full));
- tfiles[j++] = safe_strdup (full);
+ tfiles[j++] = str_dup (full);
}
}
*files = tfiles;
*numfiles = 1;
tfiles = safe_calloc (*numfiles, sizeof (char *));
mutt_expand_path (f, flen);
- tfiles[0] = safe_strdup (f);
+ tfiles[0] = str_dup (f);
*files = tfiles;
}
}
#endif
{
/* add '/' at the end of the directory name if not already there */
- int len = mutt_strlen (LastDir);
+ int len = str_len (LastDir);
if (len && LastDir[len - 1] != '/' && sizeof (buf) > len)
buf[len] = '/';
mutt_FormatString (buffer, sizeof (buffer), NONULL(GroupFormat),
newsgroup_format_str, (unsigned long) &folder,
M_FORMAT_ARROWCURSOR);
- f->desc = safe_strdup (buffer); */
+ f->desc = str_dup (buffer); */
if (menu->current + 1 < menu->max)
menu->current++;
menu->redraw = REDRAW_MOTION_RESYNCH;
mutt_FormatString (buffer, sizeof (buffer), NONULL(GroupFormat),
newsgroup_format_str, (unsigned long) &folder,
M_FORMAT_ARROWCURSOR);
- f->desc = safe_strdup (buffer);
+ f->desc = str_dup (buffer);
} */
}
if (i == OP_BROWSER_SUBSCRIBE || i == OP_BROWSER_UNSUBSCRIBE) {