summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2005-06-17 18:43:24 +0000
committerJim Meyering <jim@meyering.net>2005-06-17 18:43:24 +0000
commitd96810b0ccedba61f7e5d3abefcc7a8a2b30a8d2 (patch)
tree8342362bc7fe8e3f6b879c0ecf6ef91bd5f1702d /src
parentbbe012433f90f798761a47f87d86fc6c4a664215 (diff)
downloadcoreutils-d96810b0ccedba61f7e5d3abefcc7a8a2b30a8d2.tar.xz
Don't embed `this'-style quotes in format strings.
Rather than this: error (..., "...`%s'...", arg); do this: error (..., "...%s...", quote (arg));
Diffstat (limited to 'src')
-rw-r--r--src/pr.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/pr.c b/src/pr.c
index 96db9d032..31c8cca92 100644
--- a/src/pr.c
+++ b/src/pr.c
@@ -319,6 +319,7 @@
#include "hard-locale.h"
#include "inttostr.h"
#include "mbswidth.h"
+#include "quote.h"
#include "stdio-safer.h"
#include "strftime.h"
#include "xstrtol.h"
@@ -837,7 +838,7 @@ parse_column_count (char const *s)
if (xstrtol (s, NULL, 10, &tmp_long, "") != LONGINT_OK
|| !(1 <= tmp_long && tmp_long <= INT_MAX))
error (EXIT_FAILURE, 0,
- _("invalid number of columns: `%s'"), s);
+ _("invalid number of columns: %s"), quote (s));
columns = tmp_long;
explicit_columns = true;
@@ -913,7 +914,7 @@ main (int argc, char **argv)
error (EXIT_FAILURE, 0,
_("`--pages=FIRST_PAGE[:LAST_PAGE]' missing argument"));
else if (! first_last_page (optarg))
- error (EXIT_FAILURE, 0, _("Invalid page range `%s'"), optarg);
+ error (EXIT_FAILURE, 0, _("Invalid page range %s"), quote (optarg));
break;
}
@@ -977,8 +978,8 @@ main (int argc, char **argv)
|| tmp_long <= 0 || tmp_long > INT_MAX)
{
error (EXIT_FAILURE, 0,
- _("`-l PAGE_LENGTH' invalid number of lines: `%s'"),
- optarg);
+ _("`-l PAGE_LENGTH' invalid number of lines: %s"),
+ quote (optarg));
}
lines_per_page = tmp_long;
break;
@@ -1001,8 +1002,8 @@ main (int argc, char **argv)
|| tmp_long > INT_MAX)
{
error (EXIT_FAILURE, 0,
- _("`-N NUMBER' invalid starting line number: `%s'"),
- optarg);
+ _("`-N NUMBER' invalid starting line number: %s"),
+ quote (optarg));
}
start_line_num = tmp_long;
break;
@@ -1013,7 +1014,7 @@ main (int argc, char **argv)
if (xstrtol (optarg, NULL, 10, &tmp_long, "") != LONGINT_OK
|| tmp_long < 0 || tmp_long > INT_MAX)
error (EXIT_FAILURE, 0,
- _("`-o MARGIN' invalid line offset: `%s'"), optarg);
+ _("`-o MARGIN' invalid line offset: %s"), quote (optarg));
chars_per_margin = tmp_long;
break;
}
@@ -1054,8 +1055,8 @@ main (int argc, char **argv)
if (xstrtol (optarg, NULL, 10, &tmp_long, "") != LONGINT_OK
|| tmp_long <= 0 || tmp_long > INT_MAX)
error (EXIT_FAILURE, 0,
- _("`-w PAGE_WIDTH' invalid number of characters: `%s'"),
- optarg);
+ _("`-w PAGE_WIDTH' invalid number of characters: %s"),
+ quote (optarg));
if (!truncate_lines)
chars_per_line = tmp_long;
break;
@@ -1068,8 +1069,8 @@ main (int argc, char **argv)
if (xstrtol (optarg, NULL, 10, &tmp_long, "") != LONGINT_OK
|| tmp_long <= 0 || tmp_long > INT_MAX)
error (EXIT_FAILURE, 0,
- _("`-W PAGE_WIDTH' invalid number of characters: `%s'"),
- optarg);
+ _("`-W PAGE_WIDTH' invalid number of characters: %s"),
+ quote (optarg));
chars_per_line = tmp_long;
break;
}
@@ -1198,8 +1199,8 @@ getoptarg (char *arg, char switch_char, char *character, int *number)
|| tmp_long <= 0 || tmp_long > INT_MAX)
{
error (0, 0,
- _("`-%c' extra characters or invalid number in the argument: `%s'"),
- switch_char, arg);
+ _("`-%c' extra characters or invalid number in the argument: %s"),
+ switch_char, quote (arg));
usage (EXIT_FAILURE);
}
*number = tmp_long;