From 2bfc7b37241b88816cb0454399ec615b8511680a Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Mon, 3 Mar 2008 03:03:11 +0100 Subject: [PATCH] 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. Update elinks.conf(5) while at it. --- doc/man/man5/elinks.conf.5 | 14 +++++++------- src/config/options.inc | 8 ++++---- src/protocol/http/http.c | 12 ++++++------ src/protocol/rewrite/rewrite.c | 6 +++++- 4 files changed, 22 insertions(+), 18 deletions(-) diff --git a/doc/man/man5/elinks.conf.5 b/doc/man/man5/elinks.conf.5 index 7b5ade700..dae4974e1 100644 --- a/doc/man/man5/elinks.conf.5 +++ b/doc/man/man5/elinks.conf.5 @@ -207,12 +207,12 @@ Number of tries to establish a connection. Zero means try forever. .PP connection.try_ipv4 [0|1] (default: 1) .RS 4 -Whether to try to connect to a host over IPv4. Note that if connection.try_ipv6 is enabled too, it takes precedence. And better do not touch this at all unless you are sure what are you doing. Note that you can also force a given protocol to be used on a per\-connection basis by using a URL in the style of i.e. http4://elinks.cz/. +Whether to try to connect to a host over IPv4. Note that if connection.try_ipv6 is enabled too, it takes precedence. And better do not touch this at all unless you are sure what are you doing. Note that you can also force a given protocol to be used on a per\-connection basis by using a URL in the style of e.g. http4://elinks.cz/. .RE .PP connection.try_ipv6 [0|1] (default: 1) .RS 4 -Whether to try to connect to a host over IPv6. Note that you can also force a given protocol to be used on a per\-connection basis by using a URL in the style of i.e. http6://elinks.cz/. +Whether to try to connect to a host over IPv6. Note that you can also force a given protocol to be used on a per\-connection basis by using a URL in the style of e.g. http6://elinks.cz/. .RE .PP connection.unrestartable_receive_timeout (default: 600) @@ -1012,7 +1012,7 @@ Compress successive empty lines to only one in displayed text. .PP document.uri_passing .RS 4 -Rules for passing URIs to external commands. When one rule is defined the link and tab menu will have a menu item that makes it possible to pass the the link, frame or tab URI to an external command. If several rules are defined the link and tab menu will have a submenu of items for each rule. Note, this is mostly useful for launching graphical viewers, since there is not support for releasing the terminal while the command runs. The action and submenus are also available by binding keys to the frame\-external\-command, the link\-external\-command, and the tab\-external\-command actions. +Rules for passing URIs to external commands. When one rule is defined the link and tab menu will have a menu item that makes it possible to pass the the link, frame or tab URI to an external command. If several rules are defined the link and tab menu will have a submenu of items for each rule. Note, this is mostly useful for launching graphical viewers, since there is no support for releasing the terminal while the command runs. The action and submenus are also available by binding keys to the frame\-external\-command, the link\-external\-command, and the tab\-external\-command actions. .RE .PP document.uri_passing._template_ (default: "") @@ -1506,10 +1506,10 @@ and various server\-side scripts \-\-\- the server only returns the client's req .PP protocol.http.user_agent (default: "ELinks/%v (textmode; %s; %t\-%b)") .RS 4 -Change the User Agent ID. That means identification string, which is sent to HTTP server when a document is requested. The 'textmode' token in the first field is our silent attempt to establish this as a standard for new textmode user agents, so that the webmasters can have just a single uniform test for these if they are ie. pushing some lite version to them automagically. Use " " if you don't want any User\-Agent header to be sent at all: %v in the string means -\fIELinks\fR -version %s in the string means system identification %t in the string means size of the terminal %b in the string means number of bars displayed by +Change the User Agent ID. That means identification string, which is sent to HTTP server when a document is requested. The 'textmode' token in the first field is our silent attempt to establish this as a standard for new textmode user agents, so that the webmasters can have just a single uniform test for these if they are e.g. pushing some lite version to them automagically. Use " " if you don't want any User\-Agent header to be sent at all. %v in the string means \fIELinks\fR +version, %s in the string means system identification, %t in the string means size of the terminal, %b in the string means number of bars displayed by +\fIELinks\fR. .RE .PP protocol.https @@ -1574,7 +1574,7 @@ Default URI template used when the string entered in the goto dialog does not ap \fI:\fR or \fI/\fR -characters), and does not match any defined prefixes. Set the value to "" to disable use of the default template rewrite rule. +characters), and does not match any defined prefixes. Set the value to "" to disable use of the default template rewrite rule. %c in the template means the current URL, %s in the template means the whole string from the goto dialog, %0,%1,\&...,%9 mean the 1st,2nd,\&...,10th space\-delimited part of %s, %% in the template means '%'. .RE .PP protocol.rewrite.enable\-dumb [0|1] (default: 1) diff --git a/src/config/options.inc b/src/config/options.inc index 164225d17..4ed472d12 100644 --- a/src/config/options.inc +++ b/src/config/options.inc @@ -102,7 +102,7 @@ static struct option_info config_options_info[] = { "at all unless you are sure what are you doing.\n" "Note that you can also force a given protocol\n" "to be used on a per-connection basis by using a URL\n" - "in the style of i.e. http4://elinks.cz/.")), + "in the style of e.g. http4://elinks.cz/.")), #else INIT_OPT_BOOL("connection", N_("Try IPv4 when connecting"), "try_ipv4", 0, 1, @@ -110,7 +110,7 @@ static struct option_info config_options_info[] = { "Do not touch this option.\n" "Note that you can also force a given protocol\n" "to be used on a per-connection basis by using a URL\n" - "in the style of i.e. http4://elinks.cz/.")), + "in the style of e.g. http4://elinks.cz/.")), #endif #ifdef CONFIG_IPV6 @@ -119,7 +119,7 @@ static struct option_info config_options_info[] = { N_("Whether to try to connect to a host over IPv6.\n" "Note that you can also force a given protocol\n" "to be used on a per-connection basis by using a URL\n" - "in the style of i.e. http6://elinks.cz/.")), + "in the style of e.g. http6://elinks.cz/.")), #endif INIT_OPT_INT("connection", N_("Timeout for non-restartable connections"), @@ -729,7 +729,7 @@ static struct option_info config_options_info[] = { "an external command. If several rules are defined the link and\n" "tab menu will have a submenu of items for each rule. Note, this\n" "is mostly useful for launching graphical viewers, since there\n" - "is not support for releasing the terminal while the command runs.\n" + "is no support for releasing the terminal while the command runs.\n" "The action and submenus are also available by binding keys to\n" "the frame-external-command, the link-external-command, and\n" "the tab-external-command actions.")), diff --git a/src/protocol/http/http.c b/src/protocol/http/http.c index c1007b409..1264f6fb2 100644 --- a/src/protocol/http/http.c +++ b/src/protocol/http/http.c @@ -190,13 +190,13 @@ static struct option_info http_options[] = { "is sent to HTTP server when a document is requested. The 'textmode'\n" "token in the first field is our silent attempt to establish this as\n" "a standard for new textmode user agents, so that the webmasters can\n" - "have just a single uniform test for these if they are ie. pushing\n" + "have just a single uniform test for these if they are e.g. pushing\n" "some lite version to them automagically.\n" - "%v in the string means ELinks version\n" - "%s in the string means system identification\n" - "%t in the string means size of the terminal\n" - "%b in the string means number of bars displayed by ELinks\n" - "Use \" \" if you don't want any User-Agent header to be sent at all.")), + "Use \" \" if you don't want any User-Agent header to be sent at all.\n" + "%v in the string means ELinks version,\n" + "%s in the string means system identification,\n" + "%t in the string means size of the terminal,\n" + "%b in the string means number of bars displayed by ELinks.")), INIT_OPT_TREE("protocol", N_("HTTPS"), diff --git a/src/protocol/rewrite/rewrite.c b/src/protocol/rewrite/rewrite.c index 506e574b6..9837db4d9 100644 --- a/src/protocol/rewrite/rewrite.c +++ b/src/protocol/rewrite/rewrite.c @@ -96,7 +96,11 @@ static struct option_info uri_rewrite_options[] = { "the goto dialog does not appear to be a URI or a filename\n" "(i.e. contains no '.', ':' or '/' characters), and does\n" "not match any defined prefixes. Set the value to \"\" to\n" - "disable use of the default template rewrite rule.")), + "disable use of the default template rewrite rule.\n" + "%c in the template means the current URL,\n" + "%s in the template means the whole string from the goto dialog,\n" + "%0,%1,...,%9 mean the 1st,2nd,...,10th space-delimited part of %s,\n" + "%% in the template means '%'.")), #define INIT_OPT_DUMB_PREFIX(prefix, uri) \ INIT_OPT_STRING("protocol.rewrite.dumb", NULL, prefix, 0, uri, NULL)