From d0d28ade066af5ae00a2ec00f428065c720a6b2d Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 28 Jan 2019 06:25:20 -0800 Subject: command line: improve -c option diagnostic. * txr.c (txr_main): Fix misleading message formatting here. The spec_file string is irrelevant; we must show the argument to -c which is in arg. The name of the input source is spec_file_str; let's show that. --- txr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/txr.c b/txr.c index cb2e10f0..584ec159 100644 --- a/txr.c +++ b/txr.c @@ -826,8 +826,8 @@ int txr_main(int argc, char **argv) } if (parse_stream) { format(std_error, - lit("~a: -c ~a: input file has already been established\n"), - prog_string, spec_file, nao); + lit("~a: -c ~a: input source ~a has already been established\n"), + prog_string, arg, spec_file_str, nao); return EXIT_FAILURE; } specstring = arg; -- cgit v1.2.3