#endif
#include <lib-lib/mem.h>
+#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include "mutt.h"
#endif
#include "sidebar.h"
-#include "lib/str.h"
#include "lib/list.h"
#include <stdlib.h>
}
(state->entry)[state->entrylen].new = new;
- (state->entry)[state->entrylen].name = str_dup (name);
- (state->entry)[state->entrylen].desc = str_dup (name);
+ (state->entry)[state->entrylen].name = m_strdup(name);
+ (state->entry)[state->entrylen].desc = m_strdup(name);
#ifdef USE_IMAP
(state->entry)[state->entrylen].imap = 0;
#endif
continue;
nntp_sync_sidebar (data);
if (prefix && *prefix && strncmp (prefix, data->group,
- str_len (prefix)) != 0)
+ m_strlen(prefix)) != 0)
continue;
if (!((regexec (Mask.rx, data->group, 0, NULL, 0) == 0) ^ Mask.not))
continue;
continue; /* we don't need . */
if (prefix && *prefix
- && str_ncmp (prefix, de->d_name, str_len (prefix)) != 0)
+ && str_ncmp (prefix, de->d_name, m_strlen(prefix)) != 0)
continue;
if (!((regexec (Mask.rx, de->d_name, 0, NULL, 0) == 0) ^ Mask.not))
continue;
buffy = buffy && folder;
- memset (&state, 0, sizeof (struct browser_state));
+ p_clear(&state, 1);
if (!folder)
strfcpy (LastDirBackup, LastDir, sizeof (LastDirBackup));
}
else {
#endif
- for (i = str_len (f) - 1; i > 0 && f[i] != '/'; i--);
+ for (i = m_strlen(f) - 1; i > 0 && f[i] != '/'; i--);
if (i > 0) {
if (f[0] == '/') {
if (i > sizeof (LastDir) - 1)
strfcpy (OldLastDir, LastDir, sizeof (OldLastDir));
if (str_cmp (state.entry[menu->current].name, "..") == 0) {
- if (str_cmp ("..", LastDir + str_len (LastDir) - 2) == 0)
+ if (str_cmp ("..", LastDir + m_strlen(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 = str_len (LastDir) + 1;
+ n = m_strlen(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++] = str_dup (full);
+ tfiles[j++] = m_strdup(full);
}
}
*files = tfiles;
*numfiles = 1;
tfiles = p_new(char *, *numfiles);
mutt_expand_path (f, flen);
- tfiles[0] = str_dup (f);
+ tfiles[0] = m_strdup(f);
*files = tfiles;
}
}
#endif
{
/* add '/' at the end of the directory name if not already there */
- int len = str_len (LastDir);
+ int len = m_strlen(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 = str_dup (buffer); */
+ f->desc = m_strdup(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 = str_dup (buffer);
+ f->desc = m_strdup(buffer);
} */
}
if (i == OP_BROWSER_SUBSCRIBE || i == OP_BROWSER_UNSUBSCRIBE) {