summaryrefslogtreecommitdiffstats
path: root/plugins/check_nwstat.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_nwstat.c')
-rw-r--r--plugins/check_nwstat.c14
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 @@
23 * 23 *
24 *****************************************************************************/ 24 *****************************************************************************/
25 25
26#define PROGNAME "check_nwstat" 26const 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;
128unsigned long vars_to_check=CHECK_NONE; 128unsigned long vars_to_check=CHECK_NONE;
129int sap_number=-1; 129int sap_number=-1;
130 130
131#define PROGNAME "check_nwstat"
132
133int process_arguments(int, char **); 131int process_arguments(int, char **);
134void print_usage(void); 132void print_usage(void);
135void print_help(void); 133void 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
812void print_help(void) 810void 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