From ab40a941a07d80326aaa051e3c94c88b800cbd7d Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Wed, 28 Oct 2015 13:02:31 +0000 Subject: all: replace most uses of quotearg_colon() with quote() Related to commit v8.24-61-g6796698 this provides more consistent quoting, as quotearg_colon() defaults to "literal" quoting by default, while quote() provides appropriate quoting for diagnostics by default. * gl/modules/randread: Depend on quote module rather than quotearg. * gl/lib/randread.c: Used quote() not quotearg_colon(). * src/: Likewise. * src/shred.c: Likewise. Also avoid unnecessary quoting introducing overhead when wiping names. * cfg.mk: Relax the matching expression to allow "qname" variables as used in shred.c to satisfy the check. * tests/: Adjust accordingly. --- src/shuf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/shuf.c') diff --git a/src/shuf.c b/src/shuf.c index 040b00028..d7b5a3521 100644 --- a/src/shuf.c +++ b/src/shuf.c @@ -27,7 +27,6 @@ #include "getopt.h" #include "linebuffer.h" #include "quote.h" -#include "quotearg.h" #include "randint.h" #include "randperm.h" #include "read-file.h" @@ -545,7 +544,7 @@ main (int argc, char **argv) ? SIZE_MAX : randperm_bound (head_lines, n_lines))); if (! randint_source) - error (EXIT_FAILURE, errno, "%s", quotearg_colon (random_source)); + error (EXIT_FAILURE, errno, "%s", quote (random_source)); if (use_reservoir_sampling) { @@ -567,7 +566,7 @@ main (int argc, char **argv) permutation = randperm_new (randint_source, head_lines, n_lines); if (outfile && ! freopen (outfile, "w", stdout)) - error (EXIT_FAILURE, errno, "%s", quotearg_colon (outfile)); + error (EXIT_FAILURE, errno, "%s", quote (outfile)); /* Generate output according to requested method */ if (repeat) -- cgit v1.2.3-54-g00ecf