Permalink
Browse files

use a single invocation of printf

  • Loading branch information...
1 parent 1047f4f commit 5539385c0c543665d44cb1f8a81bcf0584a56113 @falconindy falconindy committed Dec 5, 2011
Showing with 10 additions and 5 deletions.
  1. +10 −5 wakeup.c
View
@@ -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 <timespec>\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);
}

0 comments on commit 5539385

Please sign in to comment.