1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-19 01:36:33 -04:00
Commit Graph

2302 Commits

Author SHA1 Message Date
Kalle Olavi Niemitalo
a833d6d093 Bug 1015: Define and use Py_ssize_t. 2008-06-09 23:18:03 +03:00
Kalle Olavi Niemitalo
5e4a565603 Bug 1014: Fix incompatible pointer type in init_perl.
The second argument of PERL_SYS_INIT3 should be a char ***
but ELinks was giving it a char *(*)[1].

Also, enlarge the array to 2 elements, so that my_argv[my_argc] == NULL
like in main().  PERL_SYS_INIT3 seems hardly documented at all so I'm
not sure this is necessary, but it shouldn't hurt.
(cherry picked from commit 8d0677e76a)
2008-06-08 20:40:17 +03:00
Kalle Olavi Niemitalo
bed84c483e Bug 517: read_encoded() == 0 might not mean EOF if non-blocking.
Without this patch, ELinks showed garbage at
<http://www.dwheeler.com/oss_fs_why.html> when bzip2 decompression was
enabled.  safe_read() in bzip2_read() did not see all of the body
bytes that ELinks had received from the server.  After bzip2_read()
received EAGAIN from safe_read() and returned 0, something skipped
1460 bytes.

decompress_data() apparently assumed that read_encoded() returning 0
meant the end of the file, and returned even though len still was
nonzero, i.e. it had not yet written to the pipe all the data that
the caller (read_chunked_http_data() or read_normal_http_data()) had
provided.  The caller did not know this, and discarded the data.
(cherry picked from commit 7e5e05ca60)
2008-06-07 23:33:23 +03:00
Paul B. Mahol
b03ddccf08 Recognize Insert key on cons25 (FreeBSD console) 2008-05-31 13:04:25 +03:00
Kalle Olavi Niemitalo
2463c1b2f8 Bug 939: Documented the fix.
The fix itself is in the parent commit.
(cherry picked from commit 4c390589ea,
 rewriting the NEWS entry because the bug also occurred on Debian)
2008-04-28 11:04:27 +03:00
Witold Filipczyk
8a02678bed fsp: Fixed a serious bug.
*fresult pointed to nowhere. On FreeBSD *fresult == NULL
and directories weren't displayed.
Check also if safe_write writes all data.
(cherry picked from commit 06bcc48487)
2008-04-28 11:04:06 +03:00
Witold Filipczyk
f994ef4335 mkalldirs: Reset ret when errno is EEXIST.
This bug was revelead while using bittorrent.
For filenames started with a dot and two slashes .//
the open_bittorrent_file returned -1 and set errno to EEXIST.
2008-03-29 18:41:22 +02:00
Witold Filipczyk
08894be379 bittorrent: Overflow occuring when a piece was rejected. 2008-03-25 22:35:06 +01:00
Kalle Olavi Niemitalo
4b408dd860 Display subtrees last in --config-help.
elinks --config-help used to sort options like this:

  document.history
  document.history.global
    document.history.global.enable
    document.history.global.max_items
    document.history.global.display_type
    document.history.keep_unhistory

Now it'll instead be:

  document.history
    document.history.keep_unhistory
  document.history.global
    document.history.global.enable
    document.history.global.max_items
    document.history.global.display_type

i.e. all the options listed under a subheading are children of the
tree named by it.  This makes elinks.conf(5) look saner.
2008-03-23 19:20:12 +02:00
Witold Filipczyk
dafb726a49 bug 976: do not use stdout and stderr in a child processing smb://
libsmbclient's stdout and stderr interferred with ELinks's stdout
and stdin. That caused an assertion failure. Now the ELinks uses
different streams for processing of the smb protocol.
2008-03-15 18:09:23 +02:00
Kalle Olavi Niemitalo
cd4a9d77b9 Revert "bug 991: Added the bit field cgi to the structs connection and type_query."
This reverts commit 7ceba1e461,
which is causing an assertion to fail if I open the same PDF
twice in a row, even if I cancel the dialog box when ELinks
first asks which program to run:

INTERNAL ERROR at /home/Kalle/src/elinks-0.12/src/session/download.c:980: assertion download && download->conn failed!

Forcing core dump! Man the Lifeboats! Women and children first!

But please DO NOT report this as a segfault!!! It is an internal error, not a
normal segfault, there is a huge difference in these for us the developers.
Also, noting the EXACT error you got above is crucial for hunting the problem
down. Thanks, and please get in touch with us.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1216698688 (LWP 17877)]
0xb7a02d76 in raise () from /lib/libc.so.6
(gdb) backtrace 6
    at /home/Kalle/src/elinks-0.12/src/util/error.c:179
    fmt=0x816984c "assertion download && download->conn failed!")
    at /home/Kalle/src/elinks-0.12/src/util/error.c:122
    cached=0x8253ca8) at /home/Kalle/src/elinks-0.12/src/session/download.c:980
    cached=0x8253ca8, frame=0)
    at /home/Kalle/src/elinks-0.12/src/session/download.c:1339
    at /home/Kalle/src/elinks-0.12/src/session/task.c:493
(More stack frames follow...)

There is a fix available but I don't trust it yet.
2008-03-11 10:51:20 +02:00
Witold Filipczyk
7ceba1e461 bug 991: Added the bit field cgi to the structs connection and type_query.
CGI scripts are distinguishable from normal files. I hope that this
fixes the bug 991. This commit also reverts the previous revert.
2008-03-09 15:47:35 +02:00
Kalle Olavi Niemitalo
13a04b8fbc Bug 991: Revert "When requested to open local files with a handler use the file in place"
This reverts commit d0be89a16c, and thus
restores the ELinks 0.11 behaviour: always copy the data to a
temporary file before passing it to a MIME handler, even if the
"file:" URI scheme is being used.  Previously, ELinks 0.12.GIT passed
the name of the original file directly to the handler.  That was more
efficient but unfortunately gave the wrong result with local CGI.

The commit being reverted also claims to partially fix bug 238
(caching of local files).  That bug is still open.
2008-03-08 21:20:58 +02:00
Kalle Olavi Niemitalo
5419414b59 Bug 991: Tell users not to quote % in MIME handlers.
ELinks quotes the file name automatically and user-written quote
characters would just interfere with that.
2008-03-08 21:20:58 +02:00
Witold Filipczyk
19079733df Bug 991: URI-decode and shell-quote file name for MIME handler
Currently, when ELinks passes the name of a local file to an external
MIME handler program, it encodes the name as a URI.  Programs
typically do not expect this, and they then fail to open the file.
This patch makes ELinks instead quote the file name for the shell.

(The patch was attachment 425 of bug 991, by Witold Filipczyk.
 This commit message was written by Kalle Olavi Niemitalo.)
2008-03-08 21:20:58 +02:00
Witold Filipczyk
a6966e9472 Bug 991: Replace '%s' by % in the mailcap.c
Currently, when ELinks passes the name of a local file to an external
MIME handler program, it encodes the name as a URI.  Programs
typically do not expect this, and they then fail to open the file.
ELinks should instead quote the file name for the shell.
Unfortunately, Debian has lines like this in /etc/mailcap:

audio/mpeg; xmms '%s'; test=test "$DISPLAY" != ""

If ELinks were changed to replace the %s with e.g.
'/home/Kalle/doc/Topfield/How to upgraded the Firmware(English).pdf'
(quotes included), then the quotes would cancel out and the shell
would split the file name into multiple arguments.  That could even
provide a way for malicious persons to make ELinks run arbitrary
shell commands.

The examples in RFC 1524 all have %s without any quotes.
Debian has two bug reports about the quoting behaviour:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=90483
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=221717

This patch therefore tries to detect whether the %s has been quoted
already, and remove the quotes if so.  That way, the next patch will
be able to safely add its own quotes.  This removal of quotes applies
only to mailcap files; MIME handlers defined in elinks.conf should
already be in the format preferred by ELinks.

(The patch was attachment 438 of bug 991, by Witold Filipczyk.
 This commit message was written by Kalle Olavi Niemitalo.)
2008-03-08 21:20:57 +02:00
Jonas Fonseca
e04b420897 Minor fixes and improvements to option strings
This syncs some changes (ie. -> e.g. etc.) from elinks-0.12 or beyond.
I noticed them while updating the web pages, and apologize that I will
not spent the time to attribute it to the individual commits.

(cherry picked from commit 2bfc7b3724,
 omitting generated files)
2008-03-06 10:31:20 +02:00
Kalle Olavi Niemitalo
4d06362a50 Mark option changed in "File extensions -> Add".
Previously, file extensions added or modified via the menu did not get
saved to elinks.conf when config.saving_style was 3 (the default).
This patch makes the file-extension dialog box call option_changed,
which then sets OPT_TOUCHED, so that the option appears modified in
the option manager and will be saved.

Reported and patch reviewed by Witold Filipczyk.
2008-03-04 23:33:05 +02:00
Witold Filipczyk
8f46de65d6 bug 1000: Do not discard the query part of URI.
(cherry picked from commit 3a4c053bd5)
2008-03-02 17:45:29 +02:00
Kalle Olavi Niemitalo
8b5de30f72 Bug 1001: fix uninitialized-pointer crash in URI rewriting
(cherry picked from commit 6d2e034007)
2008-03-01 16:09:41 +02:00
Kalle Olavi Niemitalo
b0c5da3ddf BUILD_ID: Fix dirt check when srcdir != builddir.
I also tried git --work-tree=$(top_srcdir) but did not get it to work.
2008-03-01 14:30:57 +02:00
Kalle Olavi Niemitalo
747b32b735 BUILD_ID: Show the full SHA-1, instead of git describe.
Git describe happily picks whatever annotated tag is closest to the
commit.  I make use of many annotated tags that correspond not to
ELinks releases but rather to patches posted in bugzilla or sent in
email.  So with git describe, the About window can display e.g.
"email/witekfl/2008-02-29-2-g705acfa-dirty", which is not the intended
use of this tag.

In the "next" branch of git.git, git describe apparently supports a
--match option with which it could be made to consider ELinks releases
only.  However, that option is not yet in any released version of Git,
and anyhow ELinks should support older versions too.

Instead of using git describe, just show the full SHA-1, like
cg-commit-id would.  The About dialog box also displays VERSION
from configure.in, so it isn't even particularly useful to show
the name of the latest tag.  (The commit count might help though.)
2008-03-01 14:01:28 +02:00
Jonas Fonseca
705acfa05a Use git tools instead of cogito for getting the build ID
The build ID now includes both last tagged version, commit generation
since last tagged version, as well as the leading characters of the
commit ID and a flag for dirty working tree.
(cherry picked from commit c2a0d3b969)
2008-03-01 13:55:16 +02:00
Witold Filipczyk
d8a062cffc http encoding: Moved the accept_encoding_header to the http.c. 2008-02-29 15:32:10 +01:00
Jonas Fonseca
8bb0f20471 FTP: Test and fix handling of symbolic link name containing spaces
The bug was reported by Paul B. Mahol on elinks-users. The example is
from the FTP site he provided:

	ftp.freebsd.org/pub/FreeBSD/ISO-IMAGES-ia64/

Message-ID: <3a142e750802262008l6fd55be5v44207bc4479dd3fc@mail.gmail.com>
(cherry picked from commit c069403b75)
2008-02-28 23:39:04 +02:00
Jonas Fonseca
1ad9d5b2b8 Fix the FTP parser test program to handle multiline responses
... so all the tests with responses stretching multiple lines are
actually tested in their entirety.

(cherry picked from commit aa9a847c00,
 resolving a conflict due to the use of get_test_opt)
2008-02-28 23:38:55 +02:00
Jonas Fonseca
577c241438 parse_time: set tm_sec to zero before conditional second parsing
This fixes test 9 (Basic VMS responses) that uses time specs with
seconds left out (e.g. 17:44) for me.
(cherry picked from commit 397bef882b)
2008-02-28 23:38:42 +02:00
Kalle Olavi Niemitalo
3aecdfc095 Content-Encoding: deflate means neither zlib nor gzip header.
deflate.c used to call inflateInit2(stream, MAX_WBITS + 32).
This makes zlib first check for a gzip header, and if it doesn't
find one, assume a zlib header.  However, if the server said
"Content-Encoding: deflate", then neither header is there, and
zlib does not detect this automatically.  So ELinks has to
distinguish between the gzip and deflate encodings, and tell
zlib which one was meant.

This bug resulted in blank pages at blogs.msdn.com accessed
through proxy.suomi.net.
2008-02-27 00:52:24 +02:00
Kalle Olavi Niemitalo
a03698d695 lzma: Set *new_len even if data was truncated.
Commit 474f1f4268 did the same
to bzip2 and deflate.
2008-02-24 20:45:33 +02:00
Witold Filipczyk
26607d2263 decompress_data: Do not leak memory in mem_realloc. 2008-02-24 20:45:33 +02:00
Witold Filipczyk
902522fbdf content encoding: New function accept_encoding_header. 2008-02-24 20:45:32 +02:00
Witold Filipczyk
8492e6b1af lzma: used the lzma library from tukaani.org. 2008-02-24 20:45:32 +02:00
Kalle Olavi Niemitalo
a7232792dd encoding: Don't leak a pipe fd if open_encoded() fails. 2008-02-17 21:54:19 +02:00
Kalle Olavi Niemitalo
474f1f4268 encoding: Set *new_len even if data was truncated.
Previously, bzip2_decode_buffer and deflate_decode_buffer left
*new_len unchanged if the compressed input data ended unexpectedly.
This behaviour was also inherited by decode_encoded_buffer,
whose only caller render_encoded_document preinitializes the variable
and so did not crash.

With this change, the functions now store in *new_len the number of
bytes that were successfully decoded, even if more bytes were expected.
An error should perhaps be reported to the user, but I don't think the
previous version did that either, as it returned a non-NULL pointer.
2008-02-17 21:54:19 +02:00
Witold Filipczyk
0b363eb245 content encoding: handle the case when the len is 0 in the chunked encoding.
We do not want to start decompression when the len is 0
with the chunked encoding.
2008-02-17 21:54:18 +02:00
Witold Filipczyk
cfb2ef63d6 encoding: Fixed a chunked decompression and added the deflate. 2008-02-17 21:54:18 +02:00
Y Giridhar Appaji Nag
4a1e296c3b Bug 1002: Fix build failure on Debian GNU/Linux arch powerpc
Change char id to enum bittorrent_message_id id to prevent FTBFS on
powerpc and s390
(cherry picked from commit 01b0c81227,
 with a conflict)
2008-02-10 14:34:21 +02:00
Kalle Olavi Niemitalo
76d803bbb9 config: Count backslashed newlines in str_rd.
If a newline has a backslash in front of it, then str_rd replaces it
with a space.  However, the newline was in the original config file,
so the line number must still be incremented.
2008-02-10 14:30:26 +02:00
Kalle Olavi Niemitalo
61019c3130 Debian bug 464384: fix OFF_T_FORMAT mismatches on amd64
On AMD64 apparently, off_t is long but ELinks detected SIZEOF_OFF_T == 8
and defined OFF_T_FORMAT as "lld", which expects long long and so causes
GCC to warn about a mismatching format specifier.  Because --enable-debug
adds -Werror to $CFLAGS, this warning breaks the build.  When both
SIZEOF_LONG and SIZEOF_LONG_LONG are 8, ELinks cannot know which type
it should use.

To fix this, do not attempt to find a format specifier for off_t itself.
Instead cast all printed off_t values to a new typedef off_print_T that
is large enough, and replace OFF_T_FORMAT with OFF_PRINT_FORMAT which
is suitable for off_print_T altough not necessarily for off_t.  ELinks
already had a similar scheme with time_print_T and TIME_PRINT_FORMAT.
2008-02-10 11:30:27 +02:00
Kalle Olavi Niemitalo
6555359f8e Debian bug 464384: fix cast warning in ssl_connect
There are warnings about casts in the Debian amd64 build logs:
http://buildd.debian.org/fetch.cgi?&pkg=elinks&ver=0.11.3-2&arch=amd64&stamp=1200348983&file=log

	[CC]   src/intl/gettext/dcigettext.o
/build/buildd/elinks-0.11.3/src/intl/gettext/dcigettext.c: In function '_nl_find_msg':
/build/buildd/elinks-0.11.3/src/intl/gettext/dcigettext.c:745: warning: cast from pointer to integer of different size
/build/buildd/elinks-0.11.3/src/intl/gettext/dcigettext.c:746: warning: cast from pointer to integer of different size
...
	[CC]   src/network/ssl/socket.o
/build/buildd/elinks-0.11.3/src/network/ssl/socket.c: In function 'ssl_connect':
/build/buildd/elinks-0.11.3/src/network/ssl/socket.c:219: warning: cast to pointer from integer of different size

The warnings in _nl_find_msg were caused by alignof, which I already
fixed.  This commit ought to fix the gnutls_transport_set_ptr call in
ssl_connect.  This warning did not yet happen in bug 464384 because
the others broke the build before it got that far.
2008-02-09 15:19:20 +02:00
Laurent MONIN
9ba7079735 Patch: fix for bug 938
This patch prevents  handle_itrm_stdin() and clear_handlers(itrm->in.std) to be
called when -remote is set and in.std < 0.
It adds two assertions for in.std >= 0 in handle_itrm_stdin() and
unhandle_itrm_stdin().
May be a bad fix, please test and review.

[Added a NEWS entry.  --KON]
2008-02-09 14:11:21 +02:00
Kalle Olavi Niemitalo
3b93dcc472 Debian bug 464384: fix cast warning in alignof 2008-02-09 00:24:45 +02:00
Kalle Olavi Niemitalo
a3d093bd25 Bug 54: Don't disable XON/XOFF flow control.
Do not clear the IXON flag in termios.c_iflag.
Bug 54 did not actually ask for this flag to be kept,
but the cable I am using doesn't seem to have the handshake
lines connected right, so XON/XOFF is a must at 38400 bps,
at least until ELinks learns to send padding based on terminfo.

Any user who has bound actions to Ctrl+S or Ctrl+Q and finds that
they no longer work should just "stty -ixon" before running ELinks.
We don't have any default bindings for those keys, fortunately.
2008-02-04 23:22:15 +02:00
Kalle Olavi Niemitalo
cb1454918a Bug 54: Don't force 8-bit characters and no parity.
Actually, don't use the cfmakeraw function at all,
and don't look for it during configure either.

(cherry picked from commit 87f1661314
 but moved the NEWS entry into the 0.12 section)
2008-02-04 23:19:40 +02:00
Kalle Olavi Niemitalo
054852ae23 config: Fix the "include" command.
Previously, it only pretended to rewrite the configuration file, so it
set or cleared OPT_MUST_SAVE but never changed or output any options.
Now, it actually sets the options when ELinks is loading the
configuration file.  Also, when ELinks is rewriting the configuration
file, it now compares the values in the included file to the current
values of the options, and sets or clears OPT_MUST_SAVE accordingly.
2008-02-03 20:28:27 +02:00
Kalle Olavi Niemitalo
92b430f3dc config: Access OPT_MUST_SAVE in the real option, not alias.
So, if elinks.conf contains a "set" command for an alias and ELinks
updates that, it now knows it doesn't have to append another "set"
command for the underlying option.
2008-02-03 20:27:56 +02:00
Kalle Olavi Niemitalo
c47d3798a3 config: Negate the value in redir_rd too.
So if ELinks is rewriting a configuration file that contains a "set"
command for a negated alias, then it properly writes the value of the
alias, rather than the value of the underlying option.
2008-02-03 20:27:54 +02:00
Kalle Olavi Niemitalo
2dbe6ec34f config: In redir_set, negate the incoming value.
That is, let the setter function of the underlying option store the
negated value.  Previously, redir_set used to tweak the value of the
option after it has already called the underlying setter.
2008-02-03 20:27:52 +02:00
Kalle Olavi Niemitalo
7cdbc908d8 config: Rewrite "set" to "unset" and vice versa.
Also, replace OPT_WATERMARK with OPT_MUST_SAVE, which has the opposite
meaning.

Watermarking of aliases does not yet work correctly in this version.
Neither does the "include" command.
2008-02-03 20:27:48 +02:00
Kalle Olavi Niemitalo
6bd961246a config: Reset OPT_TOUCHED flags after a successful save.
Previously, they were reset by smart_config_string(), which was not
called if the value of the option was saved by rewriting an existing
command in elinks.conf.  Also, it is better to reset the flags only
after the file operations have actually succeeded.
2008-02-03 20:27:45 +02:00
Kalle Olavi Niemitalo
ab8ef9698f config: In saving style 2, save deleted options too.
Previously, ELinks set the OPT_WATERMARK flag in all deleted options
when config.saving_style was 2, thus mostly preventing them from being
saved.  This had the unfortunate consequence that if you started with
no elinks.conf, set config.saving_style = 2, deleted some built-in
option (e.g. a URL rewriting rule), saved the settings, and restarted
ELinks, then the built-in option would reappear.
2008-02-03 20:27:41 +02:00
Kalle Olavi Niemitalo
6d55be2043 config: Let mirroring be implicit unless values are rewritten. 2008-02-03 20:27:37 +02:00
Kalle Olavi Niemitalo
72de752f84 config: Rearrange mirror-or-not checks. 2008-02-03 20:27:08 +02:00
Kalle Olavi Niemitalo
661dda04c9 config: Let "unset" delete built-in options too. 2008-02-03 20:26:50 +02:00
Kalle Olavi Niemitalo
2c9d966c99 config: Unsetting a missing option is not an error. 2008-02-03 14:43:43 +02:00
Kalle Olavi Niemitalo
3f077d109a config: Remember the address and length of the option name.
A later commit will take advantage of this.
2008-02-03 14:43:40 +02:00
Kalle Olavi Niemitalo
e7bd23ff37 config: More cleverly skip unrecognized or malformed commands. 2008-02-03 14:43:38 +02:00
Kalle Olavi Niemitalo
e06416d248 config: Skip values of unrecognized options.
To avoid parsing them as commands.
2008-02-03 14:43:36 +02:00
Kalle Olavi Niemitalo
edad2ddccd config: Report errors before the line number is lost. 2008-02-03 14:43:34 +02:00
Kalle Olavi Niemitalo
1f0c361ead config, Bug 503: Keep track of what has been mirrored. 2008-02-03 14:43:31 +02:00
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
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
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
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
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
Witold Filipczyk
588e914470 bug 978: Python's webbrowser.open_new_tab(URL) works since now. 2007-11-22 19:10:45 +01:00
Kalle Olavi Niemitalo
e667c43cd3 Bug 975: Fix int/size_t pointer type mismatch.
On machines where sizeof(size_t) > sizeof(int), this could corrupt the stack.
I think -Wno-pointer-sign added by configure hid this bug until now.
STRLEN is correct in Perl 5.6.0 and later, perhaps earlier too.
2007-11-10 19:28:01 +02:00
Kalle Olavi Niemitalo
e2cc0bd434 Don't cast qsort comparison function pointers.
Instead, convert the element pointers inside the comparison functions.

The last argument of qsort() is supposed to be of type
int (*)(const void *, const void *).  Previously, comp_links() was
defined to take struct link * instead of const void *, and the type
mismatch was silenced by casting the function pointer to void *.
This was in principle not portable because:

(1) The different pointer types may have different representations.
    In a word-oriented machine, the const void * might include a byte
    selector while the struct link * might not.

(2) Casting a function pointer to a data pointer can lose bits in some
    memory models.  Apparently this does not occur in POSIX-conforming
    systems though, as dlsym() would fail if it did.

This commit also fixes hits_cmp() and compare_dir_entries(), which
had similar problems.  However, I'm leaving alias_compare() in
src/intl/gettext/localealias.c unchanged for now, so as not to diverge
from the GNU version.

I also checked the bsearch() calls but they were all okay, apart from
one that used the alias_compare() mentioned above.
2007-10-06 23:05:05 +03:00
Laurent MONIN
baf2d47a8c Make copyright info independent from translations.
This is an attempt to make it easier to update without
requiring to update all translations.
Copyright info is now set in setup.h using COPYRIGHT_STRING
2007-10-03 11:53:09 +02:00
Laurent MONIN
11e477a63e ELINKS_HOMEPAGE -> ELINKS_WEBSITE_URL 2007-10-03 11:23:29 +02:00
Laurent MONIN
3f48ae491f Add an "Authors" entry to the Help menu.
It displays the ELinks website's authors page.
2007-10-03 11:16:37 +02:00
Miciah Dashiel Butler Masters
a197bde2f6 Really retry forever when connection.retries = 0
This feature has been broken since zas backported it from Links 0.99pre3 2003-04-20.
2007-09-26 16:18:59 +00:00
Laurent MONIN
27057926b9 Fix compilation with --disable-css.
Compilation failed due to missing DEBUG_CSS test.
This was introduced in commit 98260f7970
2007-09-21 11:05:40 +02:00
Laurent MONIN
39d9f669c9 Revert "format_html_part(): save and restore renderer_context.last_tag_for_newline too."
This reverts commit 4abce8e363.
This was a bad move, anchors ceased to function correctly.
Reported by Witekfl.
2007-09-19 09:14:53 +02:00
Laurent MONIN
7b6cb249ed Fix compilation using --enable-html-highlight.
It was broken by commit 09cf904814.
Reported by witekfl.
2007-09-17 10:54:52 +02:00
Laurent MONIN
b389d1b20e Revert "Use the new OBJS-unless$(CONFIG_FOO) instead of $(call not,...)"
This reverts commit e07354f5d5.
2007-09-14 17:43:36 +02:00
Kalle Olavi Niemitalo
07535cf886 Define BITTORRENT_NULL_ID in common.c; declare extern in common.h.
This change avoids linker warnings when building with Debian tcc
0.9.23-4 + patch from Debian bug 418360:

      [LD]   src/protocol/bittorrent/lib.o
bittorrent.o: 'BITTORRENT_NULL_ID' defined twice
common.o: 'BITTORRENT_NULL_ID' defined twice
connection.o: 'BITTORRENT_NULL_ID' defined twice
dialogs.o: 'BITTORRENT_NULL_ID' defined twice
peerconnect.o: 'BITTORRENT_NULL_ID' defined twice
peerwire.o: 'BITTORRENT_NULL_ID' defined twice
piececache.o: 'BITTORRENT_NULL_ID' defined twice
tracker.o: 'BITTORRENT_NULL_ID' defined twice
2007-09-14 16:58:16 +02:00
Miciah Dashiel Butler Masters
a46379a931 Move is_in_domain from cookies/cookies.c to protocol/uri.c and export 2007-09-14 16:51:04 +02:00
Jonas Fonseca
e07354f5d5 Use the new OBJS-unless$(CONFIG_FOO) instead of $(call not,...) 2007-09-14 16:48:26 +02:00
Miciah Dashiel Butler Masters
7033247905 Introduce start_document_refreshes()
start_document_refreshes() performs the NULL-pointer checks that
previously all callers to start_document_refresh() must perform
and then calls start_document_refresh().
2007-09-14 16:44:04 +02:00
Jonas Fonseca
8e3c2d6042 Move find_tag to document/document 2007-09-14 16:29:13 +02:00
Laurent MONIN
f0e66866f5 Trim trailing whitespaces. 2007-09-14 15:12:32 +02:00
Jonas Fonseca
890903a65d Compile fix for commit e876df70d8 2007-09-14 15:08:51 +02:00
Petr Baudis
c1b91c7bf3 document/html: Make HTML parser state transparent
Before, *_html_parser_state() operated with struct html_element *. Now, it is
transparent for the renderer (just void *), so that DOM won't have to provide
this struct but will be able to use something internal.

Backported from master.
2007-09-14 15:06:56 +02:00
Petr Baudis
37b20d998c document/html: Move enum html_special_type from parser.h to renderer.h
...since it is renderer interface.
2007-09-14 15:03:14 +02:00
Laurent MONIN
09cf904814 Backport Pasky's changes concerning text_style-related stuff.
It partially includes changes made in following commits:

document/html: struct text_attrib_style -> struct text_style
commit    e133941206

document: struct format_attr -> struct text_style_format
commit    070d335796

document: Unify text style -> screen attribute handling
commit    b66d2bec67

document: Move text_style-related stuff to dedicated format.*
commit    db9431465f
2007-09-14 14:59:37 +02:00
Laurent MONIN
ee503f6c00 Prevent internal errors when terminal width or height are very small
(1x1 was fatal).
2007-09-14 11:49:03 +02:00
Laurent MONIN
e9e8639c8d Improve display of version and features.
Wrap on spaces when features are sent to console using -version,
and let Info dialog do the job in interactive mode.
Insert newlines and remove parenthesis in -version and Info box display.

Backported from master branch.
2007-09-14 10:34:42 +02:00
Laurent MONIN
419cd4775e format_html_part(): group int variables declarations 2007-09-14 10:07:32 +02:00
Laurent MONIN
4abce8e363 format_html_part(): save and restore renderer_context.last_tag_for_newline too. 2007-09-14 09:59:34 +02:00
Laurent MONIN
a6f3323a4b Use explicit names for variables in format_html_part().
llm -> saved_last_link_to_move
ltm -> saved_last_tag_to_move
ef  -> saved_empty_format
lm  -> saved_margin
2007-09-14 09:55:43 +02:00
Laurent MONIN
73b1f43468 Drop useless goto/label. 2007-09-14 09:26:39 +02:00
Laurent MONIN
6e89b39ed0 Fix get_opt_bool() call and finish backport of process_head() split. 2007-09-12 23:51:43 +02:00
Miciah Dashiel Butler Masters
bd0a6f6f7d Reflow check_head_for_cache_control 2007-09-12 23:41:37 +02:00
Miciah Dashiel Butler Masters
deb74bd1bd Factor check_head_for_cache_control out of process_head 2007-09-12 23:41:17 +02:00
Miciah Dashiel Butler Masters
4b297a5b03 Factor check_head_for_refresh out of process_head 2007-09-12 23:38:41 +02:00
Miciah Dashiel Butler Masters
23262b3145 Fix process_head to check for cache-control information even if no refresh
Previously, process_head immediately returned if there was no refresh, never giving the cache-control check further down a chance to run.

Also add new tests:

   nocache.html
   refresh+nocache.html
2007-09-12 23:33:40 +02:00
Laurent MONIN
5b28e89026 Extend Use of LWS() macro to parse_old_meta_refresh(). 2007-09-11 17:57:19 +02:00
Laurent MONIN
41ece7a758 Make meta refresh content attribute parsing more tolerant.
Simply search for 'url' marker ignoring anything
before it.
ELinks is now able to follow incorrectly written
meta refresh content attribute with missing ; before
url= parameter.
As an example, try http://akkada.tivi.net.pl/
2007-09-11 17:55:10 +02:00
Jonas Fonseca
8dbd38eded NNTP: Improve listing of articles for groups
It now uses ordered list with the message number as the list item
number. Only the message subject and from field are shown.
2007-09-11 17:01:06 +02:00
Jonas Fonseca
0b0222d64f NNTP: Add support for handling RFC2047 encoded words
Code adapted from git's builtin-mailinfo.c file.
2007-09-11 16:59:56 +02:00
Jonas Fonseca
8393dc901e Bug 744: Make removal of double slashes more protocol specific
Add a boolean protocol flag which says whether "//" in the path
part of an URI can be safely substituted with "/". Be conservative
and enable it only for file://, ftp:// and nntp[s]://. Other
can be turned on later, if needed.

Generalizes the fix from 58b3b1e752.
2007-09-11 14:14:17 +02:00
Jonas Fonseca
5d5f7fc078 NNTP: Fix group listing links having bad URL syntax due to double slashes 2007-09-11 13:50:17 +02:00
Jonas Fonseca
1961a0ca50 NNTP: HTML escape header field values 2007-09-11 13:21:00 +02:00
Kalle Olavi Niemitalo
db115bfece Add tests for cwd-relative file URIs.
Test 6 currently fails.
2007-09-09 20:06:25 +03:00
Jonas Fonseca
58b3b1e752 Reinstate "canonicalization" of path names for file URIs
This reverts commit 4f0aaa166e
and insert check for the "//" -> "/" change only to occur for
file:// URIs. This fixes the recent reports on broken handling
of relative file URIs starting with "..".
2007-09-09 18:17:25 +02:00
Kalle Olavi Niemitalo
cdf2d8181c More missing va_ends.
Somehow, these slipped from commit
af14d00d17 yesterday.
2007-09-04 10:26:57 +03:00
Kalle Olavi Niemitalo
16d4e81f1b Merge commit 'pasky.or.cz/elinks-0.12' into elinks-0.12 2007-09-03 21:04:40 +03:00
Kalle Olavi Niemitalo
c44739e039 Refer to bug 96 in a comment. 2007-09-03 21:02:58 +03:00
Kalle Olavi Niemitalo
a59f44c4b5 Document Unicode characters for ACS_S[1379]. 2007-09-03 21:01:49 +03:00
Kalle Olavi Niemitalo
af14d00d17 Add missing va_ends.
I'm not sure they're needed anywhere nowadays, but still.
2007-09-03 21:01:11 +03:00
Witold Filipczyk
7f49eda39e DOM renderer: off by one error. 2007-09-02 20:44:36 +00:00
Kalle Olavi Niemitalo
78f733c6c1 More doc comments about coordinates. 2007-08-29 09:57:18 +03:00
Jonas Fonseca
8376feb6b1 Fix protocol/test ignore rule for the uri-test program 2007-08-28 20:35:14 +02:00
Jonas Fonseca
bbd7c8354a Move get_test_opt to util/test.h and use throughout test programs 2007-08-28 20:34:17 +02:00
Jonas Fonseca
c6a223c8dd dom/test: properly test test option matches in get_test_opt 2007-08-28 20:22:29 +02:00
Jonas Fonseca
5d88ea78f9 dom/test: rename get_opt to get_test_opt to avoid namespace problems 2007-08-28 20:16:27 +02:00
Jonas Fonseca
0f53941fef Introduce test library in util/test.h containing the die() function
Fix the die() function to exit with EXIT_FAILURE value as pointed
out by Kalle on elinks-dev in <87tzqkxhlp.fsf@Astalo.kon.iki.fi>.
2007-08-28 20:14:08 +02:00
Kalle Olavi Niemitalo
40afaae7d6 Doc comments about coordinate systems.
So that I may better understand Witek's patches.
2007-08-28 09:52:37 +03:00
Jonas Fonseca
5f18156708 Change protocol/test to use the shell-based test infrastructure 2007-08-10 13:30:28 +02:00
Jonas Fonseca
b3ca6a9e1f Add rule to make (c)tags file
Also fix (e)TAGS rule to work when srcdir == builddir and
Remove the tag files during clean.
2007-08-10 10:26:14 +02:00
Jonas Fonseca
36f59cacd6 Ignore tags file 2007-08-08 14:25:38 +02:00
Jonas Fonseca
d083619988 Fix doxygen warning about list end marker 2007-08-08 14:24:55 +02:00
Jonas Fonseca
1079c95b9d Integrate Doxygen better in the build system
This change:

 - Adds a check for the doxygen program to configure.
 - Moves the Doxyfile from src/Doxyfile to doc/Doxyfile.in.
 - Generates a doc/Doxyfile from doc/Doxyfile.in inserting
   an absolute path to the source directory, so that it
   also works when builddir != srcdir.
 - Adds `make api` rule for running doxygen; it depends on
   api/doxygen file which is never created to force the rule
   to always run.
2007-08-08 14:23:21 +02:00
Jonas Fonseca
4e710a3aa6 Doxygenate main header files of src/protocol/bittorrent 2007-08-08 13:20:26 +02:00
Jonas Fonseca
ab5e7f116b Update hierbox comments and make them ready for Doxygen
Noticed by kon.
2007-08-08 13:18:53 +02:00
Jonas Fonseca
fd9f1f8f6d Doxify bfu/style
Also fixes an old misleading comment noticed by kon.
2007-07-31 14:39:12 +02:00
Jonas Fonseca
b831ee64aa Fix dom_node_attribute comment mentioning non-existant struct
Noticed by kon.
2007-07-31 14:37:41 +02:00
Kalle Olavi Niemitalo
dc2cac851d itrm: Don't mention bug 776 which was already fixed. 2007-07-31 14:14:08 +03:00
Kalle Olavi Niemitalo
cc813e8541 Doxygen: minor changes in src/terminal/itrm.h 2007-07-31 14:12:28 +03:00
Kalle Olavi Niemitalo
870df797cf Doxygen: Escape some HTML tags. 2007-07-31 13:48:20 +03:00
Kalle Olavi Niemitalo
76c6f38169 Doxygen: Begin commands with @ not \. 2007-07-31 13:47:12 +03:00
Kalle Olavi Niemitalo
0cb047b298 Bug 968: Don't use copy_chars in justify_line.
All the needed memory has been allocated before the loop so we can use
copy_screen_chars() directly.  This avoids the assertion failure in
copy_chars() for width==0 and should be a bit faster too.  According
to ISO/IEC 9899:1999 7.21.1p2, memcpy() doesn't copy anything if n==0
(but the pointers must be valid).
(original 'git cherry-pick' arguments: cherry-pick bug968-att394)
2007-07-30 16:43:46 +03:00
Kalle Olavi Niemitalo
fd902e81da Rewrite wiki to en.wikipedia.org, avoid server bug.
<http://www.wikipedia.org/w/wiki.phtml?search=sue%20lawley>
incorrectly redirects to
<http://en.wikipedia.org/w/wiki.phtml?search=sue%2520lawley>
which searches for "sue%20lawley" rather than "sue lawley".
By using en.wikipedia.org directly, we avoid the server bug.
Prompted by an elinks-users post on 2007-07-27.

I asked on #wikimedia-tech, and www.wikipedia.org does always
redirect to en.wikipedia.org; it does not guess any other
language based on headers or IP addresses or such.  Also, the
redirection exists only for compatibility, and skipping it
avoids a few roundtrips to the server.  So this change is good
even if the server is eventually fixed.
2007-07-30 15:07:20 +03:00
Kalle Olavi Niemitalo
bf63228e56 Doxygen: Define CONFIG_ECMASCRIPT and CONFIG_ECMASCRIPT_SEE. 2007-07-29 19:45:55 +03:00
Kalle Olavi Niemitalo
21052fafb0 Doxygen: more links in terminal/screen.c 2007-07-29 13:02:02 +03:00
Kalle Olavi Niemitalo
6311a9d7a6 TAGS: recognize static INIT_LIST_OF 2007-07-29 12:55:38 +03:00
Kalle Olavi Niemitalo
778996d725 Doxygen: expand INIT_LIST_OF 2007-07-29 12:55:25 +03:00
Kalle Olavi Niemitalo
297ad024c3 const in css_appliers[] 2007-07-28 02:38:11 +03:00
Kalle Olavi Niemitalo
80f5ec1827 Doxygenate src/document/css/ 2007-07-28 02:35:36 +03:00
Kalle Olavi Niemitalo
a26db3948a Doxygenate src/document/ (but not subdirs) 2007-07-28 02:34:59 +03:00
Kalle Olavi Niemitalo
4231b9d8d8 Doxygen: minor fixes in handle_trm 2007-07-28 02:34:20 +03:00
Kalle Olavi Niemitalo
c78f59e78c Doxygen: rename struct key to reduce spurious links
Rename struct key to struct named_key, use more const, change the num
member from int to term_event_key_T, and put a KBD_UNDEF at the end of
the array (even though it won't be read).
2007-07-27 19:19:16 +03:00
Kalle Olavi Niemitalo
3fac1bc421 Doxygen: document text parameter of format_text{,utf8} 2007-07-27 19:01:07 +03:00
Kalle Olavi Niemitalo
8cfe7e026f Doxygenate src/terminal/ 2007-07-27 18:33:33 +03:00
Kalle Olavi Niemitalo
dbed021395 Doxygen: Define CONFIG_UTF8. 2007-07-27 16:50:06 +03:00
Kalle Olavi Niemitalo
54dfa64c04 Doxygen: @relates 2007-07-27 14:14:00 +03:00
Kalle Olavi Niemitalo
b70aa312d0 Doxygenate src/viewer/text/ 2007-07-27 14:13:27 +03:00
Kalle Olavi Niemitalo
e530fbe8e2 Doxygenate src/util/ 2007-07-27 13:10:50 +03:00
Kalle Olavi Niemitalo
364485f6bb Doxygen: Disable many slow features. 2007-07-27 12:34:37 +03:00
Kalle Olavi Niemitalo
4ac2c7031d Add src/Doxyfile for the whole ELinks. 2007-07-27 10:04:38 +03:00
Kalle Olavi Niemitalo
d5f2d90611 Doxygenate src/session/ 2007-07-27 09:55:40 +03:00
Kalle Olavi Niemitalo
96176a8c77 Declare element types of lists. 2007-07-26 22:47:23 +03:00
Kalle Olavi Niemitalo
d3d2bb26c5 New macro LIST_OF for better Doxygen support. 2007-07-26 22:45:51 +03:00
Kalle Olavi Niemitalo
2433150058 Delete unused keybinding_dialog_list. 2007-07-26 22:45:19 +03:00
Kalle Olavi Niemitalo
585f8b426b Doxygen syntax fixes
Fix warnings:
dom/stack.h:70: Warning: explicit link request to 'pop_dom_node' could not be resolved
dom/stack.h:71: Warning: explicit link request to 'pop_dom_nodes' could not be resolved
dom/stack.h:71: Warning: explicit link request to 'pop_dom_state' could not be resolved
dom/stack.h:115: Warning: explicit link request to 'done_dom_node' could not be resolved

Use @returns instead of \return in src/document/css/parser.c,
and other such things.
2007-07-26 14:14:27 +03:00
Jonas Fonseca
a721f62be3 Bug 723: Always get the current frame when loading frame files
This cleans up and changes the calling convention of
load_additional_file(), so that it now grab its own doc_view using
current_frame() and the struct session pointer in the file_to_load
object. By always looking up the current frame, corruption of doc_view
due to rerendering of the upper frame document is avoided.

The fix extends commit 6afdbf608f by
Witold, which moved the getting of doc_view in the other caller of
load_additional_file(). The additional clean up ensures that any future
users of load_additional_file() will not reintroduce a similar bug.

A possible future optimization would be to change load_additional_file()
to take the referrer as an argument.
2007-07-24 15:27:21 +02:00
Jonas Fonseca
efcd6c9758 Bug 896: use safe_strncpy when initializing the program field
This cleans up the previous fix and also fixes the problem mentioned
regarding ELinks still crashing when the first character is removed.
2007-07-24 12:47:35 +02:00
Jonas Fonseca
39a50f07c0 Add .gitignore file listing the test_uri program 2007-07-24 12:35:11 +02:00
Kalle Olavi Niemitalo
64da6774c2 CSS: Count nested blocks when skipping.
When skipping "@media print { #foo {bar: baz} pre {white-space: normal} }",
the previous code would look for the first "{" and then the first "}", and
fail to skip the "pre" rule.  Seen at support.microsoft.com.

I originally posted this change as part of attachment 383 to bug 722.
2007-07-22 16:51:04 +03:00
Kalle Olavi Niemitalo
b1cc717789 Preserve underlines in links when justifying. 2007-07-20 17:57:01 +03:00
Kalle Olavi Niemitalo
56d3f4ff6c Bug 744: Consume semicolons and fix parameters of stubs.
Most stub protocol handlers were protocol_external_handler_T when they
should have been protocol_handler_T.
2007-07-19 17:07:28 +03:00
Jonas Fonseca
d26b7b0b23 Add stub.o to cleaned files and more protocol module and handler stubs 2007-07-19 15:46:31 +02:00
Kalle Olavi Niemitalo
a2f3ec1ef7 Bug 744: More tests and fix failures. 2007-07-19 14:28:20 +03:00