From 3a5c84af103baf1d4969088bbae44723b754616d Mon Sep 17 00:00:00 2001 From: Adam Sutton Date: Fri, 15 Feb 2013 11:29:00 +0000 Subject: [PATCH] comsetics: some updates to --help output. Changes are based on suggestions from Vuolter --- src/main.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/main.c b/src/main.c index c5c8b8e5..33db93b7 100644 --- a/src/main.c +++ b/src/main.c @@ -257,8 +257,7 @@ show_usage { int i; char buf[256]; - printf("Usage :- %s [options]\n\n", argv0); - printf("Options\n"); + printf("Usage: %s [OPTIONS]\n", argv0); for (i = 0; i < num; i++) { /* Section */ @@ -271,14 +270,14 @@ show_usage char sopt[4]; char *desc, *tok; if (opts[i].sopt) - snprintf(sopt, sizeof(sopt), "-%c/", opts[i].sopt); + snprintf(sopt, sizeof(sopt), "-%c,", opts[i].sopt); else - sopt[0] = 0; - snprintf(buf, sizeof(buf), " %s--%s", sopt, opts[i].lopt); + strcpy(sopt, " "); + snprintf(buf, sizeof(buf), " %s --%s", sopt, opts[i].lopt); desc = strdup(opts[i].desc); tok = strtok(desc, "\n"); while (tok) { - printf("%s\t\t%s\n", buf, tok); + printf("%-30s%s\n", buf, tok); tok = buf; while (*tok) { *tok = ' '; @@ -290,8 +289,8 @@ show_usage } } printf("\n"); - printf("For more information read the man page or visit\n"); - printf(" http://www.lonelycoder.com/hts/\n"); + printf("For more information please visit the Tvheadend website:\n"); + printf(" http://www.lonelycoder.com/tvheadend/\n"); printf("\n"); exit(0); }