diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2021-01-02 00:20:37 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2021-01-02 00:20:37 +0000 |
commit | 1d0ba25a660483da1272a31dd077ed94441e3d9f (patch) | |
tree | 1d8dee52cd1e3d340fe178a8193dc96c4496db84 /etc.c | |
parent | Merge branch 'cvstrunk' into upstream (diff) | |
download | w3m-1d0ba25a660483da1272a31dd077ed94441e3d9f.tar.gz w3m-1d0ba25a660483da1272a31dd077ed94441e3d9f.zip |
New upstream version 0.5.3+git20210102upstream/0.5.3+git20210102upstream
Diffstat (limited to '')
-rw-r--r-- | etc.c | 31 |
1 files changed, 12 insertions, 19 deletions
@@ -498,7 +498,7 @@ calcPosition(char *l, Lineprop *pr, int len, int pos, int bpos, int mode) static char *prevl = NULL; int i, j; - if (l == NULL || len == 0) + if (l == NULL || len == 0 || pos < 0) return bpos; if (l == prevl && mode == CP_AUTO) { if (pos <= len) @@ -634,24 +634,6 @@ strerror(int errno) } #endif /* not HAVE_STRERROR */ -#ifndef HAVE_SYS_ERRLIST -char **sys_errlist; - -prepare_sys_errlist() -{ - int i, n; - - i = 1; - while (strerror(i) != NULL) - i++; - n = i; - sys_errlist = New_N(char *, n); - sys_errlist[0] = ""; - for (i = 1; i < n; i++) - sys_errlist[i] = strerror(i); -} -#endif /* not HAVE_SYS_ERRLIST */ - int next_status(char c, int *status) { @@ -727,6 +709,11 @@ next_status(char c, int *status) case '>': *status = R_ST_NORMAL; break; + case 'D': + case 'd': + /* could be a !doctype */ + *status = R_ST_TAG; + break; default: *status = R_ST_IRRTAG; } @@ -1365,7 +1352,13 @@ setup_child(int child, int i, int f) if (!child) SETPGRP(); #endif /* __MINGW32_VERSION */ + /* + * I don't know why but close_tty() sometimes interrupts loadGeneralFile() in loadImage() + * and corrupt image data can be cached in ~/.w3m. + */ +#if 0 close_tty(); +#endif close_all_fds_except(i, f); QuietMessage = TRUE; fmInitialized = FALSE; |