From 57597bf8a2538a2d897778582aad8cccbf945432 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Sat, 27 Aug 2022 05:22:53 +0200 Subject: xC: move TEXT_* constants where they belong --- xC.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/xC.c b/xC.c index ab51fae..84c5532 100644 --- a/xC.c +++ b/xC.c @@ -1479,10 +1479,21 @@ enum formatter_item_type FORMATTER_ITEM_IGNORE_ATTR ///< Un/set attribute ignoration }; +enum +{ + TEXT_BOLD = 1 << 0, + TEXT_ITALIC = 1 << 1, + TEXT_UNDERLINE = 1 << 2, + TEXT_INVERSE = 1 << 3, + TEXT_BLINK = 1 << 4, + TEXT_CROSSED_OUT = 1 << 5, + TEXT_MONOSPACE = 1 << 6 +}; + struct formatter_item { enum formatter_item_type type : 16; ///< Type of this item - int attribute : 16; ///< Attribute ID + int attribute : 16; ///< Attribute ID or a TEXT_* mask int color; ///< Colour char *text; ///< String }; @@ -2831,17 +2842,6 @@ init_colors (struct app_context *ctx) // is what people are using these days. At least no stupid ncurses limits us // with colour pairs. -enum -{ - TEXT_BOLD = 1 << 0, - TEXT_ITALIC = 1 << 1, - TEXT_UNDERLINE = 1 << 2, - TEXT_INVERSE = 1 << 3, - TEXT_BLINK = 1 << 4, - TEXT_CROSSED_OUT = 1 << 5, - TEXT_MONOSPACE = 1 << 6 -}; - struct attr_printer { char **attrs; ///< Named attributes -- cgit v1.2.3-70-g09d2