star-line

Structure for accelerating line importance sampling
git clone git://git.meso-star.fr/star-line.git
Log | Files | Refs | README | LICENSE

commit 3d073a139a8b53db9ba813bb5f3071f404a4f239
parent b21a5f66328cda8089dfd7707edc53dd94c4b4f0
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Thu,  2 Apr 2026 14:14:01 +0200

sln-build: fixd a bug related to writing the output

The tool would crash if the user did not specify an output file name; in
such cases, the output data should be written to standard output.

Diffstat:
Msrc/sln_build.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/sln_build.c b/src/sln_build.c @@ -443,7 +443,12 @@ cmd_run(struct cmd* cmd) tree_args.mesh_decimation_err = cmd->args.mesh_decimation_err; tree_args.mesh_type = cmd->args.mesh_type; - write_args.filename = cmd->args.output; + if(cmd->args.output) { + write_args.filename = cmd->args.output; + } else { + write_args.filename = "stdout"; + write_args.file = stdout; + } if((res = setup_tree_mixture(cmd, tree_args.molecules)) != RES_OK) goto error; if((res = sln_tree_create(cmd->sln, &tree_args, &tree)) != RES_OK) goto error;