From 3a57ecfda0d4aa46c8e9c932bdf65613e085b15f Mon Sep 17 00:00:00 2001 From: marschap Date: Sat, 30 Sep 2006 20:32:14 +0000 Subject: [PATCH] harmonize help messages --- clients/lcdexec/lcdexec.c | 26 +++++++++++---------- clients/lcdproc/main.c | 49 +++++++++++++++++++++------------------ clients/lcdvc/lcdvc.c | 28 +++++++++++----------- server/main.c | 36 ++++++++++++++++------------ 4 files changed, 77 insertions(+), 62 deletions(-) diff --git a/clients/lcdexec/lcdexec.c b/clients/lcdexec/lcdexec.c index c2c3925..97dd751 100644 --- a/clients/lcdexec/lcdexec.c +++ b/clients/lcdexec/lcdexec.c @@ -31,18 +31,20 @@ char * help_text = -"lcdexec - LCDproc client to execute commands from the LCDd menu.\n" -"Copyright (c) 2002, Joris Robijn\n" -"This file is released under the GNU General Public License. Refer to the\n" -"COPYING file distributed with this package.\n" -"Options:\n" -" -c \tSpecify configuration file ["DEFAULT_CONFIGFILE"]\n" -" -a
\tDNS name or IP address of the LCDd server [localhost]\n" -" -p \tport of the LCDd server [13666]\n" -" -f \t\tRun in foreground\n" -" -r \tSet reporting level (0-5) [2: errors and warnings]\n" -" -s <0|1>\tReport to syslog (1) or stderr (0, default)\n" -" -h\t\tShow this help\n"; +"lcdexec - LCDproc client to execute commands from the LCDd menu\n" +"\n" +"Copyright (c) 2002, Joris Robijn, 2006 Peter Marschall.\n" +"This program is released under the terms of the GNU General Public License.\n" +"\n" +"Usage: lcdexec []\n" +" where are:\n" +" -c Specify configuration file ["DEFAULT_CONFIGFILE"]\n" +" -a
DNS name or IP address of the LCDd server [localhost]\n" +" -p port of the LCDd server [13666]\n" +" -f Run in foreground\n" +" -r Set reporting level (0-5) [2: errors and warnings]\n" +" -s <0|1> Report to syslog (1) or stderr (0, default)\n" +" -h Show this help\n"; char * progname = "lcdexec"; diff --git a/clients/lcdproc/main.c b/clients/lcdproc/main.c index 2cfb199..bdfb87a 100644 --- a/clients/lcdproc/main.c +++ b/clients/lcdproc/main.c @@ -401,31 +401,36 @@ void HelpScreen (int exit_state) { fprintf(stderr, + "lcdproc - LCDproc system status information viewer\n" + "\n" + "Copyright (c) 1999-2006 Scott Scriven, William Ferrell, and misc. contributors.\n" + "This program is released under the terms of the GNU General Public License.\n" + "\n" "Usage: lcdproc [] [ ...]\n" " where are\n" - " -s connect to LCDd daemon on \n" - " -p connect to LCDd daemon using \n" - " -f run in foreground\n" - " -e slow down initial announcement of modes (in 1/100s)\n" - " -c use a configuration file other than %s\n" - " -h show this help screen\n" - " -v display program version\n" + " -s connect to LCDd daemon on \n" + " -p connect to LCDd daemon using \n" + " -f run in foreground\n" + " -e slow down initial announcement of screens (in 1/100s)\n" + " -c use a configuration file other than %s\n" + " -h show this help screen\n" + " -v display program version\n" " and are\n" - " C CPU detailed CPU usage\n" - " P SMP-CPU CPU usage overview (one line per CPU)\n" - " G CPUGraph CPU usage histogram\n" - " L Load load histogram\n" - " M Memory memory & swap usage\n" - " S ProcSize biggest processes size\n" - " D Disk filling level of mounted file systems\n" - " I Iface network interface usage\n" - " B Battery battery status\n" - " T TimeDate time & date information\n" - " O OldTime old time screen\n" - " U Uptime uptime screen\n" - " K BigClock big clock\n" - " N MiniClock minimal clock\n" - " A About credits page\n" + " C CPU detailed CPU usage\n" + " P SMP-CPU CPU usage overview (one line per CPU)\n" + " G CPUGraph CPU usage histogram\n" + " L Load load histogram\n" + " M Memory memory & swap usage\n" + " S ProcSize biggest processes size\n" + " D Disk filling level of mounted file systems\n" + " I Iface network interface usage\n" + " B Battery battery status\n" + " T TimeDate time & date information\n" + " O OldTime old time screen\n" + " U Uptime uptime screen\n" + " K BigClock big clock\n" + " N MiniClock minimal clock\n" + " A About credits page\n" "\n" "Example:\n" " lcdproc -s my.lcdproc.server.com -p 13666 C M L\n" diff --git a/clients/lcdvc/lcdvc.c b/clients/lcdvc/lcdvc.c index 0cba89e..5607e53 100644 --- a/clients/lcdvc/lcdvc.c +++ b/clients/lcdvc/lcdvc.c @@ -6,7 +6,7 @@ * COPYING file distributed with this package. * * Copyright (c) 2002, Joris Robijn - * + * Copyright (c) 2006, Peter Marschall */ #include @@ -35,18 +35,20 @@ char * help_text = -"lcdvc - LCDproc virtual console displayer.\n" -"Copyright (c) 2002, Joris Robijn\n" -"This file is released under the GNU General Public License. Refer to the\n" -"COPYING file distributed with this package.\n" -"Options:\n" -" -c \tSpecify a configfile to load ["DEFAULT_CONFIGFILE"]\n" -" -a
\tDNS name or IP address of the LCDd server [localhost]\n" -" -p \tPort of the LCDd server [13666]\n" -" -f \tRun in foreground\n" -" -r \tSet reporting level (0-5) [2: errors and warnings]\n" -" -s <0|1>\tReport to 1=syslog or 0=stderr\n" -" -h\t\tShow this help\n"; +"lcdvc - LCDproc virtual console\n" +"\n" +"Copyright (c) 2002, Joris Robijn, 2006 Peter Marschall.\n" +"This program is released under the terms of the GNU General Public License.\n" +"\n" +"Usage: lcdvc []\n" +" where are:\n" +" -c Specify configuration file ["DEFAULT_CONFIGFILE"]\n" +" -a
DNS name or IP address of the LCDd server [localhost]\n" +" -p port of the LCDd server [13666]\n" +" -f Run in foreground\n" +" -r Set reporting level (0-5) [2: errors and warnings]\n" +" -s <0|1> Report to syslog (1) or stderr (0, default)\n" +" -h Show this help\n"; char *progname = "lcdvc"; char *configfile = UNSET_STR; diff --git a/server/main.c b/server/main.c index 4bdfbe4..077979c 100644 --- a/server/main.c +++ b/server/main.c @@ -11,7 +11,7 @@ * 2002, Mike Patnode * 2002, Guillaume Filion * 2003, Benjamin Tse (Win32 support) - * 2005, Peter Marschall (cleanup) + * 2005-2006, Peter Marschall (cleanup) * * Contains main(), plus signal callback functions and a help screen. * @@ -1001,23 +1001,29 @@ output_help_screen(void) */ debug( RPT_DEBUG, "%s()", __FUNCTION__ ); - fprintf(stdout, "LCDd: LCDproc Server Daemon, %s\n", version); + fprintf(stdout, "LCDd - LCDproc Server Daemon, %s\n\n", version); fprintf(stdout, "Copyright (c) 1999-2006 Scott Scriven, William Ferrell, and misc. contributors.\n"); - fprintf(stdout, "This program is freely redistributable under the terms of the GNU Public License.\n\n"); + fprintf(stdout, "This program is released under the terms of the GNU General Public License.\n\n"); fprintf(stdout, "Usage: LCDd []\n"); fprintf(stdout, " where are:\n"); - fprintf(stdout, "\t-h\t\tDisplay this help screen\n"); - fprintf(stdout, "\t-c \tUse a configuration file other than %s\n", DEFAULT_CONFIGFILE); - fprintf(stdout, "\t-d \tAdd a driver to use (overrides drivers in config file) [%s]\n", DEFAULT_DRIVER); - fprintf(stdout, "\t-f\t\tRun in the foreground\n"); - fprintf(stdout, "\t-a \tNetwork (IP) address to bind to [%s]\n", DEFAULT_BIND_ADDR); - fprintf(stdout, "\t-p \tNetwork port to listen for connections on [%i]\n", DEFAULT_BIND_PORT); - fprintf(stdout, "\t-u \tUser to run as [%s]\n", DEFAULT_USER); - fprintf(stdout, "\t-w \tTime to pause at each screen (in seconds) [%d]\n", DEFAULT_SCREEN_DURATION/RENDER_FREQ); - fprintf(stdout, "\t-s \tIf set, reporting will be done using syslog\n"); - fprintf(stdout, "\t-r \tReport level [%d]\n", DEFAULT_REPORTLEVEL); - fprintf(stdout, "\t-i \tWhether to rotate the server info screen\n"); - fprintf(stdout, "\n"); + fprintf(stdout, " -h Display this help screen\n"); + fprintf(stdout, " -c Use a configuration file other than %s\n", + DEFAULT_CONFIGFILE); + fprintf(stdout, " -d Add a driver to use (overrides drivers in config file) [%s]\n", + DEFAULT_DRIVER); + fprintf(stdout, " -f Run in the foreground\n"); + fprintf(stdout, " -a Network (IP) address to bind to [%s]\n", + DEFAULT_BIND_ADDR); + fprintf(stdout, " -p Network port to listen for connections on [%i]\n", + DEFAULT_BIND_PORT); + fprintf(stdout, " -u User to run as [%s]\n", + DEFAULT_USER); + fprintf(stdout, " -w Time to pause at each screen (in seconds) [%d]\n", + DEFAULT_SCREEN_DURATION/RENDER_FREQ); + fprintf(stdout, " -s If set, reporting will be done using syslog\n"); + fprintf(stdout, " -r Report level [%d]\n", + DEFAULT_REPORTLEVEL); + fprintf(stdout, " -i Whether to rotate the server info screen\n"); /* Error messages will be flushed to the configured output after this * help message.