aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xC.c24
1 files 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