[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev Using lynx2.8.4dev.8 "damages" (ai)xterm
From: |
pg |
Subject: |
Re: lynx-dev Using lynx2.8.4dev.8 "damages" (ai)xterm |
Date: |
Thu, 31 Aug 2000 17:53:14 -0600 (MDT) |
In a recent note, Thomas Dickey said:
> Date: Thu, 31 Aug 2000 18:45:52 -0400
>
> It shouldn't - that chunk (line 1054 of LYCurses.c) already was not using
> slang. I don't see the problem on Linux with either slang or ncurses versions
> (looking at '!' command and a mailto link).
>
Ummm. Now I see at lines 1054-1066 of LyCurses.c:
#if !defined(NCURSES) && !defined(VMS) && !defined(USE_SLANG) &&
(!defined(WIN_EX) || defined(__CYGWIN__)) /* @@@ */
if(LYscreen) {
endwin(); /* stop curses */
This would seem to bypass the endwin() if USE_SLANG is defined, which
I would expect to result in the shell escape with the tty in raw mode.
> > It might be helped by a corrective patch at:
> > URL: http://www.flora.org/lynx-dev/html/month082000/msg00217.html
> >
And Jens has written me privately to say that applying my repair results
in a compilation error -- LYscreen undefined in stop_curses.
I've reworked the patch (attached) to provide a fallback definition
for LYscreen. I couldn't resist correcting an apparently erroneous
comment on a nearby #endif.
-- gil
--
StorageTek
INFORMATION made POWERFUL
########################################################################
%%% Created Thu Aug 31 17:49:20 MDT 2000 by target lynx.patch. %%%
diff -bru orig/lynx2-8-4/src/LYCurses.c lynx2-8-4/src/LYCurses.c
--- orig/lynx2-8-4/src/LYCurses.c Thu Aug 24 19:30:11 2000
+++ lynx2-8-4/src/LYCurses.c Thu Aug 31 17:47:50 2000
@@ -662,11 +662,12 @@
* If newterm is not defined, assume a curses subset which
* supports only initscr. --gil
*/
-#ifdef HAVE_NEWTERM
+#if defined(HAVE_NEWTERM) && !defined(NCURSES) && !defined(HAVE_RESIZETERM)
static SCREEN *LYscreen = NULL;
-#define LYDELSCR(scr) { \
- delscreen(scr); \
- scr = NULL; }
+#define LYDELSCR() { \
+if (recent_sizechange) { \
+ delscreen(LYscreen); \
+ LYscreen = NULL; } }
/*
* Surrogates for newterm annd delscreen
*/
@@ -674,8 +675,16 @@
static WINDOW *LYscreen = NULL;
#undef newterm
#define newterm(type, out, in) (initscr())
-#define LYDELSCR(scr) /* nothing */
+#define LYDELSCR() /* nothing */
#endif /* HAVE_NEWTERM */
+#else /* !defined(VMS) && !defined(USE_SLANG) */
+/*
+ * Provide last recourse definitions of LYscreen and LYDELSCR for
+ * stop_curses, which only tests LYscreen for zero/nonzero but
+ * never uses it as a pointer or L-value.
+ */
+#define LYscreen TRUE
+#define LYDELSCR() /* nothing */
#endif /* !defined(VMS) && !defined(USE_SLANG) */
PUBLIC void start_curses NOARGS
@@ -810,6 +819,7 @@
* If we're not VMS then only do initscr() one time,
* and one time only!
*/
+#if defined(HAVE_NEWTERM) && !defined(NCURSES) && !defined(HAVE_RESIZETERM)
{
static char lines_putenv[] = "LINES=abcde",
cols_putenv[] = "COLUMNS=abcde";
@@ -824,6 +834,7 @@
putenv(cols_putenv);
CTRACE((tfp, "start_curses putenv %s, %s\n", lines_putenv,
cols_putenv));
}
+#endif /* HAVE_NEWTERM */
if (!(LYscreen=newterm(NULL,stdout,stdin))) { /* start curses */
fprintf(tfp, "%s\n",
gettext("Terminal initialisation failed - unknown terminal
type?"));
@@ -1051,12 +1062,10 @@
*/
if(LYCursesON == TRUE) {
lynx_enable_mouse (0);
-#if !defined(NCURSES) && !defined(VMS) && !defined(USE_SLANG) &&
(!defined(WIN_EX) || defined(__CYGWIN__)) /* @@@ */
+#if (!defined(WIN_EX) || defined(__CYGWIN__)) /* @@@ */
if(LYscreen) {
endwin(); /* stop curses */
- if (recent_sizechange) {
- LYDELSCR(LYscreen);
- }
+ LYDELSCR();
}
#endif
}
@@ -1070,7 +1079,7 @@
#endif
fflush(stdout);
-#endif /* DJGPP */
+#endif /* defined(DOSPATH) && !(defined(USE_SLANG) || _WIN_CC) */
fflush(stderr);
LYCursesON = FALSE;
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden
Re: lynx-dev Using lynx2.8.4dev.8 "damages" (ai)xterm, Thomas Dickey, 2000/08/31