1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-10-01 03:36:26 -04:00
Commit Graph

26 Commits

Author SHA1 Message Date
sgerwk
153ea907a8 also pass the uri as %u to external handlers 2020-07-25 13:29:47 +02:00
Witold Filipczyk
3d96b0d7d7 Revert "Compile with C++."
This reverts commit 4f4df33638.
2019-04-21 12:27:40 +02:00
Witold Filipczyk
4f4df33638 Compile with C++.
Weak points:
- alignof
- js problems

Todo:
- make js work with C++ and mozjs-17
- then mozjs-24
- then mozjs-52
- then mozjs-60
- decrease number of warnings
2019-02-17 20:46:16 +01:00
Witold Filipczyk
52d6f37c8e Explicit cast to (const char *) for strchr function (C++) 2016-04-20 19:43:37 +02:00
Kalle Olavi Niemitalo
8b00e1ef70 bug 764: Initialize the right member of union option_value
INIT_OPTION used to initialize union option_value at compile time by
casting the default value to LIST_OF(struct option) *, which is the
type of the first member.  On sparc64 and other big-endian systems
where sizeof(int) < sizeof(struct list_head *), this tended to leave
option->value.number as zero, thus messing up OPT_INT and OPT_BOOL
at least.  OPT_LONG however tended to work right.

This would be easy to fix with C99 designated initializers,
but doc/hacking.txt says ELinks must be kept C89 compatible.
Another solution would be to make register_options() read the
value from option->value.tree (the first member), cast it back
to the right type, and write it to the appropriate member;
but that would still require somewhat dubious conversions
between integers, data pointers, and function pointers.

So here's a rather more invasive solution.  Add struct option_init,
which is somewhat similar to struct option but has non-overlapping
members for different types of values, to ensure nothing is lost
in compile-time conversions.  Move unsigned char *path from struct
option_info to struct option_init, and replace struct option_info
with a union that contains struct option_init and struct option.
Now, this union can be initialized with no portability problems,
and register_options() then moves the values from struct option_init
to their final places in struct option.

In my x86 ELinks build with plenty of options configured in, this
change bloated the text section by 340 bytes but compressed the data
section by 2784 bytes, presumably because union option_info is a
pointer smaller than struct option_info was.
(cherry picked from elinks-0.12 commit e5f6592ee2)

Conflicts:
	src/protocol/fsp/fsp.c: All options had been removed in 0.13.GIT.
	src/protocol/smb/smb2.c: Ditto.
2012-11-03 22:16:32 +02:00
Kalle Olavi Niemitalo
1bb71f3732 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/config/conf.c
	src/network/ssl/ssl.c
2009-03-12 08:46:02 +02:00
Kalle Olavi Niemitalo
5a43c55c9e Rewrap lines in option documentation.
Documentation strings of most options used to contain a "\n" at the
end of each source line.  When the option manager displayed these
strings, it treated each "\n" as a hard newline.  On 80x24 terminals
however, the option description window has only 60 columes available
for the text (with the default setup.h), and the hard newlines were
further apart, so the option manager wrapped the text a second time,
resulting in rather ugly output where long lones are interleaved with
short ones.  This could also cause the text to take up too much
vertical space and not fit in the window.

Replace most of those hard newlines with spaces so that the option
manager (or perhaps BFU) will take care of the wrapping.  At the same
time, rewrap the strings in source code so that the source lines are
at most 79 columns wide.

In some options though, there is a list of possible values and their
meanings.  In those lists, if the description of one value does not
fit in one line, then continuation lines should be indented.  The
option manager and BFU are not currently able to do that.  So, keep
the hard newlines in those lists, but rewrap them to 60 columns so
that they are less likely to require further wrapping at runtime.
2009-03-08 15:18:10 +02:00
Kalle Olavi Niemitalo
fb966b87a3 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:

	doc/Doxyfile.in
2008-03-15 19:24:51 +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
Miciah Dashiel Butler Masters
ae88223664 Make sure to always check or assert the result of get_opt_rec
Most callers already check.  Add checks to commit_option_values, checkout_option_values, and get_content_type_default.
2007-12-21 22:49:38 +00:00
Miciah Dashiel Butler Masters
ea372bd0cd get_opt_*: Add ses parameter
Add a session parameter to get_opt_ and its wrappers in preparation for session-specific and domain-specific options.
2007-08-28 17:24:59 +00:00
Kalle Olavi Niemitalo
68b069a657 Make MIME backend metadata const. 2007-02-04 13:34:48 +02:00
Miciah Dashiel Butler Masters
8147b0f149 MIME: get_mime_handler_option: Eliminate an unnecessary check. 2006-05-05 21:35:02 +00:00
Miciah Dashiel Butler Masters
675fc46987 MIME: Let get_mime_handler_option take the MIME type's option instead
of its name.
2006-05-05 21:32:04 +00:00
Miciah Dashiel Butler Masters
e6d35d8f31 MIME: get_mime_handler_default: Rename stuff.
Rename local variables opt to type_opt and opt_tree to handler_opt.
2006-05-05 21:28:05 +00:00
Miciah Dashiel Butler Masters
9337a7993d MIME: get_mime_handler_default: Reflow logic. 2006-05-05 21:25:43 +00:00
Miciah Dashiel Butler Masters
06a541487e MIME: get_mime_handler_option: More option API usage, less string
manipulation.
2006-05-05 21:21:42 +00:00
Miciah Dashiel Butler Masters
8f4b40d4a0 MIME: get_mime_handler_option: Rename local variable opt to type_opt 2006-05-05 21:15:41 +00:00
Miciah Dashiel Butler Masters
386684fe50 MIME: get_mime_type_option: Re-arrange
More option API usage, less string manipulation.
2006-05-05 21:09:21 +00:00
Miciah Dashiel Butler Masters
9bc5317b13 MIME: Re-arrange
Let get_mime_type_name return an option instead of a name, and rename
it to get_mime_type_option.
2006-05-05 20:58:30 +00:00
Miciah Dashiel Butler Masters
680a1c735b MIME: Re-arrange
Let get_mime_handler_name return an option instead of a name, and rename
it to get_mime_handler_option.
2006-05-05 20:50:45 +00:00
Jonas Fonseca
021af4e87c Although aware ELinks doesn't need another sgml/doctype here is DocBook
It was created a long time ago so (I think) it deserves to survive. It
maps .sgml files to applicatino/docbook+xml and uses the highlighter.
2006-01-01 23:22:10 +01:00
Jonas Fonseca
9a0bf83756 Add basic stuff for XBEL parsing/highlighting using the DOM engine 2005-12-30 22:19:32 +01:00
Jonas Fonseca
7679ccd881 Associate .rss file extension with application/rss+xml 2005-12-20 17:00:33 +01:00
Laurent MONIN
df065ead80 Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
Petr Baudis
0f6d4310ad Initial commit of the HEAD branch of the ELinks CVS repository, as of
Thu Sep 15 15:57:07 CEST 2005. The previous history can be added to this
by grafting.
2005-09-15 15:58:31 +02:00