From 5539385c0c543665d44cb1f8a81bcf0584a56113 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 4 Dec 2011 21:54:17 -0500 Subject: [PATCH] use a single invocation of printf --- wakeup.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/wakeup.c b/wakeup.c index a4d5441..dbfe71b 100644 --- a/wakeup.c +++ b/wakeup.c @@ -37,11 +37,16 @@ extern char *program_invocation_short_name; static void help(FILE *stream) { - fprintf(stream, "usage: %s timespec\n\n", program_invocation_short_name); - fprintf(stream, " -h, --help display this help and exit\n\n"); - fprintf(stream, "example: %s 1h20m30s\n", program_invocation_short_name); - fprintf(stream, "will (should) wake up the system from suspend in\n"); - fprintf(stream, "1 hour 20 minutes and 30 seconds.\n"); + fprintf(stream, "usage: %s \n\n" + " -h, --help display this help and exit\n\n" + "timespec can be any combination of hours, minutes, and seconds\n" + "specified by hH, mM, and sS, respecitively.\n\n" + "Examples:\n" + " %s 1h 20m 42S # 1 hour, 20 minutes, 42 seconds\n" + " %s 1h20M 2h # 3 hours, 20 minutes\n", + program_invocation_short_name, + program_invocation_short_name, + program_invocation_short_name); exit(stream == stderr ? EXIT_FAILURE : EXIT_SUCCESS); }