From: Karel Zak Date: Thu, 20 Jun 2019 09:50:15 +0000 (+0200) Subject: script: default to new format when new features expected X-Git-Tag: v2.35-rc1~159 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d628e9cf7c4507232cc59467516b0a0a633fe06c;p=thirdparty%2Futil-linux.git script: default to new format when new features expected The old format should be the default for stdout only. Signed-off-by: Karel Zak --- diff --git a/term-utils/script.c b/term-utils/script.c index 6569c98f49..7d684886d8 100644 --- a/term-utils/script.c +++ b/term-utils/script.c @@ -1063,8 +1063,11 @@ int main(int argc, char **argv) } if (timingfile) { + /* the old SCRIPT_FMT_TIMING_SIMPLE should be used when + * recoding output only (just for backward compatibility), + * otherwise switch to new format. */ if (!format) - format = outfile && infile ? + format = infile || (outfile && infile) ? SCRIPT_FMT_TIMING_MULTI : SCRIPT_FMT_TIMING_SIMPLE;