1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-25 01:05:37 +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[] = { static union option_info led_options[] = {
INIT_OPT_TREE(C_("ui"), N_("Clock"), INIT_OPT_TREE("ui", N_("Clock"),
C_("clock"), OPT_ZERO, N_("Digital clock in the status bar.")), "clock", OPT_ZERO, N_("Digital clock in the status bar.")),
INIT_OPT_BOOL(C_("ui.clock"), N_("Enable"), INIT_OPT_BOOL("ui.clock", N_("Enable"),
C_("enable"), OPT_ZERO, 0, "enable", OPT_ZERO, 0,
N_("Whether to display a digital clock in the status bar.")), N_("Whether to display a digital clock in the status bar.")),
INIT_OPT_STRING(C_("ui.clock"), N_("Format"), INIT_OPT_STRING("ui.clock", N_("Format"),
C_("format"), OPT_ZERO, "[%H:%M]", "format", OPT_ZERO, "[%H:%M]",
N_("Format string for the digital clock. See the strftime(3) " N_("Format string for the digital clock. See the strftime(3) "
"manpage for details.")), "manpage for details.")),
/* Compatibility alias. Added: 2004-04-22, 0.9.CVS. */ /* 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"), INIT_OPT_BOOL("ui", N_("Show IP"),
C_("show_ip"), OPT_ZERO, 0, "show_ip", OPT_ZERO, 0,
N_("Whether to display IP of the document in the status bar.")), N_("Whether to display IP of the document in the status bar.")),
INIT_OPT_TREE(C_("ui"), N_("Temperature"), INIT_OPT_TREE("ui", N_("Temperature"),
C_("temperature"), OPT_ZERO, N_("Temperature of CPU.")), "temperature", OPT_ZERO, N_("Temperature of CPU.")),
INIT_OPT_BOOL(C_("ui.temperature"), N_("Enable"), INIT_OPT_BOOL("ui.temperature", N_("Enable"),
C_("enable"), OPT_ZERO, 0, "enable", OPT_ZERO, 0,
N_("Whether to display temperature of the CPU in the status bar.")), N_("Whether to display temperature of the CPU in the status bar.")),
INIT_OPT_STRING(C_("ui.temperature"), N_("Filename"), INIT_OPT_STRING("ui.temperature", N_("Filename"),
C_("filename"), OPT_ZERO, "/sys/class/thermal/thermal_zone0/temp", "filename", OPT_ZERO, "/sys/class/thermal/thermal_zone0/temp",
N_("Filename to see temperature.")), N_("Filename to see temperature.")),
INIT_OPT_TREE(C_("ui"), N_("LEDs"), INIT_OPT_TREE("ui", N_("LEDs"),
C_("leds"), OPT_ZERO, "leds", OPT_ZERO,
N_("LEDs (visual indicators) options.")), N_("LEDs (visual indicators) options.")),
INIT_OPT_BOOL(C_("ui.leds"), N_("Enable"), INIT_OPT_BOOL("ui.leds", N_("Enable"),
C_("enable"), OPT_ZERO, 1, "enable", OPT_ZERO, 1,
N_("Enable LEDs. These visual indicators will inform you " N_("Enable LEDs. These visual indicators will inform you "
"about various states.")), "about various states.")),

View File

@ -45,35 +45,35 @@ static struct bookmark *bm_snapshot_last_folder;
/* Life functions */ /* Life functions */
static union option_info bookmark_options_info[] = { static union option_info bookmark_options_info[] = {
INIT_OPT_TREE(C_(""), N_("Bookmarks"), INIT_OPT_TREE("", N_("Bookmarks"),
C_("bookmarks"), OPT_ZERO, "bookmarks", OPT_ZERO,
N_("Bookmark options.")), N_("Bookmark options.")),
#ifdef CONFIG_XBEL_BOOKMARKS #ifdef CONFIG_XBEL_BOOKMARKS
INIT_OPT_INT(C_("bookmarks"), N_("File format"), INIT_OPT_INT("bookmarks", N_("File format"),
C_("file_format"), OPT_ZERO, 0, 1, 0, "file_format", OPT_ZERO, 0, 1, 0,
N_("File format for bookmarks (affects both reading and " N_("File format for bookmarks (affects both reading and "
"saving):\n" "saving):\n"
"0 is the default native ELinks format\n" "0 is the default native ELinks format\n"
"1 is XBEL universal XML bookmarks format")), "1 is XBEL universal XML bookmarks format")),
#else #else
INIT_OPT_INT(C_("bookmarks"), N_("File format"), INIT_OPT_INT("bookmarks", N_("File format"),
C_("file_format"), OPT_ZERO, 0, 1, 0, "file_format", OPT_ZERO, 0, 1, 0,
N_("File format for bookmarks (affects both reading and " N_("File format for bookmarks (affects both reading and "
"saving):\n" "saving):\n"
"0 is the default native ELinks format\n" "0 is the default native ELinks format\n"
"1 is XBEL universal XML bookmarks format (DISABLED)")), "1 is XBEL universal XML bookmarks format (DISABLED)")),
#endif #endif
INIT_OPT_BOOL(C_("bookmarks"), N_("Save folder state"), INIT_OPT_BOOL("bookmarks", N_("Save folder state"),
C_("folder_state"), OPT_ZERO, 1, "folder_state", OPT_ZERO, 1,
N_("When saving bookmarks also store whether folders are " N_("When saving bookmarks also store whether folders are "
"expanded or not, so the look of the bookmark dialog is " "expanded or not, so the look of the bookmark dialog is "
"kept across ELinks sessions. If disabled all folders will " "kept across ELinks sessions. If disabled all folders will "
"appear unexpanded next time ELinks is run.")), "appear unexpanded next time ELinks is run.")),
INIT_OPT_BOOL(C_("ui.sessions"), N_("Periodic snapshotting"), INIT_OPT_BOOL("ui.sessions", N_("Periodic snapshotting"),
C_("snapshot"), OPT_ZERO, 0, "snapshot", OPT_ZERO, 0,
N_("Automatically save a snapshot of all tabs periodically. " N_("Automatically save a snapshot of all tabs periodically. "
"This will periodically bookmark the tabs of each terminal " "This will periodically bookmark the tabs of each terminal "
"in a separate folder for recovery after a crash.\n" "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[] = { union option_info cmdline_options_info[] = {
/* [gettext_accelerator_context(IGNORE)] */ /* [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, "always-load-config", OPT_ZERO, 0,
N_("Load config also for slave instances. Slower, but more robust.")), 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, "anonymous", OPT_ZERO, 0,
N_("Restricts ELinks so it can run on an anonymous account. " N_("Restricts ELinks so it can run on an anonymous account. "
"Local file browsing, downloads, and modification of options " "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 " "entries in the association table can't be added or "
"modified.")), "modified.")),
INIT_OPT_BOOL(C_(""), N_("Autosubmit first form"), INIT_OPT_BOOL("", N_("Autosubmit first form"),
"auto-submit", OPT_ZERO, 0, "auto-submit", OPT_ZERO, 0,
N_("Automatically submit the first form in the given URLs.")), 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, "base-session", OPT_ZERO, 0, INT_MAX, 0,
N_("Used internally when opening ELinks instances in new " N_("Used internally when opening ELinks instances in new "
"windows. The ID maps to information that will be used when " "windows. The ID maps to information that will be used when "
"creating the new instance. You don't want to use it.")), "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, "", "bind-address", OPT_ZERO, "",
N_("Use a specific local IP address")), 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, "", "bind-address-ipv6", OPT_ZERO, "",
N_("Use a specific local IPv6 address")), 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, "", "config-dir", OPT_ZERO, "",
N_("Path of the directory ELinks will read and write its " N_("Path of the directory ELinks will read and write its "
"config and runtime state files to instead of ~/.elinks. " "config and runtime state files to instead of ~/.elinks. "
"If the path does not begin with a '/' it is assumed to be " "If the path does not begin with a '/' it is assumed to be "
"relative to your HOME directory.")), "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, "config-dump", OPT_ZERO, printconfigdump_cmd,
N_("Print a configuration file with options set to the " N_("Print a configuration file with options set to the "
"built-in defaults to stdout.")), "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", "config-file", OPT_ZERO, "elinks.conf",
N_("Name of the configuration file that all configuration " N_("Name of the configuration file that all configuration "
"options will be read from and written to. It should be " "options will be read from and written to. It should be "
"relative to config-dir.")), "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, "config-help", OPT_ZERO, printhelp_cmd,
N_("Print help for configuration options and exit.")), 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 " N_("The default MIME type used for documents of unknown "
"type.")), "type.")),
INIT_OPT_BOOL(C_(""), N_("Ignore user-defined keybindings"), INIT_OPT_BOOL("", N_("Ignore user-defined keybindings"),
"default-keys", OPT_ZERO, 0, "default-keys", OPT_ZERO, 0,
N_("When set, all keybindings from configuration files will " N_("When set, all keybindings from configuration files will "
"be ignored. It forces use of default keybindings and will " "be ignored. It forces use of default keybindings and will "
"reset user-defined ones on save.")), "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, "dump", OPT_ZERO, 0,
N_("Print formatted plain-text versions of given URLs to " N_("Print formatted plain-text versions of given URLs to "
"stdout.")), "stdout.")),
@ -874,7 +874,7 @@ union option_info cmdline_options_info[] = {
"dump-width", OPT_ZERO, "document.dump.width", "dump-width", OPT_ZERO, "document.dump.width",
N_("Width of the dump output.")), 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, "eval", OPT_ZERO, eval_cmd,
N_("Specify configuration file directives on the command-line " N_("Specify configuration file directives on the command-line "
"which will be evaluated after all configuration files has " "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'")), "\t-eval 'set protocol.file.allow_special_files = 1'")),
/* lynx compatibility */ /* 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, "force-html", OPT_ZERO, forcehtml_cmd,
N_("Makes ELinks assume documents of unknown types are HTML. " N_("Makes ELinks assume documents of unknown types are HTML. "
"Useful when using ELinks as an external viewer from MUAs. " "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 /* XXX: -?, -h and -help share the same caption and should be kept in
* the current order for usage help printing to be ok */ * 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, "help", OPT_ZERO, printhelp_cmd,
N_("Print usage help and exit.")), 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, "localhost", OPT_ZERO, 0,
N_("Restricts ELinks to work offline and only connect to " N_("Restricts ELinks to work offline and only connect to "
"servers with local addresses (ie. 127.0.0.1). No connections " "servers with local addresses (ie. 127.0.0.1). No connections "
"to remote servers will be permitted.")), "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, "long-help", OPT_ZERO, printhelp_cmd,
N_("Print detailed usage help and exit.")), 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, "lookup", OPT_ZERO, lookup_cmd,
N_("Look up specified host and print all DNS resolved IP " N_("Look up specified host and print all DNS resolved IP "
"addresses.")), "addresses.")),
INIT_OPT_BOOL(C_(""), N_("Run as separate instance"), INIT_OPT_BOOL("", N_("Run as separate instance"),
"no-connect", OPT_ZERO, 0, "no-connect", OPT_ZERO, 0,
N_("Run ELinks as a separate instance instead of connecting " N_("Run ELinks as a separate instance instead of connecting "
"to an existing instance. Note that normally no runtime state " "to an existing instance. Note that normally no runtime state "
"files (bookmarks, history, etc.) are written to the disk " "files (bookmarks, history, etc.) are written to the disk "
"when this option is used. See also -touch-files.")), "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, "no-home", OPT_ZERO, 0,
N_("Disables creation and use of files in the user specific " N_("Disables creation and use of files in the user specific "
"home configuration directory (~/.elinks). It forces default " "home configuration directory (~/.elinks). It forces default "
"configuration values to be used and disables saving of " "configuration values to be used and disables saving of "
"runtime state files.")), "runtime state files.")),
INIT_OPT_BOOL(C_(""), N_("Disable libevent"), INIT_OPT_BOOL("", N_("Disable libevent"),
"no-libevent", OPT_ZERO, 0, "no-libevent", OPT_ZERO, 0,
N_("Disables libevent.")), N_("Disables libevent.")),
@ -944,7 +944,7 @@ union option_info cmdline_options_info[] = {
"\n" "\n"
"Note that this really affects only -dump, nothing else.")), "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, "remote", OPT_ZERO, remote_cmd,
N_("Control a remote ELinks instance by passing commands to " N_("Control a remote ELinks instance by passing commands to "
"it. The option takes an additional argument containing the " "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" "\tsearch(string) : search in the current tab\n"
"\txfeDoCommand(openBrowser) : open new window")), "\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, "session-ring", OPT_ZERO, 0, INT_MAX, 0,
N_("ID of session ring this ELinks session should connect to. " N_("ID of session ring this ELinks session should connect to. "
"ELinks works in so-called session rings, whereby all " "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 " "runtime state files are written to the disk when this option "
"is used. See also -touch-files.")), "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, "source", OPT_ZERO, 0,
N_("Print given URLs in source form to stdout.")), 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, "terminfo", OPT_ZERO, 0,
N_("When enabled, terminfo ncurses functions will be used " N_("When enabled, terminfo ncurses functions will be used "
"instead of hardcoded sequences.")), "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, "touch-files", OPT_ZERO, 0,
N_("When enabled, runtime state files (bookmarks, history, " N_("When enabled, runtime state files (bookmarks, history, "
"etc.) are written to disk, even when -no-connect or " "etc.) are written to disk, even when -no-connect or "
"-session-ring is used. The option has no effect if not used " "-session-ring is used. The option has no effect if not used "
"in conjunction with any of these options.")), "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, "verbose", OPT_ZERO, 0, VERBOSE_LEVELS - 1, VERBOSE_WARNINGS,
N_("The verbose level controls what messages are shown at " N_("The verbose level controls what messages are shown at "
"start up and while running:\n" "start up and while running:\n"
@ -1012,7 +1012,7 @@ union option_info cmdline_options_info[] = {
"\t1 means show serious errors and warnings\n" "\t1 means show serious errors and warnings\n"
"\t2 means show all messages")), "\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, "version", OPT_ZERO, version_cmd,
N_("Print ELinks version information and exit.")), 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[] = { static union option_info cookies_options[] = {
INIT_OPT_TREE(C_(""), N_("Cookies"), INIT_OPT_TREE("", N_("Cookies"),
C_("cookies"), OPT_ZERO, "cookies", OPT_ZERO,
N_("Cookies options.")), N_("Cookies options.")),
INIT_OPT_INT(C_("cookies"), N_("Accept policy"), INIT_OPT_INT("cookies", N_("Accept policy"),
C_("accept_policy"), OPT_ZERO, "accept_policy", OPT_ZERO,
COOKIES_ACCEPT_NONE, COOKIES_ACCEPT_ALL, COOKIES_ACCEPT_ALL, COOKIES_ACCEPT_NONE, COOKIES_ACCEPT_ALL, COOKIES_ACCEPT_ALL,
N_("Cookies accepting policy:\n" N_("Cookies accepting policy:\n"
"0 is accept no cookies\n" "0 is accept no cookies\n"
"1 is ask for confirmation before accepting cookie\n" "1 is ask for confirmation before accepting cookie\n"
"2 is accept all cookies")), "2 is accept all cookies")),
INIT_OPT_INT(C_("cookies"), N_("Maximum age"), INIT_OPT_INT("cookies", N_("Maximum age"),
C_("max_age"), OPT_ZERO, -1, 10000, -1, "max_age", OPT_ZERO, -1, 10000, -1,
N_("Cookie maximum age (in days):\n" N_("Cookie maximum age (in days):\n"
"-1 is use cookie's expiration date if any\n" "-1 is use cookie's expiration date if any\n"
"0 is force expiration at the end of session, ignoring\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" "1+ is use cookie's expiration date, but limit age to the\n"
" given number of days")), " given number of days")),
INIT_OPT_BOOL(C_("cookies"), N_("Paranoid security"), INIT_OPT_BOOL("cookies", N_("Paranoid security"),
C_("paranoid_security"), OPT_ZERO, 0, "paranoid_security", OPT_ZERO, 0,
N_("When enabled, we'll require three dots in cookies domain " N_("When enabled, we'll require three dots in cookies domain "
"for all non-international domains (instead of just two " "for all non-international domains (instead of just two "
"dots). Some countries have generic second level domains " "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. " "for these generic domains could potentially be very bad. "
"Note, it is off by default as it breaks a lot of sites.")), "Note, it is off by default as it breaks a lot of sites.")),
INIT_OPT_BOOL(C_("cookies"), N_("Saving"), INIT_OPT_BOOL("cookies", N_("Saving"),
C_("save"), OPT_ZERO, 1, "save", OPT_ZERO, 1,
N_("Whether cookies should be loaded from and saved to " N_("Whether cookies should be loaded from and saved to "
"disk.")), "disk.")),
INIT_OPT_BOOL(C_("cookies"), N_("Resaving"), INIT_OPT_BOOL("cookies", N_("Resaving"),
C_("resave"), OPT_ZERO, 1, "resave", OPT_ZERO, 1,
N_("Save cookies after each change in cookies list? " N_("Save cookies after each change in cookies list? "
"No effect when cookie saving (cookies.save) is off.")), "No effect when cookie saving (cookies.save) is off.")),

View File

@ -27,31 +27,31 @@
union option_info css_options_info[] = { union option_info css_options_info[] = {
INIT_OPT_TREE(C_("document"), N_("Cascading Style Sheets"), INIT_OPT_TREE("document", N_("Cascading Style Sheets"),
C_("css"), OPT_SORT, "css", OPT_SORT,
N_("Options concerning how to use CSS for styling " N_("Options concerning how to use CSS for styling "
"documents.")), "documents.")),
INIT_OPT_BOOL(C_("document.css"), N_("Enable CSS"), INIT_OPT_BOOL("document.css", N_("Enable CSS"),
C_("enable"), OPT_ZERO, 1, "enable", OPT_ZERO, 1,
N_("Enable adding of CSS style info to documents.")), N_("Enable adding of CSS style info to documents.")),
INIT_OPT_BOOL(C_("document.css"), N_("Ignore \"display: none\""), INIT_OPT_BOOL("document.css", N_("Ignore \"display: none\""),
C_("ignore_display_none"), OPT_ZERO, 1, "ignore_display_none", OPT_ZERO, 1,
N_("When enabled, elements are rendered, even when their " N_("When enabled, elements are rendered, even when their "
"display property has the value \"none\". Because ELinks's " "display property has the value \"none\". Because ELinks's "
"CSS support is still very incomplete, this setting can " "CSS support is still very incomplete, this setting can "
"improve the way that some documents are rendered.")), "improve the way that some documents are rendered.")),
INIT_OPT_BOOL(C_("document.css"), N_("Import external style sheets"), INIT_OPT_BOOL("document.css", N_("Import external style sheets"),
C_("import"), OPT_ZERO, 1, "import", OPT_ZERO, 1,
N_("When enabled any external style sheets that are imported " N_("When enabled any external style sheets that are imported "
"from either CSS itself using the @import keyword or from the " "from either CSS itself using the @import keyword or from the "
"HTML using <link> tags in the document header will also be " "HTML using <link> tags in the document header will also be "
"downloaded.")), "downloaded.")),
INIT_OPT_STRING(C_("document.css"), N_("Default style sheet"), INIT_OPT_STRING("document.css", N_("Default style sheet"),
C_("stylesheet"), OPT_ZERO, "", "stylesheet", OPT_ZERO, "",
N_("The path to the file containing the default user defined " N_("The path to the file containing the default user defined "
"Cascading Style Sheet. It can be used to control the basic " "Cascading Style Sheet. It can be used to control the basic "
"layout of HTML documents. The path is assumed to be relative " "layout of HTML documents. The path is assumed to be relative "
@ -59,8 +59,8 @@ union option_info css_options_info[] = {
"\n" "\n"
"Leave as \"\" to use built-in document styling.")), "Leave as \"\" to use built-in document styling.")),
INIT_OPT_STRING(C_("document.css"), N_("Media types"), INIT_OPT_STRING("document.css", N_("Media types"),
C_("media"), OPT_ZERO, "tty", "media", OPT_ZERO, "tty",
N_("CSS media types that ELinks claims to support, separated " N_("CSS media types that ELinks claims to support, separated "
"with commas. The \"all\" type is implied. Currently, only " "with commas. The \"all\" type is implied. Currently, only "
"ASCII characters work reliably here. See CSS2 section 7: " "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 */ * statusbar content etc. --pasky */
static union option_info ecmascript_options[] = { static union option_info ecmascript_options[] = {
INIT_OPT_TREE(C_(""), N_("ECMAScript"), INIT_OPT_TREE("", N_("ECMAScript"),
C_("ecmascript"), OPT_ZERO, "ecmascript", OPT_ZERO,
N_("ECMAScript options.")), N_("ECMAScript options.")),
INIT_OPT_BOOL(C_("ecmascript"), N_("Enable"), INIT_OPT_BOOL("ecmascript", N_("Enable"),
C_("enable"), OPT_ZERO, 0, "enable", OPT_ZERO, 0,
N_("Whether to run those scripts inside of documents.")), N_("Whether to run those scripts inside of documents.")),
INIT_OPT_BOOL(C_("ecmascript"), N_("Console log"), INIT_OPT_BOOL("ecmascript", N_("Console log"),
C_("enable_console_log"), OPT_ZERO, 0, "enable_console_log", OPT_ZERO, 0,
N_("When enabled logs will be appended to ~/.elinks/console.log.")), N_("When enabled logs will be appended to ~/.elinks/console.log.")),
INIT_OPT_BOOL(C_("ecmascript"), N_("Script error reporting"), INIT_OPT_BOOL("ecmascript", N_("Script error reporting"),
C_("error_reporting"), OPT_ZERO, 0, "error_reporting", OPT_ZERO, 0,
N_("Open a message box when a script reports an error.")), N_("Open a message box when a script reports an error.")),
INIT_OPT_BOOL(C_("ecmascript"), N_("Ignore <noscript> content"), INIT_OPT_BOOL("ecmascript", N_("Ignore <noscript> content"),
C_("ignore_noscript"), OPT_ZERO, 0, "ignore_noscript", OPT_ZERO, 0,
N_("Whether to ignore content enclosed by the <noscript> tag " N_("Whether to ignore content enclosed by the <noscript> tag "
"when ECMAScript is enabled.")), "when ECMAScript is enabled.")),
INIT_OPT_INT(C_("ecmascript"), N_("Maximum execution time"), INIT_OPT_INT("ecmascript", N_("Maximum execution time"),
C_("max_exec_time"), OPT_ZERO, 1, 3600, 5, "max_exec_time", OPT_ZERO, 1, 3600, 5,
N_("Maximum execution time in seconds for a script.")), N_("Maximum execution time in seconds for a script.")),
INIT_OPT_BOOL(C_("ecmascript"), N_("Pop-up window blocking"), INIT_OPT_BOOL("ecmascript", N_("Pop-up window blocking"),
C_("block_window_opening"), OPT_ZERO, 0, "block_window_opening", OPT_ZERO, 0,
N_("Whether to disallow scripts to open new windows or tabs.")), N_("Whether to disallow scripts to open new windows or tabs.")),
NULL_OPTION_INFO, NULL_OPTION_INFO,

View File

@ -33,7 +33,7 @@
static union option_info forms_history_options[] = { 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, "show_formhist", OPT_ZERO, 0,
N_("Ask if a login form should be saved to file or not. " N_("Ask if a login form should be saved to file or not. "
"This option only disables the dialog, already saved login " "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[] = { static union option_info global_history_options[] = {
INIT_OPT_TREE(C_("document.history"), N_("Global history"), INIT_OPT_TREE("document.history", N_("Global history"),
C_("global"), OPT_ZERO, "global", OPT_ZERO,
N_("Global history options.")), N_("Global history options.")),
INIT_OPT_BOOL(C_("document.history.global"), N_("Enable"), INIT_OPT_BOOL("document.history.global", N_("Enable"),
C_("enable"), OPT_ZERO, 1, "enable", OPT_ZERO, 1,
N_("Enable global history (\"history of all pages " N_("Enable global history (\"history of all pages "
"visited\").")), "visited\").")),
INIT_OPT_INT(C_("document.history.global"), N_("Maximum number of entries"), INIT_OPT_INT("document.history.global", N_("Maximum number of entries"),
C_("max_items"), OPT_ZERO, 1, INT_MAX, 1024, "max_items", OPT_ZERO, 1, INT_MAX, 1024,
N_("Maximum number of entries in the global history.")), N_("Maximum number of entries in the global history.")),
INIT_OPT_INT(C_("document.history.global"), N_("Display style"), INIT_OPT_INT("document.history.global", N_("Display style"),
C_("display_type"), OPT_ZERO, 0, 1, 0, "display_type", OPT_ZERO, 0, 1, 0,
N_("What to display in global history dialog:\n" N_("What to display in global history dialog:\n"
"0 is URLs\n" "0 is URLs\n"
"1 is page titles")), "1 is page titles")),
/* Compatibility alias: added by jonas at 2004-07-16, 0.9.CVS. */ /* Compatibility alias: added by jonas at 2004-07-16, 0.9.CVS. */
INIT_OPT_ALIAS(C_("document.history.global"), C_("write_interval"), OPT_ZERO, INIT_OPT_ALIAS("document.history.global", "write_interval", OPT_ZERO,
C_("infofiles.save_interval")), "infofiles.save_interval"),
NULL_OPTION_INFO, NULL_OPTION_INFO,
}; };

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -29,18 +29,18 @@ enum nntp_protocol_option {
}; };
static union option_info nntp_protocol_options[] = { static union option_info nntp_protocol_options[] = {
INIT_OPT_TREE(C_("protocol"), N_("NNTP"), INIT_OPT_TREE("protocol", N_("NNTP"),
C_("nntp"), OPT_ZERO, "nntp", OPT_ZERO,
N_("NNTP and news specific options.")), N_("NNTP and news specific options.")),
INIT_OPT_STRING(C_("protocol.nntp"), N_("Default news server"), INIT_OPT_STRING("protocol.nntp", N_("Default news server"),
C_("server"), OPT_ZERO, "", "server", OPT_ZERO, "",
N_("Used when resolving news: URIs. " N_("Used when resolving news: URIs. "
"If set to the empty string the value of the NNTPSERVER " "If set to the empty string the value of the NNTPSERVER "
"environment variable will be used.")), "environment variable will be used.")),
INIT_OPT_STRING(C_("protocol.nntp"), N_("Message header entries"), INIT_OPT_STRING("protocol.nntp", N_("Message header entries"),
C_("header_entries"), OPT_ZERO, NNTP_HEADER_ENTRIES, "header_entries", OPT_ZERO, NNTP_HEADER_ENTRIES,
N_("Comma separated list of which entries in the article " N_("Comma separated list of which entries in the article "
"header to show. E.g. 'Subject' and 'From'. " "header to show. E.g. 'Subject' and 'From'. "
"All header entries can be read in the header info dialog.")), "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[] = { static union option_info protocol_options[] = {
INIT_OPT_TREE(C_(""), N_("Protocols"), INIT_OPT_TREE("", N_("Protocols"),
C_("protocol"), OPT_SORT, "protocol", OPT_SORT,
N_("Protocol specific options.")), N_("Protocol specific options.")),
INIT_OPT_STRING(C_("protocol"), N_("No-proxy domains"), INIT_OPT_STRING("protocol", N_("No-proxy domains"),
C_("no_proxy"), OPT_ZERO, "", "no_proxy", OPT_ZERO, "",
N_("Comma separated list of domains for which the proxy " N_("Comma separated list of domains for which the proxy "
"(HTTP/FTP) should be disabled. Optionally, a port can be " "(HTTP/FTP) should be disabled. Optionally, a port can be "
"specified for some domains as well. If it's blank, " "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[] = { static union option_info uri_rewrite_options[] = {
INIT_OPT_TREE(C_("protocol"), N_("URI rewriting"), INIT_OPT_TREE("protocol", N_("URI rewriting"),
C_("rewrite"), OPT_SORT, "rewrite", OPT_SORT,
N_("Rules for rewriting URIs entered in the goto dialog. " N_("Rules for rewriting URIs entered in the goto dialog. "
"It makes it possible to define a set of prefixes that will " "It makes it possible to define a set of prefixes that will "
"be expanded if they match a string entered in the goto " "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 " "possible to pass arguments to them like search engine "
"keywords.")), "keywords.")),
INIT_OPT_BOOL(C_("protocol.rewrite"), N_("Enable dumb prefixes"), INIT_OPT_BOOL("protocol.rewrite", N_("Enable dumb prefixes"),
C_("enable-dumb"), OPT_ZERO, 1, "enable-dumb", OPT_ZERO, 1,
N_("Enable dumb prefixes - simple URI abbreviations which " N_("Enable dumb prefixes - simple URI abbreviations which "
"can be written to the Goto URL dialog instead of actual URIs " "can be written to the Goto URL dialog instead of actual URIs "
"- i.e. if you write 'elinks' there, you are directed to " "- i.e. if you write 'elinks' there, you are directed to "
"http://elinks.cz/.")), "http://elinks.cz/.")),
INIT_OPT_BOOL(C_("protocol.rewrite"), N_("Enable smart prefixes"), INIT_OPT_BOOL("protocol.rewrite", N_("Enable smart prefixes"),
C_("enable-smart"), OPT_ZERO, 1, "enable-smart", OPT_ZERO, 1,
N_("Enable smart prefixes - URI templates triggered by " N_("Enable smart prefixes - URI templates triggered by "
"writing given abbreviation to the Goto URL dialog followed " "writing given abbreviation to the Goto URL dialog followed "
"by a list of arguments from which the actual URI is composed " "by a list of arguments from which the actual URI is composed "
"- i.e. 'gg:search keywords' or 'gn search keywords for " "- i.e. 'gg:search keywords' or 'gn search keywords for "
"news'.")), "news'.")),
INIT_OPT_TREE(C_("protocol.rewrite"), N_("Dumb Prefixes"), INIT_OPT_TREE("protocol.rewrite", N_("Dumb Prefixes"),
C_("dumb"), OPT_AUTOCREATE | OPT_SORT, "dumb", OPT_AUTOCREATE | OPT_SORT,
N_("Dumb prefixes, see enable-dumb description for details.")), N_("Dumb prefixes, see enable-dumb description for details.")),
INIT_OPT_STRING(C_("protocol.rewrite.dumb"), NULL, INIT_OPT_STRING("protocol.rewrite.dumb", NULL,
C_("_template_"), OPT_ZERO, "", "_template_", OPT_ZERO, "",
/* xgettext:no-c-format */ /* xgettext:no-c-format */
N_("Replacement URI for this dumbprefix:\n" N_("Replacement URI for this dumbprefix:\n"
"%c in the string means the current URL\n" "%c in the string means the current URL\n"
"%% in the string means '%'")), "%% in the string means '%'")),
INIT_OPT_TREE(C_("protocol.rewrite"), N_("Smart Prefixes"), INIT_OPT_TREE("protocol.rewrite", N_("Smart Prefixes"),
C_("smart"), OPT_AUTOCREATE | OPT_SORT, "smart", OPT_AUTOCREATE | OPT_SORT,
N_("Smart prefixes, see enable-smart description for " N_("Smart prefixes, see enable-smart description for "
"details.")), "details.")),
/* TODO: In some rare occations current link URI and referrer might /* TODO: In some rare occations current link URI and referrer might
* also be useful and dare I mention some kind of proxy argument. --jonas */ * also be useful and dare I mention some kind of proxy argument. --jonas */
INIT_OPT_STRING(C_("protocol.rewrite.smart"), NULL, INIT_OPT_STRING("protocol.rewrite.smart", NULL,
C_("_template_"), OPT_ZERO, "", "_template_", OPT_ZERO, "",
/* xgettext:no-c-format */ /* xgettext:no-c-format */
N_("Replacement URI for this smartprefix:\n" N_("Replacement URI for this smartprefix:\n"
"%c in the string means the current URL\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" "%0,%1,...,%9 means argument 0, 1, ..., 9\n"
"%% in the string means '%'")), "%% in the string means '%'")),
INIT_OPT_STRING(C_("protocol.rewrite"), N_("Default template"), INIT_OPT_STRING("protocol.rewrite", N_("Default template"),
C_("default_template"), OPT_ZERO, "", "default_template", OPT_ZERO, "",
/* xgettext:no-c-format */ /* xgettext:no-c-format */
N_("Default URI template used when the string entered in " N_("Default URI template used when the string entered in "
"the goto dialog does not appear to be a URI or a filename " "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 '%'.")), "%% in the template means '%'.")),
#define INIT_OPT_DUMB_PREFIX(prefix, uri) \ #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("elinks", ELINKS_WEBSITE_URL),
INIT_OPT_DUMB_PREFIX(C_("documentation"), ELINKS_DOC_URL), INIT_OPT_DUMB_PREFIX("documentation", ELINKS_DOC_URL),
INIT_OPT_DUMB_PREFIX(C_("bz"), ELINKS_BUGS_URL), INIT_OPT_DUMB_PREFIX("bz", ELINKS_BUGS_URL),
INIT_OPT_DUMB_PREFIX(C_("bug"), 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("arc", "https://web.archive.org/web/*/%c"),
INIT_OPT_DUMB_PREFIX(C_("d"), "http://www.dict.org/bin/Dict"), INIT_OPT_DUMB_PREFIX("d", "http://www.dict.org/bin/Dict"),
INIT_OPT_DUMB_PREFIX(C_("ddg"), "https://lite.duckduckgo.com/lite"), INIT_OPT_DUMB_PREFIX("ddg", "https://lite.duckduckgo.com/lite"),
INIT_OPT_DUMB_PREFIX(C_("g"), "https://www.google.com"), INIT_OPT_DUMB_PREFIX("g", "https://www.google.com"),
INIT_OPT_DUMB_PREFIX(C_("gg"), "https://www.google.com"), INIT_OPT_DUMB_PREFIX("gg", "https://www.google.com"),
INIT_OPT_DUMB_PREFIX(C_("go"), "https://www.google.com"), INIT_OPT_DUMB_PREFIX("go", "https://www.google.com"),
INIT_OPT_DUMB_PREFIX(C_("fc"), "https://freshcode.club/"), INIT_OPT_DUMB_PREFIX("fc", "https://freshcode.club/"),
INIT_OPT_DUMB_PREFIX(C_("sf"), "https://sourceforge.net"), INIT_OPT_DUMB_PREFIX("sf", "https://sourceforge.net"),
INIT_OPT_DUMB_PREFIX(C_("dbug"), "https://www.debian.org/Bugs/"), INIT_OPT_DUMB_PREFIX("dbug", "https://www.debian.org/Bugs/"),
INIT_OPT_DUMB_PREFIX(C_("dpkg"), "https://www.debian.org/distrib/packages"), INIT_OPT_DUMB_PREFIX("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("lua", "file:///usr/share/doc/lua/contents.html#index"),
INIT_OPT_DUMB_PREFIX(C_("pycur"), "https://www.python.org/doc/"), INIT_OPT_DUMB_PREFIX("pycur", "https://www.python.org/doc/"),
INIT_OPT_DUMB_PREFIX(C_("pydev"), "https://docs.python.org/dev/"), INIT_OPT_DUMB_PREFIX("pydev", "https://docs.python.org/dev/"),
INIT_OPT_DUMB_PREFIX(C_("e2"), "https://www.everything2.org"), INIT_OPT_DUMB_PREFIX("e2", "https://www.everything2.org"),
INIT_OPT_DUMB_PREFIX(C_("sd"), "https://slashdot.org/"), INIT_OPT_DUMB_PREFIX("sd", "https://slashdot.org/"),
INIT_OPT_DUMB_PREFIX(C_("vhtml"), "https://validator.w3.org/nu/?doc=%c"), INIT_OPT_DUMB_PREFIX("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("vcss", "https://jigsaw.w3.org/css-validator/validator?uri=%c"),
#define INIT_OPT_SMART_PREFIX(prefix, uri) \ #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("arc", "https://web.archive.org/web/*/%s"),
INIT_OPT_SMART_PREFIX(C_("aur"), "https://aur.archlinux.org/packages/?K=%s"), INIT_OPT_SMART_PREFIX("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("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("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("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("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("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("ddg", "https://duckduckgo.com/lite?q=%s"),
INIT_OPT_SMART_PREFIX(C_("foldoc"), "http://foldoc.org/?%s"), INIT_OPT_SMART_PREFIX("foldoc", "http://foldoc.org/?%s"),
INIT_OPT_SMART_PREFIX(C_("g"), "https://www.google.com/search?q=%s"), INIT_OPT_SMART_PREFIX("g", "https://www.google.com/search?q=%s"),
/* Whose idea was it to use 'gg' for websearches? -- Miciah */ /* 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("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("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("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("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("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("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("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("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("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("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("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("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("sf", "https://sourceforge.net/search/?q=%s"),
INIT_OPT_SMART_PREFIX(C_("sfp"), "https://sourceforge.net/projects/%s"), INIT_OPT_SMART_PREFIX("sfp", "https://sourceforge.net/projects/%s"),
INIT_OPT_SMART_PREFIX(C_("dbug"), "https://bugs.debian.org/%s"), INIT_OPT_SMART_PREFIX("dbug", "https://bugs.debian.org/%s"),
INIT_OPT_SMART_PREFIX(C_("dpkg"), "https://packages.debian.org/search?keywords=%s"), INIT_OPT_SMART_PREFIX("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("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("onelook", "https://onelook.com/?w=%s"),
INIT_OPT_SMART_PREFIX(C_("e2"), "https://www.everything2.org/?node=%s"), INIT_OPT_SMART_PREFIX("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("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("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("dict", "https://dictionary.reference.com/search?q=%s"),
INIT_OPT_SMART_PREFIX(C_("thes"), "https://www.thesaurus.com/browse/%s"), INIT_OPT_SMART_PREFIX("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("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("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("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("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("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("wn", "http://wordnetweb.princeton.edu/perl/webwn?s=%s"),
/* Search the Free Software Directory */ /* 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 */ /* 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 */ /* rfc search */
INIT_OPT_SMART_PREFIX(C_("rfcs"), "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(C_("cr"), "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, NULL_OPTION_INFO,
}; };

View File

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