summaryrefslogtreecommitdiffhomepage
path: root/src/output
diff options
context:
space:
mode:
Diffstat (limited to 'src/output')
-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(