1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-13 00:38:32 -04:00
Commit Graph

1674 Commits

Author SHA1 Message Date
Witold Filipczyk
4e93cbf496 Added the keybinding ('R' by default) for reading documents out using
the festival program. ELinks automatically scrolls down when read line
is at the bottom of the page. Press 'R' for start or stop reading.
2006-12-11 18:48:44 +01:00
Jonas Fonseca
f90c07d54f Make it possible to request only the password component of an URI
Before it was only to get the password when the user name was also
requested.  This fixes FSP access to password protected directories.

The problem was discovered by Witold and mentioned in the post to
elinks-dev with the message-id: <20061209204151.GA32758@pldmachine> on
2006-12-09.
2006-12-10 21:46:32 +01:00
Jonas Fonseca
b527fcb308 Merge with git+ssh://pasky/srv/git/elinks.git 2006-12-10 18:24:58 +01:00
Jonas Fonseca
a89ab52ebd Start writing a DOM stack 101 2006-12-10 18:24:34 +01:00
Kalle Olavi Niemitalo
3988ab97cc about_protocol_handler: Don't define len if CONFIG_SMALL.
It is not used if CONFIG_SMALL is defined, and GCC complained about this.
With -Werror added by --enable-debug, the whole build failed.
2006-12-10 17:16:38 +02:00
Kalle Olavi Niemitalo
a46afea662 Bug 887: Fix the CONFIG_SMALL version of CANNOT_SAVE_COOKIES.
It had fewer parameters than the !CONFIG_SMALL version does, and this
caused compilation to fail.
2006-12-10 17:14:49 +02:00
Kalle Olavi Niemitalo
846a8f9a4e Bug 846, SEE: Add checktype.c and checktype.h.
These should have been in commit 8bc3d7a798.
2006-12-10 17:12:27 +02:00
Kalle Olavi Niemitalo
a193632187 Make html_context.quote_level unsigned.
Continuation of 7e9fc6f33b.
2006-12-10 14:14:16 +02:00
Miciah Dashiel Butler Masters
7db8abf6e7 Use document->cached in document_info_dialog and l_current_document
Now the currently displayed version of the current document,
rather than the latest version of the current document, will be used
for the document info box and the current_document() Lua function.
2006-12-10 03:14:36 +00:00
Miciah Dashiel Butler Masters
e523504424 Add .cached to struct document
This allows code to use document->cached instead of
find_in_cache(document->uri), thereby increasing the likelihood
of getting the correct cache entry.

This should fix Bug 756 - "assertion (cached)->object.refcount >= 0 failed"
after HTTP proxy was changed.

Patches for this were written by me and then later by Jonas.
This commit combines our independent implementations.
2006-12-10 03:11:04 +00:00
Jonas Fonseca
a8de4f4832 Merge with git+ssh://pasky/srv/git/elinks.git 2006-12-10 01:30:31 +01:00
Jonas Fonseca
93e9cf089e DOM: Change code documentation to be Doxygen "compliant" 2006-12-10 01:17:35 +01:00
Kalle Olavi Niemitalo
8bc3d7a798 Bug 846, SEE: Check thisobj->objectclass before casting. 2006-12-10 01:09:06 +02:00
Jonas Fonseca
4d248638be Remove empty first lines; a remnant from when CVS Id tags was in play 2006-12-09 22:54:22 +01:00
Kalle Olavi Niemitalo
9efc661384 Bug 827: Force UTF-8 I/O on if the UTF-8 charset is selected. 2006-12-09 21:13:13 +02:00
Kalle Olavi Niemitalo
432969a3a9 Bug 788: Define n_a variables if the POPpx macro of Perl needs them.
The configure script checks whether it is possible to compile a use of
POPpx without an n_a variable; if not, the source code then defines
those variables.  This is slower than including Perl's patchlevel.h
and comparing the version numbers to 5.8.8 but I expect this to be
more reliable as well.
2006-12-09 20:26:06 +02:00
Kalle Olavi Niemitalo
e815e07179 Bug 887: save_cookies reports errors if requested by the user. 2006-12-09 18:27:40 +02:00
Kalle Olavi Niemitalo
7551be3194 Bug 887: save_cookies ignores cookies_dirty if requested by the user. 2006-12-09 18:23:41 +02:00
Kalle Olavi Niemitalo
47a2fc19e1 Bug 887: New function secsave_strerror.
Extracted from write_config_dialog.
2006-12-09 18:14:28 +02:00
Kalle Olavi Niemitalo
3cd0fbe5f0 Bug 886: Set cookies_dirty if a cookie is edited via the manager.
If the appropriate option is set, this now causes the cookies to be
immediately saved as well.
2006-12-09 16:41:53 +02:00
Kalle Olavi Niemitalo
fad9c75cc6 Bug 886: Update cookies_dirty after delete_cookie calls as appropriate. 2006-12-09 16:41:28 +02:00
Kalle Olavi Niemitalo
b79210ea1b Bug 886: Postpone resaving the cookies until a bottom half. 2006-12-09 16:40:04 +02:00
Kalle Olavi Niemitalo
8ecf105cd5 Bug 886: Document why delete_cookie does not set cookies_dirty. 2006-12-09 15:03:08 +02:00
Kalle Olavi Niemitalo
469ab151cd Document the c_domains and cookie_servers lists. 2006-12-09 14:31:58 +02:00
M. Levinson
78bd416dc0 Bug 880: Prevent SIGSEGV in init_python when -no-home is used.
Before this patch, init_python would crash trying to set up elinks.home
at the Python side.  Now it uses None as the value in that case.
Also, init_python no longer adds "(null)" to $PYTHONPATH.
2006-12-08 19:59:41 +02:00
Miciah Dashiel Butler Masters
1442f551aa Simplify init_dom_renderer, drop get_css_property 2006-12-08 15:02:59 +00:00
Kalle Olavi Niemitalo
d731fe2db0 Renumber all tinyids of SMJS properties to negative integers.
This change does not fix any bug, but the SMJS builtin classes use
negative tinyids already, so I presume this is the preferred practice.
At least it means the tinyids won't have to be renumbered later if
some of these objects are changed to behave as arrays.
2006-12-06 23:09:14 +02:00
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
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
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
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
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
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
Petr Baudis
e66b6737db ECMAScript: Fix crash on setTimeout(..., 0) 2006-11-21 08:01:36 +01: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
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
Kalle Olavi Niemitalo
24dbdbe899 Bug 830: Check -remote command names more strictly.
doc/remote.txt says there must be a nonempty sequence of ASCII
alphabetic characters before the opening parenthesis.  Check that
they really are ASCII characters and that the sequence is nonempty.
Thus, elinks -remote '(foo)' now treats the string as an address,
rather than as a command.
2006-11-14 00:22:06 +02:00
Kalle Olavi Niemitalo
8b8cd57941 Use new macro UCS_ORPHAN_CELL for broken double-cell characters.
UCS_ORPHAN_CELL is currently defined as U+0020 SPACE, which was
already used before this macro, so the behaviour does not change,
but the code seems clearer now.

I searched for ' ' and 32 and 0x20 and \x20, and replaced with
UCS_ORPHAN_CELL wherever UCS_NO_CHAR was involved.  However,
some BFU widgets first draw spaces and then overwrite with text;
those will require a more complex fix if UCS_ORPHAN_CELL is ever
changed to some other character.
2006-11-13 00:49:59 +02:00
Jonas Fonseca
89fd7efa3a Fix misparsing of -remote URLs containing parenthesis (bug 830)
Be more strict about the format accepted by the ELinks specific extension
to the -remote URL syntax. That is, commands must begin with a nonempty
sequence of ASCII alphabetic characters followed by optional whitespace and
an opening parenthesis. Also, document the syntax.

Fixes bug 830.
2006-11-12 18:49:05 +01:00
Kalle Olavi Niemitalo
cb02b46154 Bug 153: Refer to the bug from the docstring of bookmarks.file_format.
When I first read the warning about "NO NATIONAL CHARS SUPPORT!"
I was amazed: XML is based on Unicode, so why would the authors of the
XBEL specification have botched support for those characters?  The bug
is actually in the ELinks implementation of XBEL, and it has already
been entered in the ELinks bugzilla.  Make the documentation string
refer to that.
2006-11-12 18:47:07 +02:00
Kalle Olavi Niemitalo
7809efa1b5 Names of enum constants should be in upper case.
Requested by Miciah.
2006-11-12 14:51:18 +02:00
Kalle Olavi Niemitalo
40b6edc69d u2cp_: Make the no_nbsp_hack parameter an enum.
This is from attachment 279 of bug 811.  The change does not yet
affect any visible behaviour.
2006-11-12 14:29:09 +02:00
Kalle Olavi Niemitalo
c283b128b6 Bug 387: Treat &#013; inside <pre>...</pre> as a newline.
Recognize all of &#13; &#10; &#xA; &#xD; with any number of leading
zeroes.  (Previously only &#13; and &#x0A; were supported.)  All of
these are case insensitive.

Treat each CR+LF combination (&#13;&#10;) as a single newline.
2006-11-11 20:31:25 +02:00
Kalle Olavi Niemitalo
18f30e7886 decompress_data: Always initialize to_read, avoiding a GCC warning.
"'to_read' may be used uninitialized in this function" was a false warning
but removing it will make important warnings easier to see.
2006-11-11 14:12:39 +02:00
Miciah Dashiel Butler Masters
810a1fc591 data_compress: fix problem with decompression after recent change
Fix bug 834 (various gzip-encoded documents were being truncated),
which I introduced with commit e441361f2c.

Thanks to Witek for reporting the bug, Kalle for determining the
problematic commit, and Jonas for letting me know about the bug report(!).
2006-11-10 15:57:23 +00:00
Jonas Fonseca
f9d3824c65 Make get_fragment_content_type static 2006-11-06 18:09:11 +01:00
Laurent MONIN
cceb7b9be8 Add a missing parenthesis in option description. 2006-11-06 16:59:13 +01:00
Jonas Fonseca
b61d8d06d9 Fix crashes with various bogus BitTorrent URLs
... mainly bittorrent:// and bittorrent://x

The BitTorrent URL is supposed to contain an embedded URL pointing to a
metainfo file. If this is not the case a "custom" error message will be
shown. Also fixes calling of free_list() on an uninitialized list.

Closes bug 729.
2006-11-06 16:24:07 +01:00
Laurent MONIN
7585eedd2e Compilation fix: _GNU_SOURCE has to be defined on GNU platforms to get
strcasestr().
2006-11-06 15:27:54 +01:00
Jonas Fonseca
f33d9b004d Fix handling of links using file://localhost/
A simple "update" of Hugo Haas' patch posted for bug 107. This of course
also affects the (undocumented?) feature of file:// refering to the local
directory in that directories named "localhost" can no longer be displayed
using file://localhost. Nobody should do that anyway.
2006-11-06 05:43:48 +01:00
Jonas Fonseca
0ac97979a2 Fix warning from last patch 2006-11-06 05:35:57 +01:00
Jonas Fonseca
3ea73da7df Add support for more graceful detection of HTML content
It will grab at the first fragment of the cache entry and try to detect the
content-type by looking for valid HTML. It is very stupid for now, simply
searching for "<html>", which may be bogus in certain circumstances. And I
am not sure if this is better left out and up to the scripting backends,
e.g. SMJS can now modify the cache entry.

A feable fix for bug 396.
2006-11-06 05:15:50 +01:00
Jonas Fonseca
58c83a9f48 Never show empty filename in the what-to-do dialog
This fixes the last comment of bug 396.
2006-11-06 04:55:26 +01:00
Petr Baudis
6390c327aa Turn terminal transparency off by default
The problem is that if you run elinks in xterm with the default white
background, it will be totally unreadable if transparency is turned
on. We should default to usability in all common environments, eyecandy
lovers can do the extra setup for their specific one.

It also makes the description note that elinks still assumes the
background is black.
2006-11-05 16:28:53 +01:00
Miciah Dashiel Butler Masters
78946fd723 Merge with git+ssh://pasky.or.cz/srv/git/elinks.git 2006-11-05 05:34:12 +00:00
Rich Felker
d2b8e06f41 gzip_read: always call gzclearerr
This is necessary when using a POSIX-compliant stdio implementation, which
will set the FILE error flag when input from the pipe is exhausted, causing
all subsequent reads to fail.
2006-11-05 04:53:42 +00:00
Miciah Dashiel Butler Masters
dfbbde1952 decompress_data: move a comment
This should have been done in commit e441361f2c.
2006-11-05 04:24:48 +00:00
Miciah Dashiel Butler Masters
6f8f41e20d decompress_data: change initial malloc size, drop init variable
Adjust the size of to_read for the initial read instead of setting the init
flag and using that later to check whether to read a smaller amount than
the value in to_read. This also affects the realloc call on the initial
read, which was allocating more memory than necessary (altho this
discrepency would be corrected with the realloc for the next read).
2006-11-05 04:21:52 +00:00
Miciah Dashiel Butler Masters
e441361f2c decompress_data: make the current state more explicit
Introduce and use the local variable state instead of determining the
current state from to_read. Localise to_read to the loop.
2006-11-05 03:42:16 +00:00
Miciah Dashiel Butler Masters
157b08609f decompress_data: remove some unnecessary code 2006-11-05 03:17:30 +00:00
Petr Baudis
8ecf87b7b7 setTimeout: Fix da assert
Yeah, Miciah, I'm an idiot, don't walk around the fact.
2006-11-05 01:13:29 +01:00
Petr Baudis
da5ec748b6 setTimeout: kill previous timer when planting a new one
Otherwise if the page installs multiple timers the old one would live
on unreferenced and possibly (likely) trigger after the document's death
and everything would go to hell.
2006-11-05 00:53:04 +01:00
Petr Baudis
74997f772c setTimeout: A more sensibel assert 2006-11-05 00:35:04 +01:00
Petr Baudis
a1866332d3 Merge with /srv/git/elinks.git 2006-11-04 13:20:36 +01:00
Petr Baudis
a3a85ef453 setTimeout: Second try to fix timer crashes 2006-11-04 13:20:29 +01:00
Jonas Fonseca
180c8befac Fix linker warning on Mac OS X by prefixing locale_charset with "elinks_"
/usr/bin/ld: warning multiple definitions of symbol _locale_charset
lib.o definition of _locale_charset in section (__TEXT,__text)
/usr/lib/libiconv.dylib(localcharset.o) definition of _locale_charset
2006-11-04 08:46:45 +01:00
Kalle Olavi Niemitalo
eb2c64633c Revert c9ce4260e5 (broke URLs as -remote arguments)
Revert commit c9ce4260e5,
which made "elinks -remote http://elinks.cz/" fail with an error
"ELinks: Cannot parse option -remote: Remote method not supported"
even though doc/remote.txt says it should open the URL in a new tab.
2006-11-04 05:06:50 +02:00
Miciah Dashiel Butler Masters
a001cfda17 Rewrite the description for document.cache.revalidation_interval again 2006-11-04 02:23:22 +00:00
Petr Baudis
cd197170d7 Fix wrongly placed -1 ;-) 2006-11-03 20:19:43 +01:00
Petr Baudis
847feea09e setTimeout: Kill timer when it timed out, fixes random crashes 2006-11-03 20:18:31 +01:00
Petr Baudis
c7863324e0 Support for document.cache.interval (set it to -1) and rename it
...to document.cache.revalidation_interval. Moreover, -1 is the default
now.
2006-11-03 19:56:55 +01:00
Petr Baudis
5af21a8d29 Fix perl pre_format_html hook wrt. binary files
When trying to view a binary file, this hook would cut it at the first
'\0'.
2006-11-03 19:22:58 +01:00
Petr Baudis
b8d8d27df4 Fix spurious gcc warning 2006-11-03 19:22:14 +01:00
Kalle Olavi Niemitalo
97f2ca5166 draw_char_data: Document the dubious unicode_to_cell call.
This was found while examining bug 821.
2006-11-02 09:23:59 +02:00
Miciah Dashiel Butler Masters
061e3aeab5 Eliminate one more unnecessary recomputation in the plaintext parser 2006-11-01 06:38:31 +00:00
Miciah Dashiel Butler Masters
2430de30f4 Eliminate some unnecessary recomputation in the plaintext parser 2006-11-01 01:35:47 +00:00
Miciah Dashiel Butler Masters
d0d03d37bb Fix overflow in the plaintext parser
Remove a bogus cell++ that was added in commit
161ccf9eae. This fixes an overflow when
loading binary files, which was making pasky sad.
2006-11-01 01:19:50 +00:00
Kalle Olavi Niemitalo
a0ed52e699 Bug 724: Quadruple ITRM_IN_QUEUE_SIZE from 16 to 64 bytes.
DEC VT510 can apparently send 46 bytes of device attributes.
2006-10-30 23:15:43 +02:00
Kalle Olavi Niemitalo
b7319a75db Bug 724: terminal: Correct parsing of ECMA-48 control sequences.
The previous version assumed the first non-digit after the CSI was the
Final Byte, for example the first semicolon in the "\E[?1;2c" report.
It then treated all subsequent bytes as typed characters.
According to Standard ECMA-48 (Fifth Edition - June 1991), there may
be any number of Parameter Bytes in the range 0x30 to 0x3F, and then
any number of Intermediate Bytes in the range 0x20 to 0x2F, between
the CSI and the Final Byte.

This version still does not support control sequences longer than
ITRM_IN_QUEUE_SIZE bytes.
2006-10-29 18:41:16 +02:00
Kalle Olavi Niemitalo
23ca645054 terminal: Treat ESC O as Alt-O if the next byte is unsuitable for SS3. 2006-10-29 18:27:54 +02:00
Witold Filipczyk
d2006fd3dd Always terminate ELinks when using -remote.
The side effect: ELinks doesn't clear screen with -remote 'openURL(...)'.
2006-10-27 18:59:36 +02:00
Miciah Dashiel Butler Masters
6a53f92179 SMJS (doc): Don't signal an error when assigning to window.status 2006-10-26 20:30:26 +00:00
Witold Filipczyk
c9ce4260e5 elinks -remote 'ping' says:
ELinks: No remote session to connect to.
but should say:
ELinks: No running ELinks found.
2006-10-26 21:01:01 +02:00
Witold Filipczyk
4bf3e2693b "If-Modified-Since" second approach.
Added document.cache.interval option. When time elapsed since previous access
to the document is less than interval then the document is taken from
the cache. Otherwise the request with filled "If-Modified-Since" and/or
"If-None-Match" header field is sent. By default interval is set to 10 minutes.
This requires the correct time to be set on your machine.
2006-10-26 11:53:30 +02:00
Kalle Olavi Niemitalo
1c5db85b1a Bug 821: Document the charsets of buffers for BFU and form input fields. 2006-10-25 19:46:01 +03:00
Witold Filipczyk
f4e66f1fc6 ECMAScript: added writeonly property window.status 2006-10-24 20:41:25 +02:00
Witold Filipczyk
6e08e1bf5d ECMAScript: Probably superfluous kill_timer. Removed unused include. 2006-10-24 19:10:10 +02:00
Witold Filipczyk
2fe0623298 Moved the setTimeout timer to the struct document. 2006-10-24 16:47:41 +02:00
Witold Filipczyk
c76ce39a87 SpiderMonkey: added setTimeout. 2006-10-24 15:52:44 +02:00
Witold Filipczyk
e5e6727e81 SEE: setTimeout is a window object method. 2006-10-24 15:33:14 +02:00
Witold Filipczyk
5521ab2910 Merge with git+ssh://pasky.or.cz/srv/git/elinks.git 2006-10-23 23:10:05 +02:00
Witold Filipczyk
cc4d02b0ae SEE: Added setTimeout function. 2006-10-23 22:45:55 +02:00
Kalle Olavi Niemitalo
4076759890 Bug 821: With CONFIG_UTF8 and UTF-8 I/O, form_state.value is in UTF-8.
That is even if the document and the terminal have some other charset.
2006-10-23 23:01:47 +03:00
M. Levinson
50b6a61f31 Another fix for Python backend. 2006-10-22 18:45:45 +02:00
Witold Filipczyk
ac1913ff85 Merge with git+ssh://pasky.or.cz/srv/git/elinks.git 2006-10-22 18:36:42 +02:00
Kalle Olavi Niemitalo
2fd8538a72 Bug 821: kbd_field: CONFIG_UTF8 does not mean widget_data->cdata is UTF-8.
The current rules are:

             term.utf8
CONFIG_UTF8  UTF-8 I/O  widget_data.cdata
-----------  ---------  ------------------
undefined    disabled   charset of the terminal
undefined    enabled    charset of the terminal
defined      disabled   charset of the terminal (*)
defined      enabled    always UTF-8

(*) kbd_field was incorrectly assuming UTF-8 in this case.
2006-10-22 17:18:26 +03:00
Kalle Olavi Niemitalo
d050cb67aa Revert the use of wcwidth() and describe why.
This reverts the following commits:
- 86ed79deaf
  Use wcwidth if available and applicable.
- 304f5fa1ea
  comment fix (__STDC_ISO_10646__, not __STDC_ISO_10646)
- part of 71eebf1cc7
  Compensate for glibc not defining wcwidth() when _XOPEN_SOURCE is not set
And adds a lengthy comment about LC_CTYPE problems.
2006-10-22 00:05:37 +03:00
Witold Filipczyk
c87186e156 Merge with git+ssh://pasky.or.cz/srv/git/elinks.git 2006-10-21 13:55:45 +02:00
Miciah Dashiel Butler Masters
f7fba1b8e4 Use DNS_ERROR instead of -1 where appropriate 2006-10-20 23:10:36 +00:00
Miciah Dashiel Butler Masters
3041ef5ff1 Use foreachbacksafe in shrink_format_cache
I hope that it isn't too confusing to re-use the local variable next
with foreachbacksafe.
2006-10-20 23:10:35 +00:00
Miciah Dashiel Butler Masters
28261fcfba check_dialog: compare return value from widget handlers explicitly
Explicitly compare the value that is returned by the widget handler
against EVENT_NOT_PROCESSED rather than relying on the fact that
EVENT_NOT_PROCESSED is equal to 1.
ffeedbdc5045a6a5db2bc75ecaab56bfe46c80ea
2006-10-20 23:10:35 +00:00
Miciah Dashiel Butler Masters
5605a046a7 handle_interlink_event: don't check whether key <= 0xFF
This is a given, because any value >= 0x100 is negated.
2006-10-20 23:10:34 +00:00
Miciah Dashiel Butler Masters
8957379319 tree_dup: call object_nolock on the cloned children of the new tree 2006-10-20 23:10:33 +00:00
Witold Filipczyk
68913c8c7d Oh, sorry. I forgot about these. 2006-10-19 16:20:26 +02:00
M. Levinson
ebadc9bf9e Additional functionality for Python backend. 2006-10-19 15:21:39 +02:00
Petr Baudis
10d72cae7e Revert cfce869a69 (The UTF-8 detection reactivated.)
Total crap - spits out garbage on random terminals when attaching instances
and sometimes hang the attached instance.
2006-10-16 23:12:35 +02:00
Jonas Fonseca
9b5446a025 Fix warning about undefined sscanf on Mac OS X 2006-10-14 05:12:23 +02:00
Laurent MONIN
3e5b4b7adf Fix whitespace goof reported by Miciah on IRC, introduced in
947c1730a6.
2006-10-13 15:08:52 +02:00
Petr Baudis
9c8fff1100 Merge with /srv/git/elinks.git 2006-10-12 23:44:12 +02:00
Petr Baudis
71eebf1cc7 Compensate for glibc not defining wcwidth() when _XOPEN_SOURCE is not set 2006-10-12 23:43:49 +02:00
Witold Filipczyk
8d6a73646b Commented code related to "If-Modified-Since" (infinite loop). 2006-10-12 14:07:58 +02:00
Witold Filipczyk
cfce869a69 The UTF-8 detection reactivated. It trashes slightly screen,
but works probably.
2006-10-12 13:13:10 +02:00
Petr Baudis
647db326fb Merge with /srv/git/elinks.git 2006-10-12 11:11:05 +02:00
Petr Baudis
f06aed0d8f More verbose assert messages for invalid h1/h2 in POST buffer 2006-10-12 11:10:41 +02:00
Laurent MONIN
49c5299f89 Merge with git+ssh://pasky.or.cz/srv/git/elinks.git 2006-10-12 09:32:44 +02:00
Witold Filipczyk
eef961e206 Detection of UTF-8 mode doesn't work well on slave terminals. 2006-10-11 21:13:43 +02:00
Laurent MONIN
947c1730a6 Fix crash due to untested null pointer occuring when doing
HTTP_PROXY=8080:proxy.ucv.cl elinks http://wwww.google.cl. Thanks to
Karel Zak.
2006-10-11 14:44:39 +02:00
Laurent MONIN
09991b59f1 Partial Afrikaans translation was added. Thanks to Friedel Wolff. 2006-10-11 14:39:04 +02:00
Witold Filipczyk
cc6c59d932 Handling If-Modified-Since. 2006-10-08 16:24:47 +02:00
Miciah Dashiel Butler Masters
7f0fb0440c Secure file saving: restore umask after _all_ failure conditions
The secure file saving code plays some shenanigans with the umask.
Previously, the code could fail to restore the old umask when certain libc
calls failed: malloc, mkstemp, fdopen, and fopen. This resulted in
unrelated code creating files with the wrong umode. Specifically, the
download code's automatic directory creation was creating directories
without the execute permission bit.

Thanks to Quiznos for reporting and helping to track the problem down.
2006-10-01 14:57:47 +00:00
Witold Filipczyk
461787013b Revert commit 7cb91c3213. Doble glyphs should
be displayed correctly.
2006-10-01 16:08:52 +02:00
Laurent MONIN
e86e1d0fa3 Trim some trailing whitespaces. 2006-09-29 00:07:54 +02:00
Laurent MONIN
0b58b99d30 Use @current_tab for current tab. 2006-09-28 23:58:26 +02:00
Laurent MONIN
3f94687e28 Use @tabs_count instead of mixed tabs_count, num_tabs or tabs. 2006-09-28 23:50:46 +02:00
Kalle Olavi Niemitalo
bac6e76c23 switch_to_tab: Prevent "tab number out of range" assertion failure.
To reproduce:
- Start ELinks.
- Enable the ui.tabs.wraparound option.
- Press t to open a second tab.
- Go to http://elinks.cz/ in the second tab.
- Press 3< to step three tabs to the left.

In the statement "tab = tabs + tab % tabs;", tab == -2 and tabs == 2.
So tab % tabs == 0 and tab becomes 2, which is out of range.

The new version calls get_opt_bool even if the tab parameter is already in
range, but the cost should be negligible compared to the redraw_terminal()
call that follows.
2006-09-27 21:29:27 +03:00
Witold Filipczyk
86bc6a534b Should be visible not location. 2006-09-26 19:40:59 +02:00
Kalle Olavi Niemitalo
c33d195ff4 Garbage-collect SMJS objects before flushing caches. 2006-09-25 23:43:32 +03:00