numfmt options like --suffix no longer have an arbitrary 127-byte limit.
[bug introduced with numfmt in coreutils-8.21]
+ mktemp with --suffix now better diagnoses templates with too few X's.
+ Previously it conflated the insignificant --suffix in the error.
+ [bug introduced in coreutils-8.1]
+
sort again handles thousands grouping characters in single-byte locales
where the grouping character is greater than CHAR_MAX. For e.g. signed
character platforms with a 0xA0 (aka  ) grouping character.
int status = EXIT_SUCCESS;
size_t x_count;
size_t suffix_len;
- char *dest_name;
+ char *dest_name = nullptr;
initialize_main (&argc, &argv);
set_program_name (argv[0]);
}
x_count = count_consecutive_X_s (template, suffix - template);
if (x_count < 3)
- error (EXIT_FAILURE, 0, _("too few X's in template %s"), quote (template));
+ {
+ /* when suffix was appended to template only diagnose the template. */
+ if (template == dest_name)
+ template[suffix - template] = '\0';
+ error (EXIT_FAILURE, 0, _("too few X's in template %s"),
+ quote (template));
+ }
if (use_dest_dir)
{
['suffix10f', 'aXXb', {EXIT => 1},
{ERR=>"$prog: too few X's in template 'aXXb'\n"}],
['suffix10d', '-d --suffix=X aXX', {EXIT => 1},
- {ERR=>"$prog: too few X's in template 'aXXX'\n"}],
+ {ERR=>"$prog: too few X's in template 'aXX'\n"}],
['suffix11f', '--suffix=.txt', {OUT=>"./tmp.ZZZZZZZZZZ.txt\n"},
{ENV=>"TMPDIR=."},