X-Git-Url: http://git.madism.org/?a=blobdiff_plain;ds=inline;f=curs_main.c;h=81d59c2d0a5b1bf4290919dde692482942255bdb;hb=b07d69b15852a06183f7b2298436e18150c36958;hp=1217c5e14efc83f19736ffb14631a4d48de7074d;hpb=617e7d83d14e14e6a520a48e75437211b16c8834;p=apps%2Fmadmutt.git diff --git a/curs_main.c b/curs_main.c index 1217c5e..81d59c2 100644 --- a/curs_main.c +++ b/curs_main.c @@ -15,6 +15,8 @@ #endif #include +#include +#include #include "mutt.h" #include "mutt_curses.h" @@ -47,8 +49,6 @@ #include "mutt_sasl.h" #endif -#include "lib/intl.h" -#include "lib/str.h" #include "lib/debug.h" #include @@ -445,7 +445,7 @@ int mutt_index_menu (void) sidebar_set_current (Context->path); } - FOREVER { + for (;;) { 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); - 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) @@ -1202,13 +1202,13 @@ int mutt_index_menu (void) #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) { - 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) {