diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2011-10-07 00:50:29 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2011-10-07 00:50:29 -0400 |
commit | c4e14d3f47b5c3dba1872c9fa70f24a287e8ed0f (patch) | |
tree | 59dd153dfee14e313634b24bfbc175cb31413a08 /src/LYUtils.c | |
parent | adc7d65fee2f697d9db0aeafebbf9183e0b5cf9d (diff) | |
download | lynx-snapshots-c4e14d3f47b5c3dba1872c9fa70f24a287e8ed0f.tar.gz |
snapshot of project "lynx", label v2-8-8dev_9b
Diffstat (limited to 'src/LYUtils.c')
-rw-r--r-- | src/LYUtils.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/src/LYUtils.c b/src/LYUtils.c index 497e4ffa..38eb897e 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYUtils.c,v 1.213 2011/06/11 12:14:34 tom Exp $ + * $LynxId: LYUtils.c,v 1.214 2011/10/07 00:40:40 tom Exp $ */ #include <HTUtils.h> #include <HTTCP.h> @@ -553,7 +553,7 @@ static BOOL show_whereis_targets(int flag, * Start emphasis immediately if we are making the link * non-current. -FM */ - if (flag != ON) { + if (flag != TRUE) { LYstartTargetEmphasis(); TargetEmphasisON = TRUE; LYaddstr(tmp); @@ -571,7 +571,7 @@ static BOOL show_whereis_targets(int flag, * Start emphasis immediately if we are making the link * non-current. -FM */ - if (flag != ON) { + if (flag != TRUE) { LYstartTargetEmphasis(); TargetEmphasisON = TRUE; LYaddstr(tmp); @@ -585,7 +585,7 @@ static BOOL show_whereis_targets(int flag, * Start emphasis immediately if we are making the link * non-current. -FM */ - if (flag != ON) { + if (flag != TRUE) { LYstartTargetEmphasis(); TargetEmphasisON = TRUE; LYaddstr(tmp); @@ -625,7 +625,7 @@ static BOOL show_whereis_targets(int flag, * character of hightext if we are making the link * current. -FM */ - if (flag == ON && data[(itmp + 1)] == '\0') { + if (flag == TRUE && data[(itmp + 1)] == '\0') { LYstopTargetEmphasis(); TargetEmphasisON = FALSE; LYGetYX(y, offset); @@ -645,7 +645,7 @@ static BOOL show_whereis_targets(int flag, * character of hightext if we are making the link * current. -FM */ - if (flag == ON && data[(itmp + 1)] == '\0') { + if (flag == TRUE && data[(itmp + 1)] == '\0') { LYstopTargetEmphasis(); TargetEmphasisON = FALSE; LYGetYX(y, offset); @@ -661,7 +661,7 @@ static BOOL show_whereis_targets(int flag, * character of hightext if we are making the link * current. -FM */ - if (flag == ON && data[(itmp + 1)] == '\0') { + if (flag == TRUE && data[(itmp + 1)] == '\0') { LYstopTargetEmphasis(); TargetEmphasisON = FALSE; LYGetYX(y, offset); @@ -684,7 +684,7 @@ static BOOL show_whereis_targets(int flag, TargetEmphasisON = FALSE; } LYGetYX(y, offset); - if (offset < (hoffset + (flag == ON ? (hLen - 1) : hLen)) + if (offset < (hoffset + (flag == TRUE ? (hLen - 1) : hLen)) /* * See if we have another hit that starts within the * hightext. -FM @@ -705,7 +705,7 @@ static BOOL show_whereis_targets(int flag, */ && (HitOffset + offset) < (hoffset + - (flag == ON ? (hLen - 1) : hLen))) { + (flag == TRUE ? (hLen - 1) : hLen))) { /* * Set up the data and offset for the hit, and let the code * for within hightext hits handle it. -FM @@ -726,7 +726,7 @@ static BOOL show_whereis_targets(int flag, * hightext, we are done. Otherwise, move there and start * restoring the emphasis. -FM */ - if ((Offset - offset) <= (flag == ON ? (hLen - 1) : hLen)) { + if ((Offset - offset) <= (flag == TRUE ? (hLen - 1) : hLen)) { data = SKIP_GLYPHS(utf_flag, data, Offset - offset); if (utf_flag) { LYrefresh(); @@ -751,7 +751,7 @@ static BOOL show_whereis_targets(int flag, * non-current, or we are making it current but this is not * the first or last character of the hightext. -FM */ - if (flag != ON || + if (flag != TRUE || (offset > hoffset && data[itmp + 1] != '\0')) { LYstartTargetEmphasis(); TargetEmphasisON = TRUE; @@ -771,7 +771,7 @@ static BOOL show_whereis_targets(int flag, * non-current, or we are making it current but this is not * the first or last character of the hightext. -FM */ - if (flag != ON || + if (flag != TRUE || (offset > hoffset && data[itmp + 1] != '\0')) { LYstartTargetEmphasis(); TargetEmphasisON = TRUE; @@ -787,7 +787,7 @@ static BOOL show_whereis_targets(int flag, * non-current, or we are making it current but this is not * the first or last character of the hightext. -FM */ - if (flag != ON || + if (flag != TRUE || (offset > hoffset && data[itmp + 1] != '\0')) { LYstartTargetEmphasis(); TargetEmphasisON = TRUE; @@ -825,7 +825,7 @@ static BOOL show_whereis_targets(int flag, * character of hightext if we are making the link * current. -FM */ - if (flag == ON && data[(itmp + 1)] == '\0') { + if (flag == TRUE && data[(itmp + 1)] == '\0') { LYstopTargetEmphasis(); TargetEmphasisON = FALSE; LYGetYX(y, offset); @@ -845,7 +845,7 @@ static BOOL show_whereis_targets(int flag, * character of hightext if we are making the link * current. -FM */ - if (flag == ON && data[(itmp + 1)] == '\0') { + if (flag == TRUE && data[(itmp + 1)] == '\0') { LYstopTargetEmphasis(); TargetEmphasisON = FALSE; LYGetYX(y, offset); @@ -861,7 +861,7 @@ static BOOL show_whereis_targets(int flag, * character of hightext if we are making the link * current. -FM */ - if (flag == ON && data[(itmp + 1)] == '\0') { + if (flag == TRUE && data[(itmp + 1)] == '\0') { LYstopTargetEmphasis(); TargetEmphasisON = FALSE; LYGetYX(y, offset); @@ -884,7 +884,7 @@ static BOOL show_whereis_targets(int flag, TargetEmphasisON = FALSE; } LYGetYX(y, offset); - if (offset < (hoffset + (flag == ON ? (hLen - 1) : hLen)) + if (offset < (hoffset + (flag == TRUE ? (hLen - 1) : hLen)) /* * See if we have another hit that starts within the * hightext. -FM @@ -904,7 +904,7 @@ static BOOL show_whereis_targets(int flag, * last character, we are done. -FM */ && (HitOffset + offset) < - (hoffset + (flag == ON ? (hLen - 1) : hLen))) { + (hoffset + (flag == TRUE ? (hLen - 1) : hLen))) { /* * If the target extends beyond our buffer, emphasize * everything in the hightext starting at this hit. @@ -945,7 +945,7 @@ static BOOL show_whereis_targets(int flag, * last character of hightext if we are making * the link current. -FM */ - if (flag == ON && data[(itmp + 1)] == '\0') { + if (flag == TRUE && data[(itmp + 1)] == '\0') { LYstopTargetEmphasis(); TargetEmphasisON = FALSE; LYGetYX(y, offset); @@ -965,7 +965,7 @@ static BOOL show_whereis_targets(int flag, * last character of hightext if we are making * the link current. -FM */ - if (flag == ON && data[(itmp + 1)] == '\0') { + if (flag == TRUE && data[(itmp + 1)] == '\0') { LYstopTargetEmphasis(); TargetEmphasisON = FALSE; } else { @@ -979,7 +979,7 @@ static BOOL show_whereis_targets(int flag, * last character of hightext if we are making * the link current. -FM */ - if (flag == ON && data[(itmp + 1)] == '\0') { + if (flag == TRUE && data[(itmp + 1)] == '\0') { LYstopTargetEmphasis(); TargetEmphasisON = FALSE; } else { @@ -1025,7 +1025,7 @@ static int find_cached_style(int cur, s = s_curedit; #endif - if (flag != ON) { + if (flag != TRUE) { int x; /* @@ -1119,13 +1119,13 @@ void LYhighlight(int flag, NONNULL(target))); #if defined(TEXTFIELDS_MAY_NEED_ACTIVATION) && defined(INACTIVE_INPUT_STYLE_VH) - if (flag == OFF) + if (flag == FALSE) textinput_redrawn = FALSE; #endif if (nlinks > 0) { #ifdef USE_COLOR_STYLE - if (flag == ON || links[cur].type == WWW_FORM_LINK_TYPE) { + if (flag == TRUE || links[cur].type == WWW_FORM_LINK_TYPE) { LYmove(LYP + title_adjust, LXP); LynxChangeStyle(find_cached_style(cur, flag), STACK_ON); } @@ -1134,7 +1134,7 @@ void LYhighlight(int flag, || LYGetHiliteStr(cur, 0) == NULL) { LYMoveToLink(cur, target, NULL, flag, links[cur].inUnderline, utf_flag); - lynx_start_link_color(flag == ON, links[cur].inUnderline); + lynx_start_link_color(flag == TRUE, links[cur].inUnderline); } else { LYMoveToLink(cur, target, LYGetHiliteStr(cur, 0), flag, links[cur].inUnderline, utf_flag); @@ -1162,7 +1162,7 @@ void LYhighlight(int flag, LYaddch('_'); #ifdef USE_COLOR_STYLE - } else if (flag == OFF) { + } else if (flag == FALSE) { hl2_drawn = TRUE; redraw_lines_of_link(cur); CTRACE2(TRACE_STYLE, @@ -1196,17 +1196,17 @@ void LYhighlight(int flag, int row = LYP + hi_count + title_adjust; hi_offset = LYGetHilitePos(cur, hi_count); - lynx_stop_link_color(flag == ON, links[cur].inUnderline); + lynx_stop_link_color(flag == TRUE, links[cur].inUnderline); LYmove(row, hi_offset); #ifdef USE_COLOR_STYLE CTRACE2(TRACE_STYLE, (tfp, "STYLE.highlight.line2: @(%d,%d), style=%d.\n", row, hi_offset, - flag == ON ? s_alink : s_a)); - LynxChangeStyle(flag == ON ? s_alink : s_a, ABS_ON); + flag == TRUE ? s_alink : s_a)); + LynxChangeStyle(flag == TRUE ? s_alink : s_a, ABS_ON); #else - lynx_start_link_color(flag == ON, links[cur].inUnderline); + lynx_start_link_color(flag == TRUE, links[cur].inUnderline); #endif for (i = 0; (tmp[0] = hi_string[i]) != '\0' @@ -1225,7 +1225,7 @@ void LYhighlight(int flag, } } } - lynx_stop_link_color(flag == ON, links[cur].inUnderline); + lynx_stop_link_color(flag == TRUE, links[cur].inUnderline); } #ifdef SHOW_WHEREIS_TARGETS for (hi_count = target1_drawn ? 1 : 0; |