From 5c8d440eace21b3a80b7f3f5930dba90e69adeef Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Thu, 20 Jun 2013 23:20:13 +0200 Subject: [PATCH 1/1] Change all multi-word options to dashes instead of underscores. Currently some of these options use dashes to separate the words while others use the underscore character instead. The auto-generated --detailed-help option contains a dash, so the only consistent way is to use dashes everywhere. Hence this commit replaces all underscores in option names by dashes and updates the documentation accordingly. Fortunately, this does not require to change the code, because gengetopt translates dashes into underscores in the generated C code. It is, however, an API change, so this is 0.5.0 material. --- NEWS | 2 + m4/gengetopt/afh.m4 | 4 +- m4/gengetopt/afh_recv.m4 | 4 +- m4/gengetopt/audiod.m4 | 6 +-- m4/gengetopt/client.m4 | 4 +- m4/gengetopt/color.m4 | 8 ++-- m4/gengetopt/compress_filter.m4 | 2 +- m4/gengetopt/config_file.m4 | 2 +- m4/gengetopt/gui.m4 | 4 +- m4/gengetopt/history_file.m4 | 2 +- m4/gengetopt/play.m4 | 2 +- m4/gengetopt/server.m4 | 72 ++++++++++++++++----------------- web/manual.m4 | 8 ++-- 13 files changed, 61 insertions(+), 59 deletions(-) diff --git a/NEWS b/NEWS index d4ab30d1..e6d56f2a 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,8 @@ - overview.pdf is now based on dia, a simple diagram creation program. The new version is much more detailed and contains descriptions of the various programs of the paraslash package. + - The separator of all multi-word options has been changed from + underscore to dash. For example --log_color becomes --log-color. -------------------------------------- 0.4.13 (2013-07-29) "spectral gravity" diff --git a/m4/gengetopt/afh.m4 b/m4/gengetopt/afh.m4 index f8e29fea..ebc1d1cf 100644 --- a/m4/gengetopt/afh.m4 +++ b/m4/gengetopt/afh.m4 @@ -6,7 +6,7 @@ include(header.m4) include(loglevel.m4) -option "chunk_table" c +option "chunk-table" c #~~~~~~~~~~~~~~~~~~~~~ "print also the chunk table" flag off @@ -27,7 +27,7 @@ option "parser-friendly" p flag off details = " Currently this option only affects the format of the chunk table, - so it has no effect if --chunk_table is not given. + so it has no effect if --chunk-table is not given. The human-readable output (the default) consists of one output line per chunk and the output contains also the chunk number, diff --git a/m4/gengetopt/afh_recv.m4 b/m4/gengetopt/afh_recv.m4 index f4da9d99..6fdef59e 100644 --- a/m4/gengetopt/afh_recv.m4 +++ b/m4/gengetopt/afh_recv.m4 @@ -31,7 +31,7 @@ details = " num_chunks - 1 inclusively where num_chunks is the total number of chunks which is printed when using the --info option. If chunk_num is negative, the given number of chunks are counted - backwards from the end of the file. For example --begin_chunk + backwards from the end of the file. For example --begin-chunk -100 instructs para_afh to start output at chunk num_chunks - 100. This is mainly useful for cutting off the end of an audio file. @@ -43,7 +43,7 @@ option "end-chunk" e int typestr = "chunk_num" optional details = " - For the chunk_num argument the same rules as for --begin_chunk + For the chunk_num argument the same rules as for --begin-chunk apply. The default is to write up to the last chunk. " diff --git a/m4/gengetopt/audiod.m4 b/m4/gengetopt/audiod.m4 index 7bae3435..5fc15893 100644 --- a/m4/gengetopt/audiod.m4 +++ b/m4/gengetopt/audiod.m4 @@ -80,7 +80,7 @@ details=" instructed to use also \"filename\" for connecting para_audiod. " -option "user_allow" - +option "user-allow" - #~~~~~~~~~~~~~~~~~~~~ "allow this uid" int typestr="uid" @@ -98,7 +98,7 @@ details=" to connect to para_audiod. " -option "clock_diff_count" - +option "clock-diff-count" - #~~~~~~~~~~~~~~~~~~~~~~~~~~ "sync clock on startup" int typestr="count" @@ -195,7 +195,7 @@ details=" " -option "stream_delay" - +option "stream-delay" - #~~~~~~~~~~~~~~~~~~~~~~ "time for client sync" int typestr="milliseconds" diff --git a/m4/gengetopt/client.m4 b/m4/gengetopt/client.m4 index f0bbc0bd..5b4c8ec8 100644 --- a/m4/gengetopt/client.m4 +++ b/m4/gengetopt/client.m4 @@ -9,8 +9,8 @@ define(DEFAULT_HISTORY_FILE,~/.paraslash/client.history) option "hostname" i "ip or host to connect" string typestr="host" default="localhost" optional option "user" u "paraslash username" string typestr="username" default="" optional -option "server_port" p "port to connect" int typestr="port" default="2990" optional -option "key_file" k "(default='~/.paraslash/key.')" string typestr="filename" optional +option "server-port" p "port to connect" int typestr="port" default="2990" optional +option "key-file" k "(default='~/.paraslash/key.')" string typestr="filename" optional include(loglevel.m4) diff --git a/m4/gengetopt/color.m4 b/m4/gengetopt/color.m4 index 63e996f3..eb081786 100644 --- a/m4/gengetopt/color.m4 +++ b/m4/gengetopt/color.m4 @@ -8,7 +8,7 @@ values = "yes","no","auto" default = "auto" optional -option "log_color" - +option "log-color" - #~~~~~~~~~~~~~~~~~~~ "select a color for one type of log message" string typestr="color_spec" @@ -26,9 +26,9 @@ details=" Examples: - --log_color \"debug:green\" - --log_color \"info:yellow bold\" - --log_color \"notice:white red bold\" + --log-color \"debug:green\" + --log-color \"info:yellow bold\" + --log-color \"notice:white red bold\" " diff --git a/m4/gengetopt/compress_filter.m4 b/m4/gengetopt/compress_filter.m4 index 8c701a03..772bdb2e 100644 --- a/m4/gengetopt/compress_filter.m4 +++ b/m4/gengetopt/compress_filter.m4 @@ -26,7 +26,7 @@ option "inertia" i default="6" optional -option "target_level" t +option "target-level" t #~~~~~~~~~~~~~~~~~~~~~~ "target signal level (0-32768)" int typestr="number" diff --git a/m4/gengetopt/config_file.m4 b/m4/gengetopt/config_file.m4 index 318ba7a6..29f66b44 100644 --- a/m4/gengetopt/config_file.m4 +++ b/m4/gengetopt/config_file.m4 @@ -1,5 +1,5 @@ -option "config_file" c +option "config-file" c #~~~~~~~~~~~~~~~~~~~~~ "(default='DEFAULT_CONFIG_FILE')" string typestr="filename" diff --git a/m4/gengetopt/gui.m4 b/m4/gengetopt/gui.m4 index 1f5cf6e4..5b44efa6 100644 --- a/m4/gengetopt/gui.m4 +++ b/m4/gengetopt/gui.m4 @@ -34,7 +34,7 @@ details = " available themes is printed and the program terminates. " -option "stat_cmd" s +option "stat-cmd" s #~~~~~~~~~~~~~~~~~~ "command to read status items from" string typestr = "command" @@ -56,7 +56,7 @@ details = " section "Mapping keys to commands" #--------------------------------- -option "key_map" k +option "key-map" k #~~~~~~~~~~~~~~~~~ "Map key k to command c using mode m." diff --git a/m4/gengetopt/history_file.m4 b/m4/gengetopt/history_file.m4 index 932d88bf..73e98a78 100644 --- a/m4/gengetopt/history_file.m4 +++ b/m4/gengetopt/history_file.m4 @@ -1,5 +1,5 @@ -option "history_file" - +option "history-file" - #~~~~~~~~~~~~~~~~~~~~~~ "(default='DEFAULT_HISTORY_FILE')" string typestr = "filename" diff --git a/m4/gengetopt/play.m4 b/m4/gengetopt/play.m4 index ea41f562..cb406bec 100644 --- a/m4/gengetopt/play.m4 +++ b/m4/gengetopt/play.m4 @@ -33,7 +33,7 @@ option "randomize" z "randomize playlist at startup." flag off -option "key_map" k +option "key-map" k #~~~~~~~~~~~~~~~~~ "Map key k to a command." diff --git a/m4/gengetopt/server.m4 b/m4/gengetopt/server.m4 index 8707554f..4c52d2c2 100644 --- a/m4/gengetopt/server.m4 +++ b/m4/gengetopt/server.m4 @@ -42,7 +42,7 @@ include(logfile.m4) include(config_file.m4) -option "user_list" - +option "user-list" - #~~~~~~~~~~~~~~~~~~~ "(default='~/.paraslash/server.users')" @@ -60,7 +60,7 @@ option "autoplay" a "start playing on startup" flag off -option "autoplay_delay" - +option "autoplay-delay" - #~~~~~~~~~~~~~~~~~~~~~~~~ "time to wait before streaming" int typestr="ms" @@ -76,7 +76,7 @@ details=" already up when para_server starts to stream. Of course, this option depends on the autoplay option. " -option "announce_time" A +option "announce-time" A #~~~~~~~~~~~~~~~~~~~~~~~ "grace time for clients" @@ -95,7 +95,7 @@ details=" section "audio file selector" ############################# -option "afs_database_dir" D +option "afs-database-dir" D #~~~~~~~~~~~~~~~~~~~~~~~~~~ "location of the database" string typestr="path" @@ -105,7 +105,7 @@ details=" file selector. The default is '~/.paraslash/afs_database-0.4'. " -option "afs_socket" s +option "afs-socket" s #~~~~~~~~~~~~~~~~~~~~ "Command socket for afs" string typestr="path" @@ -117,7 +117,7 @@ details=" audio file selector via a local socket. This option specifies the location of that socket in the file system. " -option "afs_initial_mode" i +option "afs-initial-mode" i #~~~~~~~~~~~~~~~~~~~~~~~~~~ "Mood or playlist to load on startup." @@ -128,7 +128,7 @@ details=" The argument of this option must be prefixed with either 'p/' or 'm/' to indicate whether a playlist or a mood should be loaded. Example: - --afs_initial_mode p/foo + --afs-initial-mode p/foo loads the playlist named 'foo'. " @@ -137,7 +137,7 @@ section "http sender" ##################### -option "http_port" - +option "http-port" - #~~~~~~~~~~~~~~~~~~~ "tcp port for http streaming" int typestr="portnumber" @@ -149,20 +149,20 @@ details=" http request message such as 'GET / HTTP/'. " -option "http_default_deny" - +option "http-default-deny" - #~~~~~~~~~~~~~~~~~~~~~~~~~~~ "make the http ACL a whitelist" flag off details=" The default is to use blacklists instead, i.e. connections to the http sender are allowed unless the connecting host - matches a pattern given by a http_access option. This allows + matches a pattern given by a http-access option. This allows to use access control the other way round: Connections are denied from hosts which are not explicitly allowed by one or - more http_access options. + more http-access options. " -option "http_access" - +option "http-access" - #~~~~~~~~~~~~~~~~~~~~~ "add an entry to the http ACL" string typestr="a.b.c.d/n" @@ -170,13 +170,13 @@ optional multiple details=" Add given host/network to access control list (whitelist if - http_default_deny was given, blacklist otherwise) before + http-default-deny was given, blacklist otherwise) before opening the tcp port. This option can be given multiple times. Example: '192.168.0.0/24' whitelists/blacklists the 256 hosts 192.168.0.x " -option "http_no_autostart" - +option "http-no-autostart" - #~~~~~~~~~~~~~~~~~~~~~~~~~~~ "do not open tcp port on startup" flag off @@ -186,7 +186,7 @@ details=" later time by using the sender command. " -option "http_max_clients" - +option "http-max-clients" - #~~~~~~~~~~~~~~~~~~~~~~~~~~ "maximal number of connections" int typestr="number" @@ -204,45 +204,45 @@ section "dccp sender" ##################### -option "dccp_port" - +option "dccp-port" - #~~~~~~~~~~~~~~~~~~~ "port for dccp streaming" int typestr="portnumber" default="8000" optional details=" - See http_port for details. + See http-port for details. " -option "dccp_default_deny" - +option "dccp-default-deny" - #~~~~~~~~~~~~~~~~~~~~~~~~~~~ "make the dccp ACL a whitelist" flag off details=" - See http_default_deny for details. + See http-default-deny for details. " -option "dccp_access" - +option "dccp-access" - #~~~~~~~~~~~~~~~~~~~~~ "add an entry to the dccp ACL" string typestr="a.b.c.d/n" optional multiple details=" - See http_access for details. + See http-access for details. " -option "dccp_max_clients" - +option "dccp-max-clients" - #~~~~~~~~~~~~~~~~~~~~~~~~~~ "maximal number of connections" int typestr="number" default="-1" optional details=" - See http_max_clients for details. + See http-max-clients for details. " -option "dccp_max_slice_size" - +option "dccp-max-slice-size" - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "Upper bound for the FEC slice size" int typestr = "size" @@ -261,7 +261,7 @@ details = " the MPS of an incoming connection can not be set. " -option "dccp_data_slices_per_group" - +option "dccp-data-slices-per-group" - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "The number of non-redundant slices per FEC group" int typestr = "num" @@ -270,13 +270,13 @@ default = "3" details = " This determines the number of slices in each FEC group that are necessary to decode the group. The given number must be smaller - than the value of the dccp_slices_per_group option below. + than the value of the dccp-slices-per-group option below. Note that the duration of a FEC group is proportional to the - product dccp_max_slice_size * dccp_data_slices_per_group. + product dccp-max-slice-size * dccp-data-slices-per-group. " -option "dccp_slices_per_group" - +option "dccp-slices-per-group" - #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "The total number of slices per FEC group" int typestr = "num" @@ -284,7 +284,7 @@ optional default = "4" details = " This value must be larger than the value given for above - dccp_data_slices_per_group above. The difference being the + dccp-data-slices-per-group above. The difference being the number of redundant slices per group, i.e. the number of data packets that may be lost without causing interruptions of the resulting audio stream. @@ -296,7 +296,7 @@ details = " section "udp sender" #################### -option "udp_target" - +option "udp-target" - #~~~~~~~~~~~~~~~~~~~~ "add udp target with optional port" string typestr="host[:port]" @@ -306,7 +306,7 @@ details=" Add given host/port to the list of targets. The 'host' argument can be either an IPv4/v6 address or hostname (RFC 3986 syntax). The 'port' argument is an optional port number. If the 'port' - part is absent, the 'udp_default_port' value is used. + part is absent, the 'udp-default-port' value is used. The following examples are possible targets: '10.10.1.2:8000' (host:port); '10.10.1.2' (with default port); @@ -317,7 +317,7 @@ details=" This option can be given multiple times, for multiple targets. " -option "udp_no_autostart" - +option "udp-no-autostart" - #~~~~~~~~~~~~~~~~~~~~~~~~~~ "do not start sending" flag off @@ -326,20 +326,20 @@ details=" a later time by using the sender command. " -option "udp_default_port" - +option "udp-default-port" - #~~~~~~~~~~~~~~~~~~~~~~~~~~ "udp port to send to" int typestr="port" default="8000" optional -option "udp_mcast_iface" - +option "udp-mcast-iface" - #~~~~~~~~~~~~~~~~~~~~~~~~~~ "outgoing udp multicast interface" string optional -option "udp_header_interval" H +option "udp-header-interval" H #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "duration for sending header" int typestr = "ms" @@ -357,7 +357,7 @@ details = " audio formats, including mp3, don't need an audio file header. " -option "udp_ttl" t +option "udp-ttl" t #~~~~~~~~~~~~~~~~~ "set time to live value" int typestr="num" diff --git a/web/manual.m4 b/web/manual.m4 index 3f5f148f..55bb49a6 100644 --- a/web/manual.m4 +++ b/web/manual.m4 @@ -406,7 +406,7 @@ the directory /var/paraslash that has been created during installation: sudo chown $LOGNAME /var/paraslash -Alternatively, use the --afs_socket Option to specify a different +Alternatively, use the --afs-socket Option to specify a different location for the AFS command socket. For this first try, we'll use the info loglevel to make the output @@ -592,7 +592,7 @@ The user_list file At startup para_server reads the user list file which contains one line per user. The default location of the user list file may be -changed with the --user_list option. +changed with the --user-list option. There should be at least one user in this file. Each user must have an RSA key pair. The public part of the key is needed by para_server @@ -639,7 +639,7 @@ restricted on platforms that support UNIX socket credentials which allow para_audiod to obtain the Unix credentials of the connecting process. -Use para_audiod's --user_allow option to allow connections only for +Use para_audiod's --user-allow option to allow connections only for a limited set of users. ----------------------- @@ -1770,7 +1770,7 @@ a curses window. By default the command para_audioc -- stat -p -is executed, but this can be customized via the --stat_cmd option. In +is executed, but this can be customized via the --stat-cmd option. In particular it possible to use para_client -- stat -p -- 2.39.2