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

3031 Commits

Author SHA1 Message Date
Kalle Olavi Niemitalo
bfb034c953 Revert "copiousoutput: cleanup after copiousoutput handling. Temporary files should"
I am reverting all copiousoutput support because of bug 917.
This reverts commit 4dc4ea47f2.

Conflicts:

	src/network/connection.h: After the original commit, the declaration
	  of copiousoutput_data had been changed to use the LIST_OF macro.
	  Also, connection.cgi had been added next to the connection.popen
	  member added by the original commit.
	src/session/download.c: After the original commit, the definition of
	  copiousoutput_data had been changed to use the INIT_LIST_OF macro.
2008-06-15 14:17:44 +03:00
Kalle Olavi Niemitalo
5ef6c9e395 Revert "copiousoutput: only mark /dev/fd/%d as popen data . I reflect if ELinks may"
I am reverting all copiousoutput support because of bug 917.
This reverts commit f377e6f4af.
2008-06-15 14:09:12 +03:00
Kalle Olavi Niemitalo
1661109a99 Revert "copiousoutput: I'm not sure about this. pclose may hang ELinks for long time,"
I am reverting all copiousoutput support because of bug 917.
This reverts commit 47f3dd0421.
2008-06-15 14:08:18 +03:00
Kalle Olavi Niemitalo
95c2c941eb Revert "Fix to the new internal copiousoutput handling"
I am reverting all copiousoutput support because of bug 917.
This reverts commit ae58ab8fd7.
2008-06-15 14:06:47 +03:00
Kalle Olavi Niemitalo
01dd1b3b65 Revert "When prompting a program for copiousoutput don't show the block checkbox"
I am reverting all copiousoutput support because of bug 917.
This reverts commit 0c2ce62459.
2008-06-15 14:05:55 +03:00
Witold Filipczyk
1544b5f4b9 bug 991: fix crash when the file is already cached
If the user opens the same file again after it is in the cache, then
ELinks does not always open a new connection, so download->conn can be
NULL in init_type_query(), and download->conn->cgi would crash.
Don't read that, then; instead add a new flag cache_entry.cgi, which
http_got_header() sets or clears as soon as possible after the cache
entry has been created.
(cherry picked from commit 81f8ee1fa2)
2008-06-15 13:53:34 +03:00
Witold Filipczyk
d15439edff 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.
(cherry picked from commit 7ceba1e461)
2008-06-15 13:07:02 +03:00
Kalle Olavi Niemitalo
a3fba83f80 Remove a comment about kill_timer()
The comment said "it is not possible to call kill_timer from a timer
handler."  Sure, such calls used to crash occasionally, but that was
bug 868 and has already been fixed.
2008-06-15 11:41:52 +03:00
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
2e1df1dc78 Bug 1012: Compile with -fno-strict-overflow or -fwrapv.
(cherry picked from commit b7312e6882)
2008-05-10 23:31:05 +03:00
Kalle Olavi Niemitalo
34bdddbd87 Regenerated manpages using help2xml 2008-05-03 20:37:44 +03:00
Kalle Olavi Niemitalo
573036a403 Generate DocBook and XHTML with help2xml.
The older help2doc script is no longer used for anything.

To make future cherry-picking easier, this commit does not include the
resulting changes in generated files.
2008-05-03 20:28:45 +03:00
Kalle Olavi Niemitalo
604b99d5a4 help2xml: New script.
The intention is to convert --config-help and --long-help outputs to
DocBook XML and XHTML rather than AsciiDoc, so that the converter does
not have to work around the intricate AsciiDoc syntax.  However, this
commit does not yet connect the script to doc/Makefile.

XHTML could be generated from DocBook XML, but the script outputs it
directly because our DocBook is primarily intended for manual pages
and so does not have all the links that are useful in HTML.
2008-05-03 20:27:47 +03:00
Kalle Olavi Niemitalo
f30583d605 Do not .gitignore doc/man/man5/*.5, which are already in Git. 2008-05-03 20:27:16 +03:00
Kalle Olavi Niemitalo
be3d0d1be0 NEWS: temporarily mention bug 991 2008-04-28 22:05:17 +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
Kalle Olavi Niemitalo
1ab670cfce NEWS: the elinks-0.11 branch is at 0.11.4rc1.GIT already 2008-04-28 11:03:40 +03:00
Witold Filipczyk
6302ee5e13 Test commit. 2008-03-29 19:45:20 +01:00
Witold Filipczyk
8995fb2be5 pl.po: Changed hotkeys to be consistent with 0.13.GIT. 2008-03-29 19:24:08 +01: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
5e88382033 Polish translation was updated. 2008-03-29 16:23:23 +01:00
Witold Filipczyk
94ce034073 pl.po: Previous commit was wrong. 2008-03-29 15:43:23 +01:00
Witold Filipczyk
1799270719 pl.po: Small fixes. 2008-03-29 15:29:08 +01:00
Laurent MONIN
6f0b7f6d8f Merge branch 'elinks-0.12' of git+ssh://pasky.or.cz/srv/git/elinks into elinks-0.12 2008-03-25 22:32:25 +01:00
Witold Filipczyk
08894be379 bittorrent: Overflow occuring when a piece was rejected. 2008-03-25 22:35:06 +01:00
Laurent MONIN
511cccd190 French translation was updated. 2008-03-25 22:31:19 +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
Kalle Olavi Niemitalo
e2d7ce588f Relicense my Perl scripts to ISC license
The primary motivation for this change is that the disclaimer now
refers to the author whereas it used to refer to the copyright holder.

The ISC license is the preferred license for new code in OpenBSD.
http://www.openbsd.org/policy.html
http://www.openbsd.org/cgi-bin/cvsweb/src/share/misc/license.template?rev=1.2

I am also removing the reference to "the same terms as Perl itself"
because those terms are not being distributed with ELinks.  Anyway,
Perl 5 is dual licensed under the Artistic License and the GNU General
Public License (version 1 or later), and the ISC license seems GPL
compatible to me.
2008-03-23 13:28:06 +02:00
Kalle Olavi Niemitalo
0d7ff95d72 build: Quote redirections when echoing commands.
Without this, "make --directory=doc V=1 keymap-defaults.txt"
would not display the command it runs, because the command is

LC_ALL=C LANGUAGE=en /home/Kalle/src/elinks-0.12/doc/tools/keys2doc /home/Kalle/src/elinks-0.12/src/config/kbdbind.c keymap-defaults.txt > keymap-defaults.txt

and the build system would run

echo LC_ALL=C LANGUAGE=en /home/Kalle/src/elinks-0.12/doc/tools/keys2doc /home/Kalle/src/elinks-0.12/src/config/kbdbind.c keymap-defaults.txt > keymap-defaults.txt && LC_ALL=C LANGUAGE=en /home/Kalle/src/elinks-0.12/doc/tools/keys2doc /home/Kalle/src/elinks-0.12/src/config/kbdbind.c keymap-defaults.txt > keymap-defaults.txt

so, the initial echo was redirected to keymap-defaults.txt too,
and then overwritten with the intended output.  Now, the build
system instead runs

echo 'LC_ALL=C LANGUAGE=en /home/Kalle/src/elinks-0.12/doc/tools/keys2doc /home/Kalle/src/elinks-0.12/src/config/kbdbind.c keymap-defaults.txt > keymap-defaults.txt' && LC_ALL=C LANGUAGE=en /home/Kalle/src/elinks-0.12/doc/tools/keys2doc /home/Kalle/src/elinks-0.12/src/config/kbdbind.c keymap-defaults.txt > keymap-defaults.txt

which echoes the redirection instead of executing it.  This change
also makes the output correctly preserve quotes in some other rules.
2008-03-22 11:16:07 +02:00
Witold Filipczyk
96162a9f74 pl.po: Rozszerzenia -> Rozszerzenia plików 2008-03-21 15:15:45 +01: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
9bd5b23ee5 Doxyfile.in: Use @VERSION@.
doc/release.txt need not be changed now, because it already did not
mention updating the version number in Doxyfile.in.
2008-03-11 10:54:54 +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
7bdeb3188e When releasing po files should also be updated 2008-03-08 20:15:38 +01:00
Kalle Olavi Niemitalo
0efc9772f9 make update-man, with AsciiDoc 8.2.2 and DocBook XSL 1.72.0 2008-03-08 16:19:28 +02:00
Kalle Olavi Niemitalo
5fcf175963 help2doc: rewrite in Perl
This version takes about 1/300 of the time of the shell version
and fixes several errors in the output, most importantly that
option descriptions were being truncated at the first empty line.

Because help2doc is run only from make update-man, and the distributed
tarballs include prebuilt man pages, people building ELinks need not
have Perl installed.
2008-03-08 14:51:25 +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
Jonas Fonseca
34a18bd597 Add description and version info to manpages
This adopts customized docbook manpage header from git's
Documentation/asciidoc.conf and does away with a couple of
ugly hacks.

(cherry picked from commit 0ecc8b9d60,
 omitting generated files)
2008-03-06 10:28:09 +02:00
Kalle Olavi Niemitalo
857c27e8b6 elinks.conf.5: quoting corrections
In set and unset commands, the <option> must not be quoted.  In the
sample protocol.user.mailto.unix setting, the internal quotes were
using some manpage syntax, resulting in incorrect HTML output.
2008-03-06 10:23:21 +02:00
Miciah Dashiel Butler Masters
1086a7c561 elinks.conf.5: Correct description of 'unset' directive
The 'unset' directive does not take a value.
(cherry picked from commit dc7731d30d)
2008-03-05 22:34:10 +02:00
Jonas Fonseca
b28ccd6e4f keys2doc: fix handling of dots (.) in description list term
Quote character keybindings to workaround unescaped (resulting to
invisible) dots in elinkskeys(5).
(cherry picked from commit 3de420d72f)
2008-03-05 10:04:47 +02:00