diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2012-11-18 22:25:54 -0500 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2012-11-18 22:25:54 -0500 |
commit | 28ff055f1aeed253ec806a6ad5a216613c24f973 (patch) | |
tree | b75d994590e7724374353ee0c62749ec4013fe74 /src | |
parent | 0bf7dbb3033d5a0ed2dd2c372a4e2434b8a034cf (diff) | |
download | lynx-snapshots-28ff055f1aeed253ec806a6ad5a216613c24f973.tar.gz |
snapshot of project "lynx", label v2-8-8dev_14j
Diffstat (limited to 'src')
-rw-r--r-- | src/GridText.c | 21 | ||||
-rw-r--r-- | src/LYLocal.c | 8 |
2 files changed, 12 insertions, 17 deletions
diff --git a/src/GridText.c b/src/GridText.c index ad4dc232..0f8b1e14 100644 --- a/src/GridText.c +++ b/src/GridText.c @@ -1,5 +1,5 @@ /* - * $LynxId: GridText.c,v 1.241 2012/11/16 10:55:31 tom Exp $ + * $LynxId: GridText.c,v 1.243 2012/11/18 22:09:20 tom Exp $ * * Character grid hypertext object * =============================== @@ -2163,10 +2163,9 @@ static void display_page(HText *text, ((int) line->offset + LenNeeded) <= DISPLAY_COLS) { size_t itmp = 0; size_t written = 0; - int x_pos = offset + (int) (cp - data); + int x_off = offset + (int) (cp - data); size_t len = strlen(target); size_t utf_extra = 0; - int y; text->page_has_target = YES; @@ -2185,14 +2184,16 @@ static void display_page(HText *text, /* * Ignore special characters. */ - x_pos--; + x_off--; } else if (&data[itmp] >= cp) { if (cp == &data[itmp]) { /* * First printable character of target. */ - LYmove((i + title_lines), x_pos); + LYmove((i + title_lines), + line->offset + LYstrExtent2(line->data, + x_off - line->offset)); } /* * Output all the printable target chars. @@ -2226,17 +2227,11 @@ static void display_page(HText *text, * line. -FM */ LYstopTargetEmphasis(); - LYGetYX(y, offset); - (void) y; data = (char *) &data[itmp]; + offset = (int) (data - line->data + line->offset); - /* - * Adjust the cursor position, should we be at - * the end of the line, or not have another hit - * in it. -FM - */ - LYmove((i + title_lines + 1), 0); } /* end while */ + LYmove((i + title_lines + 1), 0); #endif /* USE_COLOR_STYLE */ #endif /* SHOW_WHEREIS_TARGETS */ diff --git a/src/LYLocal.c b/src/LYLocal.c index 52c57e9f..54d43c85 100644 --- a/src/LYLocal.c +++ b/src/LYLocal.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYLocal.c,v 1.118 2012/02/09 11:45:06 tom Exp $ + * $LynxId: LYLocal.c,v 1.119 2012/11/18 22:25:54 tom Exp $ * * Routines to manipulate the local filesystem. * Written by: Rick Mallett, Carleton University @@ -1568,8 +1568,8 @@ static int permit_location(char *destpath, char amode[10]; char *tmpbuf = NULL; - HTSprintf0(&tmpbuf, "chmod %.4o %s", (unsigned int) new_mode, destpath); - sprintf(amode, "%.4o", (unsigned int) new_mode); + HTSprintf0(&tmpbuf, "chmod %.4o %s", (unsigned) new_mode, destpath); + sprintf(amode, "%.4o", (unsigned) new_mode); args = make_argv("chmod", amode, destpath, @@ -1584,7 +1584,7 @@ static int permit_location(char *destpath, code = -1; } CTRACE((tfp, "builtin chmod %.4o ->%d\n\t%s\n", - new_mode, code, destpath)); + (unsigned) new_mode, code, destpath)); } if (code == 1) LYforce_no_cache = TRUE; /* Force update of dired listing. */ |