projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make m_dupstr return NULL if the string was empty.
[apps/madmutt.git]
/
curs_main.c
diff --git
a/curs_main.c
b/curs_main.c
index
1217c5e
..
81d59c2
100644
(file)
--- a/
curs_main.c
+++ b/
curs_main.c
@@
-15,6
+15,8
@@
#endif
#include <lib-lib/mem.h>
#endif
#include <lib-lib/mem.h>
+#include <lib-lib/str.h>
+#include <lib-lib/macros.h>
#include "mutt.h"
#include "mutt_curses.h"
#include "mutt.h"
#include "mutt_curses.h"
@@
-47,8
+49,6
@@
#include "mutt_sasl.h"
#endif
#include "mutt_sasl.h"
#endif
-#include "lib/intl.h"
-#include "lib/str.h"
#include "lib/debug.h"
#include <ctype.h>
#include "lib/debug.h"
#include <ctype.h>
@@
-445,7
+445,7
@@
int mutt_index_menu (void)
sidebar_set_current (Context->path);
}
sidebar_set_current (Context->path);
}
-
FOREVER
{
+
for (;;)
{
tag = 0; /* clear the tag-prefix */
menu->max = Context ? Context->vcount : 0;
tag = 0; /* clear the tag-prefix */
menu->max = Context ? Context->vcount : 0;
@@
-966,7
+966,7
@@
int mutt_index_menu (void)
unset_option (OPTHIDEREAD);
}
p_delete(&Context->pattern);
unset_option (OPTHIDEREAD);
}
p_delete(&Context->pattern);
- Context->pattern =
str_dup
(buf);
+ Context->pattern =
m_strdup
(buf);
}
if ((op == OP_TOGGLE_READ && mutt_pattern_func (M_LIMIT, NULL) == 0) ||
mutt_pattern_func (M_LIMIT, _("Limit to messages matching: ")) == 0)
}
if ((op == OP_TOGGLE_READ && mutt_pattern_func (M_LIMIT, NULL) == 0) ||
mutt_pattern_func (M_LIMIT, _("Limit to messages matching: ")) == 0)
@@
-1202,13
+1202,13
@@
int mutt_index_menu (void)
#endif
{
if (Context && Context->path)
#endif
{
if (Context && Context->path)
-
strncpy (buf, Context->path, sizeof (buf)
);
+
m_strcpy(buf, sizeof(buf), Context->path
);
if (op != OP_SIDEBAR_OPEN)
buffy_next (buf, sizeof (buf));
}
if (op == OP_SIDEBAR_OPEN) {
if (op != OP_SIDEBAR_OPEN)
buffy_next (buf, sizeof (buf));
}
if (op == OP_SIDEBAR_OPEN) {
-
strncpy (buf, NONULL(sidebar_get_current ()), sizeof (buf
));
+
m_strcpy(buf, sizeof(buf), sidebar_get_current(
));
}
else if (mutt_enter_fname (cp, buf, sizeof (buf), &menu->redraw, 1) == -1) {
if (menu->menu == MENU_PAGER) {
}
else if (mutt_enter_fname (cp, buf, sizeof (buf), &menu->redraw, 1) == -1) {
if (menu->menu == MENU_PAGER) {