1 // SPDX-License-Identifier: 0BSD
3 ///////////////////////////////////////////////////////////////////////////////
6 /// \brief Repeats given string given times
8 /// This program can be useful when debugging run-length encoder in
9 /// the Subblock filter, especially the condition when repeat count
10 /// doesn't fit into 28-bit integer.
12 // Author: Lasse Collin
14 ///////////////////////////////////////////////////////////////////////////////
21 main(int argc
, char **argv
)
24 fprintf(stderr
, "Usage: %s COUNT STRING\n", argv
[0]);
28 unsigned long long count
= strtoull(argv
[1], NULL
, 10);
29 const size_t size
= strlen(argv
[2]);
32 fwrite(argv
[2], 1, size
, stdout
);
34 return !!(ferror(stdout
) || fclose(stdout
));