projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rocco Rutte:
[apps/madmutt.git]
/
menu.c
diff --git
a/menu.c
b/menu.c
index
e88e8f4
..
e86c4f0
100644
(file)
--- a/
menu.c
+++ b/
menu.c
@@
-21,6
+21,10
@@
#include "imap.h"
#endif
#include "imap.h"
#endif
+#include "lib/mem.h"
+#include "lib/intl.h"
+#include "lib/str.h"
+
#include <string.h>
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
@@
-32,7
+36,7
@@
static void print_enriched_string (int attr, unsigned char *s, int do_color)
{
wchar_t wc;
size_t k;
{
wchar_t wc;
size_t k;
- size_t n =
mutt
_strlen ((char *) s);
+ size_t n =
safe
_strlen ((char *) s);
mbstate_t mbstate;
memset (&mbstate, 0, sizeof (mbstate));
mbstate_t mbstate;
memset (&mbstate, 0, sizeof (mbstate));
@@
-151,7
+155,7
@@
void menu_pad_string (char *s, size_t n)
cols = COLS - shift - SidebarWidth;
else
cols = COLS - shift;
cols = COLS - shift - SidebarWidth;
else
cols = COLS - shift;
- mutt_format_string (tmpbuf, n, cols, cols, 0, ' ', s, strlen (s), 1);
+ mutt_format_string (tmpbuf, n, cols, cols, 0, ' ', s, s
afe_s
trlen (s), 1);
tmpbuf[n - 1] = 0;
snprintf (s, n, "%s", tmpbuf); /* overkill */
FREE (&tmpbuf);
tmpbuf[n - 1] = 0;
snprintf (s, n, "%s", tmpbuf); /* overkill */
FREE (&tmpbuf);
@@
-199,7
+203,7
@@
void menu_redraw_index (MUTTMENU * menu)
char buf[STRING];
int i;
char buf[STRING];
int i;
-
draw_sidebar
(1);
+
sidebar_draw
(1);
for (i = menu->top; i < menu->top + menu->pagelen; i++) {
if (i < menu->max) {
menu_make_entry (buf, sizeof (buf), menu, i);
for (i = menu->top; i < menu->top + menu->pagelen; i++) {
if (i < menu->max) {
menu_make_entry (buf, sizeof (buf), menu, i);
@@
-693,7
+697,7
@@
static int menu_search (MUTTMENU * menu, int op)
_("Reverse search for: "),
buf, sizeof (buf), M_CLEAR) != 0 || !buf[0])
return (-1);
_("Reverse search for: "),
buf, sizeof (buf), M_CLEAR) != 0 || !buf[0])
return (-1);
-
mutt_
str_replace (&menu->searchBuf, buf);
+ str_replace (&menu->searchBuf, buf);
menu->searchDir = (op == OP_SEARCH) ? M_SEARCH_DOWN : M_SEARCH_UP;
}
else {
menu->searchDir = (op == OP_SEARCH) ? M_SEARCH_DOWN : M_SEARCH_UP;
}
else {