diff options
author | Bobby Bingham <koorogi@koorogi.info> | 2015-08-02 14:52:53 -0500 |
---|---|---|
committer | Bobby Bingham <koorogi@koorogi.info> | 2015-09-15 22:43:32 -0500 |
commit | 6f2e5c35da79905fb9a35b36cb0e1a5fe1ec4873 (patch) | |
tree | 010d770c7d8e3e34f8abb9f1b47d6eab3aa70d85 /src | |
parent | f7c6144dd97978b6962f6e043d376d42fb041fff (diff) |
output help text to stdout instead of stderr
Diffstat (limited to 'src')
-rw-r--r-- | src/satmkboot.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/satmkboot.c b/src/satmkboot.c index ffef46c..63e7bb6 100644 --- a/src/satmkboot.c +++ b/src/satmkboot.c @@ -118,10 +118,10 @@ fail: return -1; } -static void print_symbols(FILE *fp, int width, const struct symbolname *symbols) +static void print_symbols(int width, const struct symbolname *symbols) { for (; symbols->symbol; symbols++) { - fprintf(fp, "\t%*s%c: %s\n", width+4, "", symbols->symbol, symbols->name); + printf("\t%*s%c: %s\n", width+4, "", symbols->symbol, symbols->name); } } @@ -129,17 +129,17 @@ static void usage(const char *progname) { const int width = 20; - fprintf(stderr, "usage: %s -h\n", progname); - fprintf(stderr, " %s -o[iprms]\n\n", progname); - fprintf(stderr, "\t%-*s%s\n", width, "-h", "Show this help text"); - fprintf(stderr, "\t%-*s%s\n", width, "-o output", "Output file"); - fprintf(stderr, "\t%-*s%s\n", width, "-i ip.bin", "Initial program code file"); - fprintf(stderr, "\t%-*s%s\n", width, "-p peripherals", "Supported peripherals (default: control pad):"); - print_symbols(stderr, width, peripheraldefs); - fprintf(stderr, "\t%-*s%s\n", width, "-r regions", "Geographical regions (default: all):"); - print_symbols(stderr, width, regiondefs); - fprintf(stderr, "\t%-*s%s\n", width, "-m master_stack", "Master stack address (default 0x06002000)"); - fprintf(stderr, "\t%-*s%s\n", width, "-s slave_stack", "Slave stack address (default 0x06001000)"); + printf("usage: %s -h\n", progname); + printf(" %s -o[iprms]\n\n", progname); + printf("\t%-*s%s\n", width, "-h", "Show this help text"); + printf("\t%-*s%s\n", width, "-o output", "Output file"); + printf("\t%-*s%s\n", width, "-i ip.bin", "Initial program code file"); + printf("\t%-*s%s\n", width, "-p peripherals", "Supported peripherals (default: control pad):"); + print_symbols(width, peripheraldefs); + printf("\t%-*s%s\n", width, "-r regions", "Geographical regions (default: all):"); + print_symbols(width, regiondefs); + printf("\t%-*s%s\n", width, "-m master_stack", "Master stack address (default 0x06002000)"); + printf("\t%-*s%s\n", width, "-s slave_stack", "Slave stack address (default 0x06001000)"); exit(0); } |