Skip to content

Commit

Permalink
use a single invocation of printf
Browse files Browse the repository at this point in the history
  • Loading branch information
falconindy committed Dec 5, 2011
1 parent 1047f4f commit 5539385
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions wakeup.c
Expand Up @@ -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);
}
Expand Down

0 comments on commit 5539385

Please sign in to comment.