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

3813 Commits

Author SHA1 Message Date
Kalle Olavi Niemitalo
9e4d7d1883 mailcap bug 1113: Don't leak values of duplicate fields
If a mailcap entry has two test commands or two descriptions,
free the first one before replacing it with the second one.
2011-04-17 21:26:08 +03:00
Kalle Olavi Niemitalo
f735bfbe72 I18N bug 1112: Use strange_chars[] for UTF-8 output too
Make u2cp_() map code points U+0080 to U+009F via strange_chars[] even
if the target codepage is UTF-8.  This helps with buggy web pages that
use ’ when they mean ’.  This change does not affect how
ELinks decodes raw bytes 0x80 to 0x9F in HTML.

u2cp_() is used only via the u2cp and u2cp_no_nbsp macros.
Possible side effects of this change at each use of these macros:

* get_translation_table(): Not affected because it does not call u2cp
  if the target codepage is UTF-8.
* get_entity_string(): Numeric character references are affected, as intended.
  Character entity references are not affected because entities[]
  does not define any entities in the U+0080...U+009F range.
* kbd_field(), term_send_ucs(), field_op(): Affected.  It is no longer
  possible to enter code points U+0080...U+009F from the terminal.
  This should not be a problem in practice because those would be
  control characters anyway and should therefore be filtered by the
  slave process (which doesn't yet recognize them; bug 777).
2011-04-17 21:24:26 +03:00
Kalle Olavi Niemitalo
e3cb8d6a77 Compile xprop_to_string only #ifdef HAVE_X11
If ELinks was configured --without-x, the build failed at
xprop_to_string:

.../src/osdep/osdep.c:500: error: expected ‘)’ before ‘*’ token

Fix by moving xprop_to_string into the #ifdef HAVE_X11 section.
Reported by Thomas Adam.
2011-04-16 13:03:27 +03:00
Kalle Olavi Niemitalo
d2cf6912b9 Save X11 window title regardless of unconvertible characters
If Xutf8TextPropertyToTextList or XmbTextPropertyToTextList returns a
positive number, that means some characters were unconvertible and
have been replaced with XDefaultString().  Use the resulting string
even in that case, as if the function had returned Success.
The previous version ignored the string and didn't even free it.
2011-04-13 00:18:32 +03:00
Kalle Olavi Niemitalo
d1245c73a8 Recode X11 window title when saving and restoring
gnome-terminal 2.30.2 expects UTF-8 in the "OSC Ps ; Pt BEL" sequence
that sets the window title.  However, XGetWMName typically returns the
title in "STRING" (Latin-1) or "COMPOUND_TEXT" (escape sequences)
encoding.  Recode the title to restore it correctly.  This helps
especially in the fi_FI.UTF-8 locale, where gnome-terminal has "Pääte"
as the default title.

Related to bugs 885 and 336.
2011-04-11 22:13:38 +03:00
witekfl
9cb170f97f ftp: Get filesize from SIZE command instead of guess it from RETR command. 2011-03-22 17:51:13 +01:00
Miciah Dashiel Butler Masters
dfc666dd75 Factor try_menu out of send_kbd_event
Try to make the code a little clearer by pulling try_menu out of
send_kbd_event.  try_menu calls the BFU code and tells send_kbd_event
whether the BFU code did something with the event (i.e. opened a menu)
or whether the event still needs to be handled.
2011-01-19 03:52:08 +00:00
Miciah Dashiel Butler Masters
af5e54d95f send_kbd_event: Fix accesskeys when priority = 0
With document.browse.accesskey.priority = 0, accesskeys were ignored if
the current tab was not the last (rightmost) tab.  This commit fixes the
problem.

Add a function tabs_are_on_top(struct terminal *) which returns
a Boolean value indicating whether the topmost window is a tab (as
opposed to, e.g., a menu).

This commit fixes commit 1bd498cde9.
2011-01-19 03:44:50 +00:00
Miciah Dashiel Butler Masters
fd02d71178 Merge branch 'master' of ssh://pasky.or.cz/srv/git/elinks 2010-12-23 18:44:19 +00:00
Sergey Kvachonok
853547a0c4 Replace AC_CHECK_FILE with test -f in configure.in.
AC_CHECK_FILE runs target executable and dies when cross-compiling.
It's unnecessary when checking for files in build environment,
simple runtime check will do.

Signed-off-by: Sergey Kvachonok <ravenexp@gmail.com>
2010-12-13 18:37:13 +01:00
Sergey Kvachonok
d65ca4a7fe Use autoconf to detect LD reliably.
Target LD is different from ld when cross-compiling, change it together with CC.

Signed-off-by: Sergey Kvachonok <ravenexp@gmail.com>
2010-12-13 18:37:13 +01:00
Witold Filipczyk
7933724dc8 Removed code using pipes for decompression and simplified decompress_data.
Workarounds for sites, which send incorrect data, probably won't work.
2010-09-24 16:12:35 +02:00
Witold Filipczyk
a9c02bbf01 Additional check whether LANGUAGE is not NULL. 2010-09-19 15:29:55 +02:00
Witold Filipczyk
f93d5ccd80 Revert "strcpy -> strlcpy."
This reverts commit 365cbb61be.
There is no strlcpy in libc.
2010-09-19 15:26:05 +02:00
witekfl
365cbb61be strcpy -> strlcpy.
Some of these changes doesn't make sense, but warnings are avoided.
2010-09-19 15:16:00 +02:00
witekfl
d94d9720a1 Use snprintf instead of sprintf. One warning less. 2010-09-19 14:13:28 +02:00
Witold Filipczyk
cbf70d5304 Refactoring: use struct string instead of unsigned char.
It probably doesn't make sense, but there is one warning less on OpenBSD.
2010-09-19 13:56:54 +02:00
Witold Filipczyk
ac275ee172 Compilation fix.
These both variables were unused.
2010-09-19 13:12:54 +02:00
Witold Filipczyk
d112adc8f3 include libgen.h for basename 2010-09-19 13:01:42 +02:00
Witold Filipczyk
236f600148 More headers.
There was a compilation error on OpenBSD, so I guess more includes are required.
2010-09-17 16:13:22 +02:00
Miciah Dashiel Butler Masters
00870bfe3d Delete unused variables after next to last commit
Delete some variables that are unused as of the next to last commit.

Thanks to Simon Ruderich for pointing out that those variables were
still there.
2010-09-16 20:57:34 +00:00
Miciah Dashiel Butler Masters
ece4d3dc2d fixup_typeahead_match: improve comment
Clarify the comment for fixup_typeahead_match and put it closer to the
relevant code.
2010-09-16 02:00:01 +00:00
Miciah Dashiel Butler Masters
b53e8450d1 fixup_typeahead_match: use check_vs
Use check_vs instead of set_pos_x and set_pos_y in fixup_typeahead_match.
This saves us a line of code, and in addition, check_vs does not needlessly
scroll when the link is already in view.
2010-09-16 01:56:45 +00:00
Miciah Dashiel Butler Masters
f690141cab Merge branch 'master' of ssh://pasky.or.cz/srv/git/elinks 2010-09-16 01:40:54 +00:00
Miciah Dashiel Butler Masters
b1422adf20 Move screen update code into set_kbd_repeat_count
Make set_kbd_repeat_count update the status bar and link highlighting
iff the repeat count is changed to a different value.

Delete code to do the same updates from do_action and try_prefix_key.

Besides simplifying the code, this change also fixes some issues with
the status bar and link highlighting not being properly updated in some
situations.
2010-09-16 01:40:10 +00:00
Miciah Dashiel Butler Masters
d6bd7987d4 Introduce set_kbd_repeat_count
Introduce and use ses_kbd_repeat_count to change
ses->kbdprefix.repeat_count instead of setting it directly.

This change should not cause any change in behaviour.
2010-09-16 01:33:45 +00:00
Kalle Olavi Niemitalo
e17e5fe435 mkdist: Don't copy manual.html-chunked.tar.gz 2010-09-15 23:06:19 +03:00
Miciah Dashiel Butler Masters
ffcfe4a86b Document previous two patches in AUTHORS and NEWS 2010-09-14 21:26:35 +00:00
Fabienne Ducroquet
83945b677c Add document.browse.scrolling.vertical_overlap
Add an option to specify the number of overlapping lines when scrolling
page by page (0 by default because this is ELinks' current behaviour).

Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
2010-09-14 20:42:32 +00:00
Fabienne Ducroquet
6211b8e725 Add half-page-down and half-page-up commands
Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
2010-09-14 20:42:32 +00:00
Witold Filipczyk
7f164f8633 strtoll instead of strtol to show the filesize of big files in FTP
downloads.
2010-09-08 22:52:59 +02:00
Witold Filipczyk
00ebb8ef4b SMB directory listing looks like normal directory listing. 2010-09-06 18:38:36 +02:00
Witold Filipczyk
a9898eab51 iconv is always necessary. 2010-09-04 14:27:54 +02:00
Witold Filipczyk
f60d85c4c1 Use long long in place of long in conv.c to allow show size of files bigger
than 2GiB in the download dialog. Also let regetting big files.
Previously the Content-Length variable in http.c was int, what is
not enough. Now it is long long.
2010-09-04 14:10:51 +02:00
Witold Filipczyk
9574b38abe Merge branch 'master' of git+ssh://pasky.or.cz/srv/git/elinks 2010-08-12 08:10:22 +02:00
Witold Filipczyk
79340fa4ac Better looking symbols for LI elements. 2010-08-11 21:22:21 +02:00
Simon Ruderich
d4b008312a contrib/user.css: Documentation improvement
In contrib/user.css, point out that document.colors.use_document_colors
must be enabled for colors to work and ELinks must be compiled with
--enable-html-highlighting for HTML highlighting to work.
2010-08-11 17:10:01 +00:00
Witold Filipczyk
885ffc9d40 Merge branch 'master' of git+ssh://pasky.or.cz/srv/git/elinks 2010-08-08 09:47:01 +02:00
Witold Filipczyk
16ff310884 One of mailcap tests failed because of changed implementation
of copiousoutput. Now tests passed, by I'm not sure whether
they work properly.
2010-08-08 09:44:37 +02:00
Witold Filipczyk
8615e62ffb Compilation fix. make test failed. 2010-08-08 09:38:39 +02:00
Nils Dagsson Moskopp
2f0d954add Rudimentary support for HTML5 media elements
Make use of the HTML5 media elements, <video> and <audio> by adding
links to the media.
2010-08-07 20:44:44 +00:00
Miciah Dashiel Butler Masters
6cb3d30d09 Add missing include and declarations
Add an include for config/options.h to src/ecmascript/spidermonkey.c
and two missing declarations (struct form_view and struct form_state)
to src/ecmascript/spidermonkey.h.
2010-08-07 20:44:02 +00:00
Miciah Dashiel Butler Masters
f113f6a156 field_op: use goto_link
Use the newly introduced goto_link instead of goto_current_link in field_op
since field_op already looks up the current link.
2010-08-07 20:44:02 +00:00
Miciah Dashiel Butler Masters
6a91849889 Don't follow wrong link when an event handler changes documents under us
When a link had an onClick event handler that changes the current document,
ELinks would follow the current link of the document displayed after
executing the handler.

Factor goto_link out of goto_current_link.

Use goto_link instead of goto_current_link in activate_link to ensure that
the link that is passed in by enter() is followed.
2010-08-07 20:44:02 +00:00
Witold Filipczyk
20eee6f2c8 bug 1097: Restart connection when digest proxy authorization
is required for the first time.
2010-08-07 15:51:47 +02:00
Witold Filipczyk
2d906e0886 bug 1097: Better digest proxy authentication.
Added nc to the auth_entry. nc is incremented every time new
digest request is sent.
2010-08-07 15:02:51 +02:00
Witold Filipczyk
cbf5ef6680 Allow empty /dev/stdin
For example: PAGER=elinks git diff
shows nothing, when repo is not dirty.
2010-07-31 21:48:48 +02:00
Witold Filipczyk
a27e7d95ee Do not delete temporary files of external handlers. 2010-07-31 21:15:12 +02:00
Witold Filipczyk
2ff9f1a76f & 15 for foreground. 2010-07-31 20:58:11 +02:00
Witold Filipczyk
17f82a3e21 Decode ESC color sequences in the plain renderer.
Added functions for screen_char->color -> color_T conversion.
2010-07-31 20:51:24 +02:00