diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/GridText.c | 6 | ||||
-rw-r--r-- | src/HTAlert.c | 4 | ||||
-rw-r--r-- | src/HTFWriter.c | 4 | ||||
-rw-r--r-- | src/HTML.c | 14 | ||||
-rw-r--r-- | src/LYCharUtils.c | 3 | ||||
-rw-r--r-- | src/LYMainLoop.c | 7 | ||||
-rw-r--r-- | src/LYOptions.c | 8 | ||||
-rw-r--r-- | src/LYUtils.c | 4 | ||||
-rw-r--r-- | src/makefile.in | 4 |
9 files changed, 28 insertions, 26 deletions
diff --git a/src/GridText.c b/src/GridText.c index a3abbe79..2738a26b 100644 --- a/src/GridText.c +++ b/src/GridText.c @@ -1,5 +1,5 @@ /* - * $LynxId: GridText.c,v 1.294 2017/02/11 00:50:00 tom Exp $ + * $LynxId: GridText.c,v 1.295 2017/07/02 20:01:22 tom Exp $ * * Character grid hypertext object * =============================== @@ -7886,7 +7886,7 @@ static int TrimmedLength(char *string) if (!HTisDocumentSource()) { int adjust = result; - unsigned ch; + int ch; while (adjust > 0) { ch = UCH(string[adjust - 1]); @@ -13212,7 +13212,7 @@ int HText_EditTextArea(LinkInfo * form_link) TextAnchor *start_anchor = NULL; BOOLEAN firstanchor = TRUE; - char ed_offset[10]; + char ed_offset[DigitsOf(int) + 3]; int start_line = 0; int entry_line = form_link->anchor_line_num; int orig_cnt = 0; diff --git a/src/HTAlert.c b/src/HTAlert.c index aa185688..81594cf6 100644 --- a/src/HTAlert.c +++ b/src/HTAlert.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTAlert.c,v 1.102 2016/11/24 23:56:05 tom Exp $ + * $LynxId: HTAlert.c,v 1.103 2017/07/02 19:54:30 tom Exp $ * * Displaying messages and getting input for Lynx Browser * ========================================================== @@ -1132,7 +1132,7 @@ int HTConfirmPostRedirect(const char *Redirecting_url, int server_status) result = 303; break; } - /* fall through to default */ + /* FALLTHRU */ default: /* diff --git a/src/HTFWriter.c b/src/HTFWriter.c index 5356caa8..6e729ae1 100644 --- a/src/HTFWriter.c +++ b/src/HTFWriter.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTFWriter.c,v 1.112 2017/04/30 17:55:13 tom Exp $ + * $LynxId: HTFWriter.c,v 1.113 2017/07/02 20:42:32 tom Exp $ * * FILE WRITER HTFWrite.h * =========== @@ -174,7 +174,7 @@ static void decompress_gzip(HTStream *me) gzclose(gzfp); LYCloseTempFP(fp); CTRACE((tfp, "...decompress %" PRI_off_t " to %ld\n", - me->anchor->actual_length, + CAST_off_t (me->anchor->actual_length), actual)); if (success) { if (rename(copied, in_name) == 0) diff --git a/src/HTML.c b/src/HTML.c index 2053e53f..96fb80b8 100644 --- a/src/HTML.c +++ b/src/HTML.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTML.c,v 1.170 2017/04/30 18:45:06 tom Exp $ + * $LynxId: HTML.c,v 1.171 2017/07/02 19:57:04 tom Exp $ * * Structured stream to Rich hypertext converter * ============================================ @@ -3711,7 +3711,7 @@ static int HTML_start_element(HTStructured * me, int element_number, TRANSLATE_AND_UNESCAPE_ENTITIES(&me->object_title, TRUE, FALSE); LYTrimHead(me->object_title); LYTrimTail(me->object_title); - if (me->object_title == '\0') { + if (*me->object_title == '\0') { FREE(me->object_title); } } @@ -3729,7 +3729,7 @@ static int HTML_start_element(HTStructured * me, int element_number, TRANSLATE_AND_UNESCAPE_ENTITIES(&me->object_type, TRUE, FALSE); LYTrimHead(me->object_type); LYTrimTail(me->object_type); - if (me->object_type == '\0') { + if (*me->object_type == '\0') { FREE(me->object_type); } } @@ -3740,7 +3740,7 @@ static int HTML_start_element(HTStructured * me, int element_number, TRANSLATE_AND_UNESCAPE_ENTITIES(&me->object_classid, TRUE, FALSE); LYTrimHead(me->object_classid); LYTrimTail(me->object_classid); - if (me->object_classid == '\0') { + if (*me->object_classid == '\0') { FREE(me->object_classid); } } @@ -3762,7 +3762,7 @@ static int HTML_start_element(HTStructured * me, int element_number, FALSE); LYTrimHead(me->object_codetype); LYTrimTail(me->object_codetype); - if (me->object_codetype == '\0') { + if (*me->object_codetype == '\0') { FREE(me->object_codetype); } } @@ -3772,7 +3772,7 @@ static int HTML_start_element(HTStructured * me, int element_number, TRANSLATE_AND_UNESCAPE_ENTITIES(&me->object_name, TRUE, FALSE); LYTrimHead(me->object_name); LYTrimTail(me->object_name); - if (me->object_name == '\0') { + if (*me->object_name == '\0') { FREE(me->object_name); } } @@ -5067,7 +5067,7 @@ static int HTML_start_element(HTStructured * me, int element_number, && non_empty(value[HTML_TEXTAREA_ID])) { StrAllocCopy(id_string, value[HTML_TEXTAREA_ID]); TRANSLATE_AND_UNESCAPE_TO_STD(&id_string); - if ((id_string != '\0') && + if ((*id_string != '\0') && (ID_A = HTAnchor_findChildAndLink(me->node_anchor, /* Parent */ id_string, /* Tag */ NULL, /* Addresss */ diff --git a/src/LYCharUtils.c b/src/LYCharUtils.c index d7177861..caeac733 100644 --- a/src/LYCharUtils.c +++ b/src/LYCharUtils.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYCharUtils.c,v 1.129 2016/11/24 15:35:29 tom Exp $ + * $LynxId: LYCharUtils.c,v 1.130 2017/07/02 19:54:30 tom Exp $ * * Functions associated with LYCharSets.c and the Lynx version of HTML.c - FM * ========================================================================== @@ -1710,6 +1710,7 @@ char **LYUCFullyTranslateString(char **str, break; #endif } + /* FALLTHRU */ case S_recover: if (what == P_decimal || what == P_hex) { diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c index b44731eb..3329985e 100644 --- a/src/LYMainLoop.c +++ b/src/LYMainLoop.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYMainLoop.c,v 1.234 2017/05/11 21:22:06 tom Exp $ + * $LynxId: LYMainLoop.c,v 1.235 2017/07/02 20:04:20 tom Exp $ */ #include <HTUtils.h> #include <HTAccess.h> @@ -3530,7 +3530,8 @@ static char *urlencode(char *str) result = malloc(strlen(str) * 3 + 1); ptr = result; - assert(result); + if (result == NULL) + outofmem(__FILE__, "urlencode"); while ((ch = UCH(*str++)) != 0) { if (ch == ' ') { @@ -3586,7 +3587,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)) != '\0') { int subs_at = (int) (subs - result); int fill_in = (int) strlen(encoded) - 2; size_t have = strlen(result); diff --git a/src/LYOptions.c b/src/LYOptions.c index 8e795c51..5100d940 100644 --- a/src/LYOptions.c +++ b/src/LYOptions.c @@ -1,4 +1,4 @@ -/* $LynxId: LYOptions.c,v 1.171 2017/01/01 01:49:49 tom Exp $ */ +/* $LynxId: LYOptions.c,v 1.172 2017/07/02 20:07:12 tom Exp $ */ #include <HTUtils.h> #include <HTFTP.h> #include <HTTP.h> /* 'reloading' flag */ @@ -3794,7 +3794,7 @@ static int gen_options(char **newfile) PutLabel(fp0, gettext("Line edit style"), lineedit_mode_string); BeginSelect(fp0, lineedit_mode_string); for (i = 0; LYEditorNames[i]; i++) { - char temp[16]; + char temp[DigitsOf(i) + 3]; sprintf(temp, "%d", i); PutOption(fp0, i == current_lineedit, temp, LYEditorNames[i]); @@ -3806,7 +3806,7 @@ static int gen_options(char **newfile) PutLabel(fp0, gettext("Keyboard layout"), kblayout_string); BeginSelect(fp0, kblayout_string); for (i = 0; LYKbLayoutNames[i]; i++) { - char temp[16]; + char temp[DigitsOf(i) + 3]; sprintf(temp, "%d", i); PutOption(fp0, i == current_layout, temp, LYKbLayoutNames[i]); @@ -3838,7 +3838,7 @@ static int gen_options(char **newfile) PutLabel(fp0, gettext("Display character set"), display_char_set_string); MaybeSelect(fp0, LYLocaleCharset, display_char_set_string); for (i = 0; LYchar_set_names[i]; i++) { - char temp[10]; + char temp[DigitsOf(i) + 3]; size_t len = strlen(LYchar_set_names[i]); if (len > cset_len) diff --git a/src/LYUtils.c b/src/LYUtils.c index af6b2f31..8f7dc7a8 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYUtils.c,v 1.277 2017/05/11 22:33:05 tom Exp $ + * $LynxId: LYUtils.c,v 1.278 2017/07/02 20:42:32 tom Exp $ */ #include <HTUtils.h> #include <HTTCP.h> @@ -6066,7 +6066,7 @@ void LYRelaxFilePermissions(const char *name) */ mode_t save = umask(HIDE_UMASK); - mode = ((mode & 0700) | 0066) & ~save; + mode = (mode_t) (((mode & 0700) | 0066) & ~save); (void) umask(save); (void) chmod(name, mode); } diff --git a/src/makefile.in b/src/makefile.in index de4cf003..a5287fb1 100644 --- a/src/makefile.in +++ b/src/makefile.in @@ -1,4 +1,4 @@ -# $LynxId: makefile.in,v 1.74 2014/12/16 01:10:39 tom Exp $ +# $LynxId: makefile.in,v 1.75 2017/07/02 18:15:25 tom Exp $ # template-makefile for Lynx src directory SHELL = @CONFIG_SHELL@ @@ -104,7 +104,7 @@ all: lynx$x .c.i: @RULE_CC@ - @ECHO_CC@$(CPP) -C $(CPP_OPTS) $< >$@ + @ECHO_CC@$(CPP) $(CPP_OPTS) $< >$@ lynx$x: message $(top_builddir)/LYHelp.h $(OBJS) $(WWWLIB) @echo "Linking and creating Lynx executable" |