1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-19 01:36:33 -04:00
Commit Graph

3825 Commits

Author SHA1 Message Date
Kalle Olavi Niemitalo
6b05cdb3a0 1030: List the bug in NEWS.
(cherry picked from commit 295c7760f7)
2008-07-14 22:38:52 +03:00
Kalle Olavi Niemitalo
e287ca9265 1030: Wrap get_search_region_from_search_nodes in #ifdef HAVE_REGEX_H
This change avoids the following error:

gcc -DHAVE_CONFIG_H -I../../.. -I/home/Kalle/src/elinks-0.11/src -I/home/Kalle/prefix/include -I/usr/include/smjs -I/usr/include -I/usr/include/lua50 -I/usr/include -I/usr/include -O0 -ggdb -Wall -Wall -Werror -fno-strict-aliasing -Wno-pointer-sign -Wno-address -fno-strict-overflow -o search.o -c /home/Kalle/src/elinks-0.11/src/viewer/text/search.c
cc1: warnings being treated as errors
/home/Kalle/src/elinks-0.11/src/viewer/text/search.c:257: warning: 'get_search_region_from_search_nodes' defined but not used
make[3]: *** [search.o] Error 1
make[3]: Leaving directory `/home/Kalle/build/i686-pc-linux-gnu/elinks-0.11/src/viewer/text'

get_search_region_from_search_nodes is called only from
search_for_pattern, which already was inside #ifdef HAVE_REGEX_H.
(cherry picked from commit 2aec302d47)
2008-07-14 22:38:08 +03:00
Witold Filipczyk
e83f76b79e 1030: Fixed issue with undefined HAVE_REGEX_H.
(cherry picked from commit 442b0d83b0)
2008-07-14 22:36:52 +03:00
Kalle Olavi Niemitalo
386a5d517b Bug 698: Keep forms contiguous and non-overlapping and start from 0.
In document.forms, each struct form has form_num and form_end members
that reserve a subrange of [0, INT_MAX] to that form.  Previously,
multiple forms in the list could have form_end == INT_MAX and thus
overlap each other.  Prevent that by adjusting form_end of each form
newly added to the list.

Revert 438f039bda,
"check_html_form_hierarchy: Old code was buggy.", which made
check_html_form_hierarchy attach controls to the wrong forms.
Instead, construct the dummy form ("for those Flying Dutchmans") at
form_num == 0 always before adding any real forms to the list.
This prevents the assertion failure by ensuring that every possible
form_control.position is covered by some form, if there are any forms.

Add a function assert_forms_list_ok, which checks that the set of
forms actually covers the [0, INT_MAX] range without overlapping,
as intended.  Call that from check_html_form_hierarchy to detect
any corruption.

I have tested this code (before any cherry-picking) with:
- bug 613 attachment 210: didn't crash
- bug 714 attachment 471: didn't crash
- bug 961 attachment 382: didn't crash
- bug 698 attachment 239: all the submit buttons showed the right URLs
- bug 698 attachment 470: the submit button showed the right URL
2008-07-14 15:02:06 +03:00
Jonas Fonseca
46e76e0688 Minor documentation improvements 2008-07-13 15:25:41 +02:00
Kalle Olavi Niemitalo
ddd36cafb4 Bug 1029: List in NEWS. 2008-07-12 01:59:18 +03:00
Kalle Olavi Niemitalo
c5a012eca5 Bug 1029: Use JS_CallFunctionValue in keybinding.c
JS_CallFunction does not support closures in SpiderMonkey versions
earlier than 1.8.  Test case:

elinks.keymaps.main["\""] = function() {
    elinks.keymaps.main["e"] = function() {
	elinks.alert("hello!");
    };
}
2008-07-12 01:54:49 +03:00
Kalle Olavi Niemitalo
e3830cfd67 Bug 1029: Use JS_CallFunctionValue in elinks_object.c
JS_CallFunction does not support closures in SpiderMonkey versions
earlier than 1.8.  Test case:

function set_suffix(suffix) {
    elinks.preformat_html = function(cached, vs) {
	cached.content += suffix;
    }
}
set_suffix("hello");
2008-07-12 01:49:08 +03:00
Kalle Olavi Niemitalo
079b97d21b Bug 1026: Protect callback of elinks.load_uri from GC 2008-07-12 01:37:51 +03:00
Kalle Olavi Niemitalo
b2c387f1f4 Bug 1029: Use JS_CallFunctionValue in load_uri.c
JS_CallFunction does not support closures in SpiderMonkey versions
earlier than 1.8.  Test case:

elinks.keymaps.main["!"] = function() {
    elinks.load_uri("http://www.eldar.org/cgi-bin/fortune.pl?text_format=yes",
		    function (cached) { elinks.alert(cached.content); });
}
2008-07-12 01:24:51 +03:00
Kalle Olavi Niemitalo
988cec481b Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:

	NEWS
	configure.in

The following files also conflicted, but they had not been manually
edited in the elinks-0.12 branch after the previous merge, so I just
kept the 0.13.GIT versions:

	doc/man/man1/elinks.1.in
	doc/man/man5/elinks.conf.5
	doc/man/man5/elinkskeys.5
	po/fr.po
	po/pl.po
2008-07-11 22:28:45 +03:00
Kalle Olavi Niemitalo
12bb8fdfe7 NEWS: sync from 0.11.4.GIT
http://elinks.cz/release.html is generated from NEWS of elinks-0.12;
thus we should have all the news of 0.11.4.GIT here too.
2008-07-11 22:22:27 +03:00
Kalle Olavi Niemitalo
4649d0ccba Bug 951 should not be removed from NEWS before 0.12.0.
That's because the bug was in 0.11.4 as well.
2008-07-11 19:09:07 +03:00
Kalle Olavi Niemitalo
fd27acf784 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 17:08:35 +03:00
Kalle Olavi Niemitalo
1ab55c27a4 1008: make http_post.post_data point to const
Because init_http_post() now copies the file names,
http_read_post_inline() no longer writes '\0' into post_data.
2008-07-11 15:18:01 +03:00
Kalle Olavi Niemitalo
42123dab87 1008: percent-encode file names in uri.post
In uri.post, each file name begins and ends with FILE_CHAR.
Previously, file names were not encoded, and names containing
FILE_CHAR could not be used.  Because FILE_CHAR is a control
character, the user cannot directly type it in a file input field,
so ELinks asserted that the field did not contain FILE_CHAR.
However, it is possible to get FILE_CHAR in a file input field
with file name completion (ACT_EDIT_AUTO_COMPLETE), causing the
assertion to fail.  Now, ELinks encodes FILE_CHAR as "%02", so it
is no longer ambiguous and the assertion is not needed.
2008-07-11 14:44:35 +03:00
Kalle Olavi Niemitalo
50a3244dfb 1008: document the format of uri.string and uri.post 2008-07-11 14:20:47 +03:00
Miciah Dashiel Butler Masters
0c29175fd8 Revert a change that was mistakenly included in the last commit 2008-07-11 11:12:37 +00:00
Kalle Olavi Niemitalo
5251441fdc doc/smjs-scripting: add version info, rephrase risk 2008-07-10 21:11:45 +03:00
Kalle Olavi Niemitalo
9954d37a68 Move most of contrib/smjs/README into the manual.
Also document elinks.vs and elinks.action.

<kahmalo> Miciah: IMO most of contrib/smjs/README should be moved into
    the ELinks manual.  Specifically the parts that do not depend on
    contrib/smjs/hooks.js.  However manual.txt contains a notice:
    "Hold blameless the authors.  Any lawful use is allowed."  Will
    you allow that also for what is now in contrib/smjs/README?
<Miciah> Absolutely.
<Miciah> In fact, I would allow some lawless uses.
<Miciah> It seems a little silly to say that lawful uses are allowed.
2008-07-10 20:31:22 +03:00
Kalle Olavi Niemitalo
8ee5e8c4a1 Bug 951: Revert "Garbage-collect SMJS objects before flushing caches."
This reverts commit c33d195ff4.
ELinks no longer needs to collect garbage in this situation
because it can now free cache entries even if the corresponding
SMJS objects remain.
2008-07-08 15:21:07 +03:00
Kalle Olavi Niemitalo
06c39a8ac4 Bug 951: Lock the cache entry while the hook runs. 2008-07-08 15:20:38 +03:00
Miciah Dashiel Butler Masters
a3ad625122 Add newlines to some function signatures to comply with style standards
Make the signatures for lock_globhist_item, unlock_globhist_item,
is_globhist_item_used, and select_read comply with ELinks C style
guidelines.
2008-07-08 07:06:31 +00:00
Kalle Olavi Niemitalo
314a41588c Bug 951: weaken pointer from JSObject to cache_entry
The SpiderMonkey scripting module handles the "pre-format-html" event
by constructing a JSObject for the struct cache_entry and then calling
elinks.preformat_html(cache_entry, view_state) if such a function
exists.  The problem with this was that each such JSObject kept the
struct cache_entry locked until SpiderMonkey garbage-collected the
JSObject, even if the user had not defined an elinks.preformat_html
function and the JSObject was thus never needed at all.  To work
around that, the SpiderMonkey scripting module ran a garbage
collection whenever the user told ELinks to flush caches.

Remove the SpiderMonkey scripting module's use of object_lock and
object_unlock on struct cache_entry, and instead make the pointers
weak so that ELinks can free the cache_entry whenever it wants even if
a JSObject is pointing to it.  Each cache_entry now has a pointer back
to the JSObject; done_cache_entry calls smjs_detach_cache_entry_object,
which follows the pointer and detaches the cache_entry and the JSObject
from each other.

This commit does not yet remove the workaround mentioned above.
2008-07-07 23:24:43 +03:00
Kalle Olavi Niemitalo
01d5501228 po/Makefile: preset Project-Id-Version 2008-07-07 23:24:38 +03:00
Kalle Olavi Niemitalo
38779902a0 po/Makefile: removed && between commands
It is not necessary: when a rule has multiple commands in it, GNU Make
(which ELinks requires anyway) runs them one at a time, regardless of
the -j option, and skips the remaining commands when one of them
fails, regardless of the -k option.  These options take effect at the
level of targets rather than individual commands.
2008-07-07 23:24:34 +03:00
Kalle Olavi Niemitalo
8bd7d6b61a faq: rewording 2008-07-07 23:24:03 +03:00
Kalle Olavi Niemitalo
6c7986e118 faq: character droppings 2008-07-05 18:16:36 +03:00
Kalle Olavi Niemitalo
749dcb09ee po/Makefile: use xgettext --msgid-bugs-address
http://elinks.cz/community.html says bugs should be reported
to elinks-users but patches should be sent to elinks-dev.
I guess elinks-users is more appropriate here.
2008-07-05 18:12:42 +03:00
Kalle Olavi Niemitalo
3a978bd0d8 po/Makefile: put potfiles.list in build tree, not source
This is so that contrib/mkdist need not delete that explicitly
(although it still does, in order to do the right thing with
a few older versions too).

The file could apparently be removed altogether (see recent
emails on elinks-dev) but a small change like this is less
likely to cause any surprises.
2008-07-05 15:59:44 +03:00
Kalle Olavi Niemitalo
4ffe6a1b6d mkdist: include po/elinks.pot 2008-07-04 23:56:10 +03:00
Kalle Olavi Niemitalo
9c73f02083 NEWS: mention bug 1021, sync with 0.11.4.GIT
Because http://elinks.cz/release.html is made from this file,
I think we'll have to list both 0.11.4.GIT and 0.12pre1.GIT
even though it's a bit difficult to explain which fixes are
in which releases.
2008-07-04 23:01:42 +03:00
Kalle Olavi Niemitalo
5c0128d82d 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.
2008-07-04 16:42:35 +03:00
Kalle Olavi Niemitalo
aa681786d9 NEWS: list bug 955; add 0.12pre1.GIT section 2008-07-03 13:48:08 +03:00
Miciah Dashiel Butler Masters
5733f17856 goto_current_link: do nothing on input buttons
The following is in the HTML 4 standard
(<http://www.w3.org/TR/html401/interact/forms.html#push-button>):

    push buttons: Push buttons have no default behavior. Each push
    button may have client-side scripts associated with the element's
    event attributes. When an event occurs (e.g., the user presses the
    button, releases it, etc.), the associated script is triggered.

Currently, a button such created by such HTML as "<input type="button"
value="foo" />" submits the form by default in ELinks.  According to
the above, it shouldn't.
2008-07-03 13:48:08 +03:00
Witold Filipczyk
429e08e073 bug 955: Do not call onsubmit for RESET. 2008-07-03 13:48:07 +03:00
Jonas Fonseca
a5574ce37e Continue if a test fails 2008-07-03 01:55:03 +02:00
Jonas Fonseca
26e8e52f23 Fix sgml-parser so it compiles
The test does however segfault in the incremental parsing test.
2008-07-03 01:45:45 +02:00
Kalle Olavi Niemitalo
3f8dee5a5e AUTHORS: Taking credit. 2008-07-02 20:35:09 +03:00
Kalle Olavi Niemitalo
14cb43f403 grafthistory: support curl
Mac OS X comes with curl (in the com.apple.pkg.BSD package)
but not with wget.
2008-07-02 20:31:11 +03:00
Kalle Olavi Niemitalo
45f237a26c release: more like what I actually did with 0.12pre1
In particular:
- mkdist takes options and need not be run at elinks.cz
- git push just the single tag, rather than all --tags
- explicitly avoid multipart/signed
- add the release date from the elinks-users archive to NEWS
- update download.txt, release.html, and bugzilla/milestones/elinks.html
2008-07-02 01:06:43 +03:00
Kalle Olavi Niemitalo
d5dcdb4d92 mkdist: separate md5 file for each file
md5sum -c exits with code 1 if some of the files listed in the md5
file are missing, so each md5 file should list only those files that
the user is supposed to download together.  This is also how
elinks-web/download.html has been set up.
2008-07-02 01:06:43 +03:00
Jonas Fonseca
0fa88b1c05 Update Danish translation 2008-07-01 15:13:54 +02:00
Kalle Olavi Niemitalo
26a0afd8ae NEWS: 0.12pre1 was released on 2008-07-01 2008-07-01 15:31:39 +03:00
Kalle Olavi Niemitalo
8493d6c021 ELinks 0.12pre1.GIT 2008-07-01 03:16:25 +03:00
Kalle Olavi Niemitalo
c0ef72117d ELinks 0.12pre1 2008-07-01 03:11:44 +03:00
Kalle Olavi Niemitalo
d2a263ad4f NEWS: remove commented-out sections 2008-07-01 03:02:38 +03:00
Kalle Olavi Niemitalo
9b7de0a039 mkdist: create git-commit-id instead of .git/HEAD
.git/HEAD in elinks-0.12pre1.tar.gz broke git-import-orig in Debian's
git-buildpackage 0.4.33:

$ git init
Initialized empty Git repository in .git/
$ git-import-orig ~/src/elinks-seek/elinks-0.12pre1.tar.gz
Upstream version is 0.12pre1
Initial import of '/home/Kalle/src/elinks-seek/elinks-0.12pre1.tar.gz' ...
fatal: bad object HEAD
Traceback (most recent call last):
  File "/usr/bin/git-import-orig", line 243, in <module>
    sys.exit(main(sys.argv))
  File "/usr/bin/git-import-orig", line 201, in main
    import_upstream_tree(repo, orig_dir, version, options.filters, verbose=not is_empty)
  File "/usr/bin/git-import-orig", line 65, in import_upstream_tree
    if replace_source_tree(repo, src_dir, filters, verbose=True):
  File "/var/lib/python-support/python2.5/gbp/git_utils.py", line 145, in replace_source_tree
    return not repo.is_clean()[0]
  File "/var/lib/python-support/python2.5/gbp/git_utils.py", line 78, in is_clean
    if out[0].startswith('#') and out[1].strip().startswith(clean_msg):
IndexError: list index out of range

So let's try with a "git-commit-id" file outside of .git/ instead.
I also considered ".git-commit-id" but that could give the impression
that Git itself reads the file for some purpose.
2008-07-01 02:50:27 +03:00
Kalle Olavi Niemitalo
ac7d17352a INSTALL: autoconf-2.13 has not been supported for a while 2008-07-01 02:21:46 +03:00
Kalle Olavi Niemitalo
57c2e9e9ba Remove Cogito from ChangeLog and INSTALL too
Git does not appear to have anything like cg clone -s, which makes the
clone in the current directory rather than in a new directory.  It
seems possible to work around that with:

git clone --bare http://elinks.cz/elinks.git .git
git --git-dir=.git config core.bare false
git reset --hard
git clean -f
git checkout elinks-0.12

but that's already so complex that I think it'll be easier to just
remove the whole directory and clone to a new one.

The whole concept of first downloading a snapshot and then updating
that from version control comes from the time when ELinks was in CVS.
It made sense then because CVS could download deltas based on the data
in the CVS subdirectories contained in the snapshots.  However, Git
wants to get the whole history and does not benefit from having the
files of a single commit available in advance.
2008-07-01 02:17:51 +03:00