From a0573f2c1dc139b61eca27ad9af3956a5439d54d Mon Sep 17 00:00:00 2001
From: midipix <writeonce@midipix.org>
Date: Fri, 8 Mar 2024 06:43:54 +0000
Subject: utility api: slbt_output_execute(): send informational output to
 stderr.

---
 src/output/slbt_output_exec.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/output/slbt_output_exec.c b/src/output/slbt_output_exec.c
index 3f95af0..2fdef1b 100644
--- a/src/output/slbt_output_exec.c
+++ b/src/output/slbt_output_exec.c
@@ -31,7 +31,9 @@ static int slbt_output_exec_annotated(
 	const char * aclr_color;
 	const char * aclr_unset;
 
-	fdout = slbt_driver_fdout(dctx);
+	fdout = (strcmp(step,"execute"))
+		? slbt_driver_fdout(dctx)
+		: slbt_driver_fderr(dctx);
 
 	if (slbt_dprintf(
 			fdout,"%s%s%s: %s%s%s%s:%s",
@@ -74,7 +76,9 @@ static int slbt_output_exec_plain(
 	int	fdout;
 	char ** parg;
 
-	fdout = slbt_driver_fdout(dctx);
+	fdout = (strcmp(step,"execute"))
+		? slbt_driver_fdout(dctx)
+		: slbt_driver_fderr(dctx);
 
 	if (slbt_dprintf(fdout,"%s: %s:",dctx->program,step) < 0)
 		return SLBT_SYSTEM_ERROR(dctx,0);
@@ -97,7 +101,10 @@ int slbt_output_exec(
 	int                             fdout;
 
 	dctx  = (slbt_get_exec_ictx(ectx))->dctx;
-	fdout = slbt_driver_fdout(dctx);
+
+	fdout = (strcmp(step,"execute"))
+		? slbt_driver_fdout(dctx)
+		: slbt_driver_fderr(dctx);
 
 	if (dctx->cctx->drvflags & SLBT_DRIVER_ANNOTATE_NEVER)
 		return slbt_output_exec_plain(dctx,ectx,step);
-- 
cgit v1.2.3