Wrap help messages at 80 columns

In Client, Listener and Aggregator, wrap the help message text at 80
columns to make them easier to read on a standard console.
This commit is contained in:
Matteo Cypriani 2012-01-24 18:29:50 +01:00
parent a1bc3db310
commit dd01705608
3 changed files with 78 additions and 58 deletions

View File

@ -1325,16 +1325,20 @@ void print_usage()
" [-f config_file]" " [-f config_file]"
" [-D]" " [-D]"
" [-v[v[v[v]]] | -q]" " [-v[v[v[v]]] | -q]"
" -o output_file" " -o out_file"
"\n\t"
" [-i positionner_ip]" " [-i positionner_ip]"
" [-p positioner_port]" " [-p positioner_port]"
" [-l listening_port]" " [-l listening_port]"
"\n\t"
" [-t aggregate_timeout]" " [-t aggregate_timeout]"
" [-k keep_timeout]" " [-k keep_timeout]"
" [-c check_interval]" " [-c check_interval]"
"\n\t"
" [-A]" " [-A]"
" [-a autocalibration_port]" " [-a autocalibration_port]"
" [-K ap_keep_timeout]" " [-K ap_keep_timeout]"
"\n\t"
" [-C ap_check_interval]" " [-C ap_check_interval]"
"\n" "\n"
"\t%s -h\n" "\t%s -h\n"
@ -1344,41 +1348,44 @@ void print_usage()
"\t-h\t\tPrint this help.\n" "\t-h\t\tPrint this help.\n"
"\t-V\t\tShow version information.\n" "\t-V\t\tShow version information.\n"
"\t-f config_file\tUse 'config_file' instead of the default" "\t-f config_file\tUse 'config_file' instead of the default"
" configuration file (%s).\n" " configuration\n\t\t\tfile (%s).\n"
"\t-D\t\tDaemon mode.\n" "\t-D\t\tDaemon mode.\n"
"\t-v\t\tBe verbose. You can use this option up to 4 times to" "\t-v\t\tBe verbose. You can use this option up to 4 times to"
" increase the level of verbosity (1 = warnings, 2 = useful" "\n\t\t\tincrease the level of verbosity (1 = warnings,\n\t\t\t"
" information, 3 = too much information, 4 = displays the" "2 = useful information, 3 = too much information,\n\t\t\t4 = "
" detail of each and every received request).\n" "displays the detail of each and every received\n\t\t\t"
"request).\n"
"\t-q\t\tQuiet mode (default): sets the verbose level to 0.\n" "\t-q\t\tQuiet mode (default): sets the verbose level to 0.\n"
"Output options:\n" "Output options:\n"
"\t-o output_file\t\tAggregated requests will be appended to" "\t-o out_file\t\tAggregated requests will be appended to"
" this file ('-' designates the standard output).\n" " this CSV\n\t\t\t\tfile ('-' designates the standard"
" output).\n"
"\t-i positionner_ip\tIP address of the localisation server" "\t-i positionner_ip\tIP address of the localisation server"
" (default: %s).\n" " (default:\n\t\t\t\t%s).\n"
"\t-p positioner_port\tAggregated requests are transmitted to" "\t-p positioner_port\tAggregated requests are transmitted to"
" the localisation server on this port (default: %d).\n" " the\n\t\t\t\tlocalisation server on this port (default:"
"\n\t\t\t\t%d).\n"
"Aggregation options:\n" "Aggregation options:\n"
"\t-l listening_port\tOnly requests sent on this port will be" "\t-l listening_port\tOnly requests sent on this port will be"
" treated (default: %d).\n" " treated\n\t\t\t\t(default: %d).\n"
"\t-t aggregate_timeout\tRequests are stored during" "\t-t aggregate_timeout\tRequests are stored during"
" 'aggregate_timeout' milliseconds before to be grouped" " 'aggregate_timeout'\n\t\t\t\tmilliseconds before to be"
" (default: %d ms).\n" " grouped (default:\n\t\t\t\t%d ms).\n"
"\t-k keep_timeout\t\tAggregated requests are kept during" "\t-k keep_timeout\t\tAggregated requests are kept during"
" 'keep_timeout' milliseconds (default: %d ms).\n" "\n\t\t\t\t'keep_timeout' milliseconds (default: %d ms).\n"
"\t-c check_interval\tTime between two checks of the stored" "\t-c check_interval\tTime between two checks of the stored"
" requests, in milliseconds (default: %d ms).\n" " requests,\n\t\t\t\tin milliseconds (default: %d ms).\n"
"Autocalibration options:\n" "Autocalibration options:\n"
"\t-A\t\t\tEnable autocalibration (default: disabled).\n" "\t-A\t\t\tEnable autocalibration (default: disabled).\n"
"\t-a port\t\t\tPort on which autocalibration data" "\t-a port\t\t\tPort on which autocalibration data"
" are exchanged with the listeners (default: %d).\n" " are exchanged\n\t\t\t\twith the listeners (default: %d).\n"
"\t-K ap_keep_timeout\tInactive APs are kept during" "\t-K ap_keep_timeout\tInactive APs are kept during"
" 'ap_keep_timeout' seconds (default: %d s).\n" " 'ap_keep_timeout'\n\t\t\t\tseconds (default: %d s).\n"
"\t-C ap_check_interval\tTime (in milliseconds) between two" "\t-C ap_check_interval\tTime (in milliseconds) between two"
" checks of the stored APs (default: %d ms).\n" " checks of the\n\t\t\t\tstored APs (default: %d ms).\n"
, ,
program_name, program_name,
program_name, program_name,

View File

@ -529,6 +529,7 @@ void print_usage()
" -i dest_ip" " -i dest_ip"
" [-p dest_port]" " [-p dest_port]"
" [-I iface]" " [-I iface]"
"\n\t"
" [-t delay]" " [-t delay]"
" [-n nb_packets]" " [-n nb_packets]"
" [-F [delay] [-D]]" " [-F [delay] [-D]]"
@ -538,35 +539,38 @@ void print_usage()
" -i dest_ip" " -i dest_ip"
" [-p dest_port]" " [-p dest_port]"
" [-I iface]" " [-I iface]"
"\n\t"
" [-t delay]" " [-t delay]"
" [-n nb_packets]" " [-n nb_packets]"
" [-F [delay] [-D]]" " [-F [delay] [-D]]"
" direction x y z\n" " direction x y z\n"
"\n"
"Options:\n" "Options:\n"
"\t-h\t\tPrint this help.\n" "\t-h\t\tPrint this help.\n"
"\t-V\t\tPrint version information.\n" "\t-V\t\tPrint version information.\n"
"\t-i dest_ip\tDestination IP address of the localisation" "\t-i dest_ip\tDestination IP address of the localisation"
" request.\n" " request.\n"
"\t-p dest_port\tDestination port of the localisation request" "\t-p dest_port\tDestination port of the localisation request"
" (default: %d).\n" " (default:\n\t\t\t%d).\n"
"\t-t delay\tTime between each packet transmission in" "\t-t delay\tTime between each packet transmission in"
" milliseconds (default: %d ms for a normal request," " milliseconds\n\t\t\t(default: %d ms for a normal request,"
" %d ms for a calibration request).\n" " %d ms for a\n\t\t\tcalibration request).\n"
"\t-n nb_packets\tNumber of packet transmitted for the request" "\t-n nb_packets\tNumber of packet transmitted for the request"
" (default: %d for a normal request, %d for a calibration" " (default:\n\t\t\t%d for a normal request, %d for a"
" request).\n" " calibration request).\n"
"\t-I iface\tName of the network interface used to transmit the" "\t-I iface\tName of the network interface used to transmit the"
" request (e.g. \"eth2\"). If this option is absent, interface" "\n\t\t\trequest (e.g. \"eth2\"). If this option is absent, the"
" is selected automatically. You must be root to use this" "\n\t\t\tinterface is selected automatically. You must be root"
" option.\n" " to\n\t\t\tuse this option.\n"
"\t-F [delay]\t\"Flood mode\": loop undefinitely, sending a" "\t-F [delay]\t\"Flood mode\": loop undefinitely, sending a"
" new request every <delay> milliseconds (default: %d ms).\n" " new request\n\t\t\tevery <delay> milliseconds (default:"
" %d ms).\n"
"\t-D\t\tDaemon mode. Useful only in flood mode.\n" "\t-D\t\tDaemon mode. Useful only in flood mode.\n"
"\t-l [port]\tWait for the computed position and display it." "\t-l [port]\tWait for the computed position and display it."
" The Optional argument <port> allows to specify the listening" " The\n\t\t\toptional argument <port> allows to specify the"
" port (default: %d). Available only if the program was" " listening\n\t\t\tport (default: %d). Available only if the"
" compiled with the option ENABLE_RECEIVE_POSITION.\n", " program was\n\t\t\tcompiled with the compilation-time option"
"\n\t\t\tENABLE_RECEIVE_POSITION.\n",
program_name, program_name,
program_name, program_name,
OWL_DEFAULT_REQUEST_PORT, OWL_DEFAULT_REQUEST_PORT,

View File

@ -1470,21 +1470,27 @@ void print_usage()
"\t%s" "\t%s"
" [-f config_file]" " [-f config_file]"
" [-D]" " [-D]"
" [-m mode]" " [-v[v[v[v]]] | -q]"
" [-i aggregation_ip]" "\n\t"
" [-l listening_port]"
" [-p aggregation_port]"
" -r rtap_iface" " -r rtap_iface"
" [-w wifi_iface]" " [-w wifi_iface]"
" [-K]" " [-K]"
" [-v[v[v[v]]] | -q]" " [-m mode]"
"\n\t"
" [-i aggregation_ip]"
" [-l listening_port]"
" [-p aggregation_port]"
"\n\t"
" [-A]" " [-A]"
" [-I autocalibration_ip]" " [-I autocalibration_ip]"
" [-P autocalibration_request_port]" " [-P autocalibration_request_port]"
"\n\t"
" [-a autocalibration_port]" " [-a autocalibration_port]"
" [-H autocalibration_hello_delay]" " [-H autocalibration_hello_delay]"
"\n\t"
" [-t autocalibration_delay]" " [-t autocalibration_delay]"
" [-n autocalibration_nb_packets]" " [-n autocalibration_nb_packets]"
"\n\t"
" [direction x y z]\n" " [direction x y z]\n"
"\t%s -h\n" "\t%s -h\n"
"\t%s -V\n" "\t%s -V\n"
@ -1493,53 +1499,56 @@ void print_usage()
"\t-h\t\tPrint this help.\n" "\t-h\t\tPrint this help.\n"
"\t-V\t\tShow version information.\n" "\t-V\t\tShow version information.\n"
"\t-f config_file\tUse 'config_file' instead of the default" "\t-f config_file\tUse 'config_file' instead of the default"
" configuration file (%s). Available only if program was" " configuration\n\t\t\tfile (%s).\n\t\t\tAvailable only if the"
" compiled with libconfuse.\n" " program was linked against\n\t\t\tlibconfuse.\n"
"\t-D\t\tDaemon mode.\n" "\t-D\t\tDaemon mode.\n"
"\t-v\t\tBe verbose. You can use this option up to 3 times to" "\t-v\t\tBe verbose. You can use this option up to 3 times to"
" increase the level of verbosity (1 = warnings, 2 = useful" "\n\t\t\tincrease the level of verbosity (1 = warnings,"
" information, 3 = a lot of information, 4 = display each" "\n\t\t\t2 = useful information, 3 = a lot of information,"
" captured packet).\n" "\n\t\t\t4 = display each captured packet).\n"
"\t-q\t\tQuiet mode (default): sets the verbose level to 0.\n" "\t-q\t\tQuiet mode (default): sets the verbose level to 0.\n"
"Capture options:\n" "Capture options:\n"
"\t-m mode\t\t\tCapture mode: a(ctive), p(assive), m(ixed)" "\t-m mode\t\t\tCapture mode: a(ctive), p(assive), m(ixed)"
" (default: a).\n" "\n\t\t\t\t(default: a).\n"
"\t-l listening_port\tPort on which explicit positioning" "\t-l listening_port\tPort on which explicit positioning"
" requests are sent by mobiles (default: %d).\n" " requests are\n\t\t\t\tsent by mobiles (default: %d).\n"
"\t-i aggregation_ip\tIP address of the aggregation server" "\t-i aggregation_ip\tIP address of the aggregation server"
" (default: 127.0.0.1)\n" " (default:\n\t\t\t\t127.0.0.1)\n"
"\t-p aggregation_port\tRequests are transmitted to the" "\t-p aggregation_port\tRequests are transmitted to the"
" aggregation server on this port (default: %d).\n" " aggregation\n\t\t\t\tserver on this port (default: %d).\n"
"\t-r rtap_iface\t\tRadiotap capture interface.\n" "\t-r rtap_iface\t\tRadiotap capture interface.\n"
"\t-w wifi_iface\t\tPhysical interface behind rtap_iface" "\t-w wifi_iface\t\tPhysical interface behind rtap_iface"
" (default: rtap_iface).\n" " (default:\n\t\t\t\trtap_iface).\n"
"Autocalibration options:\n" "Autocalibration options:\n"
"(These options are available only if the program was compiled" "(These options are available only if the program was compiled"
" with support of POSIX threads.)\n" " with support of\nthe POSIX threads and the adequate"
" compilation-time option.)\n"
"\t-A\t\t\tEnable autocalibration (default: disabled).\n" "\t-A\t\t\tEnable autocalibration (default: disabled).\n"
"\t-I autocalib_ip\t\tDestination IP of the autocalibration" "\t-I autocalib_ip\t\tDestination IP of the autocalibration"
"requests (default: aggregation_ip).\n" " requests\n\t\t\t\t(default: aggregation_ip).\n"
"\t-P autocalib_req_port\tPort on which autocalibration" "\t-P autocalib_req_port\tPort on which autocalibration"
" positioning requests are sent (default: %d).\n" " requests are sent\n\t\t\t\t(default: %d).\n"
"\t-a autocalib_port\tPort on which autocalibration data (hello" "\t-a autocalib_port\tPort on which autocalibration data (hello"
" & orders) are exchanged with the aggregation server" " &\n\t\t\t\torders) are exchanged with the aggregation"
" (default: %d).\n" "\n\t\t\t\tserver (default: %d).\n"
"\t-H hello_delay\t\tTime between each hello message sent to" "\t-H hello_delay\t\tTime between each hello message sent to"
" the aggregation server, in seconds (default: %d s).\n" " the\n\t\t\t\taggregation server, in seconds (default:"
" %d s).\n"
"\t-t delay\t\tTime between each autocalibration" "\t-t delay\t\tTime between each autocalibration"
" packet transmission, in milliseconds (default: %d ms).\n" " packet\n\t\t\t\ttransmission, in milliseconds (default:"
" %d ms).\n"
"\t-n nb_packets\t\tNumber of packet transmitted" "\t-n nb_packets\t\tNumber of packet transmitted"
" for one autocalibration request (default: %d).\n" " for one\n\t\t\t\tautocalibration request (default: %d).\n"
"\tdirection x y z\t\tThe coordinates of the listener" "\tdirection x y z\t\tThe coordinates of the listener"
" (direction is an integer; x, y, z are floats).\n" " (direction is an\n\t\t\t\tinteger; x, y, z are floats).\n"
"Miscelanneous options:\n" "Miscelanneous options:\n"
"\t-K\tKeep the monitor mode up on wifi_iface. Use it with buggy" "\t-K\tKeep the monitor mode up on wifi_iface. Use it with"
" drivers that disable monitor mode periodically. Available" " buggy\n\t\tdrivers that disable monitor mode periodically."
" only if the program was compiled with the option" " Available only\n\t\tif the program was compiled with the"
" ENABLE_KEEP_MONITOR.\n" " option ENABLE_KEEP_MONITOR.\n"
, ,
program_name, program_name,
program_name, program_name,