Code

Add newline after "Usage:" in --help
[nagiosplug.git] / plugins / urlize.c
index 5bff4b2f8a018ed2fd3974737a281349a4ec0782..6bb42db029607e39df3e965eec3f419502f31e7f 100644 (file)
@@ -1,25 +1,36 @@
-/******************************************************************************
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-******************************************************************************/
+/*****************************************************************************
+* 
+* Nagios urlize plugin
+* 
+* License: GPL
+* Copyright (c) 2000-2007 Nagios Plugins Development Team
+* 
+* Description:
+* 
+* This file contains the urlize plugin
+* 
+* This plugin wraps the text output of another command (plugin) in HTML <A>
+* tags, thus displaying the child plugin's output as a clickable link in the
+* Nagios status screen.  This plugin returns the status of the invoked plugin.
+* 
+* 
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+* 
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+* 
+* You should have received a copy of the GNU General Public License
+* along with this program.  If not, see <http://www.gnu.org/licenses/>.
+* 
+* 
+*****************************************************************************/
 
 const char *progname = "urlize";
-const char *revision = "$Revision$";
 const char *copyright = "2000-2006";
 const char *email = "nagiosplug-devel@lists.sourceforge.net";
 
@@ -64,7 +75,7 @@ main (int argc, char **argv)
 
        while (1) {
                c = getopt_long (argc, argv, "+hVu:", longopts, &option);
-               
+
                if (c == -1 || c == EOF)
                        break;
 
@@ -74,7 +85,7 @@ main (int argc, char **argv)
                        exit (EXIT_SUCCESS);
                        break;
                case 'V':     /* version */
-                       print_revision (progname, revision);
+                       print_revision (progname, NP_VERSION);
                        exit (EXIT_SUCCESS);
                        break;
                case 'u':
@@ -82,7 +93,7 @@ main (int argc, char **argv)
                        break;
                case '?':
                default:
-                       usage2 (_("Unknown argument"), optarg);
+                       usage5 ();
                }
        }
 
@@ -129,7 +140,7 @@ main (int argc, char **argv)
        printf ("%s", nstr);
        printf ("</A>");
        nstr = strtok(NULL, PERF_CHARACTER);
-       if (nstr != NULL) 
+       if (nstr != NULL)
                printf (" | %s", nstr);
 
        /* close the pipe */
@@ -150,20 +161,20 @@ main (int argc, char **argv)
 void
 print_help (void)
 {
-       print_revision (progname, revision);
+       print_revision (progname, NP_VERSION);
 
        printf ("Copyright (c) 2000 Karl DeBisschop <kdebisschop@users.sourceforge.net>\n");
        printf (COPYRIGHT, copyright, email);
 
        printf ("%s\n", _("This plugin wraps the text output of another command (plugin)"));
-  printf ("%s\n", _("in HTML <A> tags, thus displaying the plugin output in as a clickable link in"));
-  printf ("%s\n", _("the Nagios status screen.  The return status is the same as the invoked plugin."));
+  printf ("%s\n", _("in HTML <A> tags, thus displaying the child plugin's output as a clickable link in"));
+  printf ("%s\n", _("the Nagios status screen.  This plugin returns the status of the invoked plugin."));
 
   printf ("\n\n");
 
        print_usage ();
 
-  printf (_(UT_HELP_VRSN));
+  printf (UT_HELP_VRSN);
 
   printf ("\n");
   printf ("%s\n", _("Examples:"));
@@ -175,7 +186,7 @@ print_help (void)
   printf ("    %s\n\n", _("You probably want:"));
   printf (" %s\n", _("urlize http://example.com/ \"check_http -H example.com -r 'two words'\""));
 
-       printf (_(UT_SUPPORT));
+       printf (UT_SUPPORT);
 }
 
 
@@ -183,6 +194,6 @@ print_help (void)
 void
 print_usage (void)
 {
-  printf (_("Usage:"));
+  printf ("%s\n", _("Usage:"));
        printf ("%s <url> <plugin> <arg1> ... <argN>\n", progname);
 }