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

2857 Commits

Author SHA1 Message Date
Kalle Olavi Niemitalo
4c64afec26 config: Add struct conf_parsing_state. 2008-02-03 14:43:29 +02:00
Kalle Olavi Niemitalo
63e82e68e4 config: Reduce the interface offered to exmode. 2008-02-03 14:43:26 +02:00
Kalle Olavi Niemitalo
912cff7975 config: Use memacpy instead of stracpy.
So there is no need to substitute a '\0' into the string, and undo
that afterwards.
2008-02-03 14:43:23 +02:00
Kalle Olavi Niemitalo
753aa3054b config: Fix two bogus end-of-file checks. 2008-02-03 14:43:21 +02:00
Kalle Olavi Niemitalo
09829a0b52 config: Don't mem_free(NULL). 2008-02-03 14:43:18 +02:00
Kalle Olavi Niemitalo
c92cd01e0b config: Plug some memory leaks in error handling. 2008-02-03 14:43:16 +02:00
Kalle Olavi Niemitalo
4960c65f20 config: Explain why get_opt_rec() does not follow OPT_ALIAS. 2008-02-03 14:43:13 +02:00
Kalle Olavi Niemitalo
1d16e90dca config: Swap the "unknown command" and "parse error" messages.
They should be in the same order as in enum parse_error.
2008-02-03 14:43:11 +02:00
Kalle Olavi Niemitalo
b216a21b79 config: Each backslash escapes only one character.
Previously, if you did this in elinks.conf:
set document.dump.header = "\'\\"
then str_rd() failed to detect the end of the string.
2008-02-03 14:43:09 +02:00
Kalle Olavi Niemitalo
9becd108a8 config: more const in elinks.conf parsing 2008-02-03 14:43:06 +02:00
Kalle Olavi Niemitalo
11e9a816f5 const in name_to_language 2008-02-03 14:42:07 +02:00
Kalle Olavi Niemitalo
cb90ed94f0 const in get_cp_index 2008-02-03 14:41:35 +02:00
Kalle Olavi Niemitalo
49ea10a74d Bug 994: Treat only termios.c_cc[VERASE] as "Backspace".
When setting the tty device to raw mode, save the VERASE character.
Later, compare incoming bytes to that.

This is somewhat complicated because "stty verase undef"
sets termios.c_cc[VERASE] = _POSIX_VDISABLE, and e.g. Linux
defines _POSIX_VDISABLE as 0 but that must not cause ELinks
to treat incoming null bytes as backspaces.  Furthermore,
some systems may use different VDISABLE values for different
terminal devices, in which case _POSIX_VDISABLE is undefined
and ELinks must instead read the value from fpathconf().
2008-02-02 13:19:55 +02:00
Witold Filipczyk
1faf589e90 Polish translation was updated. 2008-01-29 19:03:31 +01:00
Miciah Dashiel Butler Masters
e6276bf7ac Missing change from last commit 2008-01-27 18:50:29 +00:00
Miciah Dashiel Butler Masters
ad5b6e0a87 Add KEYMAP_INVALID value for enum keymap_id and properly check for it
get_keymap_id returns -1 when it can't find the keymap.  Because the return
type of get_keymap_id is enum keymap_id and enum keymap_id did not have any
explicit values defined, it could be unsigned, which meant that when
get_keymap_id returned -1, it was really returning a huge positive number.
This meant that when callers checker whether the return value was negative,
they were essentially performing no check at all, so they might give
get_keymap_id an invalid keymap name, get back an invalid keymap_id, and
use that invalid keymap_id.

This commit adds KEYMAP_INVALID = -1 to enum keymap_id and makes all
functions that deal with the enumeration use that symbol.
2008-01-27 18:50:29 +00:00
Miciah Dashiel Butler Masters
3a0286e447 Strings corrections from Malcolm Parsons
Fix the spelling and grammar in various comments, variable names, comment
descriptions, and documentation.
2008-01-27 04:19:23 +00:00
Kalle Olavi Niemitalo
4f1f4edd5c NEWS update
All interesting changes made in 0.12.GIT until now are listed.
2008-01-26 22:42:32 +02:00
Kalle Olavi Niemitalo
a831beb6c8 const in BitTorrent 2008-01-26 18:10:35 +02:00
Kalle Olavi Niemitalo
cab0b3fbd5 const in CSS 2008-01-26 18:10:13 +02:00
Kalle Olavi Niemitalo
0689443ad2 const in map_scanner_string 2008-01-26 17:57:14 +02:00
Kalle Olavi Niemitalo
f02e471762 const in decode_color 2008-01-26 17:53:14 +02:00
Kalle Olavi Niemitalo
3f508a9803 const in fastfind_search 2008-01-26 17:52:22 +02:00
Kalle Olavi Niemitalo
721af4e749 Detect all overflows in BitTorrent parse_bencoding_integer.
The previous check (integer > (off_t) integer * 10) did not detect all
overflows.  Examples with 32-bit off_t:

integer = 0x1C71C71D (0x100000000/9 rounded up);
integer * 10 = 0x11C71C722, wraps to 0x1C71C722 which is > integer.

integer = 0x73333333;
integer * 10 = 0x47FFFFFFE, wraps to 0x7FFFFFFE which is > integer.

Examples with 64-bit off_t:

integer = 0x1C71C71C71C71C72 (0x10000000000000000/9 rounded up);
integer * 10 = 0x11C71C71C71C71C74, wraps to 0x1C71C71C71C71C74
which is > integer.

integer = 0x7333333333333333;
integer * 10 = 0x47FFFFFFFFFFFFFFE, wraps to 0x7FFFFFFFFFFFFFFE
which is > integer.

It is unclear to me what effect an undetected overflow would actually
have from the user's viewpoint, so I'm not adding a NEWS entry.
(cherry picked from commit a25fd18e56)
2008-01-26 16:47:51 +02:00
Kalle Olavi Niemitalo
9699a03e74 Don't assume sizeof(int)==4 in bittorrent
(cherry picked from commit f3bad399e2)
2008-01-26 16:47:47 +02:00
Miciah Dashiel Butler Masters
cade70e745 Fix -dump with multicell characters
(cherry picked from commit e0f0112de9)
2008-01-25 09:57:48 +02:00
Kalle Olavi Niemitalo
4e7980d727 NEWS: sync from 0.11.3.GIT
Specifically ELinks 0.11.3.GIT (7515c9753f).
2008-01-22 00:45:09 +02:00
Kalle Olavi Niemitalo
e5922e4fe1 Bug 997: Fix unlikely stack corruption in get_pasv_socket.
It is unlikely because the standard members of struct sockaddr_in
(sin_family, sin_port, sin_addr) already require at least 8 bytes
and I don't know of any system that has size_t larger than that.
Besides, at least glibc pads the structure to 16 bytes.
2008-01-22 00:42:13 +02:00
Kalle Olavi Niemitalo
0c1b52637f get_pasv_socket: Use AF_INET6 when appropriate.
When get_pasv6_socket was merged into get_pasv_socket on 2005-04-15,
the AF_INET6 of get_pasv6_socket was lost and the merged function
always returned AF_INET sockets.  This then made getsockname fill
only part of the struct sockaddr_in6, and ELinks sent to the server
an EPRT command that had half the bits missing from the IPv6 address.
At least ftp.funet.fi then rejected the command, helpfully saying
what the address should have been.

This commit fixes active FTP over IPv6.  Passive FTP was already fixed
in 0.11.3.GIT (887d650efe), on 2007-05-01.
2008-01-22 00:41:25 +02:00
Witold Filipczyk
789eacc0d9 Polish translation was updated. 2007-12-17 19:06:57 +01:00
Kalle Olavi Niemitalo
654108c4f9 NEWS: Mention the five new move-* actions. 2007-12-16 01:16:50 +02:00
Kalle Olavi Niemitalo
a307371d9e Comments about arithmetic in scrolling.
(cherry picked from commit 4871ad0643)
2007-12-16 01:14:08 +02:00
Witold Filipczyk
04387d8d6c Added function move_cursor_rel_count and used it
in move-link-left-line and others, so move-link-left-line ans others
do not use the keyboard prefix.
(cherry picked from commit 8b281e1404)
(cherry picked from commit 4f2a9eadfc)
2007-12-16 01:14:02 +02:00
Witold Filipczyk
f33b7dea02 Removed not existent function. Spotted by Kalle.
(cherry picked from commit a76ecfb8ca)
(cherry picked from commit 54cf868429)
2007-12-16 01:13:53 +02:00
Witold Filipczyk
617e33187d move-link-up-line and others: changed mode to NAVIGATE_CURSOR_ROUTING when
there is no link.
(cherry picked from commit 7db2f8c629)
(cherry picked from commit f62eca8d92)
2007-12-16 01:13:46 +02:00
Witold Filipczyk
61eb46e94d New action: move-cursor-line-start.
It moves cursor to the start of the line.
(cherry picked from commit 5ee1d3b2b3)
(cherry picked from commit 3a87ec55fc)
2007-12-16 01:13:39 +02:00
Witold Filipczyk
d358810a5f move-link-prev(next)-line: Typo with cut-n-paste. s/line/last/.
(cherry picked from commit 848852b75f)
(cherry picked from commit 64c385f0db)
2007-12-16 01:13:32 +02:00
Witold Filipczyk
d1d8c0632a move-link-up-line: segfault when cursor was below last line.
(cherry picked from commit c646c860cd)
(cherry picked from commit 9561d8d0fd)
2007-12-16 01:13:25 +02:00
Witold Filipczyk
175f355320 move-link-prev-line: Really fixed.
(cherry picked from commit 052f7a93bb)
(cherry picked from commit 1a9112945b)
2007-12-16 01:13:18 +02:00
Witold Filipczyk
885adc7a57 move-link-prev-line .. move-link-down-line: Fixed.
(cherry picked from commit bb0166279f)
(cherry picked from commit 27361d141a)
2007-12-16 01:13:12 +02:00
Witold Filipczyk
f2de26b2d5 Fixed the issue with multiline links.
(cherry picked from commit 3555f68059)
(cherry picked from commit 8863f4335f)
2007-12-16 01:13:04 +02:00
Witold Filipczyk
a282a98d4a Avoid segfault.
Go to the page with a few lines. Follow a link to a page with more lines.
Move cursor down, do not stay on a link.
Go back and do move-link-prev-line. This caused a segmentation fault.
(cherry picked from commit 888ba87516)
(cherry picked from commit 1cbd02c141)
2007-12-16 01:12:57 +02:00
Witold Filipczyk
d830833e62 move-link-down-line, move-link-prev-line, etc.:
Change mode to NAVIGATE_LINKWISE to preserve the link position when
going back.
(cherry picked from commit 14b37d0362)
(cherry picked from commit a594b2a002)
2007-12-16 01:12:49 +02:00
Witold Filipczyk
cb07a2630c actions: Fixed moving in frames.
(cherry picked from commit 2045574edc)
(cherry picked from commit 02af6696f5)
2007-12-16 01:12:41 +02:00
Witold Filipczyk
52dfc92523 viewer: Added new four actions requested by Ligesh.
move-link-down-line moves the cursor down to the line with a link.
move-link-up-line moves the cursor up to the line with a link.
move-link-prev-line moves to the previous link horizontally.
move-link-next-line moves to the next link horizontally.
(cherry picked from commit 8259a56e99)
(cherry picked from commit 2eb3532416)
2007-12-16 01:12:31 +02:00
Kalle Olavi Niemitalo
f8863183b8 option_types: Add comments to be found by grep.
I was looking for code that handles OPT_COMMAND, so I grepped for it,
but did not immediately find this array.  Next time, I will.
2007-12-16 01:09:18 +02:00
Kalle Olavi Niemitalo
61341d9237 Bug 822: Show --disable-utf-8 in configure --help.
Because features.conf now contains CONFIG_UTF8=yes,
configure --enable-utf-8 is not useful, and it is better
to document configure --disable-utf-8.
Reported by witekfl.
2007-12-16 01:06:48 +02:00
Kalle Olavi Niemitalo
02ffed2fff Document that GNU Make >= 3.78 is needed, and check it.
(cherry picked from commit 4ffbf1faed)
2007-12-09 08:16:29 +02:00
Kalle Olavi Niemitalo
cca6ab7034 Enable asciidoc7compatible mode.
AsciiDoc 8 has changed the syntax again and generates e.g. subscripts
where we don't want them.  Instead of updating the documents, I'll
just enable a compatibility mode so that ELinks doesn't require
AsciiDoc 8 yet.
2007-11-25 09:09:58 +02:00
Witold Filipczyk
588e914470 bug 978: Python's webbrowser.open_new_tab(URL) works since now. 2007-11-22 19:10:45 +01:00