diff options
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 9835c82..8d6fc3a 100644 --- a/plugins/urlize.c +++ b/plugins/urlize.c | |||
@@ -37,12 +37,14 @@ | |||
37 | * | 37 | * |
38 | *****************************************************************************/ | 38 | *****************************************************************************/ |
39 | 39 | ||
40 | const char *progname = "urlize"; | ||
41 | |||
40 | #include "common.h" | 42 | #include "common.h" |
41 | #include "utils.h" | 43 | #include "utils.h" |
42 | #include "popen.h" | 44 | #include "popen.h" |
43 | 45 | ||
44 | void print_usage (char *); | 46 | void print_usage (const char *); |
45 | void print_help (char *); | 47 | void print_help (const char *); |
46 | 48 | ||
47 | int | 49 | int |
48 | main (int argc, char **argv) | 50 | main (int argc, char **argv) |
@@ -52,7 +54,7 @@ main (int argc, char **argv) | |||
52 | char input_buffer[MAX_INPUT_BUFFER]; | 54 | char input_buffer[MAX_INPUT_BUFFER]; |
53 | 55 | ||
54 | if (argc < 2) { | 56 | if (argc < 2) { |
55 | print_usage (my_basename (argv[0])); | 57 | print_usage (progname); |
56 | exit (STATE_UNKNOWN); | 58 | exit (STATE_UNKNOWN); |
57 | } | 59 | } |
58 | 60 | ||
@@ -62,12 +64,12 @@ main (int argc, char **argv) | |||
62 | } | 64 | } |
63 | 65 | ||
64 | if (!strcmp (argv[1], "-V") || !strcmp (argv[1], "--version")) { | 66 | if (!strcmp (argv[1], "-V") || !strcmp (argv[1], "--version")) { |
65 | print_revision (my_basename (argv[0]), "$Revision$"); | 67 | print_revision (progname, "$Revision$"); |
66 | exit (STATE_OK); | 68 | exit (STATE_OK); |
67 | } | 69 | } |
68 | 70 | ||
69 | if (argc < 2) { | 71 | if (argc < 2) { |
70 | print_usage (my_basename (argv[0])); | 72 | print_usage (progname); |
71 | exit (STATE_UNKNOWN); | 73 | exit (STATE_UNKNOWN); |
72 | } | 74 | } |
73 | 75 | ||
@@ -120,16 +122,15 @@ main (int argc, char **argv) | |||
120 | } | 122 | } |
121 | 123 | ||
122 | void | 124 | void |
123 | print_usage (char *cmd) | 125 | print_usage (const char *cmd) |
124 | { | 126 | { |
125 | printf ("Usage:\n %s <url> <plugin> <arg1> ... <argN>\n", | 127 | printf ("Usage:\n %s <url> <plugin> <arg1> ... <argN>\n", cmd); |
126 | my_basename (cmd)); | ||
127 | } | 128 | } |
128 | 129 | ||
129 | void | 130 | void |
130 | print_help (char *cmd) | 131 | print_help (const char *cmd) |
131 | { | 132 | { |
132 | print_revision ("urlize", "$Revision$"); | 133 | print_revision (progname, "$Revision$"); |
133 | printf | 134 | printf |
134 | ("Copyright (c) 2000 Karl DeBisschop (kdebiss@alum.mit.edu)\n\n" | 135 | ("Copyright (c) 2000 Karl DeBisschop (kdebiss@alum.mit.edu)\n\n" |
135 | "\nThis plugin wraps the text output of another command (plugin) in HTML\n" | 136 | "\nThis plugin wraps the text output of another command (plugin) in HTML\n" |