summaryrefslogtreecommitdiffhomepage
path: root/src/driver
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-07-14 21:20:40 +0000
committermidipix <writeonce@midipix.org>2018-07-14 21:22:43 -0400
commit1a5016799b41e0cca267a813c57bd911f999b2a9 (patch)
tree635f3b5270182b1cb0ab73c70582e3819af99702 /src/driver
parentfed26ac79355575c340ea35b36d937062aa7204d (diff)
downloadntux-1a5016799b41e0cca267a813c57bd911f999b2a9.tar.bz2
ntux-1a5016799b41e0cca267a813c57bd911f999b2a9.tar.xz
argv.h: output usage and errors using [argv_]dprintf rather than fprint.
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/ntux_driver_ctx.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/driver/ntux_driver_ctx.c b/src/driver/ntux_driver_ctx.c
index cc5142b..ef3d987 100644
--- a/src/driver/ntux_driver_ctx.c
+++ b/src/driver/ntux_driver_ctx.c
@@ -107,7 +107,7 @@ static int ntux_driver_usage(
"Options%s%s%s:\n",
program,program,cmdarg[0],cmdname,cmdarg[1]);
- argv_usage(stdout,header,optv,arg);
+ argv_usage(STDOUT_FILENO,header,optv,arg);
argv_free(meta);
return NTUX_USAGE;
@@ -293,7 +293,10 @@ int ntux_get_driver_ctx(
if (cmdargv) {
*cmdargv = 0;
- if (!(meta = argv_get(argv,optv,ntux_argv_flags(flags))))
+ if (!(meta = argv_get(
+ argv,optv,
+ ntux_argv_flags(flags),
+ STDERR_FILENO)))
return -1;
if (ntux_cctx_update(program,optv,meta,flags,&cctx,&nunits)) {
@@ -321,7 +324,8 @@ int ntux_get_driver_ctx(
if (flags & NTUX_DRIVER_VERBOSITY_ERRORS)
argv_get(
argv,optv,
- ntux_argv_flags(flags));
+ ntux_argv_flags(flags),
+ STDERR_FILENO);
return -1;
}
@@ -337,7 +341,10 @@ int ntux_get_driver_ctx(
}
/* obtain ntux's own arguments */
- if (!(meta = argv_get(argv,optv,ntux_argv_flags(flags))))
+ if (!(meta = argv_get(
+ argv,optv,
+ ntux_argv_flags(flags),
+ STDERR_FILENO)))
return -1;
if (ntux_cctx_update(program,optv,meta,flags,&cctx,&nunits)) {
@@ -381,7 +388,7 @@ int ntux_create_driver_ctx(
argv_optv_init(ntux_default_options,optv);
- if (!(meta = argv_get(argv,optv,0)))
+ if (!(meta = argv_get(argv,optv,0,STDERR_FILENO)))
return -1;
if (!(ctx = ntux_driver_ctx_alloc(meta,cctx,0)))