- add typedef for list_del() to lib/list.h and use it to fix compiler warnings (fix other warnings as well)
- fix typo in manual for $xterm_leave
git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@339
e385b8ad-14ed-0310-8656-
cc95a2468c6d
#endif
/* func to free buffy for list_del() */
#endif
/* func to free buffy for list_del() */
-static void buffy_free (void** p) {
- FREE(&(*((BUFFY**) p))->path);
+static void buffy_free (BUFFY** p) {
+ FREE(&(*p)->path);
strfcpy (buf, path->data, sizeof (buf));
if (data == M_UNMAILBOXES && str_eq (buf, "*") == 0) {
strfcpy (buf, path->data, sizeof (buf));
if (data == M_UNMAILBOXES && str_eq (buf, "*") == 0) {
- list_del (&Incoming, buffy_free);
+ list_del (&Incoming, (list_del_t*) buffy_free);
if (!mutt_strlen (c))
return "us-ascii";
if (!(c1 = strchr (c, ':')))
if (!mutt_strlen (c))
return "us-ascii";
if (!(c1 = strchr (c, ':')))
+ return ((char*) charset);
strfcpy (fcharset, c, c1 - c + 1);
return fcharset;
}
strfcpy (fcharset, c, c1 - c + 1);
return fcharset;
}
there's no easy and portable way to read the current title so mutt-ng cannot
read it upon startup and restore it when exiting.
there's no easy and portable way to read the current title so mutt-ng cannot
read it upon startup and restore it when exiting.
- Based on the xterm FAQ, the following might work: set xterm_leave = '`test
+ Based on the xterm FAQ, the following might work:
The Mutt-ng E-Mail Client 148
The Mutt-ng E-Mail Client 148
- x_\bD_\bI_\bS_\bP_\bL_\bA_\bY (section , page ) != x && xprop -id _\bW_\bI_\bN_\bD_\bO_\bW_\bI_\bD (section , page ) | grep
- WM_NAME | cut -d ''' -f 2`'
+ set xterm_leave = '`test x$DISPLAY != x && xprop -id $WINDOWID | grep WM_NAME |
+ cut -d ''' -f 2`'
_\b6_\b._\b3_\b._\b3_\b3_\b7 _\bx_\bt_\be_\br_\bm_\b__\bs_\be_\bt_\b__\bt_\bi_\bt_\bl_\be_\bs
_\b6_\b._\b3_\b._\b3_\b3_\b7 _\bx_\bt_\be_\br_\bm_\b__\bs_\be_\bt_\b__\bt_\bi_\bt_\bl_\be_\bs
int i = 0;
if (mutt_strcmp ("*", str) == 0) {
int i = 0;
if (mutt_strcmp ("*", str) == 0) {
+ list_del (l, (list_del_t*) rx_free);
/* "*" is a special case. */
if (!mutt_strcmp (buf->data, "*")) {
mutt_free_spam_list (&SpamList);
/* "*" is a special case. */
if (!mutt_strcmp (buf->data, "*")) {
mutt_free_spam_list (&SpamList);
- list_del (&NoSpamList, rx_free);
+ list_del (&NoSpamList, (list_del_t*) rx_free);
** Based on the xterm FAQ, the following might work:
**
** .pp
** Based on the xterm FAQ, the following might work:
**
** .pp
- ** \fTset xterm_leave = "`test x$DISPLAY != x && xprop -id $WINDOWID | grep WM_NAME | cut -d '"' -f 2`"\fT
+ ** \fTset xterm_leave = "`test x$$$DISPLAY != x && xprop -id $$$WINDOWID | grep WM_NAME | cut -d '"' -f 2`"\fP
*/
{"xterm_title", DT_STR, R_BOTH, UL &XtermTitle, UL "Mutt-ng with %?m?%m messages&no messages?%?n? [%n New]?"},
/*
*/
{"xterm_title", DT_STR, R_BOTH, UL &XtermTitle, UL "Mutt-ng with %?m?%m messages&no messages?%?n? [%n New]?"},
/*
return (safe_calloc (1, sizeof (list2_t)));
}
return (safe_calloc (1, sizeof (list2_t)));
}
-void list_del (list2_t** l, void (*edel) (void**)) {
+void list_del (list2_t** l, list_del_t* del) {
size_t i = 0;
if (!l || !*l)
return;
size_t i = 0;
if (!l || !*l)
return;
for (i = 0; i < (*l)->length; i++)
for (i = 0; i < (*l)->length; i++)
FREE(&(*l)->data);
FREE(l);
}
FREE(&(*l)->data);
FREE(l);
}
*/
list2_t* list_new (void);
*/
list2_t* list_new (void);
-/* frees all memory used by list and optionally used edel func
- * ptr to free items */
-void list_del (list2_t**, void (*edel) (void**));
+
+typedef void list_del_t (void**);
+
+/* free() all memory used by list and optionally
+ * use del function to free() items as well */
+void list_del (list2_t**, list_del_t* del);
#define list_empty(l) (!l || l->length == 0 || !l->data)
#define list_empty(l) (!l || l->length == 0 || !l->data)