summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-07-15 12:02:41 -0400
committermidipix <writeonce@midipix.org>2018-07-15 12:18:48 -0400
commit395925f40dbea1073f89dd9d852c944cbd779ffa (patch)
treecdc41c2c743165f441daee718fad9937d4431e37 /src
parent2b5e804c38112fd9975bc24d8ad758cbe5dfe9fe (diff)
downloadntux-395925f40dbea1073f89dd9d852c944cbd779ffa.tar.bz2
ntux-395925f40dbea1073f89dd9d852c944cbd779ffa.tar.xz
output interfaces: restrict to pure fdio via use of ntux_dprintf().
Diffstat (limited to 'src')
-rw-r--r--src/output/ntux_output_error.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/output/ntux_output_error.c b/src/output/ntux_output_error.c
index 47858ab..3848503 100644
--- a/src/output/ntux_output_error.c
+++ b/src/output/ntux_output_error.c
@@ -86,13 +86,17 @@ static int ntux_output_error_record_plain(
: erri->eunit;
if (epath && !(erri->eflags & NTUX_ERROR_NESTED))
- if (ntux_fprintf(stderr,"%s: [%s] '%s':\n",
+ if (ntux_dprintf(
+ STDERR_FILENO,
+ "%s: [%s] '%s':\n",
dctx->program,
ntux_output_unit_header(erri),
epath) < 0)
return -1;
- if (fprintf(stderr,"%s: %s %s(), line %d%s%s.\n",
+ if (ntux_dprintf(
+ STDERR_FILENO,
+ "%s: %s %s(), line %d%s%s.\n",
dctx->program,
ntux_output_error_header(erri),
erri->efunction,
@@ -101,7 +105,7 @@ static int ntux_output_error_record_plain(
errdesc) < 0)
return -1;
- return fflush(stderr);
+ return 0;
}
static int ntux_output_error_record_annotated(
@@ -116,8 +120,8 @@ static int ntux_output_error_record_annotated(
: erri->eunit;
if (epath && !(erri->eflags & NTUX_ERROR_NESTED))
- if (ntux_fprintf(
- stderr,
+ if (ntux_dprintf(
+ STDERR_FILENO,
"%s%s%s:%s %s[%s]%s %s%s'%s'%s:\n",
aclr_bold,aclr_magenta,
@@ -133,8 +137,8 @@ static int ntux_output_error_record_annotated(
aclr_reset) < 0)
return -1;
- if (fprintf(
- stderr,
+ if (ntux_dprintf(
+ STDERR_FILENO,
"%s%s%s:%s %s%s%s %s%s%s()%s, %s%sline %d%s%s%s%s%s.\n",
aclr_bold,aclr_magenta,
@@ -159,7 +163,7 @@ static int ntux_output_error_record_annotated(
aclr_reset) < 0)
return -1;
- return fflush(stderr);
+ return 0;
}
int ntux_output_error_record(