diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2024-01-15 23:28:41 +0000 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2024-01-16 00:18:06 +0000 |
commit | 8ed5d3b5bf97f5a459c5bbe7f9264903cb728d88 (patch) | |
tree | 0aafabcf3dfaab7685fa0fcbaa683dafe287807e /src | |
parent | 3ee8300fec5d35be98863ab0101433d348c936cc (diff) | |
download | lynx-snapshots-8ed5d3b5bf97f5a459c5bbe7f9264903cb728d88.tar.gz |
snapshot of project "lynx", label v2-9-0
Diffstat (limited to 'src')
-rw-r--r-- | src/GridText.c | 5 | ||||
-rw-r--r-- | src/LYGetFile.c | 14 | ||||
-rw-r--r-- | src/LYMainLoop.c | 4 | ||||
-rw-r--r-- | src/LYShowInfo.c | 24 | ||||
-rw-r--r-- | src/LYUtils.c | 4 | ||||
-rw-r--r-- | src/UCAux.c | 6 | ||||
-rw-r--r-- | src/parsdate.c | 6 | ||||
-rw-r--r-- | src/parsdate.y | 4 |
8 files changed, 32 insertions, 35 deletions
diff --git a/src/GridText.c b/src/GridText.c index 0543d09e..806a0533 100644 --- a/src/GridText.c +++ b/src/GridText.c @@ -1,5 +1,5 @@ /* - * $LynxId: GridText.c,v 1.346 2023/11/09 09:18:27 tom Exp $ + * $LynxId: GridText.c,v 1.347 2024/01/15 19:11:55 Gisle.Vanem Exp $ * * Character grid hypertext object * =============================== @@ -912,7 +912,8 @@ static char *LYGetHiTextStr(TextAnchor *a, int count) result = a->lites.hl_info[count - 1].hl_text; else result = a->lites.hl_base.hl_text; - result += LYAdjHiTextPos(a, count); + if (result) + result += LYAdjHiTextPos(a, count); return result; } diff --git a/src/LYGetFile.c b/src/LYGetFile.c index 22b43cee..57e7f30e 100644 --- a/src/LYGetFile.c +++ b/src/LYGetFile.c @@ -1,4 +1,4 @@ -/* $LynxId: LYGetFile.c,v 1.96 2018/04/01 15:27:18 tom Exp $ */ +/* $LynxId: LYGetFile.c,v 1.97 2024/01/14 20:02:21 Viatrix Exp $ */ #include <HTUtils.h> #include <HTTP.h> #include <HTAnchor.h> /* Anchor class */ @@ -740,6 +740,18 @@ int getfile(DocInfo *doc, int *target) doc->address)); FREE(tmp); url_type = HTTP_URL_TYPE; + } else if ((cp = StrChr(doc->address + 9, '/')) != NULL && + 0 == StrNCmp(++cp, "hURL", 4)) { + StrAllocCopy(tmp, cp + 4); + HTUnEscape(tmp); + if (*tmp == ':') { + CTRACE((tfp, "getfile: URL '%s'\n", doc->address)); + StrAllocCopy(doc->address, tmp + 1); + FREE(tmp); + CTRACE((tfp, " changed to '%s'\n", doc->address)); + return getfile(doc, target); + } else + FREE(tmp); } } diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c index 9584a9a5..55be2054 100644 --- a/src/LYMainLoop.c +++ b/src/LYMainLoop.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYMainLoop.c,v 1.253 2023/10/23 23:36:31 tom Exp $ + * $LynxId: LYMainLoop.c,v 1.254 2024/01/15 19:10:04 Gisle.Vanem Exp $ */ #include <HTUtils.h> #include <HTAccess.h> @@ -6769,7 +6769,7 @@ int mainloop(void) * If help is not on the screen, then put a message on the screen to * tell the user other misc info. */ - if (!show_help) { + if (!show_help && curdoc.link >= 0) { show_main_statusline(links[curdoc.link], ((curlink_is_editable && textinput_activated) diff --git a/src/LYShowInfo.c b/src/LYShowInfo.c index 03387165..129810ce 100644 --- a/src/LYShowInfo.c +++ b/src/LYShowInfo.c @@ -1,4 +1,4 @@ -/* $LynxId: LYShowInfo.c,v 1.83 2018/12/27 22:35:44 Chuck.Martin Exp $ */ +/* $LynxId: LYShowInfo.c,v 1.86 2024/01/15 18:16:29 tom Exp $ */ #include <HTUtils.h> #include <HTFile.h> #include <HTParse.h> @@ -33,35 +33,21 @@ static int label_columns; /* - * LYNX_VERSION and LYNX_DATE are automatically generated by PRCS, the tool - * which we use to archive versions of Lynx. We use a convention for naming - * the successive versions: - * {release}{status}{patch} - * where - * {release} is the release that we are working on, e.g., 2.8.4 - * {status} is one of "dev", "pre" or "rel", and - * {patch} is a number assigned by PRCS. + * LYNX_VERSION and LYNX_DATE are generated by the configure script. */ BOOL LYVersionIsRelease(void) { - return (BOOL) (strstr(LYNX_VERSION, "rel") != 0); + return TRUE; } const char *LYVersionStatus(void) { - if (LYVersionIsRelease()) - return REL_VERSION; - else if (strstr(LYNX_VERSION, "pre") != 0) - return PRE_VERSION; - return DEV_VERSION; + return REL_VERSION; } const char *LYVersionDate(void) { - static char temp[LYNX_DATE_LEN + 1]; - - LYStrNCpy(temp, &LYNX_DATE[LYNX_DATE_OFF], LYNX_DATE_LEN); - return temp; + return LYNX_DATE; } static void dt_String(FILE *fp, diff --git a/src/LYUtils.c b/src/LYUtils.c index 9b5ac476..e45e641e 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYUtils.c,v 1.308 2023/10/27 21:48:46 tom Exp $ + * $LynxId: LYUtils.c,v 1.309 2024/01/15 17:10:52 tom Exp $ */ #include <HTUtils.h> #include <HTTCP.h> @@ -3125,7 +3125,7 @@ void LYGetScreenSize(int sig GCC_UNUSED) LYcols = win.ws_col; } } -#else +#elif !defined(PDCURSES) #error inconsistent settings for TIOCGSIZE/TIOCGWINSZ #endif /* TIOCGSIZE/TIOCGWINSZ */ #endif /* HAVE_SIZECHANGE */ diff --git a/src/UCAux.c b/src/UCAux.c index 44495a61..a10f6249 100644 --- a/src/UCAux.c +++ b/src/UCAux.c @@ -1,5 +1,5 @@ /* - * $LynxId: UCAux.c,v 1.58 2021/07/01 23:34:24 tom Exp $ + * $LynxId: UCAux.c,v 1.59 2024/01/15 11:24:17 tom Exp $ */ #include <HTUtils.h> @@ -669,9 +669,7 @@ dUTF8 HTDecodeUTF8(UTFDecodeState * me, int *c_in_out, UCode_t *result) * continue a multibyte character... */ if (me->utf_count > 0 && (TOASCII(c) & 0xc0) == 0x80) { - if (me->utf_count <= 0) { - me->utf_char = UCS_REPL; - } else if (me->utf_count == 1) { + if (me->utf_count == 1) { int limit = (int) (me->utf_buf_p - me->utf_buf) + 1; int maybe = 0; diff --git a/src/parsdate.c b/src/parsdate.c index 396f996c..07bbc9dc 100644 --- a/src/parsdate.c +++ b/src/parsdate.c @@ -5,7 +5,7 @@ #define YYBYACC 1 #define YYMAJOR 2 #define YYMINOR 0 -#define YYPATCH 20220128 +#define YYPATCH 20240109 #define YYEMPTY (-1) #define yyclearin (yychar = YYEMPTY) @@ -25,7 +25,7 @@ #include <LYLeaks.h> /* - * $LynxId: parsdate.c,v 1.30 2022/03/12 12:54:09 tom Exp $ + * $LynxId: parsdate.y,v 1.32 2024/01/15 11:09:08 tom Exp $ * * This module is adapted and extended from tin, to use for LYmktime(). * @@ -2030,7 +2030,7 @@ case 19: int i; /* Unix and GMT and numeric timezones -- a little confusing. */ - if ((int)yystack.l_mark[0].Number < 0) { + if ((long)yystack.l_mark[0].Number < 0) { /* Don't work with negative modulus. */ yystack.l_mark[0].Number = -(int)yystack.l_mark[0].Number; if (yystack.l_mark[0].Number > 9999 || (i = (int) (yystack.l_mark[0].Number % 100)) >= 60) { diff --git a/src/parsdate.y b/src/parsdate.y index d6655140..faab5e55 100644 --- a/src/parsdate.y +++ b/src/parsdate.y @@ -3,7 +3,7 @@ #include <LYLeaks.h> /* - * $LynxId: parsdate.y,v 1.31 2021/06/08 23:01:28 tom Exp $ + * $LynxId: parsdate.y,v 1.32 2024/01/15 11:09:08 tom Exp $ * * This module is adapted and extended from tin, to use for LYmktime(). * @@ -255,7 +255,7 @@ numzone : tSNUMBER { int i; /* Unix and GMT and numeric timezones -- a little confusing. */ - if ((int)$1 < 0) { + if ((long)$1 < 0) { /* Don't work with negative modulus. */ $1 = -(int)$1; if ($1 > 9999 || (i = (int) ($1 % 100)) >= 60) { |