1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-30 01:55:30 +00:00
Commit Graph

1255 Commits

Author SHA1 Message Date
Kalle Olavi Niemitalo
a352ac2c64 config: Fix the "include" command.
Previously, it only pretended to rewrite the configuration file, so it
set or cleared OPT_MUST_SAVE but never changed or output any options.
Now, it actually sets the options when ELinks is loading the
configuration file.  Also, when ELinks is rewriting the configuration
file, it now compares the values in the included file to the current
values of the options, and sets or clears OPT_MUST_SAVE accordingly.
(cherry picked from commit 054852ae23)
2008-07-11 18:29:02 +03:00
Kalle Olavi Niemitalo
a4fdf122d1 config: Access OPT_MUST_SAVE in the real option, not alias.
So, if elinks.conf contains a "set" command for an alias and ELinks
updates that, it now knows it doesn't have to append another "set"
command for the underlying option.
(cherry picked from commit 92b430f3dc)
2008-07-11 18:29:02 +03:00
Kalle Olavi Niemitalo
cc2ce681e3 config: Negate the value in redir_rd too.
So if ELinks is rewriting a configuration file that contains a "set"
command for a negated alias, then it properly writes the value of the
alias, rather than the value of the underlying option.
(cherry picked from commit c47d3798a3)
2008-07-11 18:29:02 +03:00
Kalle Olavi Niemitalo
a1769e2377 config: In redir_set, negate the incoming value.
That is, let the setter function of the underlying option store the
negated value.  Previously, redir_set used to tweak the value of the
option after it has already called the underlying setter.
(cherry picked from commit 2dbe6ec34f)
2008-07-11 18:29:01 +03:00
Kalle Olavi Niemitalo
77755cf684 config: Rewrite "set" to "unset" and vice versa.
Also, replace OPT_WATERMARK with OPT_MUST_SAVE, which has the opposite
meaning.

Watermarking of aliases does not yet work correctly in this version.
Neither does the "include" command.
(cherry picked from commit 7cdbc908d8)
2008-07-11 18:29:01 +03:00
Kalle Olavi Niemitalo
841153b625 config: Reset OPT_TOUCHED flags after a successful save.
Previously, they were reset by smart_config_string(), which was not
called if the value of the option was saved by rewriting an existing
command in elinks.conf.  Also, it is better to reset the flags only
after the file operations have actually succeeded.
(cherry picked from commit 6bd961246a)
2008-07-11 18:29:01 +03:00
Kalle Olavi Niemitalo
b2c11e21c9 config: In saving style 2, save deleted options too.
Previously, ELinks set the OPT_WATERMARK flag in all deleted options
when config.saving_style was 2, thus mostly preventing them from being
saved.  This had the unfortunate consequence that if you started with
no elinks.conf, set config.saving_style = 2, deleted some built-in
option (e.g. a URL rewriting rule), saved the settings, and restarted
ELinks, then the built-in option would reappear.
(cherry picked from commit ab8ef9698f)
2008-07-11 18:29:00 +03:00
Kalle Olavi Niemitalo
2e71908995 config: Let mirroring be implicit unless values are rewritten.
(cherry picked from commit 6d55be2043)
2008-07-11 18:29:00 +03:00
Kalle Olavi Niemitalo
bfa41cef38 config: Rearrange mirror-or-not checks.
(cherry picked from commit 72de752f84)
2008-07-11 18:29:00 +03:00
Kalle Olavi Niemitalo
1841d8f399 config: Let "unset" delete built-in options too.
(cherry picked from commit 661dda04c9)
2008-07-11 18:28:59 +03:00
Kalle Olavi Niemitalo
6ef4f017be config: Unsetting a missing option is not an error.
(cherry picked from commit 2c9d966c99)
2008-07-11 18:28:59 +03:00
Kalle Olavi Niemitalo
34c91ea021 config: Remember the address and length of the option name.
A later commit will take advantage of this.
(cherry picked from commit 3f077d109a)
2008-07-11 18:28:59 +03:00
Kalle Olavi Niemitalo
0c8c9cc16f config: More cleverly skip unrecognized or malformed commands.
(cherry picked from commit e7bd23ff37)
2008-07-11 18:28:58 +03:00
Kalle Olavi Niemitalo
f67ddcf851 config: Skip values of unrecognized options.
To avoid parsing them as commands.
(cherry picked from commit e06416d248)
2008-07-11 18:28:58 +03:00
Kalle Olavi Niemitalo
f4e8682193 config: Report errors before the line number is lost.
(cherry picked from commit edad2ddccd)
2008-07-11 18:28:58 +03:00
Kalle Olavi Niemitalo
b7ff11f8d2 config, Bug 503: Keep track of what has been mirrored.
(cherry picked from commit 1f0c361ead,
 fixing the obvious typo)
2008-07-11 18:28:57 +03:00
Kalle Olavi Niemitalo
9dcece750f config: Add struct conf_parsing_state.
(cherry picked from commit 4c64afec26,
 reinserting the parse_config_file change omitted from the previous
 cherry-pick)
2008-07-11 18:28:57 +03:00
Kalle Olavi Niemitalo
0a5652da1c config: Reduce the interface offered to exmode.
(cherry picked from commit 63e82e68e4,
 but removed the parse_config_file change that broke the build)
2008-07-11 18:28:57 +03:00
Kalle Olavi Niemitalo
e4243bd8a3 config: Use memacpy instead of stracpy.
So there is no need to substitute a '\0' into the string, and undo
that afterwards.
(cherry picked from commit 912cff7975)
2008-07-11 18:28:56 +03:00
Kalle Olavi Niemitalo
fafe6583e8 config: Fix two bogus end-of-file checks.
(cherry picked from commit 753aa3054b)
2008-07-11 18:28:56 +03:00
Kalle Olavi Niemitalo
1eeb2b198a config: Don't mem_free(NULL).
(cherry picked from commit 09829a0b52)
2008-07-11 18:28:56 +03:00
Kalle Olavi Niemitalo
3c000d2c2e config: Plug some memory leaks in error handling.
(cherry picked from commit c92cd01e0b)
2008-07-11 18:28:55 +03:00
Kalle Olavi Niemitalo
ffb9321496 config: Explain why get_opt_rec() does not follow OPT_ALIAS.
(cherry picked from commit 4960c65f20)
2008-07-11 18:28:55 +03:00
Kalle Olavi Niemitalo
d67eddc93c config: Swap the "unknown command" and "parse error" messages.
They should be in the same order as in enum parse_error.
(cherry picked from commit 1d16e90dca)
2008-07-11 18:28:55 +03:00
Kalle Olavi Niemitalo
4e0e5cbcb3 config: Each backslash escapes only one character.
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 b216a21b79)
2008-07-11 18:28:54 +03:00
Kalle Olavi Niemitalo
50aea7c94b config: more const in elinks.conf parsing
(cherry picked from commit 9becd108a8)
2008-07-11 18:28:54 +03:00
Kalle Olavi Niemitalo
23b843ae64 option_types: Add comments to be found by grep.
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 f8863183b8)
2008-07-11 18:28:53 +03:00
Jonas Fonseca
9cd19d885f Remove unused add handler in the option_type_info struct
(cherry picked from commit 7fe7b42093)
2008-07-11 18:28:53 +03:00
Laurent MONIN
89acb8f534 INT/LONG: introduce long_wr() and long_set() and use them instead of
num_wr() and num_set() for options of type OPT_LONG.
(cherry picked from commit 9412cc77f0)
2008-07-11 18:28:53 +03:00
Kalle Olavi Niemitalo
a6f556d667 const in name_to_language
(cherry picked from commit 11e9a816f5)
2008-07-11 18:28:53 +03:00
Kalle Olavi Niemitalo
bd6c562a73 const in get_cp_index
(cherry picked from commit cb90ed94f0)
2008-07-11 18:28:52 +03:00
Kalle Olavi Niemitalo
b105694db3 const in decode_color
(cherry picked from commit f02e471762)
2008-07-11 18:28:52 +03:00
Kalle Olavi Niemitalo
2a1fb06d54 const in fastfind_search
(cherry picked from commit 3f508a9803)
2008-07-11 18:28:52 +03:00
Kalle Olavi Niemitalo
4c89e80c67 Make input data and source file names const in memacpy and stracpy.
(cherry picked from commit 176bbe83b6)
2008-07-11 18:28:51 +03:00
Kalle Olavi Niemitalo
20bc99173a Make many string parameters const in the memory leak detector.
(cherry picked from commit 882d179fc8)
2008-07-11 18:28:51 +03:00
Kalle Olavi Niemitalo
b7450c7095 Make errfile point to const.
(cherry picked from commit 251dcb7f9f)
2008-07-11 18:28:51 +03:00
Kalle Olavi Niemitalo
555dbf7da0 Bug 1027, SMJS: make null mean "none" in elinks.keymaps
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.
2008-07-11 16:41:14 +03:00
Kalle Olavi Niemitalo
783b52a41e NEWS: mention bug 1021 2008-07-04 22:46:32 +03:00
Kalle Olavi Niemitalo
bced779fdb Bug 1021: initialize version in http_got_header
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 5c0128d82d)
2008-07-04 22:40:58 +03:00
Kalle Olavi Niemitalo
19e2b5fd83 grafthistory: support curl
Mac OS X comes with curl (in the com.apple.pkg.BSD package)
but not with wget.
(cherry picked from commit 14cb43f403)
2008-07-03 11:41:34 +03:00
Kalle Olavi Niemitalo
332438b0c7 grafthistory: keep the downloaded pack, speed up git gc
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 d2c5aeb2c7)
2008-07-03 11:41:23 +03:00
Kalle Olavi Niemitalo
c6421966a7 grafthistory: comment about downloading the pack index
(cherry picked from commit 6139c2ffb5)
2008-07-03 11:41:08 +03:00
Kalle Olavi Niemitalo
80bb49dfff grafthistory: exit if a command fails
(cherry picked from commit bc42af691b)
2008-07-03 11:40:57 +03:00
Kalle Olavi Niemitalo
521a21d74e grafthistory: git-* commands are deprecated
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 31255d4a4d)
2008-07-03 11:40:46 +03:00
Kalle Olavi Niemitalo
cbb4f79818 THANKS: Remove link to HSTI webpage as the domain is for sale.
(cherry picked from commit 74e2b217b2)
2008-07-02 20:26:39 +03:00
Kalle Olavi Niemitalo
9f520d331d NEWS: 0.11.4 was released on 2008-06-20 2008-06-21 01:44:38 +03:00
Kalle Olavi Niemitalo
fa7f953d15 NEWS: unlist bogus "bug 451"
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.
2008-06-21 01:12:54 +03:00
Jonas Fonseca
08433c422c elinks-0.11.4.GIT 2008-06-20 22:16:36 +02:00
Jonas Fonseca
8015269e36 elinks-0.11.4 2008-06-20 21:58:14 +02:00
Jonas Fonseca
044021c532 Update manpages for 0.11.4 2008-06-20 21:57:12 +02:00