diff options
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2003-01-13 12:15:16 +0000 |
---|---|---|
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2003-01-13 12:15:16 +0000 |
commit | 0c3386274ef5002dffc20337ef02407f24d7400c (patch) | |
tree | 1e78bac7844a548e56a642b35acfe1fd67342f71 /plugins/check_nwstat.c | |
parent | de5650f28e4e43a7264913953f95a75d8afe23f0 (diff) | |
download | monitoring-plugins-0c3386274ef5002dffc20337ef02407f24d7400c.tar.gz |
convert PROGANE from a define to a const char
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@238 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_nwstat.c')
-rw-r--r-- | plugins/check_nwstat.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins/check_nwstat.c b/plugins/check_nwstat.c index 53deef87..2f7ecc10 100644 --- a/plugins/check_nwstat.c +++ b/plugins/check_nwstat.c @@ -23,7 +23,7 @@ * *****************************************************************************/ -#define PROGNAME "check_nwstat" +const char *progname = "check_nwstat"; #define REVISION "$Revision$" #define COPYRIGHT "Copyright (c) 1999-2001 Ethan Galstad" @@ -128,8 +128,6 @@ int check_netware_version=FALSE; unsigned long vars_to_check=CHECK_NONE; int sap_number=-1; -#define PROGNAME "check_nwstat" - int process_arguments(int, char **); void print_usage(void); void print_help(void); @@ -674,14 +672,14 @@ int process_arguments(int argc, char **argv){ switch (c) { case '?': /* print short usage statement if args not parsable */ - printf("%s: Unknown argument: %s\n\n",my_basename(argv[0]),optarg); + printf ("%s: Unknown argument: %s\n\n", progname, optarg); print_usage(); exit(STATE_UNKNOWN); case 'h': /* help */ print_help(); exit(STATE_OK); case 'V': /* version */ - print_revision(my_basename(argv[0]),"$Revision$"); + print_revision(progname,"$Revision$"); exit(STATE_OK); case 'H': /* hostname */ server_address=optarg; @@ -693,7 +691,7 @@ int process_arguments(int argc, char **argv){ if (is_intnonneg(optarg)) server_port=atoi(optarg); else - terminate(STATE_UNKNOWN,"Server port an integer (seconds)\nType '%s -h' for additional help\n",PROGNAME); + terminate(STATE_UNKNOWN,"Server port an integer (seconds)\nType '%s -h' for additional help\n",progname); break; case 'v': if(strlen(optarg)<3) @@ -806,12 +804,12 @@ void print_usage(void) " %s -h for detailed help\n" " %s -V for version information\n", #endif - PROGNAME, OPTIONS, PROGNAME, PROGNAME); + progname, OPTIONS, progname, progname); } void print_help(void) { - print_revision (PROGNAME, REVISION); + print_revision (progname, REVISION); printf ("%s\n\n%s\n", COPYRIGHT, SUMMARY); print_usage(); printf |