aboutsummaryrefslogtreecommitdiffstats
path: root/colorize.c
diff options
context:
space:
mode:
authorGravatar Steven Schubiger <stsc@refcnt.org> 2013-12-21 21:28:25 +0100
committerGravatar Steven Schubiger <stsc@refcnt.org> 2013-12-21 21:28:25 +0100
commitb944fc85faebb93d05f65c7e35abd47d3939ebb3 (patch)
tree77d44ebd5af51213657fb0562cd69708c09fe9ca /colorize.c
parent2f380ca954c6667fe0b974075fae160cce4d624c (diff)
downloadcolorize-b944fc85faebb93d05f65c7e35abd47d3939ebb3.tar.gz
colorize-b944fc85faebb93d05f65c7e35abd47d3939ebb3.tar.bz2
Print hint to invoke usage screen
Diffstat (limited to 'colorize.c')
-rw-r--r--colorize.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/colorize.c b/colorize.c
index 9e0c294..6cf301e 100644
--- a/colorize.c
+++ b/colorize.c
@@ -175,6 +175,7 @@ static char *exclude = NULL;
static const char *program_name;
+static void print_hint (void);
static void print_help (void);
static void print_version (void);
static void cleanup (void);
@@ -294,7 +295,7 @@ main (int argc, char **argv)
case 'v':
SET_OPT_TYPE (OPT_VERSION);
case '?':
- print_help ();
+ print_hint ();
exit (EXIT_FAILURE);
default: /* never reached */
ABORT_TRACE ();
@@ -321,8 +322,8 @@ main (int argc, char **argv)
{
if (arg_cnt == 0 || arg_cnt > 2)
{
- vfprintf_diag ("%u arguments provided, expected 1-2 arguments or option", arg_cnt);
- print_help ();
+ vfprintf_diag ("%u arguments provided, expected 1-2 arguments or clean option", arg_cnt);
+ print_hint ();
exit (EXIT_FAILURE);
}
}
@@ -339,6 +340,12 @@ main (int argc, char **argv)
}
static void
+print_hint (void)
+{
+ fprintf (stderr, "Type `%s --help' for usage screen.\n", program_name);
+}
+
+static void
print_help (void)
{
unsigned int i;