{
mutt_pretty_mailbox(buf, buflen);
if (!pass)
- mutt_history_add(hclass, buf, 1);
+ mutt_history_add(hclass, buf, true);
rv = 0;
goto bye;
}
/* Convert from wide characters */
my_wcstombs(buf, buflen, state->wbuf, state->lastchar);
if (!pass)
- mutt_history_add(hclass, buf, 1);
+ mutt_history_add(hclass, buf, true);
if (multiple)
{
if (p)
{
mutt_convert_string(&p, "utf-8", Charset, 0);
- mutt_history_add(hclass, p, 0);
+ mutt_history_add(hclass, p, false);
FREE(&p);
}
}
OldSize = History;
}
-void mutt_history_add(enum HistoryClass hclass, const char *s, int save)
+void mutt_history_add(enum HistoryClass hclass, const char *s, bool save)
{
int prev;
struct History *h = GET_HISTORY(hclass);
h->cur = h->last;
}
-int mutt_history_at_scratch(enum HistoryClass hclass)
+bool mutt_history_at_scratch(enum HistoryClass hclass)
{
struct History *h = GET_HISTORY(hclass);
if (!History || !h)
- return 0; /* disabled */
+ return false; /* disabled */
return h->cur == h->last;
}
#ifndef _MUTT_HISTORY_H
#define _MUTT_HISTORY_H
+#include <stdbool.h>
+
/**
* enum HistoryClass - Type to differentiate different histories
*/
void mutt_init_history(void);
void mutt_read_histfile(void);
-void mutt_history_add(enum HistoryClass hclass, const char *s, int save);
+void mutt_history_add(enum HistoryClass hclass, const char *s, bool save);
char *mutt_history_next(enum HistoryClass hclass);
char *mutt_history_prev(enum HistoryClass hclass);
void mutt_reset_history_state(enum HistoryClass hclass);
-int mutt_history_at_scratch(enum HistoryClass hclass);
+bool mutt_history_at_scratch(enum HistoryClass hclass);
void mutt_history_save_scratch(enum HistoryClass hclass, const char *s);
#endif /* _MUTT_HISTORY_H */