Go to the source code of this file.
Data Structures | |
struct | RegexColor |
A regular expression and a color to highlight a line. More... | |
Functions | |
STAILQ_HEAD (RegexColorList, RegexColor) | |
void | regex_colors_init (void) |
Initialise the Regex colours. | |
void | regex_colors_reset (void) |
Reset the Regex colours. | |
void | regex_colors_cleanup (void) |
Cleanup the Regex colours. | |
void | regex_color_clear (struct RegexColor *rcol) |
Free the contents of a Regex colour. | |
void | regex_color_free (struct RegexColorList *list, struct RegexColor **ptr) |
Free a Regex colour. | |
struct RegexColor * | regex_color_new (void) |
Create a new RegexColor. | |
struct RegexColorList * | regex_colors_get_list (enum ColorId cid) |
Return the RegexColorList for a colour id. | |
void | regex_color_list_clear (struct RegexColorList *rcl) |
Free the contents of a RegexColorList. | |
bool | regex_colors_parse_color_list (enum ColorId cid, const char *pat, struct AttrColor *ac, int *rc, struct Buffer *err) |
Parse a Regex 'color' command. | |
int | regex_colors_parse_status_list (enum ColorId cid, const char *pat, struct AttrColor *ac, int match, struct Buffer *err) |
Parse a Regex 'color status' command. | |
bool | regex_colors_parse_uncolor (enum ColorId cid, const char *pat, bool uncolor) |
Parse a Regex 'uncolor' command. | |
Regex Colour.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file regex4.h.
STAILQ_HEAD | ( | RegexColorList | , |
RegexColor | |||
) |
void regex_colors_init | ( | void | ) |
Initialise the Regex colours.
Definition at line 68 of file regex.c.
void regex_colors_reset | ( | void | ) |
Reset the Regex colours.
Definition at line 91 of file regex.c.
void regex_colors_cleanup | ( | void | ) |
Cleanup the Regex colours.
Definition at line 114 of file regex.c.
void regex_color_clear | ( | struct RegexColor * | rcol | ) |
Free the contents of a Regex colour.
rcol | RegexColor to empty |
Definition at line 125 of file regex.c.
void regex_color_free | ( | struct RegexColorList * | list, |
struct RegexColor ** | ptr | ||
) |
Free a Regex colour.
list | RegexColorList holding the colour |
ptr | RegexColor to free |
Definition at line 144 of file regex.c.
struct RegexColor * regex_color_new | ( | void | ) |
Create a new RegexColor.
ptr | New RegexColor |
Definition at line 159 of file regex.c.
struct RegexColorList * regex_colors_get_list | ( | enum ColorId | cid | ) |
Return the RegexColorList for a colour id.
cid | Colour Id, e.g. MT_COLOR_BODY |
ptr | RegexColorList |
Definition at line 190 of file regex.c.
void regex_color_list_clear | ( | struct RegexColorList * | rcl | ) |
Free the contents of a RegexColorList.
rcl | List to clear |
Free each of the RegexColorList in a list.
Definition at line 172 of file regex.c.
bool regex_colors_parse_color_list | ( | enum ColorId | cid, |
const char * | pat, | ||
struct AttrColor * | ac, | ||
int * | rc, | ||
struct Buffer * | err | ||
) |
Parse a Regex 'color' command.
cid | Colour Id, should be MT_COLOR_STATUS |
pat | Regex pattern |
ac | Colour value to use |
rc | Return code, e.g. MUTT_CMD_SUCCESS |
err | Buffer for error messages |
true | Colour was parsed |
Parse a Regex 'color' command, e.g. "color index green default pattern"
Definition at line 329 of file regex.c.
int regex_colors_parse_status_list | ( | enum ColorId | cid, |
const char * | pat, | ||
struct AttrColor * | ac, | ||
int | match, | ||
struct Buffer * | err | ||
) |
Parse a Regex 'color status' command.
cid | Colour ID, should be MT_COLOR_STATUS |
pat | Regex pattern |
ac | Colour value to use |
match | Use the nth regex submatch |
err | Buffer for error messages |
CommandResult | Result e.g. MUTT_CMD_SUCCESS |
Definition at line 396 of file regex.c.
bool regex_colors_parse_uncolor | ( | enum ColorId | cid, |
const char * | pat, | ||
bool | uncolor | ||
) |
Parse a Regex 'uncolor' command.
cid | Colour Id, e.g. MT_COLOR_STATUS |
pat | Pattern to remove (NULL to remove all) |
uncolor | true if 'uncolor', false if 'unmono' |
true | If colours were unset |
Definition at line 424 of file regex.c.