diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2019-01-03 02:10:17 +0000 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2019-01-03 02:10:17 +0000 |
commit | 567157ae3b72d6fdccd659a9bcadd2bb505cb28f (patch) | |
tree | 9db228704ba4a7f0e3359e7ab7f32e294caa9fbf /src | |
parent | a45e2ee8f04e0b8424ad185dcf81ec8fa884cc91 (diff) | |
download | lynx-snapshots-567157ae3b72d6fdccd659a9bcadd2bb505cb28f.tar.gz |
snapshot of project "lynx", label v2-9-0dev_0i
Diffstat (limited to 'src')
-rw-r--r-- | src/GridText.c | 8 | ||||
-rw-r--r-- | src/LYBookmark.c | 8 | ||||
-rw-r--r-- | src/LYBookmark.h | 2 | ||||
-rw-r--r-- | src/LYCookie.c | 6 | ||||
-rw-r--r-- | src/LYIcon.rc | 4 | ||||
-rw-r--r-- | src/LYMainLoop.c | 8 | ||||
-rw-r--r-- | src/LYStrings.c | 3 | ||||
-rw-r--r-- | src/LYmktime.c | 4 | ||||
-rw-r--r-- | src/LYrcFile.c | 6 | ||||
-rw-r--r-- | src/tidy_tls.c | 10 |
10 files changed, 31 insertions, 28 deletions
diff --git a/src/GridText.c b/src/GridText.c index c1d21bd0..11bb5455 100644 --- a/src/GridText.c +++ b/src/GridText.c @@ -1,5 +1,5 @@ /* - * $LynxId: GridText.c,v 1.318 2018/12/28 22:36:22 tom Exp $ + * $LynxId: GridText.c,v 1.319 2019/01/03 00:14:15 tom Exp $ * * Character grid hypertext object * =============================== @@ -8157,7 +8157,7 @@ void print_wwwfile_to_fd(FILE *fp, int is_email, int is_reply) { - int line_num, byte_num, byte_count, byte_next, byte_offset; + int line_num, byte_num, byte_count, byte_offset; int first = TRUE; HTLine *line; AnchorIndex **inx; /* sorted index of input-fields */ @@ -8227,8 +8227,7 @@ void print_wwwfile_to_fd(FILE *fp, */ byte_offset = line->offset; byte_count = TrimmedLength(line->data); - byte_next = 1; - for (byte_num = 0; byte_num < byte_count; byte_num += byte_next) { + for (byte_num = 0; byte_num < byte_count; byte_num += 1) { int cell_chr, temp_chr; size_t cell_len, temp_len; const char *cell_ptr, *temp_ptr, *try_utf8; @@ -8236,7 +8235,6 @@ void print_wwwfile_to_fd(FILE *fp, cell_ptr = &line->data[byte_num]; cell_len = 1; cell_chr = UCH(*cell_ptr); - byte_next = 1; while (cur != 0 && FieldLast(cur, this_wrap) < byte_offset) { CTRACE2(TRACE_GRIDTEXT, diff --git a/src/LYBookmark.c b/src/LYBookmark.c index ac646914..eff9dc70 100644 --- a/src/LYBookmark.c +++ b/src/LYBookmark.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYBookmark.c,v 1.79 2018/12/27 23:48:37 Kamil.Dudka Exp $ + * $LynxId: LYBookmark.c,v 1.80 2019/01/02 21:14:08 tom Exp $ */ #include <HTUtils.h> #include <HTAlert.h> @@ -29,11 +29,11 @@ char *MBM_A_subdescript[MBM_V_MAXFILES + 1]; static BOOLEAN is_mosaic_hotlist = FALSE; static const char *convert_mosaic_bookmark_file(const char *filename_buffer); -int LYindex2MBM(int n) +unsigned LYindex2MBM(int n) { static char MBMcodes[MBM_V_MAXFILES + 2] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - return n >= 0 && n <= MBM_V_MAXFILES ? MBMcodes[n] : '?'; + return n >= 0 && n <= MBM_V_MAXFILES ? UCH(MBMcodes[n]) : UCH('?'); } int LYMBM2index(int ch) @@ -854,7 +854,7 @@ int select_menu_multi_bookmarks(void) MBM_tmp_count = 0; for (c = MBM_from; c <= MBM_to; c++) { LYmove(3 + MBM_tmp_count, 5); - LYaddch((chtype) LYindex2MBM(c)); + LYaddch(UCH(LYindex2MBM(c))); LYaddstr(" : "); if (MBM_A_subdescript[c]) LYaddstr(MBM_A_subdescript[c]); diff --git a/src/LYBookmark.h b/src/LYBookmark.h index ae8257bd..a9eb4941 100644 --- a/src/LYBookmark.h +++ b/src/LYBookmark.h @@ -11,7 +11,7 @@ extern "C" { extern BOOLEAN LYHaveSubBookmarks(void); extern const char *get_bookmark_filename(char **name); extern int LYMBM2index(int ch); - extern int LYindex2MBM(int n); + extern unsigned LYindex2MBM(int n); extern int select_menu_multi_bookmarks(void); extern int select_multi_bookmarks(void); extern void LYMBM_statusline(const char *text); diff --git a/src/LYCookie.c b/src/LYCookie.c index 4f9fba59..0f489cf7 100644 --- a/src/LYCookie.c +++ b/src/LYCookie.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYCookie.c,v 1.134 2016/11/24 17:24:12 tom Exp $ + * $LynxId: LYCookie.c,v 1.135 2019/01/03 02:10:17 tom Exp $ * * Lynx Cookie Support LYCookie.c * =================== @@ -1068,12 +1068,12 @@ static unsigned parse_attribute(unsigned flags, } } else if (is_attr("max-age", 7)) { known_attr = YES; - if (cur_cookie != NULL && value && /* * Don't process a repeat max-age. - FM */ + if (cur_cookie != NULL && value && !(flags & FLAGS_MAXAGE_ATTR)) { - int temp = (int) strtol(value, NULL, 10); + long temp = strtol(value, NULL, 10); cur_cookie->flags |= COOKIE_FLAG_EXPIRES_SET; if (errno == -ERANGE) { diff --git a/src/LYIcon.rc b/src/LYIcon.rc index 5adfc9da..45fbcb50 100644 --- a/src/LYIcon.rc +++ b/src/LYIcon.rc @@ -1,4 +1,4 @@ -// $LynxId: LYIcon.rc,v 1.39 2018/12/25 21:27:01 tom Exp $ +// $LynxId: LYIcon.rc,v 1.40 2019/01/02 10:07:54 tom Exp $ #include <windows.h> @@ -21,7 +21,7 @@ BEGIN VALUE "FileDescription", "Lynx - web browser" VALUE "FileVersion", "2.9.0.1001" VALUE "InternalName", "Lynx" - VALUE "LegalCopyright", "©1997-2018 Thomas E. Dickey" + VALUE "LegalCopyright", "©1997-2019 Thomas E. Dickey" VALUE "OriginalFilename", "lynx.exe" VALUE "ProductName", "Lynx - web browser" VALUE "ProductVersion", "2.9.0.1001" diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c index 0a46ce10..1622f4f7 100644 --- a/src/LYMainLoop.c +++ b/src/LYMainLoop.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYMainLoop.c,v 1.241 2018/06/10 20:44:10 tom Exp $ + * $LynxId: LYMainLoop.c,v 1.242 2019/01/02 23:31:19 tom Exp $ */ #include <HTUtils.h> #include <HTAccess.h> @@ -3566,9 +3566,9 @@ static BOOLEAN check_JUMP_param(char **url_template) int code = TRUE; bstring *input = NULL; - CTRACE((tfp, "check_JUMP_param: %s\n", result)); + CTRACE((tfp, "check_JUMP_param: %s\n", NONNULL(result))); - while ((subs = strstr(result, "%s")) != 0) { + while (result != NULL && (subs = strstr(result, "%s")) != 0) { char prompt[MAX_LINE]; RecallType recall = NORECALL; @@ -3588,7 +3588,7 @@ static BOOLEAN check_JUMP_param(char **url_template) HTInfoMsg(CANCELLED); code = FALSE; break; - } else if (*(encoded = urlencode(input->str)) != '\0') { + } else if ((encoded = urlencode(input->str)) != NULL && *encoded != '\0') { int subs_at = (int) (subs - result); int fill_in = (int) strlen(encoded) - 2; size_t have = strlen(result); diff --git a/src/LYStrings.c b/src/LYStrings.c index 3fb31faa..d12a6e36 100644 --- a/src/LYStrings.c +++ b/src/LYStrings.c @@ -1,4 +1,4 @@ -/* $LynxId: LYStrings.c,v 1.275 2018/12/27 10:32:15 tom Exp $ */ +/* $LynxId: LYStrings.c,v 1.276 2019/01/02 23:42:50 tom Exp $ */ #include <HTUtils.h> #include <HTCJK.h> #include <UCAux.h> @@ -1003,6 +1003,7 @@ static const char *expand_tiname(const char *first, size_t len, char **result, c TERMTYPE *tp = (TERMTYPE *) (cur_term); LYStrNCpy(name, first, len); + **result = '\0'; if ((code = lookup_tiname(name, strnames)) >= 0 || (code = lookup_tiname(name, strfnames)) >= 0) { if (tp->Strings[code] != 0) { diff --git a/src/LYmktime.c b/src/LYmktime.c index 09606573..d0952416 100644 --- a/src/LYmktime.c +++ b/src/LYmktime.c @@ -1,4 +1,4 @@ -/* $LynxId: LYmktime.c,v 1.18 2018/12/27 21:08:33 tom Exp $ */ +/* $LynxId: LYmktime.c,v 1.19 2019/01/03 02:07:48 tom Exp $ */ #include <LYStrings.h> #include <LYUtils.h> @@ -58,7 +58,7 @@ FILE *TraceFP(void) * FALSE. It is intended for handling 'expires' strings in Version 0 cookies * homologously to 'max-age' strings in Version 1 cookies, for which 0 is the * minimum, and greater values are handled as '[max-age seconds] + time(NULL)'. - * If "absolute" if TRUE, we return the clock format value itself, but if + * If "absolute" is TRUE, we return the clock format value itself, but if * anything goes wrong when parsing the expected patterns, we still return 0. * - FM */ diff --git a/src/LYrcFile.c b/src/LYrcFile.c index 1754f12e..6942b6dc 100644 --- a/src/LYrcFile.c +++ b/src/LYrcFile.c @@ -1,4 +1,4 @@ -/* $LynxId: LYrcFile.c,v 1.102 2018/05/11 00:27:54 tom Exp $ */ +/* $LynxId: LYrcFile.c,v 1.103 2019/01/02 21:13:45 tom Exp $ */ #include <HTUtils.h> #include <HTFTP.h> #include <LYUtils.h> @@ -768,7 +768,7 @@ BOOL LYsetRcValue(const char *name, const char *param) case CONF_MBM: for (n = 1; n <= MBM_V_MAXFILES; n++) { - sprintf(MBM_line, "multi_bookmark%c", LYindex2MBM(n)); + sprintf(MBM_line, "multi_bookmark%c", UCH(LYindex2MBM(n))); if (!strcasecomp(name, MBM_line)) { if ((notes = StrChr(value, ',')) != 0) { @@ -1042,7 +1042,7 @@ It is not this file.\n\ case CONF_MBM: for (n = 1; n <= MBM_V_MAXFILES; n++) { - fprintf(fp, "multi_bookmark%c=", LYindex2MBM(n)); + fprintf(fp, "multi_bookmark%c=", UCH(LYindex2MBM(n))); fprintf(fp, "%s", NonNull(MBM_A_subbookmark[n])); if (MBM_A_subdescript[n] != 0 diff --git a/src/tidy_tls.c b/src/tidy_tls.c index cda9a407..e33515b9 100644 --- a/src/tidy_tls.c +++ b/src/tidy_tls.c @@ -1,6 +1,6 @@ /* - * $LynxId: tidy_tls.c,v 1.37 2018/12/29 01:41:39 tom Exp $ - * Copyright 2008-2016,2018 Thomas E. Dickey + * $LynxId: tidy_tls.c,v 1.39 2019/01/03 00:18:31 tom Exp $ + * Copyright 2008-2018,2019 Thomas E. Dickey * with fix Copyright 2008 by Thomas Viehmann * * Required libraries: @@ -368,8 +368,12 @@ SSL_CIPHER *SSL_get_current_cipher(SSL * ssl) result->encrypts = gnutls_cipher_get(ssl->gnutls_state); result->key_xchg = gnutls_kx_get(ssl->gnutls_state); result->msg_code = gnutls_mac_get(ssl->gnutls_state); - result->compress = gnutls_compression_get(ssl->gnutls_state); result->cert = gnutls_certificate_type_get(ssl->gnutls_state); +#if !defined(_GNUTLS_GCC_VERSION) || (_GNUTLS_GCC_VERSION < 30100) + result->compress = gnutls_compression_get(ssl->gnutls_state); +#else + result->compress = GNUTLS_COMP_UNKNOWN; +#endif } return result; |