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/urlize.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/urlize.c')
-rw-r--r-- | plugins/urlize.c | 21 |
1 files changed, 11 insertions, 10 deletions
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 <url> <plugin> <arg1> ... <argN>\n", - my_basename (cmd)); + printf ("Usage:\n %s <url> <plugin> <arg1> ... <argN>\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" |