diff options
author | midipix <writeonce@midipix.org> | 2018-06-26 14:12:33 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2018-07-14 20:07:40 -0400 |
commit | 9c9e94539f1d98036593e53a8f718126620b3a64 (patch) | |
tree | 85b219cbed6f2d74f4f3110d803ff80fefd6eea7 /src/driver | |
parent | b9a5891dec146a263f97b7ba4fe2868f9ace7d22 (diff) | |
download | apimagic-9c9e94539f1d98036593e53a8f718126620b3a64.tar.bz2 apimagic-9c9e94539f1d98036593e53a8f718126620b3a64.tar.xz |
argv.h: output usage and errors using [argv_]dprintf rather than fprint.
Diffstat (limited to 'src/driver')
-rw-r--r-- | src/driver/amgc_driver_ctx.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/driver/amgc_driver_ctx.c b/src/driver/amgc_driver_ctx.c index 26f48d7..620162d 100644 --- a/src/driver/amgc_driver_ctx.c +++ b/src/driver/amgc_driver_ctx.c @@ -70,7 +70,7 @@ static int amgc_driver_usage( "Usage: %s [options] <file>...\n" "Options:\n", program); - argv_usage(stdout,header,optv,arg); + argv_usage(STDOUT_FILENO,header,optv,arg); argv_free(meta); return AMGC_USAGE; @@ -162,7 +162,10 @@ int amgc_get_driver_ctx( argv_optv_init(amgc_default_options,optv); - if (!(meta = argv_get(argv,optv,amgc_argv_flags(flags)))) + if (!(meta = argv_get( + argv,optv, + amgc_argv_flags(flags), + STDERR_FILENO))) return -1; nunits = 0; @@ -260,7 +263,7 @@ int amgc_create_driver_ctx( argv_optv_init(amgc_default_options,optv); - if (!(meta = argv_get(argv,optv,0))) + if (!(meta = argv_get(argv,optv,0,STDERR_FILENO))) return -1; if (!(ctx = amgc_driver_ctx_alloc(meta,cctx,0,0))) |