diff options
Diffstat (limited to '')
-rw-r--r-- | file.c | 51 |
1 files changed, 9 insertions, 42 deletions
@@ -1,4 +1,4 @@ -/* $Id: file.c,v 1.239 2006/04/05 14:18:54 inu Exp $ */ +/* $Id: file.c,v 1.240 2006/04/07 13:21:11 inu Exp $ */ #include "fm.h" #include <sys/types.h> #include "myctype.h" @@ -50,7 +50,7 @@ static struct table_mode table_mode[MAX_TABLE]; #ifdef USE_IMAGE static ParsedURL *cur_baseURL = NULL; #ifdef USE_M17N -static wc_ces cur_document_charset; +static char cur_document_charset; #endif #endif @@ -836,15 +836,13 @@ readHeader(URLFile *uf, Buffer *newBuf, int thru, ParsedURL *pu) } if (pu && name->length > 0) { int err; - if (show_cookie) { - if (flag & COO_SECURE) - disp_message_nsec("Received a secured cookie", FALSE, 1, + if (flag & COO_SECURE) + disp_message_nsec("Received a secured cookie", FALSE, 1, TRUE, FALSE); - else - disp_message_nsec(Sprintf("Received cookie: %s=%s", + else + disp_message_nsec(Sprintf("Received cookie: %s=%s", name->ptr, value->ptr)->ptr, FALSE, 1, TRUE, FALSE); - } err = add_cookie(pu, name, value, expires, domain, path, flag, comment, version, port, commentURL); @@ -876,12 +874,10 @@ readHeader(URLFile *uf, Buffer *newBuf, int thru, ParsedURL *pu) emsg = "This cookie was rejected to prevent security violation."; record_err_message(emsg); - if (show_cookie) - disp_message_nsec(emsg, FALSE, 1, TRUE, FALSE); + disp_message_nsec(emsg, FALSE, 1, TRUE, FALSE); } else - if (show_cookie) - disp_message_nsec(Sprintf + disp_message_nsec(Sprintf ("Accepting invalid cookie: %s=%s", name->ptr, value->ptr)->ptr, FALSE, 1, TRUE, FALSE); @@ -1603,17 +1599,9 @@ getAuthCookie(struct http_auth *hauth, char *auth_header, getpassphrase(proxy ? "Proxy Password: " : "Password: ")); #else -#ifndef __MINGW32_VERSION *pwd = Strnew_charp((char *) getpass(proxy ? "Proxy Password: " : "Password: ")); -#else - term_raw(); - *pwd = Strnew_charp((char *) - inputLine(proxy ? "Proxy Password: " : - "Password: ", NULL, IN_PASSWORD)); - term_cbreak(); -#endif /* __MINGW32_VERSION */ #endif } } @@ -5293,17 +5281,6 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit) buf->hmarklist = putHmarker(buf->hmarklist, currentLn(buf), pos, hseq - 1); - else if (hseq < 0) { - int h = -hseq - 1; - if (buf->hmarklist && - h < buf->hmarklist->nmark && - buf->hmarklist->marks[h].invalid) { - buf->hmarklist->marks[h].pos = pos; - buf->hmarklist->marks[h].line = currentLn(buf); - buf->hmarklist->marks[h].invalid = 0; - hseq = -hseq; - } - } if (id && idFrame) idFrame->body->nameList = putAnchor(idFrame->body->nameList, id, NULL, @@ -5323,12 +5300,8 @@ HTMLlineproc2body(Buffer *buf, Str (*feed) (), int llimit) a_href->end.line = currentLn(buf); a_href->end.pos = pos; if (a_href->start.line == a_href->end.line && - a_href->start.pos == a_href->end.pos) { - if (buf->hmarklist && - a_href->hseq < buf->hmarklist->nmark) - buf->hmarklist->marks[a_href->hseq].invalid = 1; + a_href->start.pos == a_href->end.pos) a_href->hseq = -1; - } a_href = NULL; } break; @@ -7697,7 +7670,6 @@ _MoveFile(char *path1, char *path2) int _doFileCopy(char *tmpf, char *defstr, int download) { -#ifndef __MINGW32_VERSION Str msg; Str filen; char *p, *q = NULL; @@ -7804,7 +7776,6 @@ _doFileCopy(char *tmpf, char *defstr, int download) if (PreserveTimestamp && !is_pipe && !stat(tmpf, &st)) setModtime(p, st.st_mtime); } -#endif /* __MINGW32_VERSION */ return 0; } @@ -7819,7 +7790,6 @@ doFileMove(char *tmpf, char *defstr) int doFileSave(URLFile uf, char *defstr) { -#ifndef __MINGW32_VERSION Str msg; Str filen; char *p, *q; @@ -7905,7 +7875,6 @@ doFileSave(URLFile uf, char *defstr) if (PreserveTimestamp && uf.modtime != -1) setModtime(p, uf.modtime); } -#endif /* __MINGW32_VERSION */ return 0; } @@ -7976,7 +7945,6 @@ inputAnswer(char *prompt) static void uncompress_stream(URLFile *uf, char **src) { -#ifndef __MINGW32_VERSION pid_t pid1; FILE *f1; char *expand_cmd = GUNZIP_CMDNAME; @@ -8060,7 +8028,6 @@ uncompress_stream(URLFile *uf, char **src) } UFhalfclose(uf); uf->stream = newFileStream(f1, (void (*)())fclose); -#endif /* __MINGW32_VERSION */ } static FILE * |