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

222 Commits

Author SHA1 Message Date
Kalle Olavi Niemitalo
34f8f6a58f Merge branch 'elinks-0.12' into master
Conflicts:
	NEWS (merged)
	configure.in (merged)
	doc/man/man1/elinks.1.in (regenerated)
	doc/man/man5/elinks.conf.5 (regenerated)
	doc/man/man5/elinkskeys.5 (regenerated)
	po/af.po (used elinks-0.12)
	po/be.po (used elinks-0.12)
	po/bg.po (used elinks-0.12)
	po/ca.po (used elinks-0.12)
	po/cs.po (used elinks-0.12)
	po/da.po (used elinks-0.12)
	po/de.po (used elinks-0.12)
	po/el.po (used elinks-0.12)
	po/es.po (used elinks-0.12)
	po/et.po (used elinks-0.12)
	po/fi.po (used elinks-0.12)
	po/fr.po (used master)
	po/gl.po (used elinks-0.12)
	po/hr.po (used elinks-0.12)
	po/hu.po (used elinks-0.12)
	po/id.po (used elinks-0.12)
	po/is.po (used elinks-0.12)
	po/it.po (used elinks-0.12)
	po/lt.po (used elinks-0.12)
	po/nb.po (used elinks-0.12)
	po/nl.po (used elinks-0.12)
	po/pl.po (used master)
	po/pt.po (used elinks-0.12)
	po/pt_BR.po (used elinks-0.12)
	po/ro.po (used elinks-0.12)
	po/ru.po (used elinks-0.12)
	po/sk.po (used elinks-0.12)
	po/sr.po (used elinks-0.12)
	po/sv.po (used elinks-0.12)
	po/tr.po (used elinks-0.12)
	po/uk.po (used elinks-0.12)
2009-03-29 18:26:20 +03:00
Kalle Olavi Niemitalo
22fe77d14f ELinks 0.12pre3 was released on 2009-03-29. 2009-03-29 15:05:34 +03:00
Kalle Olavi Niemitalo
e2d60a373a NEWS: ELinks 0.12pre3 2009-03-29 01:13:42 +02:00
Kalle Olavi Niemitalo
d7d18e4e43 bug 1047: inline functions C99 conformance
C99 6.7.4p3 and 6.7.4p6 set some constraints on what can be done in
inline functions and how they can be declared.  In particular, any
function declared inline must also be defined in the same translation
unit.  To comply with that, remove inline specifiers from function
declarations in header files when the functions are not also defined
in those header files.

Sun Studio 11 on Solaris 9 is stricter than C99 and does not allow
references to static identifiers in extern inline functions.  Make the
configure script detect this and define NONSTATIC_INLINE accordingly
in config.h.  Then use that in the definitions of all non-static
inline functions.

Document the restrictions and this scheme in doc/hacking.txt.
2009-03-28 20:15:08 +02:00
Kalle Olavi Niemitalo
16c3a7c350 NEWS: sync from 0.11.6 2009-03-22 00:48:49 +02:00
Kalle Olavi Niemitalo
3581e2848e Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	doc/installation.txt
	src/protocol/http/http.c
2009-02-28 18:22:54 +02:00
Kalle Olavi Niemitalo
d65f41faab Bug 1069: Add to NEWS 2009-02-28 16:30:55 +02:00
Kalle Olavi Niemitalo
9a186a45e8 NEWS about decompression 2009-02-22 20:55:06 +02:00
Witold Filipczyk
66ea059732 Merge branch 'elinks-0.12' of git+ssh://pasky.or.cz/srv/git/elinks into elinks-0.12 2009-02-22 14:04:56 +01:00
Witold Filipczyk
0787b95634 - lzma disabled by default.
(cherry picked from commit 56b7d38a28)
2009-02-22 14:04:06 +01:00
Witold Filipczyk
56b7d38a28 - lzma disabled by default. 2009-02-22 13:58:55 +01:00
Miciah Dashiel Butler Masters
84259ff26a Fix crash on search-toggle-regex when RE disabled
Check the return value of get_opt_rec on "document.browse.search.regex"
before dereferencing it.  The option is not there if regular expression
support is disabled at build time.

This commit fixes a bug introduced in commit
b2d51c75ff0d6c52a4f6a2761801beb641cba3a2.
2009-02-22 04:06:51 +00:00
Miciah Dashiel Butler Masters
b81821a21c Fix crash on search-toggle-regex when RE disabled
Check the return value of get_opt_rec on "document.browse.search.regex"
before dereferencing it.  The option is not there if regular expression
support is disabled at build time.

This commit fixes a bug introduced in commit
b2d51c75ff0d6c52a4f6a2761801beb641cba3a2.
2009-02-22 04:00:05 +00:00
Kalle Olavi Niemitalo
d89cebc0b3 bug 762: Fix memory leak in ses_goto.
In src/session/task.c, if ses_goto() was going to ask the user to
confirm, it did:

    task->session_task.target.frame = null_or_stracpy(target_frame);

It added the struct task to a memory_list, so the structure was freed
when the message box was closed.  The target frame string was however
never freed.  To fix this leak, add the target frame string to the
memory_list too.

Alternatively, this could have been fixed by making post_yes() and
post_no() free the string.  It is however a bit better to use the
memory_list because msg_box() frees that even if it is unable to
display the message box.
2009-02-17 09:11:22 +01:00
Kalle Olavi Niemitalo
ece4bfcc28 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/document/dom/renderer.c (split into rss.c, source.c)
2009-02-15 05:08:06 +02:00
Kalle Olavi Niemitalo
c8cee1df61 bug 1067: More verbose NEWS. 2009-02-15 05:02:43 +02:00
Witold Filipczyk
9054e57c55 Merge branch 'elinks-0.12'
Conflicts:
	src/document/dom/renderer.c
2009-02-12 10:01:57 +01:00
Witold Filipczyk
a7c2f14e6d bug 1067: the node was freed, but still used. 2009-02-12 09:48:04 +01:00
Kalle Olavi Niemitalo
c53e6335a1 Mention bug 761 in NEWS. 2009-02-09 00:24:13 +02:00
Kalle Olavi Niemitalo
d2854dca8d Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/bookmarks/backend/default.c
	src/bookmarks/bookmarks.c
	src/session/session.c
	src/terminal/event.c
	src/viewer/text/search.c
2009-02-08 22:02:57 +02:00
Kalle Olavi Niemitalo
7941c7097a Bug 1060: Document the need for TRE. 2009-02-08 18:55:15 +02:00
Kalle Olavi Niemitalo
264a66fe4d bug 153: UTF-8 bookmark.title has been fully implemented.
Mention it in NEWS too.
2009-02-08 18:26:21 +02:00
Kalle Olavi Niemitalo
e5722ad0d9 Bug 1061: Correctly truncate UTF-8 titles in the tab bar. 2009-01-01 20:01:50 +00:00
Kalle Olavi Niemitalo
687f19dbde Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/bfu/dialog.c
	src/bfu/hotkey.c
	src/bfu/inpfield.c
	src/dialogs/options.c
	src/document/renderer.c
	src/intl/gettext/libintl.h
	src/protocol/http/codes.c
	src/session/task.c
	src/terminal/event.c
	src/terminal/terminal.h
	src/viewer/text/form.c
	src/viewer/text/link.c

And a semantic conflict in src/terminal/terminal.c.
2009-01-01 19:14:01 +00:00
Kalle Olavi Niemitalo
29c34df62e Fix assertion failure if IMG/@usemap refers to a different file.
Change test/imgmap2.html so it can be used for testing this too.

Debian Iceweasel 3.0.4 does not appear to support such external
client-side image maps.  Well, that's one place where ELinks is
superior, I guess.  There might be a security problem though if ELinks
were to let scripts of the referring page examine the links in the
image map.
2009-01-01 19:12:41 +00:00
Kalle Olavi Niemitalo
b6dfdf86a6 Bug 885: Proper charset support in xterm window title
When ELinks runs in an X11 terminal emulator (e.g. xterm), or in GNU
Screen, it tries to update the title of the window to match the title
of the current document.  To do this, ELinks sends an "OSC 1 ; Pt BEL"
sequence to the terminal.  Unfortunately, xterm expects the Pt string
to be in the ISO-8859-1 charset, making it impossible to display e.g.
Cyrillic characters.  In xterm patch #210 (2006-03-12) however, there
is a menu item and a resource that can make xterm take the Pt string
in UTF-8 instead, allowing characters from all around the world.
The downside is that ELinks apparently cannot ask xterm whether the
setting is on or off; so add a terminal._template_.latin1_title option
to ELinks and let the user edit that instead.

Complete list of changes:

- Add the terminal._template_.latin1_title option.  But do not add
  that to the terminal options window because it's already rather
  crowded there.

- In set_window_title(), take a new codepage argument.  Use it to
  decode the title into Unicode characters, and remove only actual
  control characters.  For example, CP437 has graphical characters in
  the 0x80...0x9F range, so don't remove those, even though ISO-8859-1
  has control characters in the same range.  Likewise, don't
  misinterpret single bytes of UTF-8 characters as control characters.

- In set_window_title(), do not truncate the title to the width of the
  window.  The font is likely to be different and proportional anyway.
  But do truncate before 1024 bytes, an xterm limit.

- In struct itrm, add a title_codepage member to remember which
  charset the master said it was going to use in the terminal window
  title.  Initialize title_codepage in handle_trm(), update it in
  dispatch_special() if the master sends the new request
  TERM_FN_TITLE_CODEPAGE, and use it in most set_window_title() calls;
  but not in the one that sets $TERM as the title, because that string
  was not received from the master and should consist of ASCII
  characters only.

- In set_terminal_title(), convert the caller-provided title to
  ISO-8859-1 or UTF-8 if appropriate, and report the codepage to the
  slave with the new TERM_FN_TITLE_CODEPAGE request.  The conversion
  can run out of memory, so return a success/error flag, rather than
  void.  In display_window_title(), check this result and don't update
  caches on error.

- Add a NEWS entry for all of this.
2009-01-01 16:17:03 +00:00
Kalle Olavi Niemitalo
25da8085b3 Fix double-free crash if EOF immediately follows </MAP>.
look_for_link() used to return 0 both when it found the closing </MAP>
tag, and when it hit the end of the file.  In the first case, it also
added *menu to the memory_list; in the second case, it did not.  The
caller get_image_map() supposedly distinguished between these cases by
checking whether pos >= eof, and freed *menu separately if so.

However, if the </MAP> was at the very end of the HTML file, so that
not even a newline followed it, then look_for_link() left pos == eof
even though it had found the </MAP> and added *menu to the memory_list.
This made get_image_map() misinterpret the result and mem_free(*menu)
even though *menu had already been freed as part of the memory_list;
thus the crash.

To fix this, make look_for_link() return -1 instead of 0 if it hits
EOF without finding the </MAP>.  Then make get_image_map() check the
return value instead of comparing pos to eof.  And add a test case,
although not an automated one.

Alternatively, look_for_link() could have been changed to decrement
pos between finding the </MAP> and returning 0.  Then, the pos >= eof
comparison in get_image_map() would have been false.  That scheme
would however have been a bit more difficult to understand and
maintain, I think.

Reported by Paul B. Mahol.
(cherry picked from commit a2404407ce)
2008-12-31 20:15:44 +00:00
Kalle Olavi Niemitalo
d668b3b6aa mouse: Exit cursor-routing mode when a link is clicked
Before this patch, if you first moved the cursor to link X with
move-cursor-up and similar actions, and then clicked link Y with the
mouse, ELinks would activate link X, i.e. not the one you clicked.
This happened because the NAVIGATE_CURSOR_ROUTING mode was left
enabled and made ELinks ignore the doc_view->vs->current_link
member that ELinks had updated according to the click.
Make ELinks return the session to NAVIGATE_LINKWISE mode, so that
the update takes effect.

Reported by Paul B. Mahol.
(cherry picked from commit 4086418069)
2008-12-28 13:24:07 +02:00
Kalle Olavi Niemitalo
0ec4f380fa Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	AUTHORS
2008-11-10 00:07:20 +02:00
Kalle Olavi Niemitalo
5d540e1f95 NEWS entry for newlines in hidden fields 2008-11-09 23:36:35 +02:00
Kalle Olavi Niemitalo
5c2fada371 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/session/download.c
2008-11-01 22:39:17 +02:00
Kalle Olavi Niemitalo
ffffa763e4 Bug 1004: NEWS and AUTHORS
The licensing statement is from comment #18 of bug 1004.
2008-11-01 22:32:44 +02:00
Kalle Olavi Niemitalo
776eff90e1 Merge branch 'elinks-0.12' into elinks-0.13 2008-10-15 23:34:27 +03:00
Kalle Olavi Niemitalo
6c0fffb958 Merge branch 'top/0.13/witekfl-scroll-dialog' (early part) into elinks-0.13
Conflicts:
	NEWS
2008-10-15 23:31:17 +03:00
Kalle Olavi Niemitalo
84e19d0e4e bug 1054: Don't abort downloads when closing a terminal.
Except if they have external handlers.

When ELinks receives an event from a terminal, move that terminal to
the beginning of the global "terminals" list, so that the terminals
are always sorted according to the time of the most recent use.  Note,
this affects the numbering of bookmark folders in session snapshots.

Add get_default_terminal(), which returns the most recently used
terminal that is still open.  Use that in various places that
previously used terminals.prev or terminals.next.  Four functions
fetch the size of the terminal for User-Agent headers, and
get_default_terminal() is not really right, but neither was the
original code; add TODO comments in those functions.

When the user chooses "Background and Notify", associate the download
with the terminal where the dialog box is.  So any later messages will
then appear in that terminal, if it is still open.  However, don't
change the terminal if the download has an external handler.

When a download gets some data, don't immediately check the associated
terminal.  Instead, wait for the download to end.  Then, if the
terminal of the download has been closed, use get_default_terminal()
instead.  If there is no default terminal either, just skip any
message boxes.
2008-10-15 23:29:25 +03:00
Kalle Olavi Niemitalo
9bb1438af1 big dialogs: NEWS entry 2008-10-12 14:05:08 +03:00
Kalle Olavi Niemitalo
c9ca6fd448 Refresh charsets from www.unicode.org.
Add copyright and licence notices, and a NEWS entry.

The data in the new versions is not entirely the same as what ELinks
used to have:

- Unicode/8859_1.cp: Adds control characters.
- Unicode/8859_2.cp: Adds control characters.
- Unicode/8859_4.cp: Adds some control characters that ELinks assumed
  there already.
- Unicode/8859_7.cp: Adds three characters.
- Unicode/8859_15.cp: Adds control characters.
- Unicode/8859_16.cp: Adds control characters and swaps 0xA5 with 0xAB.
- Unicode/koi8_r.cp: Changes 0x95 and adds some control characters
  that ELinks assumed there already.
- Unicode/macroman.cp: Changes 0xC6 and removes some control characters
  that ELinks assumes there anyway.
2008-10-11 15:35:09 +03:00
Kalle Olavi Niemitalo
75302f8e62 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:

	NEWS
2008-10-03 10:55:11 +03:00
Kalle Olavi Niemitalo
4c1f0f5647 NEWS: mention Samba GPLv2 incompatibility
Samba 3.2.0 switched to version 3 of the GNU General Public License,
which is not compatible with GPLv2 used in ELinks.  Perhaps we can
eventually relicense ELinks to "GPL version 2 or later", or resolve
this in some other way.  Until then, warn distributors of binaries
about the conflict.
2008-10-03 00:40:53 +03:00
Kalle Olavi Niemitalo
4c2ddac289 Bug 1053: Fix crash when download ends.
ELinks attempted to display a message box on file_download.term, but
it had already closed that terminal and freed the struct terminal.  To
fix this, reset file_download.term pointers to NULL when the terminal
is about to be destroyed.  Also, assert in download_data_store() that
file_download.term is either NULL or in the global "terminals" list.

Reported by أحمد المحمودي.
(cherry picked from commit 6e2476ea4d)
2008-10-03 00:18:41 +03:00
Kalle Olavi Niemitalo
b0ce4adcbe Let Perl scripts dynamically load libraries.
XML::LibXML::SAX appears to require this.
2008-09-27 21:58:08 +03:00
Kamil Dudka
a00a413765 add support for nss_compat_ossl library (OpenSSL replacement)
* configure.in: New configure parameter --with-nss_compat_ossl.
 * socket.c: New configure option connection.ssl.client_cert.nickname.
 * ssl.h: Handle CONFIG_NSS_COMPAT_OSSL macro.
 * ssl.c: Add support for nss_compat_ossl.
 * TODO: Remove completed task.
 * NEWS: Mention the change.
2008-09-27 16:32:36 +03:00
Kalle Olavi Niemitalo
b40736cafe Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:

	NEWS (merged)
	configure.in (merged)
	doc/man/man1/elinks.1.in (regenerated)
	doc/man/man5/elinks.conf.5 (regenerated)
	doc/man/man5/elinkskeys.5 (regenerated)
	po/fr.po (kept 0.13.GIT version)
	po/pl.po (kept 0.13.GIT version)
2008-09-27 16:28:28 +03:00
Kalle Olavi Niemitalo
df19e421f0 ELinks 0.11.5 and 0.12pre2 release date 2008-09-21 20:59:30 +03:00
Kalle Olavi Niemitalo
b0a01398af NEWS for ELinks 0.12pre2 2008-09-21 10:41:23 +03:00
Kalle Olavi Niemitalo
00bf5f7baf 1045: Temporarily mention in NEWS. 2008-09-15 23:44:24 +03:00
Kalle Olavi Niemitalo
a0d624cd61 Hurd bug 22861: Do not select() exceptions from pipes.
The GNU Hurd has a bug that can make select() report an exception in a
pipe even though none has actually occurred.  The typical result is
that ELinks closes the pipe through which it internally passes all
input events, such as keypresses.  It then no longer reacts to what
the user is trying to do.

Work around the Hurd bug by making set_handlers() check whether the
file descriptor refers to a pipe, and if so, pretend the caller did
not provide any handler for exceptions.  This is a minimal change that
avoids slowing down the select() loop itself and does not require
careful analysis of the callers to statically find out which file
descriptors might refer to pipes.  The extra stat() calls may slow
ELinks down somewhat, but anyway it'll work better than it did without
the patch, and if the Hurd bug is ever fixed, we can remove the
workaround at that time.
2008-09-07 22:52:47 +03:00
Miciah Dashiel Butler Masters
f62d2d1ae4 Add the number of interpreters to Resources box
Introduce static int interpreter_count in src/ecmascript/ecmascript.c.

Maintain interpreter_count in ecmascript_get_interpreter and
ecmascript_put_interpreter.

Introduce ecmascript_get_interpreter_count.

Display the number of ECMAScript interpreters that have been allocated
for documents in the Resources dialog box.
2008-09-06 20:18:10 +00:00
Kalle Olavi Niemitalo
80a5c6d466 Merge branch 'elinks-0.12' into elinks-0.13 2008-09-04 12:08:38 +03:00
Kalle Olavi Niemitalo
b7d3b4f687 1041: Add ftp_add_unparsed_line: HTML entities and more error checks.
Separate the formatting of unparsed lines from ftp_process_dirlist()
to a new function ftp_add_unparsed_line().  Check for all possible
out-of-memory errors.  Encode HTML metacharacters as entity references
and document how charsets are handled FTP directory listings.
Add a NEWS entry.
2008-09-04 11:21:06 +03:00