diff options
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2003-01-13 12:15:16 (GMT) |
---|---|---|
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2003-01-13 12:15:16 (GMT) |
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 53deef8..2f7ecc1 100644 --- a/plugins/check_nwstat.c +++ b/plugins/check_nwstat.c | |||
@@ -23,7 +23,7 @@ | |||
23 | * | 23 | * |
24 | *****************************************************************************/ | 24 | *****************************************************************************/ |
25 | 25 | ||
26 | #define PROGNAME "check_nwstat" | 26 | const char *progname = "check_nwstat"; |
27 | #define REVISION "$Revision$" | 27 | #define REVISION "$Revision$" |
28 | #define COPYRIGHT "Copyright (c) 1999-2001 Ethan Galstad" | 28 | #define COPYRIGHT "Copyright (c) 1999-2001 Ethan Galstad" |
29 | 29 | ||
@@ -128,8 +128,6 @@ int check_netware_version=FALSE; | |||
128 | unsigned long vars_to_check=CHECK_NONE; | 128 | unsigned long vars_to_check=CHECK_NONE; |
129 | int sap_number=-1; | 129 | int sap_number=-1; |
130 | 130 | ||
131 | #define PROGNAME "check_nwstat" | ||
132 | |||
133 | int process_arguments(int, char **); | 131 | int process_arguments(int, char **); |
134 | void print_usage(void); | 132 | void print_usage(void); |
135 | void print_help(void); | 133 | void print_help(void); |
@@ -674,14 +672,14 @@ int process_arguments(int argc, char **argv){ | |||
674 | switch (c) | 672 | switch (c) |
675 | { | 673 | { |
676 | case '?': /* print short usage statement if args not parsable */ | 674 | case '?': /* print short usage statement if args not parsable */ |
677 | printf("%s: Unknown argument: %s\n\n",my_basename(argv[0]),optarg); | 675 | printf ("%s: Unknown argument: %s\n\n", progname, optarg); |
678 | print_usage(); | 676 | print_usage(); |
679 | exit(STATE_UNKNOWN); | 677 | exit(STATE_UNKNOWN); |
680 | case 'h': /* help */ | 678 | case 'h': /* help */ |
681 | print_help(); | 679 | print_help(); |
682 | exit(STATE_OK); | 680 | exit(STATE_OK); |
683 | case 'V': /* version */ | 681 | case 'V': /* version */ |
684 | print_revision(my_basename(argv[0]),"$Revision$"); | 682 | print_revision(progname,"$Revision$"); |
685 | exit(STATE_OK); | 683 | exit(STATE_OK); |
686 | case 'H': /* hostname */ | 684 | case 'H': /* hostname */ |
687 | server_address=optarg; | 685 | server_address=optarg; |
@@ -693,7 +691,7 @@ int process_arguments(int argc, char **argv){ | |||
693 | if (is_intnonneg(optarg)) | 691 | if (is_intnonneg(optarg)) |
694 | server_port=atoi(optarg); | 692 | server_port=atoi(optarg); |
695 | else | 693 | else |
696 | terminate(STATE_UNKNOWN,"Server port an integer (seconds)\nType '%s -h' for additional help\n",PROGNAME); | 694 | terminate(STATE_UNKNOWN,"Server port an integer (seconds)\nType '%s -h' for additional help\n",progname); |
697 | break; | 695 | break; |
698 | case 'v': | 696 | case 'v': |
699 | if(strlen(optarg)<3) | 697 | if(strlen(optarg)<3) |
@@ -806,12 +804,12 @@ void print_usage(void) | |||
806 | " %s -h for detailed help\n" | 804 | " %s -h for detailed help\n" |
807 | " %s -V for version information\n", | 805 | " %s -V for version information\n", |
808 | #endif | 806 | #endif |
809 | PROGNAME, OPTIONS, PROGNAME, PROGNAME); | 807 | progname, OPTIONS, progname, progname); |
810 | } | 808 | } |
811 | 809 | ||
812 | void print_help(void) | 810 | void print_help(void) |
813 | { | 811 | { |
814 | print_revision (PROGNAME, REVISION); | 812 | print_revision (progname, REVISION); |
815 | printf ("%s\n\n%s\n", COPYRIGHT, SUMMARY); | 813 | printf ("%s\n\n%s\n", COPYRIGHT, SUMMARY); |
816 | print_usage(); | 814 | print_usage(); |
817 | printf | 815 | printf |