1
0
Fork 0

[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"),
"