diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2006-09-10 23:47:00 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2006-09-10 23:47:00 -0400 |
commit | 24a47fee30cfc3e2da82571f9c13c896a601a8df (patch) | |
tree | 34e6d98955850ffba8d43bc0b9bf7f8a1143f045 /src | |
parent | c6cec39ad0f9474e910e321e1b4d95054f5529a1 (diff) | |
download | lynx-snapshots-24a47fee30cfc3e2da82571f9c13c896a601a8df.tar.gz |
snapshot of project "lynx", label v2-8-6pre_3
Diffstat (limited to 'src')
-rw-r--r-- | src/LYCurses.c | 6 | ||||
-rw-r--r-- | src/LYHistory.c | 7 | ||||
-rw-r--r-- | src/LYMain.c | 2 | ||||
-rw-r--r-- | src/LYMainLoop.c | 7 | ||||
-rw-r--r-- | src/LYReadCFG.c | 3 | ||||
-rw-r--r-- | src/LYStrings.c | 4 | ||||
-rw-r--r-- | src/LYUtils.c | 39 | ||||
-rw-r--r-- | src/LYrcFile.h | 1 | ||||
-rw-r--r-- | src/UCAux.c | 8 |
9 files changed, 59 insertions, 18 deletions
diff --git a/src/LYCurses.c b/src/LYCurses.c index cbe949e1..7f1c371a 100644 --- a/src/LYCurses.c +++ b/src/LYCurses.c @@ -711,7 +711,7 @@ char *LYgetTableString(int code) int mask = decode_mono_code(code); int second = encode_color_attr(mask); int pair = PAIR_NUMBER(second); - int mono = second & A_ATTRIBUTES; + int mono = mask & A_ATTRIBUTES; int fg = lynx_color_pairs[pair].fg; int bg = lynx_color_pairs[pair].bg; unsigned n; @@ -722,7 +722,7 @@ char *LYgetTableString(int code) if (fg == 0 && bg == 0) { fg = COLOR_WHITE; } - CTRACE((tfp, "%#x -> %#x (%d) fg=%d, bg=%d\n", mask, second, pair, fg, bg)); + CTRACE((tfp, "%#x -> %#x (mono %#x pair %d) fg=%d, bg=%d\n", mask, second, mono, pair, fg, bg)); for (n = 0; n < TABLESIZE(Mono_Attrs); ++n) { if ((Mono_Attrs[n].code & mono) != 0) { if (result != 0) @@ -1870,7 +1870,9 @@ void LYwaddnstr(WINDOW * w GCC_UNUSED, wmove(sub, y0, x0); LYwideLines = TRUE; LYwaddnstr(sub, src, len); + getyx(sub, y0, x0); delwin(sub); + wmove(LYwin, y0, x0); } LYwideLines = FALSE; diff --git a/src/LYHistory.c b/src/LYHistory.c index 0e3da111..66ec15ca 100644 --- a/src/LYHistory.c +++ b/src/LYHistory.c @@ -629,6 +629,13 @@ void LYpop_num(int number, /* assume we pop the 'doc' to show it soon... */ LYSetNewline(doc->line); /* reinitialize */ #endif /* DISP_PARTIAL */ + if (TRACE) { + CTRACE((tfp, "LYpop_num(%d)\n", number)); + CTRACE((tfp, " link %d\n", doc->link)); + CTRACE((tfp, " line %d\n", doc->line)); + CTRACE((tfp, " title %s\n", NonNull(doc->title))); + CTRACE((tfp, " address %s\n", NonNull(doc->address))); + } } } diff --git a/src/LYMain.c b/src/LYMain.c index 00498122..00c387e6 100644 --- a/src/LYMain.c +++ b/src/LYMain.c @@ -3864,7 +3864,7 @@ treated '>' as a co-terminator for double-quotes and tags" "toggles [LINK], [IMAGE] and [INLINE] comments \nwith filenames of these images" ), PARSE_FUN( - "version", 4|FUNCTION_ARG, version_fun, + "version", 1|FUNCTION_ARG, version_fun, "print Lynx version information" ), PARSE_SET( diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c index e20ebf53..226e565f 100644 --- a/src/LYMainLoop.c +++ b/src/LYMainLoop.c @@ -5224,6 +5224,7 @@ int mainloop(void) int i; int follow_col = -1, key_count = 0, last_key = 0; int tmpNewline; + DocInfo tmpDocInfo; /* "internal" means "within the same document, with certainty". It includes a * space so it cannot conflict with any (valid) "TYPE" attributes on A @@ -5547,17 +5548,23 @@ int mainloop(void) newdoc.address = temp; temp = NULL; } + tmpDocInfo = newdoc; tmpNewline = -1; getresult = getfile(&newdoc, &tmpNewline); if (!reloading && !popped_doc && (tmpNewline >= 0)) { LYSetNewline(tmpNewline); + } else { + newdoc.link = tmpDocInfo.link; } } #else /* TRACK_INTERNAL_LINKS */ + tmpDocInfo = newdoc; tmpNewline = -1; getresult = getfile(&newdoc, &tmpNewline); if (!reloading && !popped_doc && (tmpNewline >= 0)) { LYSetNewline(tmpNewline); + } else { + newdoc.link = tmpDocInfo.link; } #endif /* TRACK_INTERNAL_LINKS */ diff --git a/src/LYReadCFG.c b/src/LYReadCFG.c index ce7a758c..89fb9390 100644 --- a/src/LYReadCFG.c +++ b/src/LYReadCFG.c @@ -1390,6 +1390,9 @@ static Config_Type Config_Table [] = PARSE_ENU(RC_MULTI_BOOKMARK_SUPPORT, LYMultiBookmarks, tbl_multi_bookmarks), PARSE_PRG(RC_MV_PATH, ppMV), PARSE_SET(RC_NCR_IN_BOOKMARKS, UCSaveBookmarksInUnicode), +#ifdef EXP_NESTED_TABLES + PARSE_SET(RC_NESTED_TABLES, nested_tables), +#endif #ifndef DISABLE_NEWS PARSE_FUN(RC_NEWS_CHUNK_SIZE, news_chunk_size_fun), PARSE_FUN(RC_NEWS_MAX_CHUNK, news_max_chunk_fun), diff --git a/src/LYStrings.c b/src/LYStrings.c index cb8aa198..a40bfb0f 100644 --- a/src/LYStrings.c +++ b/src/LYStrings.c @@ -1366,7 +1366,7 @@ static void setup_vtXXX_keymap(void) INTERN_KEY( "\033OP", F1, KEY_F(1) ), INTERN_KEY( "\033[OP", F1, KEY_F(1) ), INTERN_KEY( "\033[29~", DO_KEY, KEY_F(16) ), -#if defined(USE_SLANG) && defined(__MINGW32__) +#if defined(USE_SLANG) && (defined(__WIN32__) || defined(__MINGW32__)) INTERN_KEY( "\xE0H", UPARROW, KEY_UP ), INTERN_KEY( "\xE0P", DNARROW, KEY_DOWN ), INTERN_KEY( "\xE0M", RTARROW, KEY_RIGHT ), @@ -1575,7 +1575,7 @@ static int LYgetch_for(int code) key = SLang_do_key(Keymap_List, myGetChar); if ((key == NULL) || (key->type != SLKEY_F_KEYSYM)) { -#ifdef __MINGW32__ +#if defined(__WIN32__) || defined(__MINGW32__) if ((key == NULL) && (current_sl_modifier == LKC_ISLKC)) { key = SLang_do_key(Keymap_List, myGetChar); keysym = key->f.keysym; diff --git a/src/LYUtils.c b/src/LYUtils.c index 0cfd1340..2a795d99 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -1023,17 +1023,25 @@ void LYhighlight(int flag, #endif tmp[0] = tmp[1] = tmp[2] = '\0'; - CTRACE((tfp, "LYhighlight %s %d:%s\n", - flag ? "on" : "off", cur, NONNULL(target))); - /* * Bugs in the history code might cause -1 to be sent for cur, which yields * a crash when LYstrncpy() is called with a nonsense pointer. As far as I * know, such bugs have been squashed, but if they should reappear, this * works around them. -FM */ - if (cur < 0) + if (cur < 0) { + CTRACE((tfp, "LYhighlight cur %d (bug workaround)\n", cur)); cur = 0; + } + + CTRACE((tfp, "LYhighlight %s %d [%d]:%s\n", + (flag + ? "on" + : "off"), + cur, + links[cur].anchor_number, + NONNULL(target))); + #if defined(TEXTFIELDS_MAY_NEED_ACTIVATION) && defined(INACTIVE_INPUT_STYLE_VH) if (flag == OFF) textinput_redrawn = FALSE; @@ -1272,6 +1280,7 @@ void statusline(const char *text) char buffer[MAX_LINE]; unsigned char *temp = NULL; int max_length, len, i, j; + int at_lineno; unsigned char k; char *p; char text_buff[MAX_LINE]; @@ -1399,15 +1408,16 @@ void statusline(const char *text) */ if (LYStatusLine >= 0) { if (LYStatusLine < LYlines - 1) { - LYmove(LYStatusLine, 0); + at_lineno = LYStatusLine; } else { - LYmove(LYlines - 1, 0); + at_lineno = LYlines - 1; } } else if (user_mode == NOVICE_MODE) { - LYmove(LYlines - 3, 0); + at_lineno = LYlines - 3; } else { - LYmove(LYlines - 1, 0); + at_lineno = LYlines - 1; } + LYmove(at_lineno, 0); LYclrtoeol(); if (non_empty(buffer)) { @@ -1436,6 +1446,7 @@ void statusline(const char *text) #else /* draw the status bar in the STATUS style */ { + int y, x; int a = ((strncmp(buffer, ALERT_FORMAT, ALERT_PREFIX_LEN) || !hashStyles[s_alert].name) ? s_status @@ -1447,7 +1458,10 @@ void statusline(const char *text) ((lynx_has_color && LYShowColor >= SHOW_COLOR_ON) ? (chtype) hashStyles[a].color : A_NORMAL) | ' '); - LYclrtoeol(); + LYGetYX(y, x); + if (y == at_lineno) { + LYclrtoeol(); + } if (!(lynx_has_color && LYShowColor >= SHOW_COLOR_ON)) wbkgdset(LYwin, A_NORMAL | ' '); else if (s_normal != NOSTYLE) @@ -1493,9 +1507,10 @@ void noviceline(int more_flag GCC_UNUSED) return; LYmove(LYlines - 2, 0); - /* lynx_stop_reverse(); */ LYclrtoeol(); LYaddstr(NOVICE_LINE_ONE); + + LYmove(LYlines - 1, 0); LYclrtoeol(); #if defined(DIRED_SUPPORT ) && defined(OK_OVERRIDE) if (lynx_edit_mode && !no_dired_support) @@ -1741,6 +1756,10 @@ int HTCheckForInterrupt(void) nodelay(LYwin, TRUE); c = LYgetch(); nodelay(LYwin, FALSE); +#elif defined(USE_SLANG) && defined(_WINDOWS) + if (!SLang_input_pending(0)) + return ((int) FALSE); + c = LYgetch(); #else c = LYgetch(); #endif diff --git a/src/LYrcFile.h b/src/LYrcFile.h index c39d8a37..43e29631 100644 --- a/src/LYrcFile.h +++ b/src/LYrcFile.h @@ -133,6 +133,7 @@ #define RC_MULTI_BOOKMARK_SUPPORT "multi_bookmark_support" #define RC_MV_PATH "mv_path" #define RC_NCR_IN_BOOKMARKS "ncr_in_bookmarks" +#define RC_NESTED_TABLES "nested_tables" #define RC_NEWSPOST_PROXY "newspost_proxy" #define RC_NEWSREPLY_PROXY "newsreply_proxy" #define RC_NEWS_CHUNK_SIZE "news_chunk_size" diff --git a/src/UCAux.c b/src/UCAux.c index f7114fd4..49b8692e 100644 --- a/src/UCAux.c +++ b/src/UCAux.c @@ -376,7 +376,7 @@ void UCSetBoxChars(int cset, char *map = tigetstr("acsc"); if (map != 0) { - CTRACE((tfp, "check terminal line-drawing map\n")); + CTRACE((tfp, "build terminal line-drawing map\n")); while (map[0] != 0 && map[1] != 0) { for (n = 0; n < TABLESIZE(table); ++n) { if (table[n].mapping == map[0]) { @@ -397,12 +397,14 @@ void UCSetBoxChars(int cset, if (cset == last_cset) { fix_lines = last_result; } else { + CTRACE((tfp, "check terminal line-drawing map\n")); for (n = 0; n < TABLESIZE(table); ++n) { int test = UCTransUniChar(table[n].internal, cset); if (test != table[n].external) { - CTRACE((tfp, "line-drawing map %c mismatch\n", - table[n].mapping)); + CTRACE((tfp, "line-drawing map %c mismatch (have %#x, want %#x)\n", + table[n].mapping, + test, table[n].external)); fix_lines = TRUE; break; } |