mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
Merge with git+ssh://pasky.or.cz/srv/git/elinks.git
This commit is contained in:
commit
c2879b655b
84
doc/faq.txt
84
doc/faq.txt
@ -7,60 +7,60 @@ while on the mailing list.
|
||||
|
||||
|
||||
[[instances]]
|
||||
I rebuilt/upgraded/reconfigured my ELinks, restarted it, but it looks nothing has changed!
|
||||
I rebuilt/upgraded/reconfigured ELinks and restarted it, but it looks like nothing has changed!
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
ELinks instances connect together so that they share the cache, bookmarks,
|
||||
cookies, configuration, etc. Only the "master" ELinks instance does any real
|
||||
work and any other ELinkses you run will only connect to this instance. So
|
||||
when you want to restart ELinks, make sure you have no other ELinks instances
|
||||
running at the time.
|
||||
cookies, configuration, etc. Only the "master" ELinks instance does any real
|
||||
work and any other ELinkses you run will only connect to this instance. So when
|
||||
you want to restart ELinks, make sure you have no other ELinks instances
|
||||
running.
|
||||
|
||||
Alternatively, you can use the `-no-connect` parameter to make the ELinks
|
||||
always run standalone, or create a parallel group of ELinks instances by the
|
||||
`-session-ring N` parameter (where `N` is a number larger than zero); however,
|
||||
be aware of the fact that in those cases ELinks won't touch any configuration,
|
||||
bookmark, cookies, etc files - you can force that by the `-touch-files`
|
||||
parameter, however beware - this can result in a data loss! (E.g., when two
|
||||
master ELinks instances will try to save their bookmarks and you add a
|
||||
bookmark to each of those, only one of the bookmarks survives.)
|
||||
Alternatively, you can use the `-no-connect` parameter to make ELinks always run
|
||||
standalone, or create a parallel group of ELinks instances with the
|
||||
`-session-ring N` parameter (where `N` is a number larger than zero). Be aware
|
||||
of that in those cases ELinks won't touch any configuration, bookmark, cookies,
|
||||
etc. files. You can force that with the `-touch-files` parameter, but beware
|
||||
that this can result in data loss! (For example, when two master ELinks
|
||||
instances try to save the bookmarks, and you add a bookmark to each of those,
|
||||
only one of the bookmarks survives.)
|
||||
|
||||
|
||||
[[cutnpaste]]
|
||||
How does cutting and pasting work?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The reason why normal cut and pasting does not work is that ELinks requests to
|
||||
receive any mouse event info even if it is compiled without GPM. Therefore it
|
||||
is necessary to also hold down the Shift key when cutting or pasting text. If
|
||||
you do not need to use the mouse for navigation you can disable mouse support
|
||||
by passing `--disable-mouse` to configure.
|
||||
The reason why normal cut and paste does not work is that ELinks requests all
|
||||
mouse event info even if it is compiled without GPM. Therefore it is necessary
|
||||
to hold down the Shift key when cutting or pasting text. If you do not need to
|
||||
use the mouse for navigation you can disable mouse support by passing
|
||||
`--disable-mouse` to configure.
|
||||
|
||||
|
||||
[[move]]
|
||||
How does the "Move" button on the bookmark manager work?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
First you need to mark all the bookmarks (or even folders) you want to move.
|
||||
This can be done with the Insert key if you're using the default keybindings.
|
||||
Asterisk will appear near of all marked bookmarks. Next move to where you want
|
||||
to have the stuff moved to, and press the "Move" button.
|
||||
First you need to mark all the bookmarks (or folders) you want to move. This
|
||||
can be done with the Insert key if you're using the default key-bindings. An
|
||||
asterisk will appear near all marked bookmarks. Now move to where you want to
|
||||
have the stuff moved to, and press the "Move" button.
|
||||
|
||||
|
||||
[[navigation]]
|
||||
What's up with the navigation in the various managers?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The managers use list boxes. To navigate (assuming you're using a default
|
||||
keybinding configuration) use Space to open and close the folders.
|
||||
The managers use list boxes. To navigate (assuming you're using a default
|
||||
key-binding configuration) use Space to open and close the folders.
|
||||
|
||||
|
||||
[[flavours]]
|
||||
[[flavors]]
|
||||
Why are there so many Links flavors?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Please refer to the link:http://elinks.or.cz/history.html[history page] to
|
||||
read about the various flavors and the differences between them.
|
||||
Please refer to the link:http://elinks.or.cz/history.html[history page] to read
|
||||
about the various flavors and the differences between them.
|
||||
|
||||
|
||||
[[which-one]]
|
||||
@ -68,9 +68,9 @@ Which one to use?
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
If you want a fast, stable, and feature-thin text browser, use
|
||||
link:http://artax.karlin.mff.cuni.cz/~mikulas/links[Links-0.99]. Main
|
||||
drawbacks include: No HTTP-auth support and no persistent cookies (i.e. they
|
||||
die when all instances of Links are closed).
|
||||
link:http://artax.karlin.mff.cuni.cz/~mikulas/links[Links-0.99]. Main drawbacks
|
||||
include: No HTTP-auth support and no persistent cookies (i.e. they die when all
|
||||
instances of Links are closed).
|
||||
|
||||
If you want additional features, including HTTP-auth, persistent cookies, and
|
||||
on-the-fly compression, try ELinks. (Note: links-0.9x and ELinks versions >
|
||||
@ -79,10 +79,10 @@ these on the same machine.)
|
||||
|
||||
If you want the option of graphics mode, use
|
||||
link:http://links.twibright.com[Links2] or
|
||||
link:http://xray.sai.msu.ru/~karpov/links-hacked/[Hacked Links]. Be aware
|
||||
that some people have reported the latter as hard to configure/compile. You
|
||||
cannot run either of these with Links-0.9x on the same system without hacking
|
||||
the compile-time configuration.
|
||||
link:http://xray.sai.msu.ru/~karpov/links-hacked/[Hacked Links]. Be aware that
|
||||
some people have reported the latter as hard to configure/compile. You cannot
|
||||
run either of these with Links-0.9x on the same system without hacking the
|
||||
compile-time configuration.
|
||||
|
||||
|
||||
[[kibi-and-mebi]]
|
||||
@ -101,16 +101,16 @@ One mebibyte 1 MiB = 2^20 B = 1 048 576 B
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
|
||||
[[christmas]]
|
||||
Why are stable releases made at christmas?
|
||||
[[Christmas]]
|
||||
Why are stable releases made at Christmas?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This yearly present has become a tradition suspectedly because pasky worships
|
||||
the christmas spirit. ;-)
|
||||
It is suspected that this yearly present has become a tradition because pasky
|
||||
worships the Christmas spirit. ;-)
|
||||
|
||||
|
||||
[[get-256-colours]]
|
||||
How can I get 256 colours?
|
||||
How can I get 256 colors?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
First, you must enable it in the `feature.conf` file before compiling.
|
||||
@ -129,9 +129,9 @@ before running ELinks.
|
||||
[NOTE]
|
||||
.Only 16 colors on The Linux console
|
||||
===============================================================================
|
||||
Altho the Linux framebuffer supports 256 (or more) colours, the Linux console
|
||||
Although the Linux frame-buffer supports 256 (or more) colors, the Linux console
|
||||
driver does not; therefore, console applications are still limited to 16
|
||||
colours on the Linux console, framebuffer or not.
|
||||
colors on the Linux console, frame-buffer or not.
|
||||
===============================================================================
|
||||
|
||||
|
||||
@ -148,7 +148,7 @@ The new ELinks versions (from 0.9.0 on) send:
|
||||
ELinks/$version (textmode; $osinfo; $textmode_dimensions)
|
||||
|
||||
You should therefore check against something like /^ELinks[\/ ]/, since more
|
||||
fields can be added inside the parenthesis in the next versions. Note that
|
||||
fields can be added inside the parenthesis in subsequent versions. Note that
|
||||
users can change their User-Agent through the options system.
|
||||
|
||||
|
||||
|
@ -109,13 +109,13 @@ check-po:
|
||||
install-l: install-l-$(CONFIG_NLS)
|
||||
install-l-no:
|
||||
install-l-yes:
|
||||
$(mkinstalldirs) $(DESTDIR)$(localedir)
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(localedir)
|
||||
@catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
|
||||
dir=$(localedir)/$$lang/LC_MESSAGES; \
|
||||
$(mkinstalldirs) $(DESTDIR)$$dir; \
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$$dir; \
|
||||
if test -r $(srcdir)/$$cat; then \
|
||||
$(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
|
||||
echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE).mo"; \
|
||||
|
@ -97,7 +97,7 @@ all-l: elinks
|
||||
elinks: $(OBJS) $(ELINKSLIBS)
|
||||
$(call cmd,link)
|
||||
|
||||
install-local:
|
||||
$(INSTALL_PROGRAM) $(srcdir)/elinks $(DESTDIR)$(bindir)
|
||||
install:
|
||||
$(INSTALL_PROGRAM) elinks $(DESTDIR)$(bindir)
|
||||
|
||||
include $(path_to_top)/Makefile.lib
|
||||
|
@ -61,6 +61,28 @@ css_apply_background_color(struct html_context *html_context,
|
||||
element->attr.style.bg = prop->value.color;
|
||||
}
|
||||
|
||||
static void
|
||||
css_apply_display(struct html_context *html_context, struct html_element *element,
|
||||
struct css_property *prop)
|
||||
{
|
||||
assert(prop->value_type == CSS_VT_DISPLAY);
|
||||
|
||||
switch (prop->value.display) {
|
||||
case CSS_DISP_INLINE:
|
||||
element->linebreak = 0;
|
||||
break;
|
||||
case CSS_DISP_BLOCK:
|
||||
/* 1 or 2, that is the question. I went for 2 since it
|
||||
* gives a more "blocky" feel and it's more common.
|
||||
* YMMV. */
|
||||
element->linebreak = 2;
|
||||
break;
|
||||
default:
|
||||
INTERNAL("Bad prop->value.display %d", prop->value.display);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
css_apply_font_attribute(struct html_context *html_context,
|
||||
struct html_element *element, struct css_property *prop)
|
||||
@ -86,6 +108,7 @@ static css_applier_T css_appliers[CSS_PT_LAST] = {
|
||||
/* CSS_PT_BACKGROUND */ css_apply_background_color,
|
||||
/* CSS_PT_BACKGROUND_COLOR */ css_apply_background_color,
|
||||
/* CSS_PT_COLOR */ css_apply_color,
|
||||
/* CSS_PT_DISPLAY */ css_apply_display,
|
||||
/* CSS_PT_FONT_STYLE */ css_apply_font_attribute,
|
||||
/* CSS_PT_FONT_WEIGHT */ css_apply_font_attribute,
|
||||
/* CSS_PT_TEXT_ALIGN */ css_apply_text_align,
|
||||
|
@ -19,6 +19,7 @@ struct css_property_info css_property_info[CSS_PT_LAST] = {
|
||||
{ "background", CSS_PT_BACKGROUND, CSS_VT_COLOR, css_parse_background_value },
|
||||
{ "background-color", CSS_PT_BACKGROUND_COLOR, CSS_VT_COLOR, css_parse_color_value },
|
||||
{ "color", CSS_PT_COLOR, CSS_VT_COLOR, css_parse_color_value },
|
||||
{ "display", CSS_PT_DISPLAY, CSS_VT_DISPLAY, css_parse_display_value },
|
||||
{ "font-style", CSS_PT_FONT_STYLE, CSS_VT_FONT_ATTRIBUTE, css_parse_font_style_value },
|
||||
{ "font-weight", CSS_PT_FONT_WEIGHT, CSS_VT_FONT_ATTRIBUTE, css_parse_font_weight_value },
|
||||
{ "text-align", CSS_PT_TEXT_ALIGN, CSS_VT_TEXT_ALIGN, css_parse_text_align_value },
|
||||
|
@ -22,6 +22,7 @@ struct css_property {
|
||||
CSS_PT_BACKGROUND,
|
||||
CSS_PT_BACKGROUND_COLOR,
|
||||
CSS_PT_COLOR,
|
||||
CSS_PT_DISPLAY,
|
||||
CSS_PT_FONT_STYLE,
|
||||
CSS_PT_FONT_WEIGHT,
|
||||
CSS_PT_TEXT_ALIGN,
|
||||
@ -36,6 +37,7 @@ struct css_property {
|
||||
enum css_property_value_type {
|
||||
CSS_VT_NONE,
|
||||
CSS_VT_COLOR,
|
||||
CSS_VT_DISPLAY,
|
||||
CSS_VT_FONT_ATTRIBUTE,
|
||||
CSS_VT_TEXT_ALIGN,
|
||||
CSS_VT_LAST,
|
||||
@ -43,6 +45,10 @@ struct css_property {
|
||||
union css_property_value {
|
||||
void *none;
|
||||
color_T color;
|
||||
enum css_display {
|
||||
CSS_DISP_INLINE,
|
||||
CSS_DISP_BLOCK,
|
||||
} display;
|
||||
struct {
|
||||
enum format_attr add, rem;
|
||||
} font_attribute;
|
||||
|
@ -283,6 +283,32 @@ css_parse_white_space_value(struct css_property_info *propinfo,
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
css_parse_display_value(struct css_property_info *propinfo,
|
||||
union css_property_value *value,
|
||||
struct scanner *scanner)
|
||||
{
|
||||
struct scanner_token *token = get_scanner_token(scanner);
|
||||
|
||||
assert(propinfo->value_type == CSS_VT_DISPLAY);
|
||||
|
||||
if (token->type != CSS_TOKEN_IDENT) return 0;
|
||||
|
||||
/* FIXME: This is _very_ simplistic */
|
||||
if (scanner_token_contains(token, "inline")) {
|
||||
value->display = CSS_DISP_INLINE;
|
||||
} else if (scanner_token_contains(token, "inline-block")) {
|
||||
value->display = CSS_DISP_INLINE; /* XXX */
|
||||
} else if (scanner_token_contains(token, "block")) {
|
||||
value->display = CSS_DISP_BLOCK;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
skip_css_tokens(scanner, CSS_TOKEN_IDENT);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
css_parse_value(struct css_property_info *propinfo,
|
||||
|
@ -30,6 +30,11 @@ int css_parse_color_value(struct css_property_info *propinfo,
|
||||
union css_property_value *value,
|
||||
struct scanner *scanner);
|
||||
|
||||
/* Takes no parser_data. */
|
||||
int css_parse_display_value(struct css_property_info *propinfo,
|
||||
union css_property_value *value,
|
||||
struct scanner *scanner);
|
||||
|
||||
/* Takes no parser_data. */
|
||||
int css_parse_text_decoration_value(struct css_property_info *propinfo,
|
||||
union css_property_value *value,
|
||||
|
@ -131,6 +131,8 @@ struct html_element {
|
||||
unsigned char *name;
|
||||
int namelen;
|
||||
unsigned char *options;
|
||||
/* See document/html/parser/parse.c's element_info.linebreak
|
||||
* description. */
|
||||
int linebreak;
|
||||
struct frameset_desc *frameset;
|
||||
|
||||
@ -140,6 +142,8 @@ struct html_element {
|
||||
ELEMENT_VISITED = 2,
|
||||
} pseudo_class;
|
||||
};
|
||||
#define is_inline_element(e) (e->linebreak == 0)
|
||||
#define is_block_element(e) (e->linebreak > 0)
|
||||
|
||||
enum html_special_type {
|
||||
SP_TAG,
|
||||
|
@ -404,10 +404,16 @@ struct element_info {
|
||||
* in start_element() (which is also where we call these handlers). */
|
||||
element_handler_T *func;
|
||||
|
||||
/* Basically something like how many line-breaks to put before
|
||||
* (and sometimes after) an element. Also, for various element closing
|
||||
* precedence heuristics, a value of zero signifies an inline element
|
||||
* and a non-zero value indicates a block element. */
|
||||
/* How many line-breaks to ensure we have before and after an element.
|
||||
* Value of 1 means the element will be on a line on its own, value
|
||||
* of 2 means that it will also have empty lines before and after.
|
||||
* Note that this does not add up - it just ensures that there is
|
||||
* at least so many linebreaks, but does not add more if that is the
|
||||
* case. Therefore, something like e.g. </pre></p> will add only two
|
||||
* linebreaks, not four. */
|
||||
/* In some stack killing logic, we use some weird heuristic based on
|
||||
* whether an element is block or inline. That is determined from
|
||||
* whether this attribute is zero on non-zero. */
|
||||
int linebreak;
|
||||
|
||||
enum element_type type;
|
||||
@ -747,6 +753,14 @@ start_element(struct element_info *ei,
|
||||
unsigned char *eof, unsigned char *attr,
|
||||
struct html_context *html_context)
|
||||
{
|
||||
#define ELEMENT_RENDER_PROLOGUE \
|
||||
ln_break(html_context, ei->linebreak); \
|
||||
a = get_attr_val(attr, "id", html_context->options); \
|
||||
if (a) { \
|
||||
html_context->special_f(html_context, SP_TAG, a); \
|
||||
mem_free(a); \
|
||||
}
|
||||
|
||||
unsigned char *a;
|
||||
struct par_attrib old_format;
|
||||
int restore_format;
|
||||
@ -754,15 +768,6 @@ start_element(struct element_info *ei,
|
||||
struct css_selector *selector = NULL;
|
||||
#endif
|
||||
|
||||
|
||||
ln_break(html_context, ei->linebreak);
|
||||
|
||||
a = get_attr_val(attr, "id", html_context->options);
|
||||
if (a) {
|
||||
html_context->special_f(html_context, SP_TAG, a);
|
||||
mem_free(a);
|
||||
}
|
||||
|
||||
if (html_top.type == ELEMENT_WEAK) {
|
||||
kill_html_stack_item(html_context, &html_top);
|
||||
}
|
||||
@ -771,6 +776,7 @@ start_element(struct element_info *ei,
|
||||
* one. */
|
||||
if (html_top.invisible
|
||||
&& (ei->func != html_script || html_top.invisible < 2)) {
|
||||
ELEMENT_RENDER_PROLOGUE
|
||||
return html;
|
||||
}
|
||||
|
||||
@ -779,15 +785,18 @@ start_element(struct element_info *ei,
|
||||
|
||||
if (ei->func == html_table && html_context->options->tables
|
||||
&& html_context->table_level < HTML_MAX_TABLE_LEVEL) {
|
||||
ELEMENT_RENDER_PROLOGUE
|
||||
format_table(attr, html, eof, &html, html_context);
|
||||
ln_break(html_context, 2);
|
||||
return html;
|
||||
}
|
||||
if (ei->func == html_select) {
|
||||
ELEMENT_RENDER_PROLOGUE
|
||||
if (!do_html_select(attr, html, eof, &html, html_context))
|
||||
return html;
|
||||
}
|
||||
if (ei->func == html_textarea) {
|
||||
ELEMENT_RENDER_PROLOGUE
|
||||
do_html_textarea(attr, html, eof, &html, html_context);
|
||||
return html;
|
||||
}
|
||||
@ -812,10 +821,10 @@ start_element(struct element_info *ei,
|
||||
if (ei->type == ELEMENT_TYPE_NON_NESTABLE) {
|
||||
foreach (e, html_context->stack) {
|
||||
if (e->type < ELEMENT_KILLABLE) break;
|
||||
if (e->linebreak || !ei->linebreak) break;
|
||||
if (is_block_element(e) || is_inline_element(ei)) break;
|
||||
}
|
||||
} else foreach (e, html_context->stack) {
|
||||
if (e->linebreak && !ei->linebreak) break;
|
||||
if (is_block_element(e) && is_inline_element(ei)) break;
|
||||
if (e->type < ELEMENT_KILLABLE) break;
|
||||
if (!strlcasecmp(e->name, e->namelen, name, namelen)) break;
|
||||
}
|
||||
@ -854,6 +863,7 @@ start_element(struct element_info *ei,
|
||||
/* We need to have own element in the stack, that's why we waited for
|
||||
* so long. */
|
||||
if (ei->func == html_script) {
|
||||
ELEMENT_RENDER_PROLOGUE
|
||||
if (!do_html_script(html_context, attr, html, eof, &html))
|
||||
return html;
|
||||
}
|
||||
@ -881,7 +891,11 @@ start_element(struct element_info *ei,
|
||||
done_css_selector(selector);
|
||||
}
|
||||
}
|
||||
/* Now this was the reason for this whole funny ELEMENT_RENDER_PROLOGUE
|
||||
* bussiness. Only now we have the definitive linebreak value, since
|
||||
* that's what the display: property plays with. */
|
||||
#endif
|
||||
ELEMENT_RENDER_PROLOGUE
|
||||
if (ei->func) ei->func(html_context, attr);
|
||||
#ifdef CONFIG_CSS
|
||||
if (selector && html_top.options) {
|
||||
@ -902,6 +916,7 @@ start_element(struct element_info *ei,
|
||||
if (restore_format) par_format = old_format;
|
||||
|
||||
return html;
|
||||
#undef ELEMENT_RENDER_PROLOGUE
|
||||
}
|
||||
|
||||
static unsigned char *
|
||||
@ -930,7 +945,7 @@ end_element(struct element_info *ei,
|
||||
|
||||
/* dump_html_stack(html_context); */
|
||||
foreach (e, html_context->stack) {
|
||||
if (e->linebreak && !ei->linebreak) kill = 1;
|
||||
if (is_block_element(e) && is_inline_element(ei)) kill = 1;
|
||||
if (strlcasecmp(e->name, e->namelen, name, namelen)) {
|
||||
if (e->type < ELEMENT_KILLABLE)
|
||||
break;
|
||||
|
@ -52,14 +52,14 @@ install-l: $(builddir)/charset.alias all
|
||||
rm -f $$temp; \
|
||||
else \
|
||||
if test @GLIBC21@ = no; then \
|
||||
$(mkinstalldirs) $(DESTDIR)$(libdir); \
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(libdir); \
|
||||
orig=charset.alias; \
|
||||
sed -f ref-add.sed $$orig > $$temp; \
|
||||
$(INSTALL_DATA) $$temp $$dest; \
|
||||
rm -f $$temp; \
|
||||
fi; \
|
||||
fi; \
|
||||
$(mkinstalldirs) $(DESTDIR)$(localedir); \
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(localedir); \
|
||||
test -f $(DESTDIR)$(localedir)/locale.alias \
|
||||
&& orig=$(DESTDIR)$(localedir)/locale.alias \
|
||||
|| orig=$(srcdir)/locale.alias; \
|
||||
|
Loading…
Reference in New Issue
Block a user