summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2022-08-27 05:22:53 +0200
committerPřemysl Eric Janouch <p@janouch.name>2022-08-27 15:06:28 +0200
commit57597bf8a2538a2d897778582aad8cccbf945432 (patch)
tree311b91f63028ca788547173b5aea8b1818916fe9
parentc0996fcbe75bd9003476337434ffc205749c3bdf (diff)
downloadxK-57597bf8a2538a2d897778582aad8cccbf945432.tar.gz
xK-57597bf8a2538a2d897778582aad8cccbf945432.tar.xz
xK-57597bf8a2538a2d897778582aad8cccbf945432.zip
xC: move TEXT_* constants where they belong
-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