diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2015-08-11 13:05:46 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2015-08-11 13:05:46 +0000 |
commit | af52480aabcb700c9bf68989a5e6c648d22f9945 (patch) | |
tree | 17ee2ecab281cfb16d0a622d7adf6ae4ce385cfa /main.c | |
parent | Update ChangeLog (diff) | |
parent | Check for presence of prevl before using (diff) | |
download | w3m-af52480aabcb700c9bf68989a5e6c648d22f9945.tar.gz w3m-af52480aabcb700c9bf68989a5e6c648d22f9945.zip |
Merge branch 'bug/sw3m'
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -1,6 +1,7 @@ /* $Id: main.c,v 1.270 2010/08/24 10:11:51 htrb Exp $ */ #define MAINPROGRAM #include "fm.h" +#include <stdio.h> #include <signal.h> #include <setjmp.h> #include <sys/stat.h> @@ -1266,13 +1267,13 @@ static void dump_source(Buffer *buf) { FILE *f; - char c; + int c; if (buf->sourcefile == NULL) return; f = fopen(buf->sourcefile, "r"); if (f == NULL) return; - while (c = fgetc(f), !feof(f)) { + while ((c = fgetc(f)) != EOF) { putchar(c); } fclose(f); @@ -3071,7 +3072,6 @@ handleMailto(char *url) /* follow HREF link */ DEFUN(followA, GOTO_LINK, "Go to current link") { - Line *l; Anchor *a; ParsedURL u; #ifdef USE_IMAGE @@ -3081,7 +3081,6 @@ DEFUN(followA, GOTO_LINK, "Go to current link") if (Currentbuf->firstLine == NULL) return; - l = Currentbuf->currentLine; #ifdef USE_IMAGE a = retrieveCurrentImg(Currentbuf); @@ -3163,13 +3162,11 @@ bufferA(void) /* view inline image */ DEFUN(followI, VIEW_IMAGE, "View image") { - Line *l; Anchor *a; Buffer *buf; if (Currentbuf->firstLine == NULL) return; - l = Currentbuf->currentLine; a = retrieveCurrentImg(Currentbuf); if (a == NULL) @@ -3419,7 +3416,6 @@ followForm(void) static void _followForm(int submit) { - Line *l; Anchor *a, *a2; char *p; FormItemList *fi, *f2; @@ -3428,7 +3424,6 @@ _followForm(int submit) if (Currentbuf->firstLine == NULL) return; - l = Currentbuf->currentLine; a = retrieveCurrentForm(Currentbuf); if (a == NULL) @@ -3533,7 +3528,6 @@ _followForm(int submit) case FORM_INPUT_BUTTON: do_submit: tmp = Strnew(); - tmp2 = Strnew(); multipart = (fi->parent->method == FORM_METHOD_POST && fi->parent->enctype == FORM_ENCTYPE_MULTIPART); query_from_followform(&tmp, fi, multipart); |