aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2022-07-22 20:22:13 +0000
committerThomas E. Dickey <dickey@invisible-island.net>2022-07-22 20:22:13 +0000
commitd2764ae26ad47ef9ed2201112d3e62c999b1cde7 (patch)
treeededae7b4f7657c161a6f54b7af0be04435ea922 /src
parent37961f38962e91a8a2c24ec9d9c9fc111b3dbad4 (diff)
downloadlynx-snapshots-d2764ae26ad47ef9ed2201112d3e62c999b1cde7.tar.gz
snapshot of project "lynx", label v2-9-0dev_10i
Diffstat (limited to 'src')
-rw-r--r--src/HTML.c6
-rw-r--r--src/HTML.h7
-rw-r--r--src/LYCurses.c42
-rw-r--r--src/LYMainLoop.c6
4 files changed, 43 insertions, 18 deletions
diff --git a/src/HTML.c b/src/HTML.c
index 75c2bf91..5c57a075 100644
--- a/src/HTML.c
+++ b/src/HTML.c
@@ -1,5 +1,5 @@
/*
- * $LynxId: HTML.c,v 1.199 2022/06/13 00:23:57 tom Exp $
+ * $LynxId: HTML.c,v 1.200 2022/07/22 20:22:13 tom Exp $
*
* Structured stream to Rich hypertext converter
* ============================================
@@ -8077,8 +8077,8 @@ HTStream *HTMLPresent(HTPresentation *pres GCC_UNUSED,
}
HTStream *XHTMLPresent(HTPresentation *pres GCC_UNUSED,
- HTParentAnchor *anchor,
- HTStream *sink GCC_UNUSED)
+ HTParentAnchor *anchor,
+ HTStream *sink GCC_UNUSED)
{
CTRACE((tfp, "XHTMLPresent calling CacheThru_new\n"));
return CacheThru_new(anchor,
diff --git a/src/HTML.h b/src/HTML.h
index 2bc040fe..6e5ebc34 100644
--- a/src/HTML.h
+++ b/src/HTML.h
@@ -1,5 +1,5 @@
/*
- * $LynxId: HTML.h,v 1.35 2022/06/12 20:19:04 tom Exp $
+ * $LynxId: HTML.h,v 1.36 2022/07/22 20:22:13 tom Exp $
*
* HTML to rich text converter for libwww
*
@@ -252,9 +252,8 @@ extern "C" {
HTStream *sink);
extern HTStream *XHTMLPresent(HTPresentation *pres,
- HTParentAnchor *anchor,
- HTStream *sink);
-
+ HTParentAnchor *anchor,
+ HTStream *sink);
extern HTStructured *HTML_new(HTParentAnchor *anchor,
HTFormat format_out,
diff --git a/src/LYCurses.c b/src/LYCurses.c
index b35f5362..edf182d1 100644
--- a/src/LYCurses.c
+++ b/src/LYCurses.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYCurses.c,v 1.197 2021/06/09 21:44:35 tom Exp $ */
+/* $LynxId: LYCurses.c,v 1.199 2022/07/22 19:58:13 tom Exp $ */
#include <HTUtils.h>
#include <HTAlert.h>
@@ -897,21 +897,52 @@ void LYnoVideo(int a)
#define NEWTERM_NAME "newterm"
+#ifndef USE_SLANG
+static WINDOW *my_subwindow;
+
+#define delete_subwindow() if (my_subwindow) { delwin(my_subwindow); my_subwindow = NULL; }
+#endif
+
+#ifdef WIDEC_CURSES
+static WINDOW *fake_win;
+static int fake_max;
+
+#define delete_fake_win() if (fake_win) { delwin(fake_win); fake_win = NULL; fake_max = 0; }
+#else
+#define delete_fake_win() /* nothing */
+#endif
+
#if !defined(VMS) && !defined(USE_SLANG)
#if defined(NCURSES) && defined(HAVE_RESIZETERM)
static SCREEN *LYscreen = NULL;
+static void delete_screen(SCREEN * screen)
+{
+ delete_fake_win();
+ delete_subwindow();
+ delscreen(screen);
+}
+
#define LYDELSCR() /* ncurses does not need this */
#elif defined(HAVE_NEWTERM) && defined(HAVE_DELSCREEN)
static SCREEN *LYscreen = NULL;
+#if defined(USE_DEFAULT_COLORS)
+static void delete_screen(SCREEN * screen)
+{
+ delete_fake_win();
+ delete_subwindow();
+ delscreen(screen);
+}
+#endif
+
#define LYDELSCR() { \
if (recent_sizechange) { \
CTRACE((tfp, "Screen size: delscreen()\n")); \
- delscreen(LYscreen); \
+ delete_screen(LYscreen); \
LYscreen = NULL; } }
#else /* HAVE_NEWTERM */
@@ -1157,7 +1188,7 @@ void restart_curses(void)
start_color();
}
- delscreen(oldscreen);
+ delete_screen(oldscreen);
}
#endif
@@ -2026,8 +2057,6 @@ void LYpaddstr(WINDOW * the_window, int width, const char *the_string)
* FIXME: the associated call on 'keypad()' is not needed for Unix, but
* something in the OS/2 EMX port requires it.
*/
-static WINDOW *my_subwindow;
-
void LYsubwindow(WINDOW * param)
{
if (param != 0) {
@@ -2270,9 +2299,6 @@ int LYstrExtent0(const char *string,
result = used;
#ifdef WIDEC_CURSES
if (non_empty(string) && used > 0 && lynx_called_initscr) {
- static WINDOW *fake_win;
- static int fake_max;
-
if (fake_max < maxCells) {
fake_max = (maxCells + 1) * 2;
if (fake_win != 0) {
diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c
index b1764ca9..729381de 100644
--- a/src/LYMainLoop.c
+++ b/src/LYMainLoop.c
@@ -1,5 +1,5 @@
/*
- * $LynxId: LYMainLoop.c,v 1.248 2022/04/02 00:12:18 Paul.G.Fox Exp $
+ * $LynxId: LYMainLoop.c,v 1.249 2022/07/22 19:55:13 tom Exp $
*/
#include <HTUtils.h>
#include <HTAccess.h>
@@ -176,7 +176,7 @@ HTAtom *WWW_SOURCE = 0;
(track_internal_links || are_different(c,n))
static void exit_immediately_with_error_message(int state, int first_file);
-static void status_link(char *curlink_name, int show_more, int show_indx);
+static void status_link(const char *curlink_name, int show_more, int show_indx);
static void show_main_statusline(const LinkInfo curlink, int for_what);
static void form_noviceline(int);
static int are_different(DocInfo *doc1, DocInfo *doc2);
@@ -8130,7 +8130,7 @@ static void exit_immediately_with_error_message(int state, int first_file)
/* else: return(EXIT_FAILURE) in mainloop */
}
-static void status_link(char *curlink_name,
+static void status_link(const char *curlink_name,
int show_more,
int show_indx)
{