64 if ((*quote_list)->down)
89 struct QuoteStyle *new_class,
int index,
int *q_level)
103 q_list = q_list->
down;
105 else if (q_list->
next)
107 q_list = q_list->
next;
111 while (!q_list->
next)
118 q_list = q_list->
next;
137 size_t length,
bool *force_redraw,
int *q_level)
144 const char *tail_qptr = NULL;
218 if (q_list == *quote_list)
233 *force_redraw =
true;
239 q_list = q_list->
next;
255 q_list = q_list->
down;
256 tail_lng = length - offset;
257 tail_qptr = qptr + offset;
291 tmp->
up = q_list->
up;
293 if (tmp->
up->
down == q_list)
337 *force_redraw =
true;
342 q_list = q_list->
next;
356 q_list = q_list->
down;
357 tail_lng = length - offset;
358 tail_qptr = qptr + offset;
365 q_list = q_list->
next;
402 q_list = q_list->
next;
419 if ((*quote_list)->next)
424 (*quote_list)->next = qc;
425 qc->
prev = *quote_list;
453 *cur_qlevel = (*cur_qlevel + 1) % num_qlevel;
#define FREE(x)
Free memory and set the pointer to NULL.
#define MUTT_MEM_CALLOC(n, type)
Convenience wrapper for the library headers.
char * mutt_strn_dup(const char *begin, size_t len)
Duplicate a sub-string.
bool mutt_strn_equal(const char *a, const char *b, size_t num)
Check for equality of two strings (to a maximum), safely.
struct QuoteStyle * qstyle_classify(struct QuoteStyle **quote_list, const char *qptr, size_t length, bool *force_redraw, int *q_level)
Find a style for a string.
void qstyle_recolor(struct QuoteStyle *quote_list)
Recolour quotes after colour changes.
static void qstyle_recurse(struct QuoteStyle *quote_list, int num_qlevel, int *cur_qlevel)
Update the quoting styles after colour changes.
void qstyle_free_tree(struct QuoteStyle **quote_list)
Free an entire tree of QuoteStyle.
static void qstyle_insert(struct QuoteStyle *quote_list, struct QuoteStyle *new_class, int index, int *q_level)
Insert a new quote colour class into a list.
static struct QuoteStyle * qstyle_new(void)
Create a new QuoteStyle.
static void qstyle_free(struct QuoteStyle **ptr)
Free a single QuoteStyle object.
struct AttrColor * quoted_colors_get(int q)
Return the color of a quote, cycling through the used quotes.
int quoted_colors_num_used(void)
Return the number of used quotes.
struct AttrColor * attr_color
Colour and attribute of the text.
struct QuoteStyle * next
Different quoting styles at the same level.
size_t prefix_len
Length of the prefix string.
char * prefix
Prefix string, e.g. "> ".
struct QuoteStyle * down
Parent (less quoted) and child (more quoted) levels.
int quote_n
The quoteN colour index for this level.