diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2024-01-07 23:03:23 +0000 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2024-01-07 23:49:31 +0000 |
commit | cd6eca00f4da52b54382d31cf28dd92eca98c576 (patch) | |
tree | 929b67e968a4ee6645aa138f7191f87aeef987e4 /src | |
parent | c244c640f9b4f69f521d286b77db0be566a5a610 (diff) | |
download | lynx-snapshots-cd6eca00f4da52b54382d31cf28dd92eca98c576.tar.gz |
snapshot of project "lynx", label v2-9-0dev_12n
Diffstat (limited to 'src')
-rw-r--r-- | src/GridText.c | 4 | ||||
-rw-r--r-- | src/LYCurses.c | 4 | ||||
-rw-r--r-- | src/LYIcon.rc | 4 | ||||
-rw-r--r-- | src/LYMain.c | 24 | ||||
-rw-r--r-- | src/TRSTable.c | 29 |
5 files changed, 36 insertions, 29 deletions
diff --git a/src/GridText.c b/src/GridText.c index 402d133a..0543d09e 100644 --- a/src/GridText.c +++ b/src/GridText.c @@ -1,5 +1,5 @@ /* - * $LynxId: GridText.c,v 1.345 2023/10/24 22:50:05 tom Exp $ + * $LynxId: GridText.c,v 1.346 2023/11/09 09:18:27 tom Exp $ * * Character grid hypertext object * =============================== @@ -14072,7 +14072,7 @@ static void redraw_part_of_line(HTLine *line, const char *str, LastDisplayChar == '-') { /* * Ignore the soft hyphen if it is not the last character in - * the line. Also ignore it if it first character following + * the line. Also ignore it if it is first character following * the margin, or if it is preceded by a white character (we * loaded 'M' into LastDisplayChar if it was a multibyte * character) or hyphen, though it should have been excluded by diff --git a/src/LYCurses.c b/src/LYCurses.c index 401af836..e628938e 100644 --- a/src/LYCurses.c +++ b/src/LYCurses.c @@ -1,4 +1,4 @@ -/* $LynxId: LYCurses.c,v 1.204 2023/11/06 01:21:57 tom Exp $ */ +/* $LynxId: LYCurses.c,v 1.205 2024/01/07 23:03:23 tom Exp $ */ #include <HTUtils.h> #include <HTAlert.h> @@ -1387,7 +1387,7 @@ void start_curses(void) LYcols = LYscreenWidth(); #if defined(NCURSES_VERSION) -#ifdef CAN_CUT_AND_PASTE +#if defined(CAN_CUT_AND_PASTE) && defined(IXON) && defined(IXOFF) /* * User-defined keymaps are loaded after this check, but since the * ifdef is enabled, we know that at least the copy/paste commands diff --git a/src/LYIcon.rc b/src/LYIcon.rc index 8b9af9f3..001af562 100644 --- a/src/LYIcon.rc +++ b/src/LYIcon.rc @@ -1,4 +1,4 @@ -// $LynxId: LYIcon.rc,v 1.56 2023/01/23 21:39:23 tom Exp $ +// $LynxId: LYIcon.rc,v 1.57 2024/01/07 11:13:00 tom Exp $ #include <windows.h> @@ -21,7 +21,7 @@ BEGIN VALUE "FileDescription", "Lynx - web browser" VALUE "FileVersion", "2.9.0.1013" VALUE "InternalName", "Lynx" - VALUE "LegalCopyright", "©1997-2023 Thomas E. Dickey" + VALUE "LegalCopyright", "©1997-2024 Thomas E. Dickey" VALUE "OriginalFilename", "lynx.exe" VALUE "ProductName", "Lynx - web browser" VALUE "ProductVersion", "2.9.0.1013" diff --git a/src/LYMain.c b/src/LYMain.c index f7b848e4..ab48caea 100644 --- a/src/LYMain.c +++ b/src/LYMain.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYMain.c,v 1.299 2023/10/23 08:05:32 tom Exp $ + * $LynxId: LYMain.c,v 1.300 2024/01/07 15:31:25 tom Exp $ */ #include <HTUtils.h> #include <HTTP.h> @@ -69,6 +69,13 @@ #include <LYexit.h> #include <LYLeaks.h> +#if defined(HAVE_PWD_H) && defined(HAVE_GETPWUID) && !defined(DONT_HAVE_PW_GECOS) +#define USE_GETPWUID 1 +#include <pwd.h> +#else +#define USE_GETPWUID 0 +#endif + /* ahhhhhhhhhh!! Global variables :-< */ #ifdef SOCKS BOOLEAN socks_flag = TRUE; @@ -1041,6 +1048,10 @@ int main(int argc, char filename[LY_MAXPATH]; BOOL LYGetStdinArgs = FALSE; +#if USE_GETPWUID + struct passwd *my_pwd; +#endif + #ifdef _WINDOWS WSADATA WSAData; #endif /* _WINDOWS */ @@ -1450,13 +1461,14 @@ int main(int argc, #if defined (VMS) || defined (NOUSERS) !strcasecomp((LYGetEnv("USER") == NULL ? " " : LYGetEnv("USER")), ANONYMOUS_USER) -#else -#ifdef HAVE_CUSERID - STREQ((char *) cuserid((char *) NULL), ANONYMOUS_USER) +#elif USE_GETPWUID + ((my_pwd = getpwuid(getuid())) == NULL + || STREQ(my_pwd->pw_gecos, ANONYMOUS_USER)) +#elif defined(HAVE_CUSERID) + STREQ((char *) cuserid(NULL), ANONYMOUS_USER) #else STREQ(((char *) getlogin() == NULL ? " " : getlogin()), ANONYMOUS_USER) -#endif /* HAVE_CUSERID */ -#endif /* VMS */ +#endif /* checks for user-id */ ) { parse_restrictions("default"); LYRestricted = TRUE; diff --git a/src/TRSTable.c b/src/TRSTable.c index 2a9461c8..41235962 100644 --- a/src/TRSTable.c +++ b/src/TRSTable.c @@ -1,5 +1,5 @@ /* - * $LynxId: TRSTable.c,v 1.39 2021/10/24 18:05:05 tom Exp $ + * $LynxId: TRSTable.c,v 1.43 2023/11/10 01:01:54 tom Exp $ * Simple table object * =================== * Authors @@ -232,7 +232,7 @@ struct _STable_info *Stbl_startTABLE(int alignment) STable_info *me = typecalloc(STable_info); CTRACE2(TRACE_TRST, - (tfp, "TRST:Stbl_startTABLE(align=%d)\n", (int) alignment)); + (tfp, "TRST:Stbl_startTABLE(align=%d)\n", alignment)); if (me) { me->alignment = (short) alignment; me->rowgroup_align = HT_ALIGN_NONE; @@ -556,7 +556,7 @@ static int Stbl_finishCellInRow(STable_rowinfo *me, STable_states *s, int end_td CTRACE2(TRACE_TRST, (tfp, "TRST:Stbl_finishCellInRow line=%d pos=%d end_td=%d ncells=%d pnd_len=%d\n", - lineno, pos, (int) end_td, me->ncells, s->pending_len)); + lineno, pos, end_td, me->ncells, s->pending_len)); if (me->ncells <= 0) return -1; @@ -566,7 +566,7 @@ static int Stbl_finishCellInRow(STable_rowinfo *me, STable_states *s, int end_td CTRACE2(TRACE_TRST, (tfp, - " [lines: lastCell=%d state=%d multi=%d] empty=%d (prev)state=(%s) %s\n", + " [lines: lastCell=%d stateLine=%d multi=%d] empty=%d (prev)state=(%s) %s\n", lastcell->cLine, s->lineno, multiline, empty, cellstate_s(s->prev_state), cellstate_s(s->state))); @@ -911,7 +911,6 @@ static int Stbl_finishCellInRow(STable_rowinfo *me, STable_states *s, int end_td } #endif -/* lastcell->len = pos - lastcell->pos; */ trace_and_return: CTRACE2(TRACE_TRST, (tfp, " => prev_state=%s, state=%s, return=%d\n", @@ -1044,7 +1043,7 @@ int Stbl_addRowToTable(STable_info *me, int alignment, STable_states *s = &me->s; CTRACE2(TRACE_TRST, - (tfp, "TRST:Stbl_addRowToTable(alignment=%d, lineno=%d)\n", + (tfp, "TRST:Stbl_addRowToTable(alignment=%d, line=%d)\n", alignment, lineno)); if (me->nrows > 0 && me->rows[me->nrows - 1].ncells > 0) { if (s->pending_len > 0) @@ -1282,7 +1281,7 @@ static int Stbl_fakeFinishCellInTable(STable_info *me, CTRACE2(TRACE_TRST, (tfp, - "TRST:Stbl_fakeFinishCellInTable(lineno=%d, finishing=%d) START FAKING\n", + "TRST:Stbl_fakeFinishCellInTable(line=%d, finishing=%d) START FAKING\n", lineno, finishing)); /* Although here we use pos=0, this may commit the previous @@ -1297,10 +1296,6 @@ static int Stbl_fakeFinishCellInTable(STable_info *me, } } - /* Fake </TR> at BOL */ - /* Stbl_finishCellInTable(lineno, 0, 0); */ - /* Needed? */ - /* Fake <TR> at BOL */ if (Stbl_addRowToTable(me, al, lineno) < 0) { return -1; @@ -1396,7 +1391,7 @@ static int Stbl_fakeFinishCellInTable(STable_info *me, } CTRACE2(TRACE_TRST, (tfp, - "TRST:Stbl_fakeFinishCellInTable(lineno=%d) FINISH FAKING\n", + "TRST:Stbl_fakeFinishCellInTable(line=%d) FINISH FAKING\n", lineno)); return 1; } @@ -1422,8 +1417,8 @@ int Stbl_addCellToTable(STable_info *me, int colspan, CTRACE2(TRACE_TRST, (tfp, - "TRST:Stbl_addCellToTable(lineno=%d, pos=%d, isheader=%d, cs=%d, rs=%d, al=%d)\n", - lineno, pos, (int) isheader, colspan, rowspan, alignment)); + "TRST:Stbl_addCellToTable(line=%d, pos=%d, isheader=%d, cs=%d, rs=%d, al=%d)\n", + lineno, pos, isheader, colspan, rowspan, alignment)); if (!me->rows || !me->nrows) return -1; /* no row started! */ /* ##850_fail_if_fail?? */ @@ -1532,8 +1527,8 @@ int Stbl_finishCellInTable(STable_info *me, int end_td, CTRACE2(TRACE_TRST, (tfp, - "TRST:Stbl_finishCellInTable(lineno=%d, pos=%d, off=%d, end_td=%d)\n", - lineno, pos, offset, (int) end_td)); + "TRST:Stbl_finishCellInTable(line=%d, pos=%d, off=%d, end_td=%d)\n", + lineno, pos, offset, end_td)); if (me->nrows == 0) return -1; lastrow = me->rows + (me->nrows - 1); @@ -1648,7 +1643,7 @@ int Stbl_addColInfo(STable_info *me, CTRACE2(TRACE_TRST, (tfp, "TRST:Stbl_addColInfo(cs=%d, al=%d, isgroup=%d)\n", - colspan, alignment, (int) isgroup)); + colspan, alignment, isgroup)); if (isgroup) { if (me->pending_colgroup_next > me->ncolinfo) me->ncolinfo = me->pending_colgroup_next; |