Previously, if you did this in elinks.conf:
set document.dump.header = "\'\\"
then str_rd() failed to detect the end of the string.
(cherry picked from commit b216a21b799a5c5746b10e68d948e0cd610e926b)
I was looking for code that handles OPT_COMMAND, so I grepped for it,
but did not immediately find this array. Next time, I will.
(cherry picked from commit f8863183b86b8dd64f9316965cfb69d69b5719d2)
elinks.keymaps.main["/"] = null;
used to crash ELinks with a segfault in JS_ObjectIsFunction.
Fix that by recognizing JSVAL_NULL explicitly and treating it as "none".
Likewise, if keymap_get_property would return "none" to ECMAScript,
return JSVAL_NULL instead.
gcc-4.3 -O2 was complaining that http_got_header may use uninitialized
version.major and version.minor. That indeed happened with HTTP/0.9
servers, and the PRE_HTTP_1_1(version) check then had an undefined
result, so http->close could remain 0 even though it should have
become 1; fortunately, it was then set to 1 anyway, because there was
no Content-Length header. The undefined version was also saved in
http->recv_version, but it appears nothing ever reads that. So in the
end, the bug did not cause any symptoms at runtime, but the warning
broke the build on gcc-4.3 if ELinks was configured with --enable-debug.
(cherry picked from commit 5c0128d82d4bd9d706ec36cc2e13cd3492ff3181)
To segregate the historical commits (can't remember why),
I originally placed their pack in an alternate object store,
but later I found that a *.keep file does the job as well.
This gives a considerable speedup in git gc. It takes some
more disk space but OTOH you might then run gc more often
and have fewer loose objects.
real user sys (tested in this order)
1m15.900s 0m59.732s 0m4.336s gc after clone&graft without *.keep
0m23.162s 0m17.549s 0m1.588s gc after clone&graft with *.keep
0m06.932s 0m04.440s 0m0.588s gc after clone&graft&gc with *.keep
0m32.214s 0m24.138s 0m2.284s gc after clone&graft&gc without *.keep
Total size of .git/objects/pack/ was 90592 KiB without *.keep
and 97397 KiB with *.keep. So *.keep reduced gc time by 70-80%
but increased disk space usage by 7.5%.
(cherry picked from commit d2c5aeb2c7a2d113eca6ffafd97d508258cf52fd)
The fully dashed form git-update-server-info is deprecated
in Git 1.5.4 and will cease to work in Git 1.6.0 (unless
PATH is modified). Use git update-server-info instead.
(cherry picked from commit 31255d4a4d21b0c4c6d87cfa9badac0d75f97287)
When fixing bug 1014, I had added the wrong bug number 451 to NEWS.
Later, I had noticed bug 1014 was missing from NEWS, and added that too.
Don't mention bug 451, which was tagged INVALID already in 2004
and has no real connection to the ELinks 0.11.4 release.
The second argument of PERL_SYS_INIT3 should be a char ***
but ELinks was giving it a char *(*)[1].
Also, enlarge the array to 2 elements, so that my_argv[my_argc] == NULL
like in main(). PERL_SYS_INIT3 seems hardly documented at all so I'm
not sure this is necessary, but it shouldn't hurt.
If fdopen failed, save_textarea_file would free the filename, but it still returned the pointer to the filename. With this commit, save_textarea_file will return NULL if fdopen fails.
The fix itself is in the parent commit.
(cherry picked from commit 4c390589ea28eeba020357fd89841b0fc2be33b3,
rewriting the NEWS entry because the bug also occurred on Debian)
*fresult pointed to nowhere. On FreeBSD *fresult == NULL
and directories weren't displayed.
Check also if safe_write writes all data.
(cherry picked from commit 06bcc48487676e0ea113ed7ace63798dc0562694)
In set and unset commands, the <option> must not be quoted. In the
sample protocol.user.mailto.unix setting, the internal quotes were
using some manpage syntax, resulting in incorrect HTML output.
(cherry picked from commit 857c27e8b68e8ae08a4bdf4950a296ed4aa5df49)
elinks.1.in, elinkskeys.5, and elinks.conf.5 are included in the Git tree,
so they are initially in the srcdir, and that's were the new versions must go.
(cherry picked from commit 9cae6a4fa4a033e10e29fdc8329d92bb7e141385)
Previously, file extensions added or modified via the menu did not get
saved to elinks.conf when config.saving_style was 3 (the default).
This patch makes the file-extension dialog box call option_changed,
which then sets OPT_TOUCHED, so that the option appears modified in
the option manager and will be saved.
[ Reported by Witek; original patch by me; adapted to 0.11 by Witek;
commit message by me. --KON ]