From 0c3386274ef5002dffc20337ef02407f24d7400c Mon Sep 17 00:00:00 2001 From: Karl DeBisschop Date: Mon, 13 Jan 2003 12:15:16 +0000 Subject: 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 --- plugins/urlize.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'plugins/urlize.c') diff --git a/plugins/urlize.c b/plugins/urlize.c index 9835c824..8d6fc3ad 100644 --- a/plugins/urlize.c +++ b/plugins/urlize.c @@ -37,12 +37,14 @@ * *****************************************************************************/ +const char *progname = "urlize"; + #include "common.h" #include "utils.h" #include "popen.h" -void print_usage (char *); -void print_help (char *); +void print_usage (const char *); +void print_help (const char *); int main (int argc, char **argv) @@ -52,7 +54,7 @@ main (int argc, char **argv) char input_buffer[MAX_INPUT_BUFFER]; if (argc < 2) { - print_usage (my_basename (argv[0])); + print_usage (progname); exit (STATE_UNKNOWN); } @@ -62,12 +64,12 @@ main (int argc, char **argv) } if (!strcmp (argv[1], "-V") || !strcmp (argv[1], "--version")) { - print_revision (my_basename (argv[0]), "$Revision$"); + print_revision (progname, "$Revision$"); exit (STATE_OK); } if (argc < 2) { - print_usage (my_basename (argv[0])); + print_usage (progname); exit (STATE_UNKNOWN); } @@ -120,16 +122,15 @@ main (int argc, char **argv) } void -print_usage (char *cmd) +print_usage (const char *cmd) { - printf ("Usage:\n %s ... \n", - my_basename (cmd)); + printf ("Usage:\n %s ... \n", cmd); } void -print_help (char *cmd) +print_help (const char *cmd) { - print_revision ("urlize", "$Revision$"); + print_revision (progname, "$Revision$"); printf ("Copyright (c) 2000 Karl DeBisschop (kdebiss@alum.mit.edu)\n\n" "\nThis plugin wraps the text output of another command (plugin) in HTML\n" -- cgit v1.2.3