projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Do not use implicit ncurses functions, now we can grep for 'stdscr' to find them.
[apps/madmutt.git]
/
remailer.c
diff --git
a/remailer.c
b/remailer.c
index
40f5bba
..
1118345
100644
(file)
--- a/
remailer.c
+++ b/
remailer.c
@@
-255,11
+255,11
@@
static void mix_redraw_ce (remailer_t ** type2_list,
else
SETCOLOR (MT_COLOR_NORMAL);
else
SETCOLOR (MT_COLOR_NORMAL);
- mv
addstr (
coords[i].r, coords[i].c, type2_list[chain->ch[i]]->shortname);
+ mv
waddstr (stdscr,
coords[i].r, coords[i].c, type2_list[chain->ch[i]]->shortname);
SETCOLOR (MT_COLOR_NORMAL);
if (i + 1 < chain->cl)
SETCOLOR (MT_COLOR_NORMAL);
if (i + 1 < chain->cl)
-
addstr (
", ");
+
waddstr (stdscr,
", ");
}
}
}
}
@@
-272,8
+272,8
@@
static void mix_redraw_chain (remailer_t ** type2_list,
BKGDSET (MT_COLOR_NORMAL);
for (i = MIX_VOFFSET; i < MIX_MAXROW; i++) {
BKGDSET (MT_COLOR_NORMAL);
for (i = MIX_VOFFSET; i < MIX_MAXROW; i++) {
-
move (
i, 0);
-
clrtoeol (
);
+
wmove (stdscr,
i, 0);
+
wclrtoeol (stdscr
);
}
for (i = 0; i < chain->cl; i++)
}
for (i = 0; i < chain->cl; i++)
@@
-283,11
+283,11
@@
static void mix_redraw_chain (remailer_t ** type2_list,
static void mix_redraw_head (mixchain_t * chain)
{
SETCOLOR (MT_COLOR_STATUS);
static void mix_redraw_head (mixchain_t * chain)
{
SETCOLOR (MT_COLOR_STATUS);
- mv
printw (
MIX_VOFFSET - 1, 0, "-- Remailer chain [Length: %d]",
+ mv
wprintw (stdscr,
MIX_VOFFSET - 1, 0, "-- Remailer chain [Length: %d]",
chain ? chain->cl : 0);
BKGDSET (MT_COLOR_STATUS);
chain ? chain->cl : 0);
BKGDSET (MT_COLOR_STATUS);
-
clrtoeol (
);
+
wclrtoeol (stdscr
);
BKGDSET (MT_COLOR_NORMAL);
SETCOLOR (MT_COLOR_NORMAL);
BKGDSET (MT_COLOR_NORMAL);
SETCOLOR (MT_COLOR_NORMAL);
@@
-340,17
+340,13
@@
static const char *mix_format_caps (remailer_t * r)
* %a address
*
*/
* %a address
*
*/
-static const char *mix_entry_fmt (char *dest,
- ssize_t destlen,
- char op,
- const char *src,
- const char *prefix,
- const char *ifstring,
- const char *elsestring,
- unsigned long data, format_flag flags)
+static const char *
+mix_entry_fmt (char *dest, ssize_t destlen, char op, const char *src,
+ const char *prefix, const char *ifstr,
+ const char *elstr, anytype data, format_flag flags)
{
char fmt[16];
{
char fmt[16];
- remailer_t *remailer =
(remailer_t *) data
;
+ remailer_t *remailer =
data.ptr
;
int optional = (flags & M_FORMAT_OPTIONAL);
switch (op) {
int optional = (flags & M_FORMAT_OPTIONAL);
switch (op) {
@@
-387,10
+383,9
@@
static const char *mix_entry_fmt (char *dest,
*dest = '\0';
}
*dest = '\0';
}
- if (optional)
- m_strformat (dest, destlen, ifstring, mutt_attach_fmt, data, 0);
- else if (flags & M_FORMAT_OPTIONAL)
- m_strformat (dest, destlen, elsestring, mutt_attach_fmt, data, 0);
+ if (flags & M_FORMAT_OPTIONAL)
+ m_strformat(dest, destlen, 0, optional ? ifstr : elstr,
+ mutt_attach_fmt, data, 0);
return (src);
}
return (src);
}
@@
-399,10
+394,9
@@
static const char *mix_entry_fmt (char *dest,
static void mix_entry (char *b, ssize_t blen, MUTTMENU * menu, int num)
{
remailer_t **type2_list = (remailer_t **) menu->data;
static void mix_entry (char *b, ssize_t blen, MUTTMENU * menu, int num)
{
remailer_t **type2_list = (remailer_t **) menu->data;
- int w = (COLS-SW) > blen ? blen : (COLS-SW);
- m_strformat
(b, w, NONULL (MixEntryFormat)
, mix_entry_fmt,
-
(unsigned long) type2_list[num], M_FORMAT_ARROWCURSOR
);
+ m_strformat
(b, blen, COLS - SW, MixEntryFormat
, mix_entry_fmt,
+
type2_list[num], 0
);
}
static int mix_chain_add (mixchain_t * chain, const char *s,
}
static int mix_chain_add (mixchain_t * chain, const char *s,
@@
-433,16
+427,6
@@
static int mix_chain_add (mixchain_t * chain, const char *s,
return 0;
}
return 0;
}
-static struct mapping_t RemailerHelp[] = {
- {N_("Append"), OP_MIX_APPEND},
- {N_("Insert"), OP_MIX_INSERT},
- {N_("Delete"), OP_MIX_DELETE},
- {N_("Abort"), OP_EXIT},
- {N_("OK"), OP_MIX_USE},
- {NULL, OP_NULL}
-};
-
-
void mix_make_chain (string_list_t ** chainp, int *redraw)
{
string_list_t *p;
void mix_make_chain (string_list_t ** chainp, int *redraw)
{
string_list_t *p;
@@
-457,7
+441,6
@@
void mix_make_chain (string_list_t ** chainp, int *redraw)
struct coord *coords = NULL;
MUTTMENU *menu;
struct coord *coords = NULL;
MUTTMENU *menu;
- char helpstr[STRING];
short loop = 1;
int op;
short loop = 1;
int op;
@@
-493,8
+476,6
@@
void mix_make_chain (string_list_t ** chainp, int *redraw)
menu->tag = NULL;
menu->title = _("Select a remailer chain.");
menu->data = type2_list;
menu->tag = NULL;
menu->title = _("Select a remailer chain.");
menu->data = type2_list;
- menu->help =
- mutt_compile_help (helpstr, sizeof (helpstr), MENU_MIX, RemailerHelp);
m_len = menu->pagelen = MIX_VOFFSET - menu->offset - 1;
m_len = menu->pagelen = MIX_VOFFSET - menu->offset - 1;