1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-15 23:35:34 +00:00

[options] No need for C_ macro in INIT_OPT_*

This commit is contained in:
Witold Filipczyk 2022-03-02 18:30:25 +01:00
parent 777d0a4114
commit 2c2cf97e03
23 changed files with 664 additions and 664 deletions

View File

@ -76,44 +76,44 @@ enum led_option {
};
static union option_info led_options[] = {
INIT_OPT_TREE(C_("ui"), N_("Clock"),
C_("clock"), OPT_ZERO, N_("Digital clock in the status bar.")),
INIT_OPT_TREE("ui", N_("Clock"),
"clock", OPT_ZERO, N_("Digital clock in the status bar.")),
INIT_OPT_BOOL(C_("ui.clock"), N_("Enable"),
C_("enable"), OPT_ZERO, 0,
INIT_OPT_BOOL("ui.clock", N_("Enable"),
"enable", OPT_ZERO, 0,
N_("Whether to display a digital clock in the status bar.")),
INIT_OPT_STRING(C_("ui.clock"), N_("Format"),
C_("format"), OPT_ZERO, "[%H:%M]",
INIT_OPT_STRING("ui.clock", N_("Format"),
"format", OPT_ZERO, "[%H:%M]",
N_("Format string for the digital clock. See the strftime(3) "
"manpage for details.")),
/* Compatibility alias. Added: 2004-04-22, 0.9.CVS. */
INIT_OPT_ALIAS(C_("ui.timer"), C_("clock"), OPT_ZERO, C_("ui.clock")),
INIT_OPT_ALIAS("ui.timer", "clock", OPT_ZERO, "ui.clock"),
INIT_OPT_BOOL(C_("ui"), N_("Show IP"),
C_("show_ip"), OPT_ZERO, 0,
INIT_OPT_BOOL("ui", N_("Show IP"),
"show_ip", OPT_ZERO, 0,
N_("Whether to display IP of the document in the status bar.")),
INIT_OPT_TREE(C_("ui"), N_("Temperature"),
C_("temperature"), OPT_ZERO, N_("Temperature of CPU.")),
INIT_OPT_TREE("ui", N_("Temperature"),
"temperature", OPT_ZERO, N_("Temperature of CPU.")),
INIT_OPT_BOOL(C_("ui.temperature"), N_("Enable"),
C_("enable"), OPT_ZERO, 0,
INIT_OPT_BOOL("ui.temperature", N_("Enable"),
"enable", OPT_ZERO, 0,
N_("Whether to display temperature of the CPU in the status bar.")),
INIT_OPT_STRING(C_("ui.temperature"), N_("Filename"),
C_("filename"), OPT_ZERO, "/sys/class/thermal/thermal_zone0/temp",
INIT_OPT_STRING("ui.temperature", N_("Filename"),
"filename", OPT_ZERO, "/sys/class/thermal/thermal_zone0/temp",
N_("Filename to see temperature.")),
INIT_OPT_TREE(C_("ui"), N_("LEDs"),
C_("leds"), OPT_ZERO,
INIT_OPT_TREE("ui", N_("LEDs"),
"leds", OPT_ZERO,
N_("LEDs (visual indicators) options.")),
INIT_OPT_BOOL(C_("ui.leds"), N_("Enable"),
C_("enable"), OPT_ZERO, 1,
INIT_OPT_BOOL("ui.leds", N_("Enable"),
"enable", OPT_ZERO, 1,
N_("Enable LEDs. These visual indicators will inform you "
"about various states.")),

View File

@ -45,35 +45,35 @@ static struct bookmark *bm_snapshot_last_folder;
/* Life functions */
static union option_info bookmark_options_info[] = {
INIT_OPT_TREE(C_(""), N_("Bookmarks"),
C_("bookmarks"), OPT_ZERO,
INIT_OPT_TREE("", N_("Bookmarks"),
"bookmarks", OPT_ZERO,
N_("Bookmark options.")),
#ifdef CONFIG_XBEL_BOOKMARKS
INIT_OPT_INT(C_("bookmarks"), N_("File format"),
C_("file_format"), OPT_ZERO, 0, 1, 0,
INIT_OPT_INT("bookmarks", N_("File format"),
"file_format", OPT_ZERO, 0, 1, 0,
N_("File format for bookmarks (affects both reading and "
"saving):\n"
"0 is the default native ELinks format\n"
"1 is XBEL universal XML bookmarks format")),
#else
INIT_OPT_INT(C_("bookmarks"), N_("File format"),
C_("file_format"), OPT_ZERO, 0, 1, 0,
INIT_OPT_INT("bookmarks", N_("File format"),
"file_format", OPT_ZERO, 0, 1, 0,
N_("File format for bookmarks (affects both reading and "
"saving):\n"
"0 is the default native ELinks format\n"
"1 is XBEL universal XML bookmarks format (DISABLED)")),
#endif
INIT_OPT_BOOL(C_("bookmarks"), N_("Save folder state"),
C_("folder_state"), OPT_ZERO, 1,
INIT_OPT_BOOL("bookmarks", N_("Save folder state"),
"folder_state", OPT_ZERO, 1,
N_("When saving bookmarks also store whether folders are "
"expanded or not, so the look of the bookmark dialog is "
"kept across ELinks sessions. If disabled all folders will "
"appear unexpanded next time ELinks is run.")),
INIT_OPT_BOOL(C_("ui.sessions"), N_("Periodic snapshotting"),
C_("snapshot"), OPT_ZERO, 0,
INIT_OPT_BOOL("ui.sessions", N_("Periodic snapshotting"),
"snapshot", OPT_ZERO, 0,
N_("Automatically save a snapshot of all tabs periodically. "
"This will periodically bookmark the tabs of each terminal "
"in a separate folder for recovery after a crash.\n"

View File

@ -790,11 +790,11 @@ printconfigdump_cmd(struct option *option, char ***argv, int *argc)
union option_info cmdline_options_info[] = {
/* [gettext_accelerator_context(IGNORE)] */
INIT_OPT_BOOL(C_(""), N_("Load config also for slave instances"),
INIT_OPT_BOOL("", N_("Load config also for slave instances"),
"always-load-config", OPT_ZERO, 0,
N_("Load config also for slave instances. Slower, but more robust.")),
INIT_OPT_BOOL(C_(""), N_("Restrict to anonymous mode"),
INIT_OPT_BOOL("", N_("Restrict to anonymous mode"),
"anonymous", OPT_ZERO, 0,
N_("Restricts ELinks so it can run on an anonymous account. "
"Local file browsing, downloads, and modification of options "
@ -802,47 +802,47 @@ union option_info cmdline_options_info[] = {
"entries in the association table can't be added or "
"modified.")),
INIT_OPT_BOOL(C_(""), N_("Autosubmit first form"),
INIT_OPT_BOOL("", N_("Autosubmit first form"),
"auto-submit", OPT_ZERO, 0,
N_("Automatically submit the first form in the given URLs.")),
INIT_OPT_INT(C_(""), N_("Clone internal session with given ID"),
INIT_OPT_INT("", N_("Clone internal session with given ID"),
"base-session", OPT_ZERO, 0, INT_MAX, 0,
N_("Used internally when opening ELinks instances in new "
"windows. The ID maps to information that will be used when "
"creating the new instance. You don't want to use it.")),
INIT_OPT_STRING(C_(""), N_("Use a specific local IP address"),
INIT_OPT_STRING("", N_("Use a specific local IP address"),
"bind-address", OPT_ZERO, "",
N_("Use a specific local IP address")),
INIT_OPT_STRING(C_(""), N_("Use a specific local IPv6 address"),
INIT_OPT_STRING("", N_("Use a specific local IPv6 address"),
"bind-address-ipv6", OPT_ZERO, "",
N_("Use a specific local IPv6 address")),
INIT_OPT_COMMAND(C_(""), NULL, "confdir", OPT_HIDDEN, redir_cmd, NULL),
INIT_OPT_COMMAND("", NULL, "confdir", OPT_HIDDEN, redir_cmd, NULL),
INIT_OPT_STRING(C_(""), N_("Name of directory with configuration file"),
INIT_OPT_STRING("", N_("Name of directory with configuration file"),
"config-dir", OPT_ZERO, "",
N_("Path of the directory ELinks will read and write its "
"config and runtime state files to instead of ~/.elinks. "
"If the path does not begin with a '/' it is assumed to be "
"relative to your HOME directory.")),
INIT_OPT_COMMAND(C_(""), N_("Print default configuration file to stdout"),
INIT_OPT_COMMAND("", N_("Print default configuration file to stdout"),
"config-dump", OPT_ZERO, printconfigdump_cmd,
N_("Print a configuration file with options set to the "
"built-in defaults to stdout.")),
INIT_OPT_COMMAND(C_(""), NULL, "conffile", OPT_HIDDEN, redir_cmd, NULL),
INIT_OPT_COMMAND("", NULL, "conffile", OPT_HIDDEN, redir_cmd, NULL),
INIT_OPT_STRING(C_(""), N_("Name of configuration file"),
INIT_OPT_STRING("", N_("Name of configuration file"),
"config-file", OPT_ZERO, "elinks.conf",
N_("Name of the configuration file that all configuration "
"options will be read from and written to. It should be "
"relative to config-dir.")),
INIT_OPT_COMMAND(C_(""), N_("Print help for configuration options"),
INIT_OPT_COMMAND("", N_("Print help for configuration options"),
"config-help", OPT_ZERO, printhelp_cmd,
N_("Print help for configuration options and exit.")),
@ -851,13 +851,13 @@ union option_info cmdline_options_info[] = {
N_("The default MIME type used for documents of unknown "
"type.")),
INIT_OPT_BOOL(C_(""), N_("Ignore user-defined keybindings"),
INIT_OPT_BOOL("", N_("Ignore user-defined keybindings"),
"default-keys", OPT_ZERO, 0,
N_("When set, all keybindings from configuration files will "
"be ignored. It forces use of default keybindings and will "
"reset user-defined ones on save.")),
INIT_OPT_BOOL(C_(""), N_("Print formatted versions of given URLs to stdout"),
INIT_OPT_BOOL("", N_("Print formatted versions of given URLs to stdout"),
"dump", OPT_ZERO, 0,
N_("Print formatted plain-text versions of given URLs to "
"stdout.")),
@ -874,7 +874,7 @@ union option_info cmdline_options_info[] = {
"dump-width", OPT_ZERO, "document.dump.width",
N_("Width of the dump output.")),
INIT_OPT_COMMAND(C_(""), N_("Evaluate configuration file directive"),
INIT_OPT_COMMAND("", N_("Evaluate configuration file directive"),
"eval", OPT_ZERO, eval_cmd,
N_("Specify configuration file directives on the command-line "
"which will be evaluated after all configuration files has "
@ -882,7 +882,7 @@ union option_info cmdline_options_info[] = {
"\t-eval 'set protocol.file.allow_special_files = 1'")),
/* lynx compatibility */
INIT_OPT_COMMAND(C_(""), N_("Interpret documents of unknown types as HTML"),
INIT_OPT_COMMAND("", N_("Interpret documents of unknown types as HTML"),
"force-html", OPT_ZERO, forcehtml_cmd,
N_("Makes ELinks assume documents of unknown types are HTML. "
"Useful when using ELinks as an external viewer from MUAs. "
@ -890,44 +890,44 @@ union option_info cmdline_options_info[] = {
/* XXX: -?, -h and -help share the same caption and should be kept in
* the current order for usage help printing to be ok */
INIT_OPT_COMMAND(C_(""), NULL, "?", OPT_ZERO, printhelp_cmd, NULL),
INIT_OPT_COMMAND("", NULL, "?", OPT_ZERO, printhelp_cmd, NULL),
INIT_OPT_COMMAND(C_(""), NULL, "h", OPT_ZERO, printhelp_cmd, NULL),
INIT_OPT_COMMAND("", NULL, "h", OPT_ZERO, printhelp_cmd, NULL),
INIT_OPT_COMMAND(C_(""), N_("Print usage help and exit"),
INIT_OPT_COMMAND("", N_("Print usage help and exit"),
"help", OPT_ZERO, printhelp_cmd,
N_("Print usage help and exit.")),
INIT_OPT_BOOL(C_(""), N_("Only permit local connections"),
INIT_OPT_BOOL("", N_("Only permit local connections"),
"localhost", OPT_ZERO, 0,
N_("Restricts ELinks to work offline and only connect to "
"servers with local addresses (ie. 127.0.0.1). No connections "
"to remote servers will be permitted.")),
INIT_OPT_COMMAND(C_(""), N_("Print detailed usage help and exit"),
INIT_OPT_COMMAND("", N_("Print detailed usage help and exit"),
"long-help", OPT_ZERO, printhelp_cmd,
N_("Print detailed usage help and exit.")),
INIT_OPT_COMMAND(C_(""), N_("Look up specified host"),
INIT_OPT_COMMAND("", N_("Look up specified host"),
"lookup", OPT_ZERO, lookup_cmd,
N_("Look up specified host and print all DNS resolved IP "
"addresses.")),
INIT_OPT_BOOL(C_(""), N_("Run as separate instance"),
INIT_OPT_BOOL("", N_("Run as separate instance"),
"no-connect", OPT_ZERO, 0,
N_("Run ELinks as a separate instance instead of connecting "
"to an existing instance. Note that normally no runtime state "
"files (bookmarks, history, etc.) are written to the disk "
"when this option is used. See also -touch-files.")),
INIT_OPT_BOOL(C_(""), N_("Disable use of files in ~/.elinks"),
INIT_OPT_BOOL("", N_("Disable use of files in ~/.elinks"),
"no-home", OPT_ZERO, 0,
N_("Disables creation and use of files in the user specific "
"home configuration directory (~/.elinks). It forces default "
"configuration values to be used and disables saving of "
"runtime state files.")),
INIT_OPT_BOOL(C_(""), N_("Disable libevent"),
INIT_OPT_BOOL("", N_("Disable libevent"),
"no-libevent", OPT_ZERO, 0,
N_("Disables libevent.")),
@ -944,7 +944,7 @@ union option_info cmdline_options_info[] = {
"\n"
"Note that this really affects only -dump, nothing else.")),
INIT_OPT_COMMAND(C_(""), N_("Control an already running ELinks"),
INIT_OPT_COMMAND("", N_("Control an already running ELinks"),
"remote", OPT_ZERO, remote_cmd,
N_("Control a remote ELinks instance by passing commands to "
"it. The option takes an additional argument containing the "
@ -966,7 +966,7 @@ union option_info cmdline_options_info[] = {
"\tsearch(string) : search in the current tab\n"
"\txfeDoCommand(openBrowser) : open new window")),
INIT_OPT_INT(C_(""), N_("Connect to session ring with given ID"),
INIT_OPT_INT("", N_("Connect to session ring with given ID"),
"session-ring", OPT_ZERO, 0, INT_MAX, 0,
N_("ID of session ring this ELinks session should connect to. "
"ELinks works in so-called session rings, whereby all "
@ -986,25 +986,25 @@ union option_info cmdline_options_info[] = {
"runtime state files are written to the disk when this option "
"is used. See also -touch-files.")),
INIT_OPT_BOOL(C_(""), N_("Print the source of given URLs to stdout"),
INIT_OPT_BOOL("", N_("Print the source of given URLs to stdout"),
"source", OPT_ZERO, 0,
N_("Print given URLs in source form to stdout.")),
INIT_OPT_COMMAND(C_(""), NULL, "stdin", OPT_HIDDEN, redir_cmd, NULL),
INIT_OPT_COMMAND("", NULL, "stdin", OPT_HIDDEN, redir_cmd, NULL),
INIT_OPT_BOOL(C_(""), N_("Whether to use terminfo"),
INIT_OPT_BOOL("", N_("Whether to use terminfo"),
"terminfo", OPT_ZERO, 0,
N_("When enabled, terminfo ncurses functions will be used "
"instead of hardcoded sequences.")),
INIT_OPT_BOOL(C_(""), N_("Touch files in ~/.elinks when running with -no-connect/-session-ring"),
INIT_OPT_BOOL("", N_("Touch files in ~/.elinks when running with -no-connect/-session-ring"),
"touch-files", OPT_ZERO, 0,
N_("When enabled, runtime state files (bookmarks, history, "
"etc.) are written to disk, even when -no-connect or "
"-session-ring is used. The option has no effect if not used "
"in conjunction with any of these options.")),
INIT_OPT_INT(C_(""), N_("Verbose level"),
INIT_OPT_INT("", N_("Verbose level"),
"verbose", OPT_ZERO, 0, VERBOSE_LEVELS - 1, VERBOSE_WARNINGS,
N_("The verbose level controls what messages are shown at "
"start up and while running:\n"
@ -1012,7 +1012,7 @@ union option_info cmdline_options_info[] = {
"\t1 means show serious errors and warnings\n"
"\t2 means show all messages")),
INIT_OPT_COMMAND(C_(""), N_("Print version information and exit"),
INIT_OPT_COMMAND("", N_("Print version information and exit"),
"version", OPT_ZERO, version_cmd,
N_("Print ELinks version information and exit.")),

File diff suppressed because it is too large Load Diff

View File

@ -84,20 +84,20 @@ enum cookies_option {
};
static union option_info cookies_options[] = {
INIT_OPT_TREE(C_(""), N_("Cookies"),
C_("cookies"), OPT_ZERO,
INIT_OPT_TREE("", N_("Cookies"),
"cookies", OPT_ZERO,
N_("Cookies options.")),
INIT_OPT_INT(C_("cookies"), N_("Accept policy"),
C_("accept_policy"), OPT_ZERO,
INIT_OPT_INT("cookies", N_("Accept policy"),
"accept_policy", OPT_ZERO,
COOKIES_ACCEPT_NONE, COOKIES_ACCEPT_ALL, COOKIES_ACCEPT_ALL,
N_("Cookies accepting policy:\n"
"0 is accept no cookies\n"
"1 is ask for confirmation before accepting cookie\n"
"2 is accept all cookies")),
INIT_OPT_INT(C_("cookies"), N_("Maximum age"),
C_("max_age"), OPT_ZERO, -1, 10000, -1,
INIT_OPT_INT("cookies", N_("Maximum age"),
"max_age", OPT_ZERO, -1, 10000, -1,
N_("Cookie maximum age (in days):\n"
"-1 is use cookie's expiration date if any\n"
"0 is force expiration at the end of session, ignoring\n"
@ -105,8 +105,8 @@ static union option_info cookies_options[] = {
"1+ is use cookie's expiration date, but limit age to the\n"
" given number of days")),
INIT_OPT_BOOL(C_("cookies"), N_("Paranoid security"),
C_("paranoid_security"), OPT_ZERO, 0,
INIT_OPT_BOOL("cookies", N_("Paranoid security"),
"paranoid_security", OPT_ZERO, 0,
N_("When enabled, we'll require three dots in cookies domain "
"for all non-international domains (instead of just two "
"dots). Some countries have generic second level domains "
@ -114,13 +114,13 @@ static union option_info cookies_options[] = {
"for these generic domains could potentially be very bad. "
"Note, it is off by default as it breaks a lot of sites.")),
INIT_OPT_BOOL(C_("cookies"), N_("Saving"),
C_("save"), OPT_ZERO, 1,
INIT_OPT_BOOL("cookies", N_("Saving"),
"save", OPT_ZERO, 1,
N_("Whether cookies should be loaded from and saved to "
"disk.")),
INIT_OPT_BOOL(C_("cookies"), N_("Resaving"),
C_("resave"), OPT_ZERO, 1,
INIT_OPT_BOOL("cookies", N_("Resaving"),
"resave", OPT_ZERO, 1,
N_("Save cookies after each change in cookies list? "
"No effect when cookie saving (cookies.save) is off.")),

View File

@ -27,31 +27,31 @@
union option_info css_options_info[] = {
INIT_OPT_TREE(C_("document"), N_("Cascading Style Sheets"),
C_("css"), OPT_SORT,
INIT_OPT_TREE("document", N_("Cascading Style Sheets"),
"css", OPT_SORT,
N_("Options concerning how to use CSS for styling "
"documents.")),
INIT_OPT_BOOL(C_("document.css"), N_("Enable CSS"),
C_("enable"), OPT_ZERO, 1,
INIT_OPT_BOOL("document.css", N_("Enable CSS"),
"enable", OPT_ZERO, 1,
N_("Enable adding of CSS style info to documents.")),
INIT_OPT_BOOL(C_("document.css"), N_("Ignore \"display: none\""),
C_("ignore_display_none"), OPT_ZERO, 1,
INIT_OPT_BOOL("document.css", N_("Ignore \"display: none\""),
"ignore_display_none", OPT_ZERO, 1,
N_("When enabled, elements are rendered, even when their "
"display property has the value \"none\". Because ELinks's "
"CSS support is still very incomplete, this setting can "
"improve the way that some documents are rendered.")),
INIT_OPT_BOOL(C_("document.css"), N_("Import external style sheets"),
C_("import"), OPT_ZERO, 1,
INIT_OPT_BOOL("document.css", N_("Import external style sheets"),
"import", OPT_ZERO, 1,
N_("When enabled any external style sheets that are imported "
"from either CSS itself using the @import keyword or from the "
"HTML using <link> tags in the document header will also be "
"downloaded.")),
INIT_OPT_STRING(C_("document.css"), N_("Default style sheet"),
C_("stylesheet"), OPT_ZERO, "",
INIT_OPT_STRING("document.css", N_("Default style sheet"),
"stylesheet", OPT_ZERO, "",
N_("The path to the file containing the default user defined "
"Cascading Style Sheet. It can be used to control the basic "
"layout of HTML documents. The path is assumed to be relative "
@ -59,8 +59,8 @@ union option_info css_options_info[] = {
"\n"
"Leave as \"\" to use built-in document styling.")),
INIT_OPT_STRING(C_("document.css"), N_("Media types"),
C_("media"), OPT_ZERO, "tty",
INIT_OPT_STRING("document.css", N_("Media types"),
"media", OPT_ZERO, "tty",
N_("CSS media types that ELinks claims to support, separated "
"with commas. The \"all\" type is implied. Currently, only "
"ASCII characters work reliably here. See CSS2 section 7: "

View File

@ -57,33 +57,33 @@ std::map<struct timer *, bool> map_timer;
* statusbar content etc. --pasky */
static union option_info ecmascript_options[] = {
INIT_OPT_TREE(C_(""), N_("ECMAScript"),
C_("ecmascript"), OPT_ZERO,
INIT_OPT_TREE("", N_("ECMAScript"),
"ecmascript", OPT_ZERO,
N_("ECMAScript options.")),
INIT_OPT_BOOL(C_("ecmascript"), N_("Enable"),
C_("enable"), OPT_ZERO, 0,
INIT_OPT_BOOL("ecmascript", N_("Enable"),
"enable", OPT_ZERO, 0,
N_("Whether to run those scripts inside of documents.")),
INIT_OPT_BOOL(C_("ecmascript"), N_("Console log"),
C_("enable_console_log"), OPT_ZERO, 0,
INIT_OPT_BOOL("ecmascript", N_("Console log"),
"enable_console_log", OPT_ZERO, 0,
N_("When enabled logs will be appended to ~/.elinks/console.log.")),
INIT_OPT_BOOL(C_("ecmascript"), N_("Script error reporting"),
C_("error_reporting"), OPT_ZERO, 0,
INIT_OPT_BOOL("ecmascript", N_("Script error reporting"),
"error_reporting", OPT_ZERO, 0,
N_("Open a message box when a script reports an error.")),
INIT_OPT_BOOL(C_("ecmascript"), N_("Ignore <noscript> content"),
C_("ignore_noscript"), OPT_ZERO, 0,
INIT_OPT_BOOL("ecmascript", N_("Ignore <noscript> content"),
"ignore_noscript", OPT_ZERO, 0,
N_("Whether to ignore content enclosed by the <noscript> tag "
"when ECMAScript is enabled.")),
INIT_OPT_INT(C_("ecmascript"), N_("Maximum execution time"),
C_("max_exec_time"), OPT_ZERO, 1, 3600, 5,
INIT_OPT_INT("ecmascript", N_("Maximum execution time"),
"max_exec_time", OPT_ZERO, 1, 3600, 5,
N_("Maximum execution time in seconds for a script.")),
INIT_OPT_BOOL(C_("ecmascript"), N_("Pop-up window blocking"),
C_("block_window_opening"), OPT_ZERO, 0,
INIT_OPT_BOOL("ecmascript", N_("Pop-up window blocking"),
"block_window_opening", OPT_ZERO, 0,
N_("Whether to disallow scripts to open new windows or tabs.")),
NULL_OPTION_INFO,

View File

@ -33,7 +33,7 @@
static union option_info forms_history_options[] = {
INIT_OPT_BOOL(C_("document.browse.forms"), N_("Show form history dialog"),
INIT_OPT_BOOL("document.browse.forms", N_("Show form history dialog"),
"show_formhist", OPT_ZERO, 0,
N_("Ask if a login form should be saved to file or not. "
"This option only disables the dialog, already saved login "

View File

@ -55,28 +55,28 @@ enum global_history_options {
};
static union option_info global_history_options[] = {
INIT_OPT_TREE(C_("document.history"), N_("Global history"),
C_("global"), OPT_ZERO,
INIT_OPT_TREE("document.history", N_("Global history"),
"global", OPT_ZERO,
N_("Global history options.")),
INIT_OPT_BOOL(C_("document.history.global"), N_("Enable"),
C_("enable"), OPT_ZERO, 1,
INIT_OPT_BOOL("document.history.global", N_("Enable"),
"enable", OPT_ZERO, 1,
N_("Enable global history (\"history of all pages "
"visited\").")),
INIT_OPT_INT(C_("document.history.global"), N_("Maximum number of entries"),
C_("max_items"), OPT_ZERO, 1, INT_MAX, 1024,
INIT_OPT_INT("document.history.global", N_("Maximum number of entries"),
"max_items", OPT_ZERO, 1, INT_MAX, 1024,
N_("Maximum number of entries in the global history.")),
INIT_OPT_INT(C_("document.history.global"), N_("Display style"),
C_("display_type"), OPT_ZERO, 0, 1, 0,
INIT_OPT_INT("document.history.global", N_("Display style"),
"display_type", OPT_ZERO, 0, 1, 0,
N_("What to display in global history dialog:\n"
"0 is URLs\n"
"1 is page titles")),
/* Compatibility alias: added by jonas at 2004-07-16, 0.9.CVS. */
INIT_OPT_ALIAS(C_("document.history.global"), C_("write_interval"), OPT_ZERO,
C_("infofiles.save_interval")),
INIT_OPT_ALIAS("document.history.global", "write_interval", OPT_ZERO,
"infofiles.save_interval"),
NULL_OPTION_INFO,
};

View File

@ -22,8 +22,8 @@
static union option_info default_mime_options[] = {
INIT_OPT_TREE(C_("mime"), N_("MIME type associations"),
C_("type"), OPT_AUTOCREATE,
INIT_OPT_TREE("mime", N_("MIME type associations"),
"type", OPT_AUTOCREATE,
N_("Handler <-> MIME type association. The first sub-tree is "
"the MIME class while the second sub-tree is the MIME type "
"(ie. image/gif handler will reside at mime.type.image.gif). "
@ -31,19 +31,19 @@ static union option_info default_mime_options[] = {
"of the MIME handler (its properties are stored at "
"mime.handler.<name>).")),
INIT_OPT_TREE(C_("mime.type"), NULL,
C_("_template_"), OPT_AUTOCREATE,
INIT_OPT_TREE("mime.type", NULL,
"_template_", OPT_AUTOCREATE,
N_("Handler matching this MIME-type class "
"('*' is used here in place of '.').")),
INIT_OPT_STRING(C_("mime.type._template_"), NULL,
C_("_template_"), OPT_ZERO, "",
INIT_OPT_STRING("mime.type._template_", NULL,
"_template_", OPT_ZERO, "",
N_("Handler matching this MIME-type name "
"('*' is used here in place of '.').")),
INIT_OPT_TREE(C_("mime"), N_("File type handlers"),
C_("handler"), OPT_AUTOCREATE,
INIT_OPT_TREE("mime", N_("File type handlers"),
"handler", OPT_AUTOCREATE,
N_("A file type handler is a set of information about how to "
"use an external program to view a file. It is possible to "
"refer to it for several MIME types -- e.g., you can define "
@ -53,25 +53,25 @@ static union option_info default_mime_options[] = {
"PDF files. Note you must define both a MIME handler "
"and a MIME type association for it to work.")),
INIT_OPT_TREE(C_("mime.handler"), NULL,
C_("_template_"), OPT_AUTOCREATE,
INIT_OPT_TREE("mime.handler", NULL,
"_template_", OPT_AUTOCREATE,
N_("Description of this handler.")),
INIT_OPT_TREE(C_("mime.handler._template_"), NULL,
C_("_template_"), OPT_ZERO,
INIT_OPT_TREE("mime.handler._template_", NULL,
"_template_", OPT_ZERO,
N_("System-specific handler description "
"(ie. unix, unix-xwin, ...).")),
INIT_OPT_BOOL(C_("mime.handler._template_._template_"), N_("Ask before opening"),
C_("ask"), OPT_ZERO, 1,
INIT_OPT_BOOL("mime.handler._template_._template_", N_("Ask before opening"),
"ask", OPT_ZERO, 1,
N_("Ask before opening.")),
INIT_OPT_BOOL(C_("mime.handler._template_._template_"), N_("Block terminal"),
C_("block"), OPT_ZERO, 1,
INIT_OPT_BOOL("mime.handler._template_._template_", N_("Block terminal"),
"block", OPT_ZERO, 1,
N_("Block the terminal when the handler is running.")),
INIT_OPT_STRING(C_("mime.handler._template_._template_"), N_("Program"),
C_("program"), OPT_ZERO, "",
INIT_OPT_STRING("mime.handler._template_._template_", N_("Program"),
"program", OPT_ZERO, "",
/* xgettext:no-c-format */
N_("External viewer for this file type. "
"'%f' in this string will be substituted by a file name, "
@ -79,33 +79,33 @@ static union option_info default_mime_options[] = {
"Do _not_ put single- or double-quotes around the % sign.")),
INIT_OPT_TREE(C_("mime"), N_("File extension associations"),
C_("extension"), OPT_AUTOCREATE,
INIT_OPT_TREE("mime", N_("File extension associations"),
"extension", OPT_AUTOCREATE,
N_("Extension <-> MIME type association.")),
INIT_OPT_STRING(C_("mime.extension"), NULL,
C_("_template_"), OPT_ZERO, "",
INIT_OPT_STRING("mime.extension", NULL,
"_template_", OPT_ZERO, "",
N_("MIME-type matching this file extension "
"('*' is used here in place of '.').")),
#define INIT_OPT_MIME_EXTENSION(extension, type) \
INIT_OPT_STRING(C_("mime.extension"), NULL, extension, OPT_ZERO, type, NULL)
INIT_OPT_STRING("mime.extension", NULL, extension, OPT_ZERO, type, NULL)
INIT_OPT_MIME_EXTENSION(C_("gif"), "image/gif"),
INIT_OPT_MIME_EXTENSION(C_("jpg"), "image/jpg"),
INIT_OPT_MIME_EXTENSION(C_("jpeg"), "image/jpeg"),
INIT_OPT_MIME_EXTENSION(C_("png"), "image/png"),
INIT_OPT_MIME_EXTENSION(C_("txt"), "text/plain"),
INIT_OPT_MIME_EXTENSION(C_("htm"), "text/html"),
INIT_OPT_MIME_EXTENSION(C_("html"), "text/html"),
INIT_OPT_MIME_EXTENSION(C_("gmi"), "text/gemini"),
INIT_OPT_MIME_EXTENSION("gif", "image/gif"),
INIT_OPT_MIME_EXTENSION("jpg", "image/jpg"),
INIT_OPT_MIME_EXTENSION("jpeg", "image/jpeg"),
INIT_OPT_MIME_EXTENSION("png", "image/png"),
INIT_OPT_MIME_EXTENSION("txt", "text/plain"),
INIT_OPT_MIME_EXTENSION("htm", "text/html"),
INIT_OPT_MIME_EXTENSION("html", "text/html"),
INIT_OPT_MIME_EXTENSION("gmi", "text/gemini"),
#ifdef CONFIG_BITTORRENT
INIT_OPT_MIME_EXTENSION(C_("torrent"), "application/x-bittorrent"),
INIT_OPT_MIME_EXTENSION("torrent", "application/x-bittorrent"),
#endif
#ifdef CONFIG_DOM
INIT_OPT_MIME_EXTENSION(C_("rss"), "application/rss+xml"),
INIT_OPT_MIME_EXTENSION(C_("xbel"), "application/xbel+xml"),
INIT_OPT_MIME_EXTENSION(C_("sgml"), "application/docbook+xml"),
INIT_OPT_MIME_EXTENSION("rss", "application/rss+xml"),
INIT_OPT_MIME_EXTENSION("xbel", "application/xbel+xml"),
INIT_OPT_MIME_EXTENSION("sgml", "application/docbook+xml"),
#endif
NULL_OPTION_INFO,

View File

@ -86,25 +86,25 @@ enum mailcap_option {
};
static union option_info mailcap_options[] = {
INIT_OPT_TREE(C_("mime"), N_("Mailcap"),
C_("mailcap"), OPT_ZERO,
INIT_OPT_TREE("mime", N_("Mailcap"),
"mailcap", OPT_ZERO,
N_("Options for mailcap support.")),
INIT_OPT_BOOL(C_("mime.mailcap"), N_("Enable"),
C_("enable"), OPT_ZERO, 1,
INIT_OPT_BOOL("mime.mailcap", N_("Enable"),
"enable", OPT_ZERO, 1,
N_("Enable mailcap support.")),
INIT_OPT_STRING(C_("mime.mailcap"), N_("Path"),
C_("path"), OPT_ZERO, DEFAULT_MAILCAP_PATH,
INIT_OPT_STRING("mime.mailcap", N_("Path"),
"path", OPT_ZERO, DEFAULT_MAILCAP_PATH,
N_("Mailcap search path. Colon-separated list of files. "
"Leave as \"\" to use MAILCAP environment variable instead.")),
INIT_OPT_BOOL(C_("mime.mailcap"), N_("Ask before opening"),
C_("ask"), OPT_ZERO, 1,
INIT_OPT_BOOL("mime.mailcap", N_("Ask before opening"),
"ask", OPT_ZERO, 1,
N_("Ask before using the handlers defined by mailcap.")),
INIT_OPT_INT(C_("mime.mailcap"), N_("Type query string"),
C_("description"), OPT_ZERO, 0, 2, 0,
INIT_OPT_INT("mime.mailcap", N_("Type query string"),
"description", OPT_ZERO, 0, 2, 0,
N_("Type of description to show in \"what to do with "
"this file\" query dialog:\n"
"0 is show \"mailcap\"\n"
@ -112,8 +112,8 @@ static union option_info mailcap_options[] = {
"2 is show mailcap description field if any;\n"
" \"mailcap\" otherwise")),
INIT_OPT_BOOL(C_("mime.mailcap"), N_("Prioritize entries by file"),
C_("prioritize"), OPT_ZERO, 1,
INIT_OPT_BOOL("mime.mailcap", N_("Prioritize entries by file"),
"prioritize", OPT_ZERO, 1,
N_("Prioritize entries by the order of the files in "
"the mailcap path. This means that wildcard entries "
"(like: image/*) will also be checked before deciding "

View File

@ -43,18 +43,18 @@ enum mimetypes_option {
/* Keep options in alphabetical order. */
static union option_info mimetypes_options[] = {
INIT_OPT_TREE(C_("mime"), N_("Mimetypes files"),
C_("mimetypes"), OPT_ZERO,
INIT_OPT_TREE("mime", N_("Mimetypes files"),
"mimetypes", OPT_ZERO,
N_("Options for the support of mime.types files. These files "
"can be used to find the content type of a URL by looking at "
"the extension of the file name.")),
INIT_OPT_BOOL(C_("mime.mimetypes"), N_("Enable"),
C_("enable"), OPT_ZERO, 1,
INIT_OPT_BOOL("mime.mimetypes", N_("Enable"),
"enable", OPT_ZERO, 1,
N_("Enable mime.types support.")),
INIT_OPT_STRING(C_("mime.mimetypes"), N_("Path"),
C_("path"), OPT_ZERO, DEFAULT_MIMETYPES_PATH,
INIT_OPT_STRING("mime.mimetypes", N_("Path"),
"path", OPT_ZERO, DEFAULT_MIMETYPES_PATH,
N_("The search path for mime.types files. "
"Colon-separated list of files.")),

View File

@ -35,12 +35,12 @@ enum mime_options {
};
static union option_info mime_options[] = {
INIT_OPT_TREE(C_(""), N_("MIME"),
C_("mime"), OPT_SORT,
INIT_OPT_TREE("", N_("MIME"),
"mime", OPT_SORT,
N_("MIME-related options (handlers of various MIME types).")),
INIT_OPT_STRING(C_("mime"), N_("Default MIME-type"),
C_("default_type"), OPT_ZERO, DEFAULT_MIME_TYPE,
INIT_OPT_STRING("mime", N_("Default MIME-type"),
"default_type", OPT_ZERO, DEFAULT_MIME_TYPE,
N_("Document MIME-type to assume by default "
"(when we are unable to guess it properly "
"from known information about the document).")),

View File

@ -125,27 +125,27 @@ done_openssl(struct module *module)
}
static union option_info openssl_options[] = {
INIT_OPT_BOOL(C_("connection.ssl"), N_("Verify certificates"),
C_("cert_verify"), OPT_ZERO, 1,
INIT_OPT_BOOL("connection.ssl", N_("Verify certificates"),
"cert_verify", OPT_ZERO, 1,
N_("Verify the peer's SSL certificate. Note that this "
"needs extensive configuration of OpenSSL by the user.")),
INIT_OPT_BOOL(C_("connection.ssl"), N_("Use HTTPS by default"),
C_("https_by_default"), OPT_ZERO, 0,
INIT_OPT_BOOL("connection.ssl", N_("Use HTTPS by default"),
"https_by_default", OPT_ZERO, 0,
N_("Use HTTPS when a URL scheme is not provided.")),
INIT_OPT_TREE(C_("connection.ssl"), N_("Client Certificates"),
C_("client_cert"), OPT_SORT,
INIT_OPT_TREE("connection.ssl", N_("Client Certificates"),
"client_cert", OPT_SORT,
N_("X509 client certificate options.")),
INIT_OPT_BOOL(C_("connection.ssl.client_cert"), N_("Enable"),
C_("enable"), OPT_ZERO, 0,
INIT_OPT_BOOL("connection.ssl.client_cert", N_("Enable"),
"enable", OPT_ZERO, 0,
N_("Enable or not the sending of X509 client certificates "
"to servers which request them.")),
#ifdef CONFIG_NSS_COMPAT_OSSL
INIT_OPT_STRING(C_("connection.ssl.client_cert"), N_("Certificate nickname"),
C_("nickname"), OPT_ZERO, "",
INIT_OPT_STRING("connection.ssl.client_cert", N_("Certificate nickname"),
"nickname", OPT_ZERO, "",
N_("The nickname of the client certificate stored in NSS "
"database. If this value is unset, the nickname from "
"the X509_CLIENT_CERT variable is used instead. If you "
@ -158,8 +158,8 @@ static union option_info openssl_options[] = {
"environment variable. The database can be also shared "
"with Mozilla browsers.")),
#else
INIT_OPT_STRING(C_("connection.ssl.client_cert"), N_("Certificate File"),
C_("file"), OPT_ZERO, "",
INIT_OPT_STRING("connection.ssl.client_cert", N_("Certificate File"),
"file", OPT_ZERO, "",
N_("The location of a file containing the client certificate "
"and unencrypted private key in PEM format. If unset, the "
"file pointed to by the X509_CLIENT_CERT variable is used "
@ -260,13 +260,13 @@ done_gnutls(struct module *module)
}
static union option_info gnutls_options[] = {
INIT_OPT_BOOL(C_("connection.ssl"), N_("Verify certificates"),
C_("cert_verify"), OPT_ZERO, 0,
INIT_OPT_BOOL("connection.ssl", N_("Verify certificates"),
"cert_verify", OPT_ZERO, 0,
N_("Verify the peer's SSL certificate. If you enable "
"this, set also \"Trusted CA file\".")),
INIT_OPT_BOOL(C_("connection.ssl"), N_("Use HTTPS by default"),
C_("https_by_default"), OPT_ZERO, 0,
INIT_OPT_BOOL("connection.ssl", N_("Use HTTPS by default"),
"https_by_default", OPT_ZERO, 0,
N_("Use HTTPS when a URL scheme is not provided.")),
/* The default value of the following option points to a file
@ -277,8 +277,8 @@ static union option_info gnutls_options[] = {
* of binary packages should of course change the default to
* suit their systems.
* TODO: If the file name is relative, look in elinks_home? */
INIT_OPT_STRING(C_("connection.ssl"), N_("Trusted CA file"),
C_("trusted_ca_file"), OPT_ZERO,
INIT_OPT_STRING("connection.ssl", N_("Trusted CA file"),
"trusted_ca_file", OPT_ZERO,
#ifdef HAVE_GNUTLS_CERTIFICATE_SET_X509_SYSTEM_TRUST
"",
#else
@ -292,17 +292,17 @@ static union option_info gnutls_options[] = {
"restart ELinks for the changes to take effect. "
"This option affects GnuTLS but not OpenSSL.")),
INIT_OPT_TREE(C_("connection.ssl"), N_("Client Certificates"),
C_("client_cert"), OPT_SORT,
INIT_OPT_TREE("connection.ssl", N_("Client Certificates"),
"client_cert", OPT_SORT,
N_("X509 client certificate options.")),
INIT_OPT_BOOL(C_("connection.ssl.client_cert"), N_("Enable"),
C_("enable"), OPT_ZERO, 0,
INIT_OPT_BOOL("connection.ssl.client_cert", N_("Enable"),
"enable", OPT_ZERO, 0,
N_("Enable or not the sending of X509 client certificates "
"to servers which request them.")),
INIT_OPT_STRING(C_("connection.ssl.client_cert"), N_("Certificate File"),
C_("file"), OPT_ZERO, "",
INIT_OPT_STRING("connection.ssl.client_cert", N_("Certificate File"),
"file", OPT_ZERO, "",
N_("The location of a file containing the client certificate "
"and unencrypted private key in PEM format. If unset, the "
"file pointed to by the X509_CLIENT_CERT variable is used "
@ -324,8 +324,8 @@ static struct module gnutls_module = struct_module(
#endif /* USE_OPENSSL or CONFIG_GNUTLS */
static union option_info ssl_options[] = {
INIT_OPT_TREE(C_("connection"), N_("SSL"),
C_("ssl"), OPT_SORT,
INIT_OPT_TREE("connection", N_("SSL"),
"ssl", OPT_SORT,
N_("SSL options.")),
NULL_OPTION_INFO,

View File

@ -27,24 +27,24 @@
/* Hey, anything is possible, I am about to drink a carrot! */
static union option_info bittorrent_protocol_options[] = {
INIT_OPT_TREE(C_("protocol"), N_("BitTorrent"),
C_("bittorrent"), OPT_ZERO,
INIT_OPT_TREE("protocol", N_("BitTorrent"),
"bittorrent", OPT_ZERO,
N_("BitTorrent specific options.")),
/* ****************************************************************** */
/* Listening socket options: */
/* ****************************************************************** */
INIT_OPT_TREE(C_("protocol.bittorrent"), N_("Port range"),
C_("ports"), OPT_ZERO,
INIT_OPT_TREE("protocol.bittorrent", N_("Port range"),
"ports", OPT_ZERO,
N_("Port range allowed to be used for listening on.")),
INIT_OPT_INT(C_("protocol.bittorrent.ports"), N_("Minimum port"),
C_("min"), OPT_ZERO, LOWEST_PORT, HIGHEST_PORT, 6881,
INIT_OPT_INT("protocol.bittorrent.ports", N_("Minimum port"),
"min", OPT_ZERO, LOWEST_PORT, HIGHEST_PORT, 6881,
N_("The minimum port to try and listen on.")),
INIT_OPT_INT(C_("protocol.bittorrent.ports"), N_("Maximum port"),
C_("max"), OPT_ZERO, LOWEST_PORT, HIGHEST_PORT, 6999,
INIT_OPT_INT("protocol.bittorrent.ports", N_("Maximum port"),
"max", OPT_ZERO, LOWEST_PORT, HIGHEST_PORT, 6999,
N_("The maximum port to try and listen on.")),
@ -52,44 +52,44 @@ static union option_info bittorrent_protocol_options[] = {
/* Tracker connection options: */
/* ****************************************************************** */
INIT_OPT_TREE(C_("protocol.bittorrent"), N_("Tracker"),
C_("tracker"), OPT_ZERO,
INIT_OPT_TREE("protocol.bittorrent", N_("Tracker"),
"tracker", OPT_ZERO,
N_("Tracker options.")),
INIT_OPT_BOOL(C_("protocol.bittorrent.tracker"), N_("Use compact tracker format"),
C_("compact"), OPT_ZERO, 0,
INIT_OPT_BOOL("protocol.bittorrent.tracker", N_("Use compact tracker format"),
"compact", OPT_ZERO, 0,
N_("Whether to request that the tracker returns peer info "
"in compact format. Note, the compact format only supports "
"IPv4 addresses.")),
INIT_OPT_INT(C_("protocol.bittorrent.tracker"), N_("Tracker announce interval"),
C_("interval"), OPT_ZERO, 0, INT_MAX, 0,
INIT_OPT_INT("protocol.bittorrent.tracker", N_("Tracker announce interval"),
"interval", OPT_ZERO, 0, INT_MAX, 0,
N_("The number of seconds to wait between periodically "
"contacting the tracker for announcing progress and "
"requesting more peers. Set to zero to use the interval "
"requested by the tracker.")),
INIT_OPT_STRING(C_("protocol.bittorrent.tracker"), N_("IP-address to announce"),
C_("ip_address"), OPT_ZERO, "",
INIT_OPT_STRING("protocol.bittorrent.tracker", N_("IP-address to announce"),
"ip_address", OPT_ZERO, "",
N_("What IP address to report to the tracker. If set to \"\" "
"no IP address will be sent and the tracker will "
"automatically determine an appropriate IP address.")),
INIT_OPT_STRING(C_("protocol.bittorrent.tracker"), N_("User identification string"),
C_("key"), OPT_ZERO, "",
INIT_OPT_STRING("protocol.bittorrent.tracker", N_("User identification string"),
"key", OPT_ZERO, "",
N_("An additional identification that is not shared with any "
"users. It is intended to allow a client to prove their "
"identity should their IP address change. It is an optional "
"parameter, but some trackers require this parameter. "
"If set to \"\" no user key will be sent to the tracker.")),
INIT_OPT_INT(C_("protocol.bittorrent.tracker"), N_("Maximum number of peers to request"),
C_("numwant"), OPT_ZERO, 0, INT_MAX, 50,
INIT_OPT_INT("protocol.bittorrent.tracker", N_("Maximum number of peers to request"),
"numwant", OPT_ZERO, 0, INT_MAX, 50,
N_("The maximum number of peers to request from the tracker. "
"Set to 0 to use the server default.")),
INIT_OPT_INT(C_("protocol.bittorrent.tracker"), N_("Minimum peers to skip rerequesting"),
C_("min_skip_size"), OPT_ZERO, 0, INT_MAX, 20,
INIT_OPT_INT("protocol.bittorrent.tracker", N_("Minimum peers to skip rerequesting"),
"min_skip_size", OPT_ZERO, 0, INT_MAX, 20,
N_("The minimum number of peers to have in the current peer "
"info pool before skipping requesting of more peers. I.e. "
"setting numwant to zero. Set to 0 to not have any limit.")),
@ -99,12 +99,12 @@ static union option_info bittorrent_protocol_options[] = {
/* Lowlevel peer-wire options: */
/* ****************************************************************** */
INIT_OPT_TREE(C_("protocol.bittorrent"), N_("Peer-wire"),
C_("peerwire"), OPT_ZERO,
INIT_OPT_TREE("protocol.bittorrent", N_("Peer-wire"),
"peerwire", OPT_ZERO,
N_("Lowlevel peer-wire options.")),
INIT_OPT_INT(C_("protocol.bittorrent.peerwire"), N_("Maximum number of peer connections"),
C_("connections"), OPT_ZERO, 1, INT_MAX, 55,
INIT_OPT_INT("protocol.bittorrent.peerwire", N_("Maximum number of peer connections"),
"connections", OPT_ZERO, 1, INT_MAX, 55,
N_("The maximum number of allowed connections to both active "
"and non-active peers. By increasing the number of allowed "
"connections, the chance of finding good peers to download "
@ -112,30 +112,30 @@ static union option_info bittorrent_protocol_options[] = {
"TCP congestion. If the maximum is reached all new incoming "
"connections will be closed.")),
INIT_OPT_INT(C_("protocol.bittorrent.peerwire"), N_("Maximum peer message length"),
C_("max_message_length"), OPT_ZERO, 1, INT_MAX, BITTORRENT_MESSAGE_MAX_SIZE,
INIT_OPT_INT("protocol.bittorrent.peerwire", N_("Maximum peer message length"),
"max_message_length", OPT_ZERO, 1, INT_MAX, BITTORRENT_MESSAGE_MAX_SIZE,
N_("The maximum length of messages to accept over the wire. "
"Larger values will cause the connection to be dropped.")),
INIT_OPT_INT(C_("protocol.bittorrent.peerwire"), N_("Maximum allowed request length"),
C_("max_request_length"), OPT_ZERO, 1, INT_MAX, BITTORRENT_REQUEST_ACCEPT_LENGTH,
INIT_OPT_INT("protocol.bittorrent.peerwire", N_("Maximum allowed request length"),
"max_request_length", OPT_ZERO, 1, INT_MAX, BITTORRENT_REQUEST_ACCEPT_LENGTH,
N_("The maximum length to allow for incoming requests. "
"Larger requests will cause the connection to be dropped.")),
INIT_OPT_INT(C_("protocol.bittorrent.peerwire"), N_("Length of requests"),
C_("request_length"), OPT_ZERO, 1, INT_MAX, BITTORRENT_REQUEST_LENGTH,
INIT_OPT_INT("protocol.bittorrent.peerwire", N_("Length of requests"),
"request_length", OPT_ZERO, 1, INT_MAX, BITTORRENT_REQUEST_LENGTH,
N_("How many bytes to query for per request. This is "
"complementary to the max_request_length option. "
"If the configured length is bigger than the piece length "
"it will be truncated.")),
INIT_OPT_INT(C_("protocol.bittorrent.peerwire"), N_("Peer inactivity timeout"),
C_("timeout"), OPT_ZERO, 0, INT_MAX, 300,
INIT_OPT_INT("protocol.bittorrent.peerwire", N_("Peer inactivity timeout"),
"timeout", OPT_ZERO, 0, INT_MAX, 300,
N_("The number of seconds to wait before closing a socket on "
"which nothing has been received or sent.")),
INIT_OPT_INT(C_("protocol.bittorrent.peerwire"), N_("Maximum peer pool size"),
C_("pool_size"), OPT_ZERO, 0, INT_MAX, 55,
INIT_OPT_INT("protocol.bittorrent.peerwire", N_("Maximum peer pool size"),
"pool_size", OPT_ZERO, 0, INT_MAX, 55,
N_("Maximum number of items in the peer pool. The peer pool "
"contains information used for establishing connections to "
"new peers.\n"
@ -147,8 +147,8 @@ static union option_info bittorrent_protocol_options[] = {
/* Piece management options: */
/* ****************************************************************** */
INIT_OPT_INT(C_("protocol.bittorrent"), N_("Maximum piece cache size"),
C_("piece_cache_size"), OPT_ZERO, 0, INT_MAX, 1024 * 1024,
INIT_OPT_INT("protocol.bittorrent", N_("Maximum piece cache size"),
"piece_cache_size", OPT_ZERO, 0, INT_MAX, 1024 * 1024,
N_("The maximum amount of memory used to hold recently "
"downloaded pieces.\n"
"\n"
@ -159,8 +159,8 @@ static union option_info bittorrent_protocol_options[] = {
/* ****************************************************************** */
#if 0
INIT_OPT_STRING(C_("protocol.bittorrent"), N_("Sharing rate"),
C_("sharing_rate"), OPT_ZERO, "1.0",
INIT_OPT_STRING("protocol.bittorrent", N_("Sharing rate"),
"sharing_rate", OPT_ZERO, "1.0",
N_("The minimum sharing rate to achieve before stop seeding. "
"The sharing rate is computed as the number of uploaded bytes "
"divided with the number of downloaded bytes. The value "
@ -168,24 +168,24 @@ static union option_info bittorrent_protocol_options[] = {
"Set to 1.0 to atleast upload a complete copy of all data and "
"set to 0.0 to have unlimited sharing rate.")),
#endif
INIT_OPT_INT(C_("protocol.bittorrent"), N_("Maximum number of uploads"),
C_("max_uploads"), OPT_ZERO, 0, INT_MAX, 7,
INIT_OPT_INT("protocol.bittorrent", N_("Maximum number of uploads"),
"max_uploads", OPT_ZERO, 0, INT_MAX, 7,
N_("The maximum number of uploads to allow at once.")),
/* The number of uploads to fill out to with extra optimistic unchokes */
INIT_OPT_INT(C_("protocol.bittorrent"), N_("Minimum number of uploads"),
C_("min_uploads"), OPT_ZERO, 0, INT_MAX, 2,
INIT_OPT_INT("protocol.bittorrent", N_("Minimum number of uploads"),
"min_uploads", OPT_ZERO, 0, INT_MAX, 2,
N_("The minimum number of uploads which should at least "
"be used for new connections.")),
#if 0
INIT_OPT_INT(C_("protocol.bittorrent"), N_("Keepalive interval"),
C_("keepalive_interval"), OPT_ZERO, 0, INT_MAX, 120,
INIT_OPT_INT("protocol.bittorrent", N_("Keepalive interval"),
"keepalive_interval", OPT_ZERO, 0, INT_MAX, 120,
N_("The number of seconds to pause between sending keepalive "
"messages.")),
#endif
INIT_OPT_INT(C_("protocol.bittorrent"), N_("Number of pending requests"),
C_("request_queue_size"), OPT_ZERO, 1, INT_MAX, 5,
INIT_OPT_INT("protocol.bittorrent", N_("Number of pending requests"),
"request_queue_size", OPT_ZERO, 1, INT_MAX, 5,
N_("How many piece requests to continuously keep in queue. "
"Pipelining of requests is essential to saturate connections "
"and get a good connection performance and thus a faster "
@ -195,26 +195,26 @@ static union option_info bittorrent_protocol_options[] = {
#if 0
/* Bram uses 30 seconds here. */
INIT_OPT_INT(C_("protocol.bittorrent"), N_("Peer snubbing interval"),
C_("snubbing_interval"), OPT_ZERO, 0, INT_MAX, 30,
INIT_OPT_INT("protocol.bittorrent", N_("Peer snubbing interval"),
"snubbing_interval", OPT_ZERO, 0, INT_MAX, 30,
N_("The number of seconds to wait for file data before "
"assuming the peer has been snubbed.")),
#endif
INIT_OPT_INT(C_("protocol.bittorrent"), N_("Peer choke interval"),
C_("choke_interval"), OPT_ZERO, 0, INT_MAX, BITTORRENT_DEFAULT_CHOKE_INTERVAL,
INIT_OPT_INT("protocol.bittorrent", N_("Peer choke interval"),
"choke_interval", OPT_ZERO, 0, INT_MAX, BITTORRENT_DEFAULT_CHOKE_INTERVAL,
N_("The number of seconds between updating the connection "
"state and most importantly choke and unchoke peer "
"connections. The choke period should be big enough for newly "
"unchoked connections to get started but small enough to not "
"allow freeriders too much room for stealing bandwidth.")),
INIT_OPT_INT(C_("protocol.bittorrent"), N_("Rarest first piece selection cutoff"),
C_("rarest_first_cutoff"), OPT_ZERO, 0, INT_MAX, 4,
INIT_OPT_INT("protocol.bittorrent", N_("Rarest first piece selection cutoff"),
"rarest_first_cutoff", OPT_ZERO, 0, INT_MAX, 4,
N_("The number of pieces to obtain before switching piece "
"selection strategy from random to rarest first.")),
INIT_OPT_BOOL(C_("protocol.bittorrent"), N_("Allow blacklisting"),
C_("allow_blacklist"), OPT_ZERO, 1,
INIT_OPT_BOOL("protocol.bittorrent", N_("Allow blacklisting"),
"allow_blacklist", OPT_ZERO, 1,
N_("Allow blacklisting of buggy peers.")),
NULL_OPTION_INFO,

View File

@ -41,17 +41,17 @@
#include "util/string.h"
static union option_info cgi_options[] = {
INIT_OPT_TREE(C_("protocol.file"), N_("Local CGI"),
C_("cgi"), OPT_ZERO,
INIT_OPT_TREE("protocol.file", N_("Local CGI"),
"cgi", OPT_ZERO,
N_("Local CGI specific options.")),
INIT_OPT_STRING(C_("protocol.file.cgi"), N_("Path"),
C_("path"), OPT_ZERO, "",
INIT_OPT_STRING("protocol.file.cgi", N_("Path"),
"path", OPT_ZERO, "",
N_("Colon separated list of directories, "
"where CGI scripts are stored.")),
INIT_OPT_BOOL(C_("protocol.file.cgi"), N_("Allow local CGI"),
C_("policy"), OPT_ZERO, 0,
INIT_OPT_BOOL("protocol.file.cgi", N_("Allow local CGI"),
"policy", OPT_ZERO, 0,
N_("Whether to execute local CGI scripts.")),
NULL_OPTION_INFO,
};

View File

@ -42,23 +42,23 @@
static union option_info file_options[] = {
INIT_OPT_TREE(C_("protocol"), N_("Local files"),
C_("file"), OPT_ZERO,
INIT_OPT_TREE("protocol", N_("Local files"),
"file", OPT_ZERO,
N_("Options specific to local browsing.")),
INIT_OPT_BOOL(C_("protocol.file"), N_("Allow reading special files"),
C_("allow_special_files"), OPT_ZERO, 0,
INIT_OPT_BOOL("protocol.file", N_("Allow reading special files"),
"allow_special_files", OPT_ZERO, 0,
N_("Whether to allow reading from non-regular files. "
"Note this can be dangerous; reading /dev/urandom or "
"/dev/zero can ruin your day!")),
INIT_OPT_BOOL(C_("protocol.file"), N_("Show hidden files in directory listing"),
C_("show_hidden_files"), OPT_ZERO, 1,
INIT_OPT_BOOL("protocol.file", N_("Show hidden files in directory listing"),
"show_hidden_files", OPT_ZERO, 1,
N_("When set to false, files with name starting with a dot "
"will be hidden in local directory listings.")),
INIT_OPT_BOOL(C_("protocol.file"), N_("Try encoding extensions"),
C_("try_encoding_extensions"), OPT_ZERO, 1,
INIT_OPT_BOOL("protocol.file", N_("Try encoding extensions"),
"try_encoding_extensions", OPT_ZERO, 1,
N_("When set, if we can't open a file named 'filename', "
"we'll try to open 'filename' with some encoding extension "
"appended (ie. 'filename.gz'); it depends on the supported "

View File

@ -53,31 +53,31 @@
union option_info ftp_options[] = {
INIT_OPT_TREE(C_("protocol"), N_("FTP"),
C_("ftp"), OPT_ZERO,
INIT_OPT_TREE("protocol", N_("FTP"),
"ftp", OPT_ZERO,
N_("FTP specific options.")),
INIT_OPT_TREE(C_("protocol.ftp"), N_("Proxy configuration"),
C_("proxy"), OPT_ZERO,
INIT_OPT_TREE("protocol.ftp", N_("Proxy configuration"),
"proxy", OPT_ZERO,
N_("FTP proxy configuration.")),
INIT_OPT_STRING(C_("protocol.ftp.proxy"), N_("Host and port-number"),
C_("host"), OPT_ZERO, "",
INIT_OPT_STRING("protocol.ftp.proxy", N_("Host and port-number"),
"host", OPT_ZERO, "",
N_("Host and port-number (host:port) of the FTP proxy, "
"or blank. If it's blank, FTP_PROXY environment variable "
"is checked as well.")),
INIT_OPT_STRING(C_("protocol.ftp"), N_("Anonymous password"),
C_("anon_passwd"), OPT_ZERO, "some@host.domain",
INIT_OPT_STRING("protocol.ftp", N_("Anonymous password"),
"anon_passwd", OPT_ZERO, "some@host.domain",
N_("FTP anonymous password to be sent.")),
INIT_OPT_BOOL(C_("protocol.ftp"), N_("Use passive mode (IPv4)"),
C_("use_pasv"), OPT_ZERO, 1,
INIT_OPT_BOOL("protocol.ftp", N_("Use passive mode (IPv4)"),
"use_pasv", OPT_ZERO, 1,
N_("Use PASV instead of PORT (passive vs active mode, "
"IPv4 only).")),
#ifdef CONFIG_IPV6
INIT_OPT_BOOL(C_("protocol.ftp"), N_("Use passive mode (IPv6)"),
C_("use_epsv"), OPT_ZERO, 0,
INIT_OPT_BOOL("protocol.ftp", N_("Use passive mode (IPv6)"),
"use_epsv", OPT_ZERO, 0,
N_("Use EPSV instead of EPRT (passive vs active mode, "
"IPv6 only).")),
#endif /* CONFIG_IPV6 */

View File

@ -71,60 +71,60 @@ static char *accept_charset = NULL;
static union option_info http_options[] = {
INIT_OPT_TREE(C_("protocol"), N_("HTTP"),
C_("http"), OPT_ZERO,
INIT_OPT_TREE("protocol", N_("HTTP"),
"http", OPT_ZERO,
N_("HTTP-specific options.")),
INIT_OPT_TREE(C_("protocol.http"), N_("Server bug workarounds"),
C_("bugs"), OPT_ZERO,
INIT_OPT_TREE("protocol.http", N_("Server bug workarounds"),
"bugs", OPT_ZERO,
N_("Server-side HTTP bugs workarounds.")),
INIT_OPT_BOOL(C_("protocol.http.bugs"), N_("Do not send Accept-Charset"),
C_("accept_charset"), OPT_ZERO, 1,
INIT_OPT_BOOL("protocol.http.bugs", N_("Do not send Accept-Charset"),
"accept_charset", OPT_ZERO, 1,
N_("The Accept-Charset header is quite long and sending it "
"can trigger bugs in some rarely found servers.")),
INIT_OPT_BOOL(C_("protocol.http.bugs"), N_("Allow blacklisting"),
C_("allow_blacklist"), OPT_ZERO, 1,
INIT_OPT_BOOL("protocol.http.bugs", N_("Allow blacklisting"),
"allow_blacklist", OPT_ZERO, 1,
N_("Allow blacklisting of buggy servers.")),
INIT_OPT_BOOL(C_("protocol.http.bugs"), N_("Broken 302 redirects"),
C_("broken_302_redirect"), OPT_ZERO, 1,
INIT_OPT_BOOL("protocol.http.bugs", N_("Broken 302 redirects"),
"broken_302_redirect", OPT_ZERO, 1,
N_("Broken 302 redirect (violates RFC but compatible with "
"Netscape). This is a problem for a lot of web discussion "
"boards and the like. If they will do strange things to you, "
"try to play with this.")),
INIT_OPT_BOOL(C_("protocol.http.bugs"), N_("No keepalive after POST requests"),
C_("post_no_keepalive"), OPT_ZERO, 0,
INIT_OPT_BOOL("protocol.http.bugs", N_("No keepalive after POST requests"),
"post_no_keepalive", OPT_ZERO, 0,
N_("Disable keepalive connection after POST request.")),
INIT_OPT_BOOL(C_("protocol.http.bugs"), N_("Use HTTP/1.0"),
C_("http10"), OPT_ZERO, 0,
INIT_OPT_BOOL("protocol.http.bugs", N_("Use HTTP/1.0"),
"http10", OPT_ZERO, 0,
N_("Use HTTP/1.0 protocol instead of HTTP/1.1.")),
INIT_OPT_TREE(C_("protocol.http"), N_("Proxy configuration"),
C_("proxy"), OPT_ZERO,
INIT_OPT_TREE("protocol.http", N_("Proxy configuration"),
"proxy", OPT_ZERO,
N_("HTTP proxy configuration.")),
INIT_OPT_STRING(C_("protocol.http.proxy"), N_("Host and port-number"),
C_("host"), OPT_ZERO, "",
INIT_OPT_STRING("protocol.http.proxy", N_("Host and port-number"),
"host", OPT_ZERO, "",
N_("Host and port-number (host:port) of the HTTP proxy, "
"or blank. If it's blank, HTTP_PROXY environment variable "
"is checked as well.")),
INIT_OPT_STRING(C_("protocol.http.proxy"), N_("Username"),
C_("user"), OPT_ZERO, "",
INIT_OPT_STRING("protocol.http.proxy", N_("Username"),
"user", OPT_ZERO, "",
N_("Proxy authentication username.")),
INIT_OPT_STRING(C_("protocol.http.proxy"), N_("Password"),
C_("passwd"), OPT_ZERO, "",
INIT_OPT_STRING("protocol.http.proxy", N_("Password"),
"passwd", OPT_ZERO, "",
N_("Proxy authentication password.")),
INIT_OPT_TREE(C_("protocol.http"), N_("Referer sending"),
C_("referer"), OPT_ZERO,
INIT_OPT_TREE("protocol.http", N_("Referer sending"),
"referer", OPT_ZERO,
N_("HTTP referer sending options. HTTP referer is a special "
"header sent in the HTTP requests, which is supposed to "
"contain the previous page visited by the browser."
@ -133,8 +133,8 @@ static union option_info http_options[] = {
"unfortunately considerably affect privacy and can lead even "
"to a security problem on some badly designed web pages.")),
INIT_OPT_INT(C_("protocol.http.referer"), N_("Policy"),
C_("policy"), OPT_ZERO,
INIT_OPT_INT("protocol.http.referer", N_("Policy"),
"policy", OPT_ZERO,
REFERER_NONE, REFERER_TRUE, REFERER_TRUE,
N_("Mode of sending HTTP referer:\n"
"0 is send no referer\n"
@ -142,17 +142,17 @@ static union option_info http_options[] = {
"2 is send fixed fake referer\n"
"3 is send previous URL as referer (correct, but insecure)")),
INIT_OPT_STRING(C_("protocol.http.referer"), N_("Fake referer URL"),
C_("fake"), OPT_ZERO, "",
INIT_OPT_STRING("protocol.http.referer", N_("Fake referer URL"),
"fake", OPT_ZERO, "",
N_("Fake referer to be sent when policy is 2.")),
INIT_OPT_STRING(C_("protocol.http"), N_("Send Accept-Language header"),
C_("accept_language"), OPT_ZERO, "",
INIT_OPT_STRING("protocol.http", N_("Send Accept-Language header"),
"accept_language", OPT_ZERO, "",
N_("Send Accept-Language header.")),
INIT_OPT_BOOL(C_("protocol.http"), N_("Use UI language as Accept-Language"),
C_("accept_ui_language"), OPT_ZERO, 1,
INIT_OPT_BOOL("protocol.http", N_("Use UI language as Accept-Language"),
"accept_ui_language", OPT_ZERO, 1,
N_("Request localised versions of documents from web-servers "
"(using the Accept-Language header) using the language "
"you have configured for ELinks' user-interface (this also "
@ -170,8 +170,8 @@ static union option_info http_options[] = {
* ELinks should instead report the decompression error (bug 1017)
* or perhaps even blacklist the server for compression and retry.
* Until that has been implemented, disable compression by default. */
INIT_OPT_BOOL(C_("protocol.http"), N_("Enable on-the-fly compression"),
C_("compression"), OPT_ZERO, 0,
INIT_OPT_BOOL("protocol.http", N_("Enable on-the-fly compression"),
"compression", OPT_ZERO, 0,
N_("If enabled, the capability to receive compressed content "
"(gzip and/or bzip2) is announced to the server, which "
"usually sends the reply compressed, thus saving some "
@ -185,8 +185,8 @@ static union option_info http_options[] = {
"this option has no effect. To check the supported features, "
"see Help -> About.")),
INIT_OPT_BOOL(C_("protocol.http"), N_("Activate HTTP TRACE debugging"),
C_("trace"), OPT_ZERO, 0,
INIT_OPT_BOOL("protocol.http", N_("Activate HTTP TRACE debugging"),
"trace", OPT_ZERO, 0,
N_("If active, all HTTP requests are sent with TRACE as "
"their method rather than GET or POST. This is useful for "
"debugging of both ELinks and various server-side scripts "
@ -195,8 +195,8 @@ static union option_info http_options[] = {
"not be enabled on all servers.")),
/* OSNews.com is supposed to be relying on the textmode token, at least. */
INIT_OPT_STRING(C_("protocol.http"), N_("User-agent identification"),
C_("user_agent"), OPT_ZERO, "ELinks/%v (textmode; %s; %t-%b)",
INIT_OPT_STRING("protocol.http", N_("User-agent identification"),
"user_agent", OPT_ZERO, "ELinks/%v (textmode; %s; %t-%b)",
N_("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 "
@ -215,16 +215,16 @@ static union option_info http_options[] = {
"%b in the string means number of bars displayed by ELinks.")),
INIT_OPT_TREE(C_("protocol"), N_("HTTPS"),
C_("https"), OPT_ZERO,
INIT_OPT_TREE("protocol", N_("HTTPS"),
"https", OPT_ZERO,
N_("HTTPS-specific options.")),
INIT_OPT_TREE(C_("protocol.https"), N_("Proxy configuration"),
C_("proxy"), OPT_ZERO,
INIT_OPT_TREE("protocol.https", N_("Proxy configuration"),
"proxy", OPT_ZERO,
N_("HTTPS proxy configuration.")),
INIT_OPT_STRING(C_("protocol.https.proxy"), N_("Host and port-number"),
C_("host"), OPT_ZERO, "",
INIT_OPT_STRING("protocol.https.proxy", N_("Host and port-number"),
"host", OPT_ZERO, "",
N_("Host and port-number (host:port) of the HTTPS CONNECT "
"proxy, or blank. If it's blank, HTTPS_PROXY environment "
"variable is checked as well.")),

View File

@ -29,18 +29,18 @@ enum nntp_protocol_option {
};
static union option_info nntp_protocol_options[] = {
INIT_OPT_TREE(C_("protocol"), N_("NNTP"),
C_("nntp"), OPT_ZERO,
INIT_OPT_TREE("protocol", N_("NNTP"),
"nntp", OPT_ZERO,
N_("NNTP and news specific options.")),
INIT_OPT_STRING(C_("protocol.nntp"), N_("Default news server"),
C_("server"), OPT_ZERO, "",
INIT_OPT_STRING("protocol.nntp", N_("Default news server"),
"server", OPT_ZERO, "",
N_("Used when resolving news: URIs. "
"If set to the empty string the value of the NNTPSERVER "
"environment variable will be used.")),
INIT_OPT_STRING(C_("protocol.nntp"), N_("Message header entries"),
C_("header_entries"), OPT_ZERO, NNTP_HEADER_ENTRIES,
INIT_OPT_STRING("protocol.nntp", N_("Message header entries"),
"header_entries", OPT_ZERO, NNTP_HEADER_ENTRIES,
N_("Comma separated list of which entries in the article "
"header to show. E.g. 'Subject' and 'From'. "
"All header entries can be read in the header info dialog.")),

View File

@ -274,12 +274,12 @@ get_protocol_external_handler(struct terminal *term, struct uri *uri)
static union option_info protocol_options[] = {
INIT_OPT_TREE(C_(""), N_("Protocols"),
C_("protocol"), OPT_SORT,
INIT_OPT_TREE("", N_("Protocols"),
"protocol", OPT_SORT,
N_("Protocol specific options.")),
INIT_OPT_STRING(C_("protocol"), N_("No-proxy domains"),
C_("no_proxy"), OPT_ZERO, "",
INIT_OPT_STRING("protocol", N_("No-proxy domains"),
"no_proxy", OPT_ZERO, "",
N_("Comma separated list of domains for which the proxy "
"(HTTP/FTP) should be disabled. Optionally, a port can be "
"specified for some domains as well. If it's blank, "

View File

@ -41,8 +41,8 @@ enum uri_rewrite_option {
};
static union option_info uri_rewrite_options[] = {
INIT_OPT_TREE(C_("protocol"), N_("URI rewriting"),
C_("rewrite"), OPT_SORT,
INIT_OPT_TREE("protocol", N_("URI rewriting"),
"rewrite", OPT_SORT,
N_("Rules for rewriting URIs entered in the goto dialog. "
"It makes it possible to define a set of prefixes that will "
"be expanded if they match a string entered in the goto "
@ -51,41 +51,41 @@ static union option_info uri_rewrite_options[] = {
"possible to pass arguments to them like search engine "
"keywords.")),
INIT_OPT_BOOL(C_("protocol.rewrite"), N_("Enable dumb prefixes"),
C_("enable-dumb"), OPT_ZERO, 1,
INIT_OPT_BOOL("protocol.rewrite", N_("Enable dumb prefixes"),
"enable-dumb", OPT_ZERO, 1,
N_("Enable dumb prefixes - simple URI abbreviations which "
"can be written to the Goto URL dialog instead of actual URIs "
"- i.e. if you write 'elinks' there, you are directed to "
"http://elinks.cz/.")),
INIT_OPT_BOOL(C_("protocol.rewrite"), N_("Enable smart prefixes"),
C_("enable-smart"), OPT_ZERO, 1,
INIT_OPT_BOOL("protocol.rewrite", N_("Enable smart prefixes"),
"enable-smart", OPT_ZERO, 1,
N_("Enable smart prefixes - URI templates triggered by "
"writing given abbreviation to the Goto URL dialog followed "
"by a list of arguments from which the actual URI is composed "
"- i.e. 'gg:search keywords' or 'gn search keywords for "
"news'.")),
INIT_OPT_TREE(C_("protocol.rewrite"), N_("Dumb Prefixes"),
C_("dumb"), OPT_AUTOCREATE | OPT_SORT,
INIT_OPT_TREE("protocol.rewrite", N_("Dumb Prefixes"),
"dumb", OPT_AUTOCREATE | OPT_SORT,
N_("Dumb prefixes, see enable-dumb description for details.")),
INIT_OPT_STRING(C_("protocol.rewrite.dumb"), NULL,
C_("_template_"), OPT_ZERO, "",
INIT_OPT_STRING("protocol.rewrite.dumb", NULL,
"_template_", OPT_ZERO, "",
/* xgettext:no-c-format */
N_("Replacement URI for this dumbprefix:\n"
"%c in the string means the current URL\n"
"%% in the string means '%'")),
INIT_OPT_TREE(C_("protocol.rewrite"), N_("Smart Prefixes"),
C_("smart"), OPT_AUTOCREATE | OPT_SORT,
INIT_OPT_TREE("protocol.rewrite", N_("Smart Prefixes"),
"smart", OPT_AUTOCREATE | OPT_SORT,
N_("Smart prefixes, see enable-smart description for "
"details.")),
/* TODO: In some rare occations current link URI and referrer might
* also be useful and dare I mention some kind of proxy argument. --jonas */
INIT_OPT_STRING(C_("protocol.rewrite.smart"), NULL,
C_("_template_"), OPT_ZERO, "",
INIT_OPT_STRING("protocol.rewrite.smart", NULL,
"_template_", OPT_ZERO, "",
/* xgettext:no-c-format */
N_("Replacement URI for this smartprefix:\n"
"%c in the string means the current URL\n"
@ -93,8 +93,8 @@ static union option_info uri_rewrite_options[] = {
"%0,%1,...,%9 means argument 0, 1, ..., 9\n"
"%% in the string means '%'")),
INIT_OPT_STRING(C_("protocol.rewrite"), N_("Default template"),
C_("default_template"), OPT_ZERO, "",
INIT_OPT_STRING("protocol.rewrite", N_("Default template"),
"default_template", OPT_ZERO, "",
/* xgettext:no-c-format */
N_("Default URI template used when the string entered in "
"the goto dialog does not appear to be a URI or a filename "
@ -110,81 +110,81 @@ static union option_info uri_rewrite_options[] = {
"%% in the template means '%'.")),
#define INIT_OPT_DUMB_PREFIX(prefix, uri) \
INIT_OPT_STRING(C_("protocol.rewrite.dumb"), NULL, prefix, OPT_ZERO, uri, NULL)
INIT_OPT_STRING("protocol.rewrite.dumb", NULL, prefix, OPT_ZERO, uri, NULL)
INIT_OPT_DUMB_PREFIX(C_("elinks"), ELINKS_WEBSITE_URL),
INIT_OPT_DUMB_PREFIX(C_("documentation"), ELINKS_DOC_URL),
INIT_OPT_DUMB_PREFIX(C_("bz"), ELINKS_BUGS_URL),
INIT_OPT_DUMB_PREFIX(C_("bug"), ELINKS_BUGS_URL),
INIT_OPT_DUMB_PREFIX("elinks", ELINKS_WEBSITE_URL),
INIT_OPT_DUMB_PREFIX("documentation", ELINKS_DOC_URL),
INIT_OPT_DUMB_PREFIX("bz", ELINKS_BUGS_URL),
INIT_OPT_DUMB_PREFIX("bug", ELINKS_BUGS_URL),
INIT_OPT_DUMB_PREFIX(C_("arc"), "https://web.archive.org/web/*/%c"),
INIT_OPT_DUMB_PREFIX(C_("d"), "http://www.dict.org/bin/Dict"),
INIT_OPT_DUMB_PREFIX(C_("ddg"), "https://lite.duckduckgo.com/lite"),
INIT_OPT_DUMB_PREFIX(C_("g"), "https://www.google.com"),
INIT_OPT_DUMB_PREFIX(C_("gg"), "https://www.google.com"),
INIT_OPT_DUMB_PREFIX(C_("go"), "https://www.google.com"),
INIT_OPT_DUMB_PREFIX(C_("fc"), "https://freshcode.club/"),
INIT_OPT_DUMB_PREFIX(C_("sf"), "https://sourceforge.net"),
INIT_OPT_DUMB_PREFIX(C_("dbug"), "https://www.debian.org/Bugs/"),
INIT_OPT_DUMB_PREFIX(C_("dpkg"), "https://www.debian.org/distrib/packages"),
INIT_OPT_DUMB_PREFIX(C_("lua"), "file:///usr/share/doc/lua/contents.html#index"),
INIT_OPT_DUMB_PREFIX(C_("pycur"), "https://www.python.org/doc/"),
INIT_OPT_DUMB_PREFIX(C_("pydev"), "https://docs.python.org/dev/"),
INIT_OPT_DUMB_PREFIX(C_("e2"), "https://www.everything2.org"),
INIT_OPT_DUMB_PREFIX(C_("sd"), "https://slashdot.org/"),
INIT_OPT_DUMB_PREFIX(C_("vhtml"), "https://validator.w3.org/nu/?doc=%c"),
INIT_OPT_DUMB_PREFIX(C_("vcss"), "https://jigsaw.w3.org/css-validator/validator?uri=%c"),
INIT_OPT_DUMB_PREFIX("arc", "https://web.archive.org/web/*/%c"),
INIT_OPT_DUMB_PREFIX("d", "http://www.dict.org/bin/Dict"),
INIT_OPT_DUMB_PREFIX("ddg", "https://lite.duckduckgo.com/lite"),
INIT_OPT_DUMB_PREFIX("g", "https://www.google.com"),
INIT_OPT_DUMB_PREFIX("gg", "https://www.google.com"),
INIT_OPT_DUMB_PREFIX("go", "https://www.google.com"),
INIT_OPT_DUMB_PREFIX("fc", "https://freshcode.club/"),
INIT_OPT_DUMB_PREFIX("sf", "https://sourceforge.net"),
INIT_OPT_DUMB_PREFIX("dbug", "https://www.debian.org/Bugs/"),
INIT_OPT_DUMB_PREFIX("dpkg", "https://www.debian.org/distrib/packages"),
INIT_OPT_DUMB_PREFIX("lua", "file:///usr/share/doc/lua/contents.html#index"),
INIT_OPT_DUMB_PREFIX("pycur", "https://www.python.org/doc/"),
INIT_OPT_DUMB_PREFIX("pydev", "https://docs.python.org/dev/"),
INIT_OPT_DUMB_PREFIX("e2", "https://www.everything2.org"),
INIT_OPT_DUMB_PREFIX("sd", "https://slashdot.org/"),
INIT_OPT_DUMB_PREFIX("vhtml", "https://validator.w3.org/nu/?doc=%c"),
INIT_OPT_DUMB_PREFIX("vcss", "https://jigsaw.w3.org/css-validator/validator?uri=%c"),
#define INIT_OPT_SMART_PREFIX(prefix, uri) \
INIT_OPT_STRING(C_("protocol.rewrite.smart"), NULL, prefix, OPT_ZERO, uri, NULL)
INIT_OPT_STRING("protocol.rewrite.smart", NULL, prefix, OPT_ZERO, uri, NULL)
INIT_OPT_SMART_PREFIX(C_("arc"), "https://web.archive.org/web/*/%s"),
INIT_OPT_SMART_PREFIX(C_("aur"), "https://aur.archlinux.org/packages/?K=%s"),
INIT_OPT_SMART_PREFIX(C_("aw"), "https://wiki.archlinux.org/index.php?search=%s"),
INIT_OPT_SMART_PREFIX(C_("bug"), ELINKS_BUGS_URL "?q=is:issue+%s"),
INIT_OPT_SMART_PREFIX(C_("cambridge"), "https://dictionary.cambridge.org/dictionary/english/%s"),
INIT_OPT_SMART_PREFIX(C_("cliki"), "http://www.cliki.net/site/search?words=%s"),
INIT_OPT_SMART_PREFIX(C_("d"), "http://www.dict.org/bin/Dict?Query=%s&Form=Dict1&Strategy=*&Database=*&submit=Submit+query"),
INIT_OPT_SMART_PREFIX(C_("ddg"), "https://duckduckgo.com/lite?q=%s"),
INIT_OPT_SMART_PREFIX(C_("foldoc"), "http://foldoc.org/?%s"),
INIT_OPT_SMART_PREFIX(C_("g"), "https://www.google.com/search?q=%s"),
INIT_OPT_SMART_PREFIX("arc", "https://web.archive.org/web/*/%s"),
INIT_OPT_SMART_PREFIX("aur", "https://aur.archlinux.org/packages/?K=%s"),
INIT_OPT_SMART_PREFIX("aw", "https://wiki.archlinux.org/index.php?search=%s"),
INIT_OPT_SMART_PREFIX("bug", ELINKS_BUGS_URL "?q=is:issue+%s"),
INIT_OPT_SMART_PREFIX("cambridge", "https://dictionary.cambridge.org/dictionary/english/%s"),
INIT_OPT_SMART_PREFIX("cliki", "http://www.cliki.net/site/search?words=%s"),
INIT_OPT_SMART_PREFIX("d", "http://www.dict.org/bin/Dict?Query=%s&Form=Dict1&Strategy=*&Database=*&submit=Submit+query"),
INIT_OPT_SMART_PREFIX("ddg", "https://duckduckgo.com/lite?q=%s"),
INIT_OPT_SMART_PREFIX("foldoc", "http://foldoc.org/?%s"),
INIT_OPT_SMART_PREFIX("g", "https://www.google.com/search?q=%s"),
/* Whose idea was it to use 'gg' for websearches? -- Miciah */
/* INIT_OPT_SMART_PREFIX("gg", "https://groups.google.com/forum/#!search/%s"), */
INIT_OPT_SMART_PREFIX(C_("gg"), "https://www.google.com/search?q=%s"),
INIT_OPT_SMART_PREFIX(C_("gi"), "https://www.google.com/search?q=%s&tbm=isch"),
INIT_OPT_SMART_PREFIX(C_("gn"), "https://news.google.com/search?q=%s&hl=en-US&gl=US&ceid=US:en"),
INIT_OPT_SMART_PREFIX(C_("go"), "https://www.google.com/search?q=%s"),
INIT_OPT_SMART_PREFIX(C_("gr"), "https://groups.google.com/forum/#!search/%s"),
INIT_OPT_SMART_PREFIX(C_("google"), "https://www.google.com/search?q=%s"),
INIT_OPT_SMART_PREFIX(C_("gwho"), "http://www.googlism.com/search/?ism=%s&type=1"),
INIT_OPT_SMART_PREFIX(C_("gwhat"), "http://www.googlism.com/search/?ism=%s&type=2"),
INIT_OPT_SMART_PREFIX(C_("gwhere"), "http://www.googlism.com/search/?ism=%s&type=3"),
INIT_OPT_SMART_PREFIX(C_("gwhen"), "http://www.googlism.com/search/?ism=%s&type=4"),
INIT_OPT_SMART_PREFIX(C_("savannah"), "https://savannah.nongnu.org/search/?words=%s&type_of_search=soft&exact=1"),
INIT_OPT_SMART_PREFIX(C_("sf"), "https://sourceforge.net/search/?q=%s"),
INIT_OPT_SMART_PREFIX(C_("sfp"), "https://sourceforge.net/projects/%s"),
INIT_OPT_SMART_PREFIX(C_("dbug"), "https://bugs.debian.org/%s"),
INIT_OPT_SMART_PREFIX(C_("dpkg"), "https://packages.debian.org/search?keywords=%s"),
INIT_OPT_SMART_PREFIX(C_("emacs"), "https://www.emacswiki.org/emacs?match=%s&pages=on&permanentanchors=on"),
INIT_OPT_SMART_PREFIX(C_("onelook"), "https://onelook.com/?w=%s"),
INIT_OPT_SMART_PREFIX(C_("e2"), "https://www.everything2.org/?node=%s"),
INIT_OPT_SMART_PREFIX(C_("encz"), "https://www.slovnik.cz/bin/ecd?ecd_il=1&ecd_vcb=%s&ecd_trn=translate&ecd_trn_dir=0&ecd_lines=15&ecd_hptxt=0"),
INIT_OPT_SMART_PREFIX(C_("czen"), "https://www.slovnik.cz/bin/ecd?ecd_il=1&ecd_vcb=%s&ecd_trn=translate&ecd_trn_dir=1&ecd_lines=15&ecd_hptxt=0"),
INIT_OPT_SMART_PREFIX(C_("dict"), "https://dictionary.reference.com/search?q=%s"),
INIT_OPT_SMART_PREFIX(C_("thes"), "https://www.thesaurus.com/browse/%s"),
INIT_OPT_SMART_PREFIX(C_("a"), "https://www.acronymfinder.com/~/search/af.aspx?String=exact&Acronym=%s"),
INIT_OPT_SMART_PREFIX(C_("imdb"), "https://www.imdb.com/find?q=%s"),
INIT_OPT_SMART_PREFIX(C_("mw"), "https://www.merriam-webster.com/dictionary?s=%s"),
INIT_OPT_SMART_PREFIX(C_("mwt"), "https://www.merriam-webster.com/thesaurus/%s"),
INIT_OPT_SMART_PREFIX(C_("wiki"), "https://en.wikipedia.org/w/index.php?search=%s"),
INIT_OPT_SMART_PREFIX(C_("wn"), "http://wordnetweb.princeton.edu/perl/webwn?s=%s"),
INIT_OPT_SMART_PREFIX("gg", "https://www.google.com/search?q=%s"),
INIT_OPT_SMART_PREFIX("gi", "https://www.google.com/search?q=%s&tbm=isch"),
INIT_OPT_SMART_PREFIX("gn", "https://news.google.com/search?q=%s&hl=en-US&gl=US&ceid=US:en"),
INIT_OPT_SMART_PREFIX("go", "https://www.google.com/search?q=%s"),
INIT_OPT_SMART_PREFIX("gr", "https://groups.google.com/forum/#!search/%s"),
INIT_OPT_SMART_PREFIX("google", "https://www.google.com/search?q=%s"),
INIT_OPT_SMART_PREFIX("gwho", "http://www.googlism.com/search/?ism=%s&type=1"),
INIT_OPT_SMART_PREFIX("gwhat", "http://www.googlism.com/search/?ism=%s&type=2"),
INIT_OPT_SMART_PREFIX("gwhere", "http://www.googlism.com/search/?ism=%s&type=3"),
INIT_OPT_SMART_PREFIX("gwhen", "http://www.googlism.com/search/?ism=%s&type=4"),
INIT_OPT_SMART_PREFIX("savannah", "https://savannah.nongnu.org/search/?words=%s&type_of_search=soft&exact=1"),
INIT_OPT_SMART_PREFIX("sf", "https://sourceforge.net/search/?q=%s"),
INIT_OPT_SMART_PREFIX("sfp", "https://sourceforge.net/projects/%s"),
INIT_OPT_SMART_PREFIX("dbug", "https://bugs.debian.org/%s"),
INIT_OPT_SMART_PREFIX("dpkg", "https://packages.debian.org/search?keywords=%s"),
INIT_OPT_SMART_PREFIX("emacs", "https://www.emacswiki.org/emacs?match=%s&pages=on&permanentanchors=on"),
INIT_OPT_SMART_PREFIX("onelook", "https://onelook.com/?w=%s"),
INIT_OPT_SMART_PREFIX("e2", "https://www.everything2.org/?node=%s"),
INIT_OPT_SMART_PREFIX("encz", "https://www.slovnik.cz/bin/ecd?ecd_il=1&ecd_vcb=%s&ecd_trn=translate&ecd_trn_dir=0&ecd_lines=15&ecd_hptxt=0"),
INIT_OPT_SMART_PREFIX("czen", "https://www.slovnik.cz/bin/ecd?ecd_il=1&ecd_vcb=%s&ecd_trn=translate&ecd_trn_dir=1&ecd_lines=15&ecd_hptxt=0"),
INIT_OPT_SMART_PREFIX("dict", "https://dictionary.reference.com/search?q=%s"),
INIT_OPT_SMART_PREFIX("thes", "https://www.thesaurus.com/browse/%s"),
INIT_OPT_SMART_PREFIX("a", "https://www.acronymfinder.com/~/search/af.aspx?String=exact&Acronym=%s"),
INIT_OPT_SMART_PREFIX("imdb", "https://www.imdb.com/find?q=%s"),
INIT_OPT_SMART_PREFIX("mw", "https://www.merriam-webster.com/dictionary?s=%s"),
INIT_OPT_SMART_PREFIX("mwt", "https://www.merriam-webster.com/thesaurus/%s"),
INIT_OPT_SMART_PREFIX("wiki", "https://en.wikipedia.org/w/index.php?search=%s"),
INIT_OPT_SMART_PREFIX("wn", "http://wordnetweb.princeton.edu/perl/webwn?s=%s"),
/* Search the Free Software Directory */
INIT_OPT_SMART_PREFIX(C_("fsd"), "https://directory.fsf.org/wiki?title=Special%3ASearch&search=%s"),
INIT_OPT_SMART_PREFIX("fsd", "https://directory.fsf.org/wiki?title=Special%3ASearch&search=%s"),
/* rfc by number */
INIT_OPT_SMART_PREFIX(C_("rfc"), "https://www.rfc-editor.org/rfc/rfc%s.txt"),
INIT_OPT_SMART_PREFIX("rfc", "https://www.rfc-editor.org/rfc/rfc%s.txt"),
/* rfc search */
INIT_OPT_SMART_PREFIX(C_("rfcs"), "https://www.rfc-editor.org/search/rfc_search_detail.php?title=%s"),
INIT_OPT_SMART_PREFIX(C_("cr"), "https://www.rfc-editor.org/search/rfc_search_detail.php?title=%s"),
INIT_OPT_SMART_PREFIX("rfcs", "https://www.rfc-editor.org/search/rfc_search_detail.php?title=%s"),
INIT_OPT_SMART_PREFIX("cr", "https://www.rfc-editor.org/search/rfc_search_detail.php?title=%s"),
NULL_OPTION_INFO,
};

View File

@ -31,8 +31,8 @@
static union option_info user_protocol_options[] = {
INIT_OPT_TREE(C_("protocol"), N_("User protocols"),
C_("user"), OPT_AUTOCREATE,
INIT_OPT_TREE("protocol", N_("User protocols"),
"user", OPT_AUTOCREATE,
N_("User protocols. Options in this tree specify external "
"handlers for the appropriate protocols. Ie. "
"protocol.user.mailto.unix.")),
@ -42,14 +42,14 @@ static union option_info user_protocol_options[] = {
/* Basically, it looks like protocol.user.mailto.win32 = "blah" */
INIT_OPT_TREE(C_("protocol.user"), NULL,
C_("_template_"), OPT_AUTOCREATE,
INIT_OPT_TREE("protocol.user", NULL,
"_template_", OPT_AUTOCREATE,
N_("Handler (external program) for this protocol. Name the "
"options in this tree after your system (ie. unix, "
"unix-xwin).")),
INIT_OPT_STRING(C_("protocol.user._template_"), NULL,
C_("_template_"), OPT_ZERO, "",
INIT_OPT_STRING("protocol.user._template_", NULL,
"_template_", OPT_ZERO, "",
N_("Handler (external program) for this protocol and system.\n"
"%f in the string means file name to include form data from\n"
"%h in the string means hostname (or email address)\n"
@ -62,21 +62,21 @@ static union option_info user_protocol_options[] = {
INIT_OPT_STRING("protocol.user." scheme, NULL, system, OPT_ZERO, cmd, NULL)
#ifndef CONFIG_GOPHER
INIT_OPT_USER_PROTOCOL("gopher", C_("unix"), DEFAULT_AC_OPT_GOPHER),
INIT_OPT_USER_PROTOCOL("gopher", C_("unix-xwin"), DEFAULT_AC_OPT_GOPHER),
INIT_OPT_USER_PROTOCOL("gopher", "unix", DEFAULT_AC_OPT_GOPHER),
INIT_OPT_USER_PROTOCOL("gopher", "unix-xwin", DEFAULT_AC_OPT_GOPHER),
#endif
INIT_OPT_USER_PROTOCOL("irc", C_("unix"), DEFAULT_AC_OPT_IRC),
INIT_OPT_USER_PROTOCOL("irc", C_("unix-xwin"), DEFAULT_AC_OPT_IRC),
INIT_OPT_USER_PROTOCOL("mailto", C_("unix"), DEFAULT_AC_OPT_MAILTO),
INIT_OPT_USER_PROTOCOL("mailto", C_("unix-xwin"), DEFAULT_AC_OPT_MAILTO),
INIT_OPT_USER_PROTOCOL("irc", "unix", DEFAULT_AC_OPT_IRC),
INIT_OPT_USER_PROTOCOL("irc", "unix-xwin", DEFAULT_AC_OPT_IRC),
INIT_OPT_USER_PROTOCOL("mailto", "unix", DEFAULT_AC_OPT_MAILTO),
INIT_OPT_USER_PROTOCOL("mailto", "unix-xwin", DEFAULT_AC_OPT_MAILTO),
#ifndef CONFIG_NNTP
INIT_OPT_USER_PROTOCOL("news", C_("unix"), DEFAULT_AC_OPT_NEWS),
INIT_OPT_USER_PROTOCOL("news", C_("unix-xwin"), DEFAULT_AC_OPT_NEWS),
INIT_OPT_USER_PROTOCOL("news", "unix", DEFAULT_AC_OPT_NEWS),
INIT_OPT_USER_PROTOCOL("news", "unix-xwin", DEFAULT_AC_OPT_NEWS),
#endif
INIT_OPT_USER_PROTOCOL("telnet", C_("unix"), DEFAULT_AC_OPT_TELNET),
INIT_OPT_USER_PROTOCOL("telnet", C_("unix-xwin"), DEFAULT_AC_OPT_TELNET),
INIT_OPT_USER_PROTOCOL("tn3270", C_("unix"), DEFAULT_AC_OPT_TN3270),
INIT_OPT_USER_PROTOCOL("tn3270", C_("unix-xwin"), DEFAULT_AC_OPT_TN3270),
INIT_OPT_USER_PROTOCOL("telnet", "unix", DEFAULT_AC_OPT_TELNET),
INIT_OPT_USER_PROTOCOL("telnet", "unix-xwin", DEFAULT_AC_OPT_TELNET),
INIT_OPT_USER_PROTOCOL("tn3270", "unix", DEFAULT_AC_OPT_TN3270),
INIT_OPT_USER_PROTOCOL("tn3270", "unix-xwin", DEFAULT_AC_OPT_TN3270),
NULL_OPTION_INFO,
};