diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/GridText.c | 21 | ||||
-rw-r--r-- | src/LYCurses.c | 9 | ||||
-rw-r--r-- | src/LYCurses.h | 15 | ||||
-rw-r--r-- | src/LYGlobalDefs.h | 4 | ||||
-rw-r--r-- | src/LYMain.c | 17 | ||||
-rw-r--r-- | src/LYStrings.c | 9 | ||||
-rw-r--r-- | src/LYUtils.c | 18 |
7 files changed, 16 insertions, 77 deletions
diff --git a/src/GridText.c b/src/GridText.c index 21c57c37..032a3703 100644 --- a/src/GridText.c +++ b/src/GridText.c @@ -1,5 +1,5 @@ /* - * $LynxId: GridText.c,v 1.309 2018/03/11 18:32:25 tom Exp $ + * $LynxId: GridText.c,v 1.310 2018/03/11 23:12:39 tom Exp $ * * Character grid hypertext object * =============================== @@ -2494,16 +2494,15 @@ void HText_beginAppend(HText *text) } -/* LYcols_cu is the notion that the display library has of the screen - width. Normally it is the same as LYcols, but there may be a - difference via SLANG_MBCS_HACK. Checks of the line length (as the - non-UTF-8-aware display library would see it) against LYcols_cu are - is used to try to prevent that lines with UTF-8 chars get wrapped - by the library when they shouldn't. - If there is no display library involved, i.e. dump_output_immediately, - no such limit should be imposed. MAX_COLS should be just as good - as any other large value. (But don't use INT_MAX or something close - to it to, avoid over/underflow.) - kw */ +/* + * LYcols_cu is the notion that the display library has of the screen width. + * Checks of the line length (as the non-UTF-8-aware display library would see + * it) against LYcols_cu are used to try to prevent lines with UTF-8 chars from + * being wrapped by the library when they shouldn't. If there is no display + * library involved, i.e., dump_output_immediately, no such limit should be + * imposed. MAX_COLS should be just as good as any other large value. (But + * don't use INT_MAX or something close to it to, avoid over/underflow.) - kw + */ #ifdef USE_SLANG #define LYcols_cu(text) (dump_output_immediately ? MAX_COLS : SLtt_Screen_Cols) #else diff --git a/src/LYCurses.c b/src/LYCurses.c index 26dd1648..f3a8dfd2 100644 --- a/src/LYCurses.c +++ b/src/LYCurses.c @@ -1,4 +1,4 @@ -/* $LynxId: LYCurses.c,v 1.191 2018/03/07 10:02:01 tom Exp $ */ +/* $LynxId: LYCurses.c,v 1.192 2018/03/11 22:19:56 tom Exp $ */ #include <HTUtils.h> #include <HTAlert.h> @@ -98,13 +98,6 @@ unsigned Lynx_Color_Flags = 0; BOOLEAN FullRefresh = FALSE; int curscr = 0; -#ifdef SLANG_MBCS_HACK -/* - * Will be set by size_change. - KW - */ -int PHYSICAL_SLtt_Screen_Cols = 10; -#endif /* SLANG_MBCS_HACK */ - void LY_SLrefresh(void) { if (FullRefresh) { diff --git a/src/LYCurses.h b/src/LYCurses.h index b7924a1f..e8b52d69 100644 --- a/src/LYCurses.h +++ b/src/LYCurses.h @@ -1,4 +1,4 @@ -/* $LynxId: LYCurses.h,v 1.95 2016/10/11 23:43:51 tom Exp $ */ +/* $LynxId: LYCurses.h,v 1.96 2018/03/11 22:19:36 tom Exp $ */ #ifndef LYCURSES_H #define LYCURSES_H @@ -558,13 +558,7 @@ extern "C" { * Map some curses functions to slang functions. */ #define stdscr ((WINDOW *)0) -#ifdef SLANG_MBCS_HACK - extern int PHYSICAL_SLtt_Screen_Cols; - -#define COLS PHYSICAL_SLtt_Screen_Cols -#else #define COLS SLtt_Screen_Cols -#endif /* SLANG_MBCS_HACK */ #define LINES SLtt_Screen_Rows #define move SLsmg_gotorc #define addstr SLsmg_write_string @@ -685,17 +679,10 @@ extern "C" { #define start_underline() LYaddAttr(LYUnderlineLinks ? A_BOLD : A_UNDERLINE) #define stop_underline() LYsubAttr(LYUnderlineLinks ? A_BOLD : A_UNDERLINE) -#if defined(SNAKE) && defined(HP_TERMINAL) -#define start_reverse() LYaddWAttr(LYwin, A_DIM) -#define wstart_reverse(w) LYaddWAttr(w, A_DIM) -#define stop_reverse() LYsubWAttr(LYwin, A_DIM) -#define wstop_reverse(w) LYsubWAttr(w, A_DIM) -#else #define start_reverse() LYaddAttr(A_REVERSE) #define wstart_reverse(w) LYaddWAttr(w, A_REVERSE) #define stop_reverse() LYsubAttr(A_REVERSE) #define wstop_reverse(w) LYsubWAttr(w, A_REVERSE) -#endif /* SNAKE && HP_TERMINAL */ #endif /* VMS */ diff --git a/src/LYGlobalDefs.h b/src/LYGlobalDefs.h index 743b1879..02e73bff 100644 --- a/src/LYGlobalDefs.h +++ b/src/LYGlobalDefs.h @@ -1,5 +1,5 @@ /* - * $LynxId: LYGlobalDefs.h,v 1.143 2018/03/05 09:49:59 tom Exp $ + * $LynxId: LYGlobalDefs.h,v 1.144 2018/03/11 22:49:43 tom Exp $ * * global variable definitions */ @@ -588,9 +588,7 @@ extern "C" { extern int ssl_noprompt; #endif -#ifdef MISC_EXP extern int LYNoZapKey; /* 0: off (do 'z' checking), 1: full, 2: initially */ -#endif #ifdef USE_JUSTIFY_ELTS extern BOOLEAN ok_justify; diff --git a/src/LYMain.c b/src/LYMain.c index 97fcf488..92d19574 100644 --- a/src/LYMain.c +++ b/src/LYMain.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYMain.c,v 1.272 2018/03/07 22:18:43 tom Exp $ + * $LynxId: LYMain.c,v 1.273 2018/03/11 22:49:35 tom Exp $ */ #include <HTUtils.h> #include <HTTP.h> @@ -158,12 +158,7 @@ BOOLEAN track_internal_links = TRUE; BOOLEAN track_internal_links = FALSE; #endif -#ifdef REVERSE_CLEAR_SCREEN_PROBLEM -BOOLEAN enable_scrollback = TRUE; - -#else BOOLEAN enable_scrollback = FALSE; -#endif /* REVERSE_CLEAR_SCREEN_PROBLEM */ char empty_string[] = {'\0'}; @@ -640,9 +635,7 @@ BOOLEAN LYNonRestartingSIGWINCH = FALSE; BOOLEAN LYReuseTempfiles = FALSE; BOOLEAN LYUseBuiltinSuffixes = TRUE; -#ifdef MISC_EXP int LYNoZapKey = 0; /* 0: off (do z checking), 1: full, 2: initially */ -#endif #ifndef DISABLE_NEWS #include <HTNews.h> @@ -2626,7 +2619,6 @@ static int color_fun(char *next_arg GCC_UNUSED) } #endif -#ifdef MISC_EXP /* -convert_to */ static int convert_to_fun(char *next_arg) { @@ -2668,7 +2660,6 @@ static int convert_to_fun(char *next_arg) } return 0; } -#endif /* -crawl */ static int crawl_fun(char *next_arg GCC_UNUSED) @@ -2919,7 +2910,6 @@ static int nounderline_fun(char *next_arg GCC_UNUSED) return 0; } -#ifdef MISC_EXP /* -nozap */ static int nozap_fun(char *next_arg) { @@ -2931,7 +2921,6 @@ static int nozap_fun(char *next_arg) } return 0; } -#endif /* MISC_EXP */ /* -pauth */ static int pauth_fun(char *next_arg) @@ -3439,12 +3428,10 @@ outputs for -source dumps" "connect_timeout", 4|NEED_INT_ARG, connect_timeout, "=N\nset the N-second connection timeout" ), -#ifdef MISC_EXP PARSE_FUN( "convert_to", 4|FUNCTION_ARG, convert_to_fun, "=FORMAT\nconvert input, FORMAT is in MIME type notation\n(experimental)" ), -#endif #ifdef USE_PERSISTENT_COOKIES PARSE_STR( "cookie_file", 4|LYSTRING_ARG, LYCookieFile, @@ -3769,12 +3756,10 @@ soon as they are seen)" "nounderline", 4|FUNCTION_ARG, nounderline_fun, "disable underline video-attribute" ), -#ifdef MISC_EXP PARSE_FUN( "nozap", 4|FUNCTION_ARG, nozap_fun, "=DURATION (\"initially\" or \"full\") disable checks for 'z' key" ), -#endif PARSE_SET( "number_fields", 4|SET_ARG, number_fields, "force numbering of links as well as form input fields" diff --git a/src/LYStrings.c b/src/LYStrings.c index f565c4e4..d89ec19d 100644 --- a/src/LYStrings.c +++ b/src/LYStrings.c @@ -1,4 +1,4 @@ -/* $LynxId: LYStrings.c,v 1.269 2018/02/19 21:22:53 tom Exp $ */ +/* $LynxId: LYStrings.c,v 1.270 2018/03/11 23:10:37 tom Exp $ */ #include <HTUtils.h> #include <HTCJK.h> #include <UCAux.h> @@ -813,10 +813,6 @@ static int myGetChar(void) #define GetChar() myGetChar() #endif -#if !defined(GetChar) && defined(SNAKE) -#define GetChar() wgetch(LYwin) -#endif - #if !defined(GetChar) && defined(VMS) #define GetChar() ttgetc() #endif @@ -1834,7 +1830,6 @@ static int LYgetch_for(int code) #endif /* !USE_SLANG || VMS */ CTRACE((tfp, "GETCH%d: Got %#x.\n", code, c)); -#ifdef MISC_EXP if (LYNoZapKey > 1 && errno != EINTR && (c == EOF #ifdef USE_SLANG @@ -1855,8 +1850,6 @@ static int LYgetch_for(int code) goto re_read; } } -#endif /* MISC_EXP */ - #ifdef USE_GETCHAR if (c == EOF && errno == EINTR) /* Ctrl-Z causes EINTR in getchar() */ goto re_read; diff --git a/src/LYUtils.c b/src/LYUtils.c index 767ab9b4..eb462a55 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYUtils.c,v 1.281 2018/03/07 10:02:51 tom Exp $ + * $LynxId: LYUtils.c,v 1.282 2018/03/11 22:50:21 tom Exp $ */ #include <HTUtils.h> #include <HTTCP.h> @@ -1638,7 +1638,6 @@ void noviceline(int more_flag GCC_UNUSED) return; } -#if defined(MISC_EXP) || defined(TTY_DEVICE) || defined(HAVE_TTYNAME) /* * If the standard input is not a tty, and Lynx is really reading from the * standard input, attempt to reopen it, pointing to a real tty. Normally @@ -1699,9 +1698,7 @@ int LYReopenInput(void) } return result; } -#endif -#if defined(NSL_FORK) || defined(MISC_EXP) || defined (TTY_DEVICE) || defined(HAVE_TTYNAME) /* * Returns the file descriptor from which keyboard input is expected, or INVSOC * (-1) if not available. If need_selectable is true, returns non-INVSOC fd @@ -1735,7 +1732,6 @@ int LYConsoleInputFD(int need_selectable) } return fd; } -#endif /* NSL_FORK || MISC_EXP */ static int fake_zap = 0; @@ -1768,10 +1764,8 @@ static int DontCheck(void) if (LYHaveCmdScript()) /* we may be running from a script */ return (TRUE); -#ifdef MISC_EXP if (LYNoZapKey) return (TRUE); -#endif /* * Avoid checking interrupts more than one per second, since it is a slow * and expensive operation - TD @@ -3086,16 +3080,6 @@ void size_change(int sig GCC_UNUSED) #endif /* VMS || UNIX */ LYlines = SLtt_Screen_Rows; LYcols = SLtt_Screen_Cols; -#ifdef SLANG_MBCS_HACK - PHYSICAL_SLtt_Screen_Cols = LYcols; -#ifdef SLANG_NO_LIMIT /* define this if slang has been fixed */ - SLtt_Screen_Cols = LYcolLimit * 6; -#else - /* Needs to be limited: fixed buffer bugs in slang can cause crash, - see slang's SLtt_smart_puts - kw */ - SLtt_Screen_Cols = HTMIN(LYcolLimit * 6, 255); -#endif -#endif /* SLANG_MBCS_HACK */ if (sig == 0) /* * Called from start_curses(). |