summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@linbit.com>2012-04-17 16:45:21 +0200
committerAndreas Gruenbacher <agruen@linbit.com>2012-04-17 16:48:19 +0200
commit8de9b7b0369a1f4c7f8a07bd3b4dae71dc8f1fba (patch)
treee230a83582e78eac914c828c3a1b726cefcc9bb1
parented081db4b169495f75c5b5274bf547e242c58712 (diff)
downloadpatch-8de9b7b0369a1f4c7f8a07bd3b4dae71dc8f1fba.tar.gz
Switch from the `old' gnu quoting style to the 'new' one
* src/common.h, src/patch.c, src/pch.c, src/util.c, src/util.h: Switch from the `old' gnu quoting style to the 'new' one in messages and comments.
-rw-r--r--src/common.h4
-rw-r--r--src/patch.c12
-rw-r--r--src/pch.c34
-rw-r--r--src/util.c8
-rw-r--r--src/util.h2
5 files changed, 30 insertions, 30 deletions
diff --git a/src/common.h b/src/common.h
index bc93e59..b1e6c9e 100644
--- a/src/common.h
+++ b/src/common.h
@@ -1,4 +1,4 @@
-/* common definitions for `patch' */
+/* common definitions for 'patch' */
/* Copyright (C) 1986, 1988 Larry Wall
@@ -42,7 +42,7 @@
#include <ctype.h>
/* CTYPE_DOMAIN (C) is nonzero if the unsigned char C can safely be given
- as an argument to <ctype.h> macros like `isspace'. */
+ as an argument to <ctype.h> macros like 'isspace'. */
#if STDC_HEADERS
#define CTYPE_DOMAIN(c) 1
#else
diff --git a/src/patch.c b/src/patch.c
index 9e94823..0272b82 100644
--- a/src/patch.c
+++ b/src/patch.c
@@ -301,7 +301,7 @@ main (int argc, char **argv)
/* apply each hunk of patch */
while (0 < (got_hunk = another_hunk (diff_type, reverse)))
{
- lin where = 0; /* Pacify `gcc -Wall'. */
+ lin where = 0; /* Pacify 'gcc -Wall'. */
lin newwhere;
lin fuzz = 0;
lin mymaxfuzz;
@@ -351,7 +351,7 @@ main (int argc, char **argv)
if (where)
{
apply_anyway = true;
- fuzz--; /* Undo `++fuzz' below. */
+ fuzz--; /* Undo '++fuzz' below. */
where = 0;
}
}
@@ -750,7 +750,7 @@ usage (FILE *stream, int status)
if (status != 0)
{
- fprintf (stream, "%s: Try `%s --help' for more information.\n",
+ fprintf (stream, "%s: Try '%s --help' for more information.\n",
program_name, Argv[0]);
}
else
@@ -781,8 +781,8 @@ get_some_switches (void)
case 'b':
make_backups = true;
/* Special hack for backward compatibility with CVS 1.9.
- If the last 4 args are `-b SUFFIX ORIGFILE PATCHFILE',
- treat `-b' as if it were `-b -z'. */
+ If the last 4 args are '-b SUFFIX ORIGFILE PATCHFILE',
+ treat '-b' as if it were '-b -z'. */
if (Argc - optind == 3
&& strcmp (Argv[optind - 1], "-b") == 0
&& ! (Argv[optind + 0][0] == '-' && Argv[optind + 0][1])
@@ -791,7 +791,7 @@ get_some_switches (void)
{
optarg = Argv[optind++];
if (verbosity != SILENT)
- say ("warning: the `-b %s' option is obsolete; use `-b -z %s' instead\n",
+ say ("warning: the '-b %s' option is obsolete; use '-b -z %s' instead\n",
optarg, optarg);
goto case_z;
}
diff --git a/src/pch.c b/src/pch.c
index a07f291..a1e2839 100644
--- a/src/pch.c
+++ b/src/pch.c
@@ -425,7 +425,7 @@ intuit_diff_type (bool need_header, mode_t *p_file_type)
file_offset this_line = 0;
file_offset first_command_line = -1;
char first_ed_command_letter = 0;
- lin fcl_line = 0; /* Pacify `gcc -W'. */
+ lin fcl_line = 0; /* Pacify 'gcc -W'. */
bool this_is_a_command = false;
bool stars_this_line = false;
bool git_diff = false;
@@ -717,7 +717,7 @@ intuit_diff_type (bool need_header, mode_t *p_file_type)
if ((diff_type == NO_DIFF || diff_type == UNI_DIFF)
&& strnEQ(s, "@@ -", 4)) {
- /* `p_name', `p_timestr', and `p_timestamp' are backwards;
+ /* 'p_name', 'p_timestr', and 'p_timestamp' are backwards;
swap them. */
struct timespec ti = p_timestamp[OLD];
p_timestamp[OLD] = p_timestamp[NEW];
@@ -824,12 +824,12 @@ intuit_diff_type (bool need_header, mode_t *p_file_type)
}
*p_file_type = file_type;
- /* To intuit `inname', the name of the file to patch,
+ /* To intuit 'inname', the name of the file to patch,
use the algorithm specified by POSIX 1003.1-2001 XCU lines 25680-26599
(with some modifications if posixly_correct is zero):
- Take the old and new names from the context header if present,
- and take the index name from the `Index:' line if present and
+ and take the index name from the 'Index:' line if present and
if either the old and new names are both absent
or posixly_correct is nonzero.
Consider the file names to be in the order (old, new, index).
@@ -842,7 +842,7 @@ intuit_diff_type (bool need_header, mode_t *p_file_type)
some names are given, posixly_correct is zero,
and the patch appears to create a file, then use the best name
requiring the creation of the fewest directories.
- - Otherwise, report failure by setting `inname' to 0;
+ - Otherwise, report failure by setting 'inname' to 0;
this causes our invoker to ask the user for a file name. */
i = NONE;
@@ -1187,7 +1187,7 @@ another_hunk (enum diff difftype, bool rev)
lin ptrn_copiable = 0; /* # of copiable lines in ptrn */
lin repl_copiable = 0; /* Likewise for replacement. */
- /* Pacify `gcc -Wall'. */
+ /* Pacify 'gcc -Wall'. */
fillsrc = filldst = repl_patch_line = repl_context = 0;
chars_read = get_line ();
@@ -1250,7 +1250,7 @@ another_hunk (enum diff difftype, bool rev)
repl_missing = true;
goto hunk_done;
}
- fatal ("unexpected `***' at line %s: %s",
+ fatal ("unexpected '***' at line %s: %s",
format_linenum (numbuf0, p_input_line), buf);
}
context = 0;
@@ -1294,8 +1294,8 @@ another_hunk (enum diff difftype, bool rev)
{
if (p_end == 1)
{
- /* `Old' lines were omitted. Set up to fill
- them in from `new' context lines. */
+ /* 'Old' lines were omitted. Set up to fill
+ them in from 'new' context lines. */
ptrn_missing = true;
p_end = p_ptrn_lines + 1;
ptrn_prefix_context = ptrn_suffix_context = -1;
@@ -1304,14 +1304,14 @@ another_hunk (enum diff difftype, bool rev)
fillcnt = p_ptrn_lines;
}
else if (! repl_beginning)
- fatal ("%s `---' at line %s; check line numbers at line %s",
+ fatal ("%s '---' at line %s; check line numbers at line %s",
(p_end <= p_ptrn_lines
? "Premature"
: "Overdue"),
format_linenum (numbuf0, p_input_line),
format_linenum (numbuf1, p_hunk_beg));
else if (! repl_could_be_missing)
- fatal ("duplicate `---' at line %s; check line numbers at line %s",
+ fatal ("duplicate '---' at line %s; check line numbers at line %s",
format_linenum (numbuf0, p_input_line),
format_linenum (numbuf1,
p_hunk_beg + repl_beginning));
@@ -1476,7 +1476,7 @@ another_hunk (enum diff difftype, bool rev)
hunk_done:
if (p_end >=0 && !repl_beginning)
- fatal ("no `---' found in patch at line %s",
+ fatal ("no '---' found in patch at line %s",
format_linenum (numbuf0, pch_hunk_beg ()));
if (repl_missing) {
@@ -1790,7 +1790,7 @@ another_hunk (enum diff difftype, bool rev)
fatal ("unexpected end of file in patch at line %s",
format_linenum (numbuf0, p_input_line));
if (buf[0] != '<' || (buf[1] != ' ' && buf[1] != '\t'))
- fatal ("`<' expected at line %s of patch",
+ fatal ("'<' expected at line %s of patch",
format_linenum (numbuf0, p_input_line));
chars_read -= 2 + (i == p_ptrn_lines && incomplete_line ());
p_len[i] = chars_read;
@@ -1812,7 +1812,7 @@ another_hunk (enum diff difftype, bool rev)
fatal ("unexpected end of file in patch at line %s",
format_linenum (numbuf0, p_input_line));
if (*buf != '-')
- fatal ("`---' expected at line %s of patch",
+ fatal ("'---' expected at line %s of patch",
format_linenum (numbuf0, p_input_line));
}
sprintf (buf, "--- %s,%s\n",
@@ -1835,7 +1835,7 @@ another_hunk (enum diff difftype, bool rev)
fatal ("unexpected end of file in patch at line %s",
format_linenum (numbuf0, p_input_line));
if (buf[0] != '>' || (buf[1] != ' ' && buf[1] != '\t'))
- fatal ("`>' expected at line %s of patch",
+ fatal ("'>' expected at line %s of patch",
format_linenum (numbuf0, p_input_line));
chars_read -= 2 + (i == p_end && incomplete_line ());
p_len[i] = chars_read;
@@ -2253,7 +2253,7 @@ pch_mode (bool which)
return p_mode[which];
}
-/* Is the newline-terminated line a valid `ed' command for patch
+/* Is the newline-terminated line a valid 'ed' command for patch
input? If so, return the command character; if not, return 0.
This accepts just a subset of the valid commands, but it's
good enough in practice. */
@@ -2378,7 +2378,7 @@ do_ed_script (char const *inname, char const *outname,
FILE *ifp = fopen (outname, binary_transput ? "rb" : "r");
int c;
if (!ifp)
- pfatal ("can't open `%s'", outname);
+ pfatal ("can't open '%s'", outname);
while ((c = getc (ifp)) != EOF)
if (putc (c, ofp) == EOF)
write_fatal ();
diff --git a/src/util.c b/src/util.c
index b60ef3a..5f35231 100644
--- a/src/util.c
+++ b/src/util.c
@@ -1,4 +1,4 @@
-/* utility functions for `patch' */
+/* utility functions for 'patch' */
/* Copyright (C) 1986 Larry Wall
@@ -811,7 +811,7 @@ version_get (char const *filename, char const *cs, bool exists, bool readonly,
if (dry_run)
{
if (! exists)
- fatal ("can't do dry run on nonexistent version-controlled file %s; invoke `%s' and try again",
+ fatal ("can't do dry run on nonexistent version-controlled file %s; invoke '%s' and try again",
quotearg (filename), getbuf);
}
else
@@ -977,7 +977,7 @@ ask (char const *format, ...)
/* If standard output is not a tty, don't bother opening /dev/tty,
since it's unlikely that stdout will be seen by the tty user.
The isatty test also works around a bug in GNU Emacs 19.34 under Linux
- which makes a call-process `patch' hang when it reads from /dev/tty.
+ which makes a call-process 'patch' hang when it reads from /dev/tty.
POSIX.1-2001 XCU line 26599 requires that we read /dev/tty,
though. */
ttyfd = (posixly_correct || isatty (STDOUT_FILENO)
@@ -1251,7 +1251,7 @@ replace_slashes (char *filename)
}
/* Make sure we'll have the directories to create a file.
- Ignore the last element of `filename'. */
+ Ignore the last element of 'filename'. */
static void
makedirs (char const *name)
diff --git a/src/util.h b/src/util.h
index 240e7e7..9a953ea 100644
--- a/src/util.h
+++ b/src/util.h
@@ -1,4 +1,4 @@
-/* utility functions for `patch' */
+/* utility functions for 'patch' */
/* Copyright (C) 1986 Larry Wall