1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00
Commit Graph

2268 Commits

Author SHA1 Message Date
Miciah Dashiel Butler Masters
c22f38413e Decode the fragment identifier extracted from the URI when looking it up
This fixes a problem with fragment references that was reported
by Thomas Adam.
2006-12-05 18:06:47 +00:00
Thomas Adam
d90702aeca Fix crashes and problems with rerendering when preformatting with Ruby
This reverts baf7b0e91d:

	Fix segfaults caused by ruby scripting (gentoo bug #121247).

which reverted 5145ae266a:

	Change the Python, Ruby, and SEE hooks for pre-format-html to work
	properly now that they are given a non-NUL-terminated string.

and also makes the Ruby hooks interface generally use rb_str_new(str, len)
in favor of rb_str_new2(str) to avoid relying on NUL-terminated being
handled correctly by Ruby. Also, it was wrong for the preformat hook which
is not always handed a NUL-terminated string. Finally, the gentoo bug
(http://bugs.gentoo.org/show_bug.cgi?id=121247) is currently reopened which
suggests that the previous fix was not correct.
2006-12-04 23:45:40 +01:00
Thomas Adam
1951009a2d Lots of updates to hooks.rb
[jf: Merged from http://starshine.org/xteddy/thomas/elinks/hooks.rb]
2006-12-04 23:23:12 +01:00
Jonas Fonseca
685cb8d1a2 Bug 831: Make it possible to quote args given to -remote
This fixes the problem with URLs that contain commas and are passed to
ELinks using: -remote openURL(URL). Fixes bug 831.
2006-12-04 21:54:39 +01:00
Jonas Fonseca
45d82029be Add simple script to testing the various features of the -remote option
It should test the most important use cases.
2006-12-04 21:50:01 +01:00
Kalle Olavi Niemitalo
3a7798d72b split_line: Define text_end only ifdef CONFIG_UTF8.
If CONFIG_UTF8 is not defined, then text_end is not used, and GCC
could warn about that.  Because configure can add -Werror to CFLAGS,
the warning could then cause the whole build to fail.
2006-12-03 22:23:42 +02:00
Jonas Fonseca
640d73b7db Cast indentation counter to int to fix compilation on Mac OS X
The error was:

sgml-parser.c: In function 'print_indent':
sgml-parser.c:99: warning: field precision should have type 'int', but argument 2 has type 'long unsigned int'
2006-12-03 20:45:01 +01:00
Kalle Olavi Niemitalo
7894e30ace Bug 870: Don't panic if an SMJS property ID is unrecognized.
If ECMAScript code does obj[42], then the getProperty or setProperty
function of the JSClass of obj gets 42 as the property ID and must not
treat that as an internal error.
2006-12-03 12:07:07 +02:00
Kalle Olavi Niemitalo
aa410301f1 Bug 846: {get,set}Property check JS_InstanceOf without asserting.
The getProperty and setProperty functions of a JSClass must not assume
that the obj parameter points to an instance of that class.  It might
instead point to another object that merely has an instance of the
class in its prototype chain.  Thus, do not assert that JS_InstanceOf
returns true there.  Instead, run the check even with CONFIG_FASTMEM,
and just return JS_FALSE if it fails.
2006-12-03 11:17:48 +02:00
Kalle Olavi Niemitalo
c150331668 Bug 868: check_timers: Don't keep pointers to other timers past timer->func. 2006-12-02 21:00:32 +02:00
Kalle Olavi Niemitalo
d6a7360962 Merge with http://elinks.cz/elinks.git 2006-12-02 19:03:45 +02:00
Miciah Dashiel Butler Masters
711ee0a33f Fix horizontal scrolling of textareas when UTF-8 I/O is enabled
As draw_textarea_utf8 loops over each character of the textarea content, it
checks whether the character is on the screen; draws it if so; increments
the screen co-ordinate; and updates the position in the textarea text.
The last step was being skipped when the character was not on the line,
so a line would be drawn from the beginning, even if the left edge of the
textarea is off the screen.

Closes: Bug 835 - Text in textarea is unaffected by horizontal scrolling of
document in UTF-8 mode
2006-12-02 16:35:51 +00:00
Kalle Olavi Niemitalo
bddafe5f7e Document how timer callbacks erase timer IDs; add some assertions.
Tangential to bug 868.
2006-12-02 18:35:03 +02:00
Miciah Dashiel Butler Masters
5537a3f977 Improve performance with textareas + UTF-8 I/O
If utf8_char2cells isn't told where the string that contains
the given UTF-8 character ends, it computes that itself. Two users
of utf8_char2cells, format_textutf8 and split_line, were calling
utf8_char2cells in a loop without providing the end of the string,
resulting in numerous calls by utf8_char2cells to strlen.
With this patch, format_textutf8 and split_line each find the end
of the string once and provide it to utf8_char2cells.

This particularly improves performance with textareas, since
format_textutf8 is called multiple times each time the user interacts
with the textarea and when it must be redrawn.

Closes: Bug 823 - Big textarea is too slow with CONFIG_UTF8
2006-12-02 14:48:48 +00:00
Kalle Olavi Niemitalo
a3c27ee02e Merge with http://elinks.cz/elinks.git 2006-12-02 01:22:30 +02:00
Kalle Olavi Niemitalo
39e97921f7 smjs_action_fn_callback: Assert the type of the correct object.
We're calling JS_GetPrivate(ctx, fn_obj), so the JS_InstanceOf assertion
must also use fn_obj, rather than obj.

Reported by Miciah.
2006-12-02 01:15:07 +02:00
Kalle Olavi Niemitalo
f52d23c224 make install-doc installs doc/python.txt too. 2006-12-01 22:31:16 +02:00
Kalle Olavi Niemitalo
b3cbb0a915 Rename TXT_DOCS to TXT_DOCS_NOINSTALL.
By analogy with HTML_DOCS_NOINSTALL.
2006-12-01 21:38:06 +02:00
Jonas Fonseca
85e3a09470 Add a stupid test script to print CGI variables set by ELinks
To use it to test whether that CGI works put the following in your
elinks.conf:

      set protocol.file.cgi.policy = 1
      set protocol.file.cgi.path = "/path/to/elinks/test/cgi"

Then point ELinks to the print-vars.sh script inside the CGI test directory
in the ELinks source directory.
2006-11-30 20:46:10 +01:00
Jonas Fonseca
7e9fc6f33b 6 GB funny 2006-11-28 21:49:35 +01:00
Jonas Fonseca
9d43babde2 Fix out-of-bound access to the quote_char buffer
The quote_level was decremented unconditionally and could become negative
resulting in a negative index after applying "modulus 2". Reproducable
with an HTML file contianing "</q>".

Reported by paakku.
2006-11-26 22:32:02 +01:00
Kalle Olavi Niemitalo
7e52d23d2f Bug 846: Document the expected parents of form_elements_class instances.
This should have been in commit 36f5f73a60.
The corresponding commit e76e047196 in the
REL_0_10 branch does include it.
2006-11-26 17:35:33 +02:00
Kalle Olavi Niemitalo
d9604331b8 SMJS: keymap_get_property: fix build error
Fix an error in the order of variable initialisation that was introduced
in commit bbf0d478e9.
2006-11-26 15:37:24 +02:00
Miciah Dashiel Butler Masters
33ba13fcbc Comment fix: s/stricktest/strictest/
Fix a spelling error in a comment noted by Quiznos on IRC.
2006-11-26 12:43:45 +00:00
Miciah Dashiel Butler Masters
8617d69872 SMJS: keymap_set_property: fix build error
Fix an error in the order of variable initialisation that was introduced
in commit bbf0d478e9.
2006-11-26 12:43:45 +00:00
Kalle Olavi Niemitalo
b7a58b74f9 doc/Makefile: Don't install po/perl/ documentation. 2006-11-26 13:42:29 +02:00
Kalle Olavi Niemitalo
6299fb44e1 doc/Makefile: Move a semicolon outside ncmd invocation.
This apparently didn't cause any real problems, but the output of Make
looked suspicious.
2006-11-26 11:55:47 +02:00
M. Levinson
0c1ba7306f doc: Additional functionality for Python backend.
This should have been in commit ebadc9bf9e.
2006-11-26 11:37:51 +02:00
Kalle Olavi Niemitalo
15ea2b9b50 Bug 846: Add two more comments about how SMJS calls functions.
They should have been in commit 670ad939c3.
The corresponding commit fcebd6d111 in the
elinks-0.11 branch does include them.
2006-11-25 23:25:52 +02:00
Kalle Olavi Niemitalo
df546f79a3 doc/release.txt: What to do to bugs fixed in the new version. 2006-11-25 19:37:04 +02:00
Kalle Olavi Niemitalo
47dce0922b Bug 846: Add plenty of JS_InstanceOf assertions and checks. 2006-11-25 16:09:38 +02:00
Kalle Olavi Niemitalo
bbf0d478e9 Bug 846: Separate JS_GetParent & JS_GetPrivate calls from initializations.
This will allow the types of objects to be checked before those calls.
2006-11-25 15:55:25 +02:00
Kalle Olavi Niemitalo
98a120b3d5 Bug 846: Rename some local variables.
Rename parent to parent_win if it points to an instance of window_class.
2006-11-25 14:57:44 +02:00
Kalle Olavi Niemitalo
356678dd80 Bug 846: Document the JSClass assumed in each JS_{Set,Get}Private call. 2006-11-25 14:52:58 +02:00
Kalle Olavi Niemitalo
36f5f73a60 Bug 846: Document the expected parents of SMJS class instances. 2006-11-25 14:42:20 +02:00
Kalle Olavi Niemitalo
670ad939c3 Bug 846: Comments on the relations between JSClasses and functions. 2006-11-25 13:36:28 +02:00
Kalle Olavi Niemitalo
d6ea143f36 Bug 846: Document the private data in each SMJS class. 2006-11-25 13:19:35 +02:00
Petr Baudis
eab3cb762f ECMAScript: Fix a leak in case of setTimeout(..., 0)
identified by Jonas seconds after I pushed the original fix out. *blush*
2006-11-23 01:24:56 +01:00
Petr Baudis
a0bc4f7792 Merge with /srv/git/elinks.git 2006-11-23 01:18:06 +01:00
Jonas Fonseca
a370e7ccac Improve CPPFLAGS usage
CPPFLAGS was dropped[1] back on 2004-04-24. Then a workaround was
introduced by commit 6d7e9bfe5b to fix
compilation on FreeBSD that used CPPFLAGS to store iconv related flags.
The use of CPPFLAGS with respect to the COMPILE "macro" reappeared in
40e257bedd on 2006-08-05.

This commit makes configure.in print CPPFLAGS and LDFLAGS. Before,
CPPFLAGS and CFLAGS was mixed together in the feature summary. It also
restores the use of CPPFLAGS storing iconv related flags but keeps the
use of the SAVE/RESTORE_FLAGS in the iconv macro.

Reported by Daniel E. Macks <dmacks@netspace.org> on 2005-11-22 in a mail
to elinks-users with the ID: <slrnem7tjs.lvk.dmacks@happy.netspace.org>.

[1] http://pasky.or.cz/gitweb.cgi?p=elinks-history.git;a=commit;h=ebad0e71572b41dac5376e148fe4b1b5cb9ccc33
2006-11-22 20:16:18 +01:00
Petr Baudis
e66b6737db ECMAScript: Fix crash on setTimeout(..., 0) 2006-11-21 08:01:36 +01:00
Jonas Fonseca
c9701c80af Add a releast check list 2006-11-21 01:50:04 +01:00
Kalle Olavi Niemitalo
388de7bd65 Bug 841, CVE-2006-5925: Disable SMB earlier so that features.log is correct. 2006-11-18 22:17:58 +02:00
Kalle Olavi Niemitalo
f915c31127 Bug 841, CVE-2006-5925: Prevent enabling the SMB protocol.
src/protocol/smb/smb.c: Added #error directives so that this
vulnerable code cannot be accidentally compiled in.

features.conf: Disable CONFIG_SMB by default and explain why.

configure.in: If CONFIG_SMB is enabled, disable it and warn the user.
This is for people who have customized features.conf.
2006-11-18 20:39:01 +02:00
Jonas Fonseca
5571716abd Merge with git+ssh://pasky/srv/git/elinks.git 2006-11-18 11:23:47 +01:00
Jonas Fonseca
ca7a70b243 Revisit Ruby version checking fix
The version checking was recently reworked in commit
14d5ff3b17, however use of 'puts' is wrong
because it returns nil and thus always causes the check to exit with code
1.

The issue was brought up by dalias. Acked on IRC by Thomas Adam.
2006-11-18 11:23:24 +01:00
Miciah Dashiel Butler Masters
a90588debc Fix a grammatical error in the description for document.uri_passing
Suggested by Quiznos on IRC.
2006-11-15 20:08:02 +00:00
Miciah Dashiel Butler Masters
44537de0c4 SMJS (user): Add documentation on the available interfaces
Note that the interfaces may change at any time (which is the reason that
I've put off committing this file for so long).
2006-11-14 16:13:11 +00:00
Laurent MONIN
39771679b3 French translation was updated. 2006-11-14 14:46:23 +01:00
Miciah Dashiel Butler Masters
3c7354b135 Correct documentation for follow-url and goto-url
Synchronise the phrasing and mention in both that either NULL or an
empty, dynamically allocated string indicates that no URL should be loaded.
2006-11-14 00:24:20 +00:00