qstat (2.11-3) help_output.patch

Summary

 qstat.c |  115 ++++++++++++++++++++++++++++++++--------------------------------
 1 file changed, 58 insertions(+), 57 deletions(-)

    
download this patch

Patch contents

Description: Fix some formatting issues with Qstat's help output
 The main motivation for this is to make the help output usable with
 help2man. Some harmonization fixes have been made to capitalization and
 usage of trailing dots.
Author: Jordi Mallach <jordi@debian.org>
Forwarded: no

Index: b/qstat.c
===================================================================
--- a/qstat.c	2010-06-07 00:33:30.078496543 +0200
+++ b/qstat.c	2010-06-07 00:33:30.366001557 +0200
@@ -2598,9 +2598,10 @@
     if ( msg)
 	fprintf( stderr, msg, a1);
 
+    printf( "%s -- Tool for querying gaming servers\n", argv[0]);
     printf( "Usage: %s [options ...]\n", argv[0]);
-    printf( "\t[-default server-type] [-cfg file] [-f file] [host[:port]] ...\n");
-    printf( "Where host is an IP address or host name\n");
+    printf( "       [-default server-type] [-cfg file] [-f file] [host[:port]] ...\n");
+    printf( "       Where host is an IP address or host name\n\n");
 
 	sorted_types = (server_type **) malloc( sizeof(server_type *) * n_server_types );
 	type = &types[0];
@@ -2614,75 +2615,75 @@
     for ( i = 0; i < n_server_types; i++ )
     {
     	type = sorted_types[i];
-		printf( "%s\t\tquery %s server\n", type->type_option, type->game_name );
+		printf( " %s\t\tquery %s server\n", type->type_option, type->game_name );
 	}
 
     quicksort( (void**)sorted_types, 0, n_server_types-1, (int (*)(void*,void*)) type_string_compare );
-    printf( "-default\tset default server type:");
+    printf( " -default\tset default server type:");
     for ( i = 0; i < n_server_types; type++, i++ )
     {
         type = sorted_types[i];
 		printf( " %s", type->type_string );
 	}
     puts("");
-	printf( "-nocfg\t\tIgnore qstat configuration loaded from any default location. Must be the first option on the command-line.\n" );
-    printf( "-cfg\t\tread the extended types from given file not the default one\n");
-    printf( "-f\t\tread hosts from file\n");
-    printf( "-R\t\tfetch and display server rules\n");
-    printf( "-P\t\tfetch and display player info\n");
-    printf( "-sort\t\tsort servers and/or players\n");
-    printf( "-u\t\tonly display servers that are up\n");
-    printf( "-nf\t\tdo not display full servers\n");
-    printf( "-ne\t\tdo not display empty servers\n");
-	printf( "-nh\t\tdo not display header line.\n" );
-    printf( "-cn\t\tdisplay color names instead of numbers\n");
-    printf( "-ncn\t\tdisplay color numbers instead of names\n");
-    printf( "-hc\t\tdisplay colors in #rrggbb format\n");
-    printf( "-tc\t\tdisplay time in clock format (DhDDmDDs)\n");
-    printf( "-tsw\t\tdisplay time in stop-watch format (DD:DD:DD)\n");
-    printf( "-ts\t\tdisplay time in seconds\n");
-    printf( "-pa\t\tdisplay player address\n");
-    printf( "-hpn\t\tdisplay player names in hex\n");
-    printf( "-hsn\t\tdisplay server names in hex\n");
-    printf( "-nh\t\tdo not display header\n");
-    printf( "-old\t\told style display\n");
-    printf( "-progress\tdisplay progress meter (text only)\n");
-    printf( "-retry\t\tnumber of retries, default is %d\n", DEFAULT_RETRIES);
-    printf( "-interval\tinterval between retries, default is %.2f seconds\n",
+	printf( " -nocfg\t\tIgnore qstat configuration loaded from any default location. Must be the first option on the command-line\n" );
+    printf( " -cfg\t\tread the extended types from given file not the default one\n");
+    printf( " -f\t\tread hosts from file\n");
+    printf( " -R\t\tfetch and display server rules\n");
+    printf( " -P\t\tfetch and display player info\n");
+    printf( " -sort\t\tsort servers and/or players\n");
+    printf( " -u\t\tonly display servers that are up\n");
+    printf( " -nf\t\tdo not display full servers\n");
+    printf( " -ne\t\tdo not display empty servers\n");
+	printf( " -nh\t\tdo not display header line\n" );
+    printf( " -cn\t\tdisplay color names instead of numbers\n");
+    printf( " -ncn\t\tdisplay color numbers instead of names\n");
+    printf( " -hc\t\tdisplay colors in #rrggbb format\n");
+    printf( " -tc\t\tdisplay time in clock format (DhDDmDDs)\n");
+    printf( " -tsw\t\tdisplay time in stop-watch format (DD:DD:DD)\n");
+    printf( " -ts\t\tdisplay time in seconds\n");
+    printf( " -pa\t\tdisplay player address\n");
+    printf( " -hpn\t\tdisplay player names in hex\n");
+    printf( " -hsn\t\tdisplay server names in hex\n");
+    printf( " -nh\t\tdo not display header\n");
+    printf( " -old\t\told style display\n");
+    printf( " -progress\tdisplay progress meter (text only)\n");
+    printf( " -retry\t\tnumber of retries, default is %d\n", DEFAULT_RETRIES);
+    printf( " -interval\tinterval between retries, default is %.2f seconds\n",
 	DEFAULT_RETRY_INTERVAL / 1000.0);
-    printf( "-mi\t\tinterval between master server retries, default is %.2f seconds\n",
+    printf( " -mi\t\tinterval between master server retries, default is %.2f seconds\n",
 	(DEFAULT_RETRY_INTERVAL*4) / 1000.0);
-    printf( "-timeout\ttotal time in seconds before giving up\n");
-    printf( "-maxsim\t\tset maximum simultaneous queries\n");
-    printf( "-sendinterval\t\tset time in ms between sending packets, default %u\n", sendinterval);
-    printf( "-errors\t\tdisplay errors\n");
-    printf( "-allowserverdups\t\tallow adding multiple servers with same ip:port (needed for ts2)\n");
-    printf( "-of\t\toutput file\n");
-	printf( "-af\t\tLike -of, but append to the file\n" );
-    printf( "-raw <delim>\toutput in raw format using <delim> as delimiter\n");
-	printf( "-mdelim <delim>\tFor rules with multi values use <delim> as delimiter\n");
-    printf( "-xml\t\toutput status data as an XML document\n");
-    printf( "-Th,-Ts,-Tpt\toutput templates: header, server and player\n");
-	printf( "-Tr,-Tt\t\toutput templates: rule, and trailer\n");
-    printf( "-srcport <range>\tSend packets from these network ports\n");
-    printf( "-srcip <IP>\tSend packets using this IP address\n");
-    printf( "-H\t\tresolve host names\n");
-    printf( "-Hcache\t\thost name cache file\n");
-	printf( "-carets\t\tDisplay carets in Quake 3 player names\n" );
-	printf( "-d\t\tEnable debug options. Specify multiple times to increase debug level.\n");
+    printf( " -timeout\ttotal time in seconds before giving up\n");
+    printf( " -maxsim\t\tset maximum simultaneous queries\n");
+    printf( " -sendinterval\t\tset time in ms between sending packets, default %u\n", sendinterval);
+    printf( " -errors\t\tdisplay errors\n");
+    printf( " -allowserverdups\t\tallow adding multiple servers with same ip:port (needed for ts2)\n");
+    printf( " -of\t\toutput file\n");
+	printf( " -af\t\tlike -of, but append to the file\n" );
+    printf( " -raw <delim>\toutput in raw format using <delim> as delimiter\n");
+	printf( " -mdelim <delim>\tfor rules with multi values use <delim> as delimiter\n");
+    printf( " -xml\t\toutput status data as an XML document\n");
+    printf( " -Th, -Ts, -Tpt\toutput templates: header, server and player\n");
+	printf( " -Tr, -Tt\t\toutput templates: rule, and trailer\n");
+    printf( " -srcport <range>\tsend packets from these network ports\n");
+    printf( " -srcip <IP>\tsend packets using this IP address\n");
+    printf( " -H\t\tresolve host names\n");
+    printf( " -Hcache <file>\thost name cache file\n");
+	printf( " -carets\t\tdisplay carets in Quake 3 player names\n" );
+	printf( " -d\t\tenable debug options. Specify multiple times to increase debug level\n");
 #ifdef ENABLE_DUMP
-	printf( "-dump\t\twrite received raw packets to dumpNNN files which must not exist before\n");
-	printf( "-pkt <file>\tuse file as server reply instead of quering the server. Works only with TF_SINGLE_QUERY servers\n");
+	printf( " -dump\t\twrite received raw packets to dumpNNN files which must not exist before\n");
+	printf( " -pkt <file>\tuse file as server reply instead of quering the server. Works only with TF_SINGLE_QUERY servers\n");
 #endif
-	printf( "-htmlmode\tConvert <, >, and & to the equivalent HTML entities\n" );
-	printf( "-htmlnames\tColorize Quake 3 and Tribes 2 player names using html font tags\n" );
-	printf( "-nohtmlnames\tDo not colorize Quake 3 and Tribes 2 player names even if $HTML is used in an output template.\n" );
-	printf( "-showgameport\tAlways display the game port in QStat output.\n" );
-	printf( "-noportoffset\tDont use builtin status port offsets ( assume query port was specified ).\n" );
-	printf( "-raw-arg\tWhen used with -raw, always display the server address as it appeared in a file or on the command-line.\n" );
-	printf( "-utf8\t\tUse the UTF-8 character encoding for XML output.\n" );
+	printf( " -htmlmode\tconvert <, >, and & to the equivalent HTML entities\n" );
+	printf( " -htmlnames\tcolorize Quake 3 and Tribes 2 player names using html font tags\n" );
+	printf( " -nohtmlnames\tdo not colorize Quake 3 and Tribes 2 player names even if $HTML is used in an output template\n" );
+	printf( " -showgameport\talways display the game port in QStat output\n" );
+	printf( " -noportoffset\tdont use builtin status port offsets (assume query port was specified)\n" );
+	printf( " -raw-arg\twhen used with -raw, always display the server address as it appeared in a file or on the command-line\n" );
+	printf( " -utf8\t\tuse the UTF-8 character encoding for XML output\n" );
 #ifdef _WIN32
-	printf( "-noconsole\t\tFree the console\n" );
+	printf( " -noconsole\t\tfree the console\n" );
 #endif
     printf( "\n");
     printf( "Sort keys:\n");