static struct Resize
{
int line;
- int search_compiled;
- int search_back;
+ bool search_compiled;
+ bool search_back;
} *Resize = NULL;
#define NUM_SIG_LINES 4
* @retval ptr Quoting style
*/
static struct QClass *classify_quote(struct QClass **quote_list, const char *qptr,
- size_t length, int *force_redraw, int *q_level)
+ size_t length, bool *force_redraw, int *q_level)
{
struct QClass *q_list = *quote_list;
struct QClass *class = NULL, *tmp = NULL, *ptr = NULL, *save = NULL;
}
/* we found a shorter prefix, so certain quotes have changed classes */
- *force_redraw = 1;
+ *force_redraw = true;
continue;
}
else
}
/* we found a shorter prefix, so we need a redraw */
- *force_redraw = 1;
+ *force_redraw = true;
continue;
}
else
*/
static void resolve_types(char *buf, char *raw, struct Line *line_info, int n,
int last, struct QClass **quote_list, int *q_level,
- int *force_redraw, bool q_classify)
+ bool *force_redraw, bool q_classify)
{
struct ColorLine *color_line = NULL;
regmatch_t pmatch[1], smatch[1];
line_info[j].type = line_info[n].type;
line_info[j].syntax[0].color = line_info[n].syntax[0].color;
}
- *force_redraw = 1; /* the previous lines have already been drawn on the screen */
+ *force_redraw = true; /* the previous lines have already been drawn on the screen */
}
break;
}
*/
static int display_line(FILE *f, LOFF_T *last_pos, struct Line **line_info,
int n, int *last, int *max, int flags,
- struct QClass **quote_list, int *q_level, int *force_redraw,
+ struct QClass **quote_list, int *q_level, bool *force_redraw,
regex_t *search_re, struct MuttWindow *pager_window)
{
unsigned char *buf = NULL, *fmt = NULL;
int last_line;
int curline;
int topline;
- int force_redraw;
+ bool force_redraw;
int has_types;
int hide_quoted;
int q_level;
struct MuttWindow *pager_window;
struct Menu *index; /**< the Pager Index (PI) */
regex_t search_re;
- int search_compiled;
+ bool search_compiled;
int search_flag;
- int search_back;
+ bool search_back;
const char *banner;
char *helpstr;
char *searchbuf;
{
regerror(err, &rd->search_re, buffer, sizeof(buffer));
mutt_error("%s", buffer);
- rd->search_compiled = 0;
+ rd->search_compiled = false;
}
else
{
mutt_window_move(rd->pager_window, 0, 0);
rd->curline = rd->oldtopline = rd->topline;
rd->lines = 0;
- rd->force_redraw = 0;
+ rd->force_redraw = false;
while (rd->lines < rd->pager_window->rows &&
rd->line_info[rd->curline].offset <= rd->sb.st_size - 1)
searchctx = 0;
search_next:
- if ((!rd.search_back && ch == OP_SEARCH_NEXT) ||
- (rd.search_back && ch == OP_SEARCH_OPPOSITE))
+ if ((!rd.search_back && (ch == OP_SEARCH_NEXT)) ||
+ (rd.search_back && (ch == OP_SEARCH_OPPOSITE)))
{
/* searching forward */
for (i = wrapped ? 0 : rd.topline + searchctx + 1; i < rd.last_line; i++)
/* leave search_back alone if ch == OP_SEARCH_NEXT */
if (ch == OP_SEARCH)
- rd.search_back = 0;
+ rd.search_back = false;
else if (ch == OP_SEARCH_REVERSE)
- rd.search_back = 1;
+ rd.search_back = true;
if (rd.search_compiled)
{
rd.line_info[i].search_cnt = -1;
}
rd.search_flag = 0;
- rd.search_compiled = 0;
+ rd.search_compiled = false;
}
else
{
- rd.search_compiled = 1;
+ rd.search_compiled = true;
/* update the search pointers */
i = 0;
while (display_line(rd.fp, &rd.last_pos, &rd.line_info, i, &rd.last_line, &rd.max_line,
if (rd.search_compiled)
{
regfree(&rd.search_re);
- rd.search_compiled = 0;
+ rd.search_compiled = false;
}
FREE(&rd.line_info);
mutt_menu_pop_current(pager_menu);