diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2013-10-02 14:47:09 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2013-10-02 14:47:09 -0400 |
commit | 080f58558da81e4d715d50c357d8e121c4d8af15 (patch) | |
tree | 0a6fe916e76fe7f1413443c8f5d2bfc1eba7bf08 /src | |
parent | 3b6378f767f39efc0e8da6f7f8bb36f76e684b5f (diff) | |
download | lynx-snapshots-080f58558da81e4d715d50c357d8e121c4d8af15.tar.gz |
snapshot of project "lynx", label v2-8-8dev_16e
Diffstat (limited to 'src')
-rw-r--r-- | src/LYCurses.c | 4 | ||||
-rw-r--r-- | src/LYStyle.c | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/LYCurses.c b/src/LYCurses.c index b8934930..28a0ff19 100644 --- a/src/LYCurses.c +++ b/src/LYCurses.c @@ -1,4 +1,4 @@ -/* $LynxId: LYCurses.c,v 1.174 2013/07/21 00:40:06 tom Exp $ */ +/* $LynxId: LYCurses.c,v 1.175 2013/10/02 14:35:56 tom Exp $ */ #include <HTUtils.h> #include <HTAlert.h> @@ -647,7 +647,7 @@ static int get_color_pair(int n) && lynx_color_pairs[n].bg == default_bg) return 0; #endif - return COLOR_PAIR(n); + return (int) COLOR_PAIR(n); } /* diff --git a/src/LYStyle.c b/src/LYStyle.c index 40c419c7..3aa0517d 100644 --- a/src/LYStyle.c +++ b/src/LYStyle.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYStyle.c,v 1.73 2013/06/02 19:17:06 tom Exp $ + * $LynxId: LYStyle.c,v 1.75 2013/10/02 14:47:09 tom Exp $ * * character level styles for Lynx * (c) 1996 Rob Partington -- donated to the Lyncei (if they want it :-) @@ -187,6 +187,7 @@ static void parse_attributes(const char *mono, int bA = default_bg; int cA = A_NORMAL; int newstyle = hash_code(element); + int colored_attr; CTRACE2(TRACE_STYLE, (tfp, "CSS(PA):style d=%d / h=%d, e=%s\n", style, newstyle, element)); @@ -254,9 +255,10 @@ static void parse_attributes(const char *mono, } } CTRACE2(TRACE_STYLE, (tfp, "CSS(CURPAIR):%d\n", curPair)); + colored_attr = ((int) COLOR_PAIR(curPair)) | ((int) cA); if (style < DSTYLE_ELEMENTS) - setStyle(style, COLOR_PAIR(curPair) | cA, cA, mA); - setHashStyle(newstyle, COLOR_PAIR(curPair) | cA, cA, mA, element); + setStyle(style, colored_attr, cA, mA); + setHashStyle(newstyle, colored_attr, cA, mA, element); } else { if (lynx_has_color && fA != NO_COLOR) { CTRACE2(TRACE_STYLE, @@ -812,7 +814,7 @@ void FreeCachedStyles(void) */ void update_color_style(void) { - CTRACE((tfp, "update_color_style %p\n", lss_styles)); + CTRACE((tfp, "update_color_style %p\n", (void *) lss_styles)); memset(our_pairs, 0, sizeof(our_pairs)); parse_userstyles(); } |