summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8b0297a)
raw | patch | inline | side by side (parent: 8b0297a)
author | Jonas Fonseca <fonseca@diku.dk> | |
Thu, 1 Jun 2006 02:12:48 +0000 (04:12 +0200) | ||
committer | Jonas Fonseca <fonseca@antimatter.localdomain> | |
Thu, 1 Jun 2006 02:12:48 +0000 (04:12 +0200) |
tig.c | patch | blob | history |
index f541697a26a5863a829785e0c1454729941aa325..4a4ce9a5517c1761d3a52fea9f064051d7f5ae47 100644 (file)
--- a/tig.c
+++ b/tig.c
}
-static struct int_map color_map[] = {
-#define COLOR_MAP(name) { #name, STRING_SIZE(#name), COLOR_##name }
- COLOR_MAP(DEFAULT),
- COLOR_MAP(BLACK),
- COLOR_MAP(BLUE),
- COLOR_MAP(CYAN),
- COLOR_MAP(GREEN),
- COLOR_MAP(MAGENTA),
- COLOR_MAP(RED),
- COLOR_MAP(WHITE),
- COLOR_MAP(YELLOW),
-};
-
-static struct int_map attr_map[] = {
-#define ATTR_MAP(name) { #name, STRING_SIZE(#name), A_##name }
- ATTR_MAP(NORMAL),
- ATTR_MAP(BLINK),
- ATTR_MAP(BOLD),
- ATTR_MAP(DIM),
- ATTR_MAP(REVERSE),
- ATTR_MAP(STANDOUT),
- ATTR_MAP(UNDERLINE),
-};
-
#define LINE_INFO \
LINE(DIFF_HEADER, "diff --git ", COLOR_YELLOW, COLOR_DEFAULT, 0), \
LINE(DIFF_CHUNK, "@@", COLOR_MAGENTA, COLOR_DEFAULT, 0), \
* User config file handling.
*/
+static struct int_map color_map[] = {
+#define COLOR_MAP(name) { #name, STRING_SIZE(#name), COLOR_##name }
+ COLOR_MAP(DEFAULT),
+ COLOR_MAP(BLACK),
+ COLOR_MAP(BLUE),
+ COLOR_MAP(CYAN),
+ COLOR_MAP(GREEN),
+ COLOR_MAP(MAGENTA),
+ COLOR_MAP(RED),
+ COLOR_MAP(WHITE),
+ COLOR_MAP(YELLOW),
+};
+
#define set_color(color, name, namelen) \
set_from_int_map(color_map, ARRAY_SIZE(color_map), color, name, namelen)
+static struct int_map attr_map[] = {
+#define ATTR_MAP(name) { #name, STRING_SIZE(#name), A_##name }
+ ATTR_MAP(NORMAL),
+ ATTR_MAP(BLINK),
+ ATTR_MAP(BOLD),
+ ATTR_MAP(DIM),
+ ATTR_MAP(REVERSE),
+ ATTR_MAP(STANDOUT),
+ ATTR_MAP(UNDERLINE),
+};
+
#define set_attribute(attr, name, namelen) \
set_from_int_map(attr_map, ARRAY_SIZE(attr_map), attr, name, namelen)