mirror of
https://github.com/coreutils/coreutils.git
synced 2024-12-12 03:15:15 +08:00
maint: src/*.[ch]: convert more `...' to '...'
Run this (twice): git grep -E -l '`.+'\' src/*.[ch] \ |xargs perl -pi -e 's/`(.+?'\'')/'\''$1/'
This commit is contained in:
parent
a517386f1b
commit
3ba8b04426
@ -122,9 +122,9 @@ main (int argc, char **argv)
|
||||
name = base_name (argv[optind]);
|
||||
strip_trailing_slashes (name);
|
||||
|
||||
/* Per POSIX, `basename // /' must return '//' on platforms with
|
||||
/* Per POSIX, 'basename // /' must return '//' on platforms with
|
||||
distinct //. On platforms with drive letters, this generalizes
|
||||
to making `basename c: :' return 'c:'. This rule is captured by
|
||||
to making 'basename c: :' return 'c:'. This rule is captured by
|
||||
skipping suffix stripping if base_name returned an absolute path
|
||||
or a drive letter (only possible if name is a file-system
|
||||
root). */
|
||||
|
@ -651,7 +651,7 @@ main (int argc, char **argv)
|
||||
else
|
||||
{
|
||||
check_redirection = false;
|
||||
#ifdef lint /* Suppress `used before initialized' warning. */
|
||||
#ifdef lint /* Suppress 'used before initialized' warning. */
|
||||
out_dev = 0;
|
||||
out_ino = 0;
|
||||
#endif
|
||||
|
@ -406,7 +406,7 @@ Each MODE is of the form '[ugoa]*([-+=]([rwxXst]*|[ugo]))+'.\n\
|
||||
}
|
||||
|
||||
/* Parse the ASCII mode given on the command line into a linked list
|
||||
of `struct mode_change' and apply that to each file argument. */
|
||||
of 'struct mode_change' and apply that to each file argument. */
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
|
@ -48,7 +48,7 @@ struct Chown_option
|
||||
/* If nonzero, change the ownership of directories recursively. */
|
||||
bool recurse;
|
||||
|
||||
/* Pointer to the device and inode numbers of `/', when --recursive.
|
||||
/* Pointer to the device and inode numbers of '/', when --recursive.
|
||||
Need not be freed. Otherwise NULL. */
|
||||
struct dev_ino *root_dev_ino;
|
||||
|
||||
|
10
src/copy.c
10
src/copy.c
@ -1186,7 +1186,7 @@ close_src_desc:
|
||||
work to do and should return successfully, right away.
|
||||
|
||||
Set *UNLINK_SRC if we've determined that the caller wants to do
|
||||
`rename (a, b)' where 'a' and 'b' are distinct hard links to the same
|
||||
'rename (a, b)' where 'a' and 'b' are distinct hard links to the same
|
||||
file. In that case, the caller should try to unlink 'a' and then return
|
||||
successfully. Ideally, we wouldn't have to do that, and we'd be
|
||||
able to rely on rename to remove the source file. However, POSIX
|
||||
@ -1314,7 +1314,7 @@ same_file_ok (char const *src_name, struct stat const *src_sb,
|
||||
/* They may refer to the same file if we're in move mode and the
|
||||
target is a symlink. That is ok, since we remove any existing
|
||||
destination file before opening it -- via 'rename' if they're on
|
||||
the same file system, via `unlink (DST_NAME)' otherwise.
|
||||
the same file system, via 'unlink (DST_NAME)' otherwise.
|
||||
It's also ok if they're distinct hard links to the same file. */
|
||||
if (x->move_mode || x->unlink_dest_before_opening)
|
||||
{
|
||||
@ -1939,7 +1939,7 @@ copy_internal (char const *src_name, char const *dst_name,
|
||||
been copied.
|
||||
- when using -H and processing a command line argument;
|
||||
that command line argument could be a symlink pointing to another
|
||||
command line argument. With `cp -H --preserve=link', we hard-link
|
||||
command line argument. With 'cp -H --preserve=link', we hard-link
|
||||
those two destination files.
|
||||
- likewise for -L except that it applies to all files, not just
|
||||
command line arguments.
|
||||
@ -2298,7 +2298,7 @@ copy_internal (char const *src_name, char const *dst_name,
|
||||
link() on a symlink creates a hard-link to the symlink, or only
|
||||
to the referent (effectively dereferencing the symlink) (POSIX
|
||||
2001 required the latter behavior, although many systems provided
|
||||
the former). Yet cp, invoked with `--link --no-dereference',
|
||||
the former). Yet cp, invoked with '--link --no-dereference',
|
||||
should not follow the link. We can approximate the desired
|
||||
behavior by skipping this hard-link creating block and instead
|
||||
copying the symlink, via the 'S_ISLNK'- copying code below.
|
||||
@ -2439,7 +2439,7 @@ copy_internal (char const *src_name, char const *dst_name,
|
||||
if (copied_as_regular)
|
||||
return delayed_ok;
|
||||
|
||||
/* POSIX says that `cp -p' must restore the following:
|
||||
/* POSIX says that 'cp -p' must restore the following:
|
||||
- permission bits
|
||||
- setuid, setgid bits
|
||||
- owner and group
|
||||
|
@ -124,8 +124,8 @@ struct cp_options
|
||||
|
||||
/* If true, first try to open each existing destination nondirectory,
|
||||
then, if the open fails, unlink and try again.
|
||||
This option must be set for `cp -f', in case the destination file
|
||||
exists when the open is attempted. It is irrelevant to `mv' since
|
||||
This option must be set for 'cp -f', in case the destination file
|
||||
exists when the open is attempted. It is irrelevant to 'mv' since
|
||||
any destination is sure to be removed before the open. */
|
||||
bool unlink_dest_after_failed_open;
|
||||
|
||||
|
10
src/cp.c
10
src/cp.c
@ -279,7 +279,7 @@ regular file.\n\
|
||||
ATTR_LIST is a null-terminated linked list of structures that
|
||||
indicates the end of the filename of each intermediate directory
|
||||
in CONST_DST_NAME that may need to have its attributes changed.
|
||||
The command `cp --parents --preserve a/b/c d/e_dir' changes the
|
||||
The command 'cp --parents --preserve a/b/c d/e_dir' changes the
|
||||
attributes of the directories d/e_dir/a and d/e_dir/a/b to match
|
||||
the corresponding source directories regardless of whether they
|
||||
existed before the 'cp' command was given.
|
||||
@ -451,7 +451,7 @@ make_dir_parents_private (char const *const_dir, size_t src_offset,
|
||||
|
||||
/* This component does not exist. We must set
|
||||
*new_dst and new->st.st_mode inside this loop because,
|
||||
for example, in the command `cp --parents ../a/../b/c e_dir',
|
||||
for example, in the command 'cp --parents ../a/../b/c e_dir',
|
||||
make_dir_parents_private creates only e_dir/../a if
|
||||
./b already exists. */
|
||||
*new_dst = true;
|
||||
@ -655,7 +655,7 @@ do_copy (int n_files, char **file, const char *target_directory,
|
||||
|
||||
/* Use 'arg' without trailing slashes in constructing destination
|
||||
file names. Otherwise, we can end up trying to create a
|
||||
directory via `mkdir ("dst/foo/"...', which is not portable.
|
||||
directory via 'mkdir ("dst/foo/"...', which is not portable.
|
||||
It fails, due to the trailing slash, on at least
|
||||
NetBSD 1.[34] systems. */
|
||||
ASSIGN_STRDUPA (arg_no_trailing_slash, arg);
|
||||
@ -681,7 +681,7 @@ do_copy (int n_files, char **file, const char *target_directory,
|
||||
/* Append the last component of 'arg' to 'target_directory'. */
|
||||
|
||||
ASSIGN_BASENAME_STRDUPA (arg_base, arg);
|
||||
/* For `cp -R source/.. dest', don't copy into 'dest/..'. */
|
||||
/* For 'cp -R source/.. dest', don't copy into 'dest/..'. */
|
||||
dst_name = (STREQ (arg_base, "..")
|
||||
? xstrdup (target_directory)
|
||||
: file_name_concat (target_directory, arg_base,
|
||||
@ -734,7 +734,7 @@ do_copy (int n_files, char **file, const char *target_directory,
|
||||
/* When the force and backup options have been specified and
|
||||
the source and destination are the same name for an existing
|
||||
regular file, convert the user's command, e.g.,
|
||||
`cp --force --backup foo foo' to `cp --force foo fooSUFFIX'
|
||||
'cp --force --backup foo foo' to 'cp --force foo fooSUFFIX'
|
||||
where SUFFIX is determined by any version control options used. */
|
||||
|
||||
if (x->unlink_dest_after_failed_open
|
||||
|
@ -801,7 +801,7 @@ main (int argc, char **argv)
|
||||
|
||||
case 'd':
|
||||
/* New delimiter. */
|
||||
/* Interpret -d '' to mean `use the NUL byte as the delimiter.' */
|
||||
/* Interpret -d '' to mean 'use the NUL byte as the delimiter.' */
|
||||
if (optarg[0] != '\0' && optarg[1] != '\0')
|
||||
FATAL_ERROR (_("the delimiter must be a single character"));
|
||||
delim = optarg[0];
|
||||
@ -811,7 +811,7 @@ main (int argc, char **argv)
|
||||
case OUTPUT_DELIMITER_OPTION:
|
||||
output_delimiter_specified = true;
|
||||
/* Interpret --output-delimiter='' to mean
|
||||
`use the NUL byte as the delimiter.' */
|
||||
'use the NUL byte as the delimiter.' */
|
||||
output_delimiter_length = (optarg[0] == '\0'
|
||||
? 1 : strlen (optarg));
|
||||
output_delimiter_string = xstrdup (optarg);
|
||||
|
@ -395,7 +395,7 @@ main (int argc, char **argv)
|
||||
set_date = true;
|
||||
break;
|
||||
case 'u':
|
||||
/* POSIX says that `date -u' is equivalent to setting the TZ
|
||||
/* POSIX says that 'date -u' is equivalent to setting the TZ
|
||||
environment variable, so this option should do nothing other
|
||||
than setting TZ. */
|
||||
if (putenv (bad_cast ("TZ=UTC0")) != 0)
|
||||
|
4
src/df.c
4
src/df.c
@ -617,7 +617,7 @@ get_dev (char const *disk, char const *mount_point,
|
||||
long int lipct = pct = u * 100 / nonroot_total;
|
||||
double ipct = lipct;
|
||||
|
||||
/* Like `pct = ceil (dpct);', but avoid ceil so that
|
||||
/* Like 'pct = ceil (dpct);', but avoid ceil so that
|
||||
the math library needn't be linked. */
|
||||
if (ipct - 1 < pct && pct <= ipct + 1)
|
||||
pct = ipct + (ipct < pct);
|
||||
@ -690,7 +690,7 @@ get_disk (char const *disk)
|
||||
|
||||
/* Figure out which device file or directory POINT is mounted on
|
||||
and show its disk usage.
|
||||
STATP must be the result of `stat (POINT, STATP)'. */
|
||||
STATP must be the result of 'stat (POINT, STATP)'. */
|
||||
static void
|
||||
get_point (const char *point, const struct stat *statp)
|
||||
{
|
||||
|
@ -227,7 +227,7 @@ append_quoted (const char *str)
|
||||
}
|
||||
|
||||
/* Read the file open on FP (with name FILENAME). First, look for a
|
||||
`TERM name' directive where name matches the current terminal type.
|
||||
'TERM name' directive where name matches the current terminal type.
|
||||
Once found, translate and accumulate the associated directives onto
|
||||
the global obstack LSC_OBSTACK. Give a diagnostic
|
||||
upon failure (unrecognized keyword is the only way to fail here).
|
||||
|
2
src/du.c
2
src/du.c
@ -138,7 +138,7 @@ static bool opt_separate_dirs = false;
|
||||
|
||||
/* Show the total for each directory (and file if --all) that is at
|
||||
most MAX_DEPTH levels down from the root of the hierarchy. The root
|
||||
is at level 0, so `du --max-depth=0' is equivalent to `du -s'. */
|
||||
is at level 0, so 'du --max-depth=0' is equivalent to 'du -s'. */
|
||||
static size_t max_depth = SIZE_MAX;
|
||||
|
||||
/* Human-readable options for output. */
|
||||
|
@ -554,7 +554,7 @@ elide_tail_lines_pipe (const char *filename, int fd, uintmax_t n_elide)
|
||||
total_lines -= tmp->nlines;
|
||||
}
|
||||
|
||||
/* Print the first `total_lines - n_elide' lines of tmp->buffer. */
|
||||
/* Print the first 'total_lines - n_elide' lines of tmp->buffer. */
|
||||
if (n_elide < total_lines)
|
||||
{
|
||||
size_t n = total_lines - n_elide;
|
||||
|
@ -105,7 +105,7 @@ PID is an integer; if negative it identifies a process group.\n\
|
||||
exit (status);
|
||||
}
|
||||
|
||||
/* Print a row of `kill -t' output. NUM_WIDTH is the maximum signal
|
||||
/* Print a row of 'kill -t' output. NUM_WIDTH is the maximum signal
|
||||
number width, and SIGNUM is the signal number to print. The
|
||||
maximum name width is NAME_WIDTH, and SIGNAME is the name to print. */
|
||||
|
||||
|
6
src/ln.c
6
src/ln.c
@ -65,7 +65,7 @@ static bool hard_dir_link;
|
||||
|
||||
/* If nonzero, and the specified destination is a symbolic link to a
|
||||
directory, treat it just as if it were a directory. Otherwise, the
|
||||
command `ln --force --no-dereference file symlink-to-dir' deletes
|
||||
command 'ln --force --no-dereference file symlink-to-dir' deletes
|
||||
symlink-to-dir before creating the new link. */
|
||||
static bool dereference_dest_dir_symlinks = true;
|
||||
|
||||
@ -195,9 +195,9 @@ do_link (const char *source, const char *dest)
|
||||
the command in question doesn't use --force. */
|
||||
|| (!symbolic_link && backup_type != no_backups))
|
||||
&& dest_lstat_ok
|
||||
/* Allow `ln -sf --backup k k' to succeed in creating the
|
||||
/* Allow 'ln -sf --backup k k' to succeed in creating the
|
||||
self-referential symlink, but don't allow the hard-linking
|
||||
equivalent: `ln -f k k' (with or without --backup) to get
|
||||
equivalent: 'ln -f k k' (with or without --backup) to get
|
||||
beyond this point, because the error message you'd get is
|
||||
misleading. */
|
||||
&& (backup_type == no_backups || !symbolic_link)
|
||||
|
4
src/ls.c
4
src/ls.c
@ -300,7 +300,7 @@ static Hash_table *active_dir_set;
|
||||
|
||||
/* The table of files in the current directory:
|
||||
|
||||
'cwd_file' points to a vector of `struct fileinfo', one per file.
|
||||
'cwd_file' points to a vector of 'struct fileinfo', one per file.
|
||||
'cwd_n_alloc' is the number of elements space has been allocated for.
|
||||
'cwd_n_used' is the number actually in use. */
|
||||
|
||||
@ -3146,7 +3146,7 @@ make_link_name (char const *name, char const *linkname)
|
||||
}
|
||||
|
||||
/* Return true if the last component of NAME is '.' or '..'
|
||||
This is so we don't try to recurse on `././././. ...' */
|
||||
This is so we don't try to recurse on '././././. ...' */
|
||||
|
||||
static bool
|
||||
basename_is_dot_or_dotdot (const char *name)
|
||||
|
6
src/ls.h
6
src/ls.h
@ -1,10 +1,10 @@
|
||||
/* This is for the `ls' program. */
|
||||
/* This is for the 'ls' program. */
|
||||
#define LS_LS 1
|
||||
|
||||
/* This is for the `dir' program. */
|
||||
/* This is for the 'dir' program. */
|
||||
#define LS_MULTI_COL 2
|
||||
|
||||
/* This is for the `vdir' program. */
|
||||
/* This is for the 'vdir' program. */
|
||||
#define LS_LONG_FORMAT 3
|
||||
|
||||
extern int ls_mode;
|
||||
|
@ -287,7 +287,7 @@ split_3 (char *s, size_t s_len,
|
||||
}
|
||||
|
||||
/* Ignore this line if it is too short.
|
||||
Each line must have at least `min_digest_line_length - 1' (or one more, if
|
||||
Each line must have at least 'min_digest_line_length - 1' (or one more, if
|
||||
the first is a backslash) more characters to contain correct message digest
|
||||
information. */
|
||||
if (s_len - i < min_digest_line_length + (s[i] == '\\'))
|
||||
|
@ -168,7 +168,7 @@ main (int argc, char **argv)
|
||||
quote (scontext));
|
||||
|
||||
/* Only check the first character, to allow mnemonic usage like
|
||||
`mknod /dev/rst0 character 18 0'. */
|
||||
'mknod /dev/rst0 character 18 0'. */
|
||||
|
||||
switch (argv[optind + 1][0])
|
||||
{
|
||||
|
2
src/mv.c
2
src/mv.c
@ -173,7 +173,7 @@ do_move (const char *source, const char *dest, const struct cp_options *x)
|
||||
the same as, or a parent of DEST. In this case we know it's a
|
||||
parent. It doesn't make sense to move a directory into itself, and
|
||||
besides in some situations doing so would give highly nonintuitive
|
||||
results. Run this `mkdir b; touch a c; mv * b' in an empty
|
||||
results. Run this 'mkdir b; touch a c; mv * b' in an empty
|
||||
directory. Here's the result of running echo `find b -print`:
|
||||
b b/a b/b b/b/a b/c. Notice that only file 'a' was copied
|
||||
into b/b. Handle this by giving a diagnostic, removing the
|
||||
|
10
src/od.c
10
src/od.c
@ -92,7 +92,7 @@ enum
|
||||
/* Ensure that our choice for FMT_BYTES_ALLOCATED is reasonable. */
|
||||
verify (MAX_INTEGRAL_TYPE_SIZE * CHAR_BIT / 3 <= 99);
|
||||
|
||||
/* Each output format specification (from `-t spec' or from
|
||||
/* Each output format specification (from '-t spec' or from
|
||||
old-style options) is represented by one of these structures. */
|
||||
struct tspec
|
||||
{
|
||||
@ -156,7 +156,7 @@ static const int width_bytes[] =
|
||||
sizeof (long double)
|
||||
};
|
||||
|
||||
/* Ensure that for each member of `enum size_spec' there is an
|
||||
/* Ensure that for each member of 'enum size_spec' there is an
|
||||
initializer in the width_bytes array. */
|
||||
verify (ARRAY_CARDINALITY (width_bytes) == N_SIZE_SPECS);
|
||||
|
||||
@ -1518,7 +1518,7 @@ main (int argc, char **argv)
|
||||
size_t width_per_block = 0;
|
||||
static char const multipliers[] = "bEGKkMmPTYZ0";
|
||||
|
||||
/* The old-style `pseudo starting address' to be printed in parentheses
|
||||
/* The old-style 'pseudo starting address' to be printed in parentheses
|
||||
after any true address. */
|
||||
uintmax_t pseudo_start IF_LINT ( = 0);
|
||||
|
||||
@ -1538,7 +1538,7 @@ main (int argc, char **argv)
|
||||
integral_type_size[sizeof (int)] = INT;
|
||||
integral_type_size[sizeof (long int)] = LONG;
|
||||
#if HAVE_UNSIGNED_LONG_LONG_INT
|
||||
/* If `long int' and `long long int' have the same size, it's fine
|
||||
/* If 'long int' and 'long long int' have the same size, it's fine
|
||||
to overwrite the entry for 'long' with this one. */
|
||||
integral_type_size[sizeof (unsigned_long_long_int)] = LONG_LONG;
|
||||
#endif
|
||||
@ -1547,7 +1547,7 @@ main (int argc, char **argv)
|
||||
fp_type_size[i] = NO_SIZE;
|
||||
|
||||
fp_type_size[sizeof (float)] = FLOAT_SINGLE;
|
||||
/* The array entry for 'double' is filled in after that for `long double'
|
||||
/* The array entry for 'double' is filled in after that for 'long double'
|
||||
so that if they are the same size, we avoid any overhead of
|
||||
long double computation in libc. */
|
||||
fp_type_size[sizeof (long double)] = FLOAT_LONG_DOUBLE;
|
||||
|
10
src/pr.c
10
src/pr.c
@ -51,9 +51,9 @@
|
||||
utilities, e.g. sort or cut. - Same as SunOS does.
|
||||
- With multicolumn output
|
||||
two conflicting POSIX requirements exist:
|
||||
First `default n-separator is TAB', second `output text columns shall
|
||||
First 'default n-separator is TAB', second `output text columns shall
|
||||
be of equal width'. Moreover POSIX specifies the number+separator a
|
||||
part of the column, together with '-COLUMN' and `-a -COLUMN'.
|
||||
part of the column, together with '-COLUMN' and '-a -COLUMN'.
|
||||
(With -m output the number shall occupy each line only once. Exactly
|
||||
the same situation as single column output exists.)
|
||||
GNU pr gives priority to the 2nd requirement and observes POSIX
|
||||
@ -125,7 +125,7 @@
|
||||
two
|
||||
three
|
||||
four
|
||||
will be printed with `-a -3' as
|
||||
will be printed with '-a -3' as
|
||||
one two three
|
||||
four
|
||||
|
||||
@ -899,7 +899,7 @@ main (int argc, char **argv)
|
||||
switch (c)
|
||||
{
|
||||
case 1: /* Non-option argument. */
|
||||
/* long option --page dominates old `+FIRST_PAGE ...'. */
|
||||
/* long option --page dominates old '+FIRST_PAGE ...'. */
|
||||
if (! (first_page_number == 0
|
||||
&& *optarg == '+' && first_last_page (-2, '+', optarg + 1)))
|
||||
file_names[n_files++] = optarg;
|
||||
@ -2048,7 +2048,7 @@ add_line_number (COLUMN *p)
|
||||
if (columns > 1)
|
||||
{
|
||||
/* Tabification is assumed for multiple columns, also for n-separators,
|
||||
but `default n-separator = TAB' hasn't been given priority over
|
||||
but 'default n-separator = TAB' hasn't been given priority over
|
||||
equal column_width also specified by POSIX. */
|
||||
if (number_separator == '\t')
|
||||
{
|
||||
|
16
src/ptx.c
16
src/ptx.c
@ -86,9 +86,9 @@ static enum Format output_format = UNKNOWN_FORMAT;
|
||||
/* output format */
|
||||
|
||||
static bool ignore_case = false; /* fold lower to upper for sorting */
|
||||
static const char *break_file = NULL; /* name of the `Break chars' file */
|
||||
static const char *only_file = NULL; /* name of the `Only words' file */
|
||||
static const char *ignore_file = NULL; /* name of the `Ignore words' file */
|
||||
static const char *break_file = NULL; /* name of the 'Break chars' file */
|
||||
static const char *only_file = NULL; /* name of the 'Only words' file */
|
||||
static const char *ignore_file = NULL; /* name of the 'Ignore words' file */
|
||||
|
||||
/* Options that use regular expressions. */
|
||||
struct regex_data
|
||||
@ -760,7 +760,7 @@ find_occurs_in_text (void)
|
||||
char *word_end; /* end of word */
|
||||
char *next_context_start; /* next start of left context */
|
||||
|
||||
/* reference_length is always used within `if (input_reference)'.
|
||||
/* reference_length is always used within 'if (input_reference)'.
|
||||
However, GNU C diagnoses that it may be used uninitialized. The
|
||||
following assignment is merely to shut it up. */
|
||||
|
||||
@ -924,8 +924,8 @@ find_occurs_in_text (void)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Ignore the word if an `Ignore words' table exists and if it is
|
||||
part of it. Also ignore the word if an `Only words' table and
|
||||
/* Ignore the word if an 'Ignore words' table exists and if it is
|
||||
part of it. Also ignore the word if an 'Only words' table and
|
||||
if it is *not* part of it.
|
||||
|
||||
It is allowed that both tables be used at once, even if this
|
||||
@ -2093,12 +2093,12 @@ main (int argc, char **argv)
|
||||
|
||||
initialize_regex ();
|
||||
|
||||
/* Read `Break character' file, if any. */
|
||||
/* Read 'Break character' file, if any. */
|
||||
|
||||
if (break_file)
|
||||
digest_break_file (break_file);
|
||||
|
||||
/* Read `Ignore words' file and `Only words' files, if any. If any of
|
||||
/* Read 'Ignore words' file and 'Only words' files, if any. If any of
|
||||
these files is empty, reset the name of the file to NULL, to avoid
|
||||
unnecessary calls to search_table. */
|
||||
|
||||
|
@ -181,7 +181,7 @@ write_protected_non_symlink (int fd_cwd,
|
||||
|
||||
IS_DIR is true if ENT designates a directory, false otherwise.
|
||||
|
||||
Depending on MODE, ask whether to `descend into' or to 'remove' the
|
||||
Depending on MODE, ask whether to 'descend into' or to 'remove' the
|
||||
directory FILENAME. MODE is ignored when FILENAME is not a directory.
|
||||
Set *IS_EMPTY_P to T_YES if FILENAME is an empty directory, and it is
|
||||
appropriate to try to remove it with rmdir (e.g. recursive mode).
|
||||
@ -236,7 +236,7 @@ prompt (FTS const *fts, FTSENT const *ent, bool is_dir,
|
||||
}
|
||||
else
|
||||
{
|
||||
/* This happens, e.g., with `rm '''. */
|
||||
/* This happens, e.g., with 'rm '''. */
|
||||
write_protected = -1;
|
||||
wp_errno = errno;
|
||||
}
|
||||
|
@ -49,8 +49,8 @@ struct rm_options
|
||||
/* If true, recursively remove directories. */
|
||||
bool recursive;
|
||||
|
||||
/* Pointer to the device and inode numbers of `/', when --recursive
|
||||
and preserving `/'. Otherwise NULL. */
|
||||
/* Pointer to the device and inode numbers of '/', when --recursive
|
||||
and preserving '/'. Otherwise NULL. */
|
||||
struct dev_ino *root_dev_ino;
|
||||
|
||||
/* If nonzero, stdin is a tty. */
|
||||
|
@ -810,7 +810,7 @@ do_wipefd (int fd, char const *qname, struct randint_source *s,
|
||||
}
|
||||
}
|
||||
|
||||
/* Allow `rounding up' only for regular files. */
|
||||
/* Allow 'rounding up' only for regular files. */
|
||||
if (0 <= size && !(flags->exact) && S_ISREG (st.st_mode))
|
||||
{
|
||||
size += ST_BLKSIZE (st) - 1 - (size - 1) % ST_BLKSIZE (st);
|
||||
|
@ -4327,7 +4327,7 @@ main (int argc, char **argv)
|
||||
N_("invalid number at field start"));
|
||||
if (! key->sword--)
|
||||
{
|
||||
/* Provoke with `sort -k0' */
|
||||
/* Provoke with 'sort -k0' */
|
||||
badfieldspec (optarg, N_("field number is zero"));
|
||||
}
|
||||
if (*s == '.')
|
||||
@ -4336,7 +4336,7 @@ main (int argc, char **argv)
|
||||
N_("invalid number after '.'"));
|
||||
if (! key->schar--)
|
||||
{
|
||||
/* Provoke with `sort -k1.0' */
|
||||
/* Provoke with 'sort -k1.0' */
|
||||
badfieldspec (optarg, N_("character offset is zero"));
|
||||
}
|
||||
}
|
||||
@ -4355,7 +4355,7 @@ main (int argc, char **argv)
|
||||
N_("invalid number after ','"));
|
||||
if (! key->eword--)
|
||||
{
|
||||
/* Provoke with `sort -k1,0' */
|
||||
/* Provoke with 'sort -k1,0' */
|
||||
badfieldspec (optarg, N_("field number is zero"));
|
||||
}
|
||||
if (*s == '.')
|
||||
@ -4409,7 +4409,7 @@ main (int argc, char **argv)
|
||||
newtab = '\0';
|
||||
else
|
||||
{
|
||||
/* Provoke with `sort -txx'. Complain about
|
||||
/* Provoke with 'sort -txx'. Complain about
|
||||
"multi-character tab" instead of "multibyte tab", so
|
||||
that the diagnostic's wording does not need to be
|
||||
changed once multibyte characters are supported. */
|
||||
|
@ -232,7 +232,7 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
|
||||
/* Also compare with the list in "man 2 statfs" using the
|
||||
fs-magic-compare make target. */
|
||||
|
||||
/* IMPORTANT NOTE: Each of the following `case S_MAGIC_...:'
|
||||
/* IMPORTANT NOTE: Each of the following 'case S_MAGIC_...:'
|
||||
statements must be followed by a hexadecimal constant in
|
||||
a comment. The S_MAGIC_... name and constant are automatically
|
||||
combined to produce the #define directives in fs.h. */
|
||||
|
@ -178,13 +178,13 @@ enum output_type
|
||||
changed, all, recoverable /* Default, -a, -g. */
|
||||
};
|
||||
|
||||
/* Which member(s) of `struct termios' a mode uses. */
|
||||
/* Which member(s) of 'struct termios' a mode uses. */
|
||||
enum mode_type
|
||||
{
|
||||
control, input, output, local, combination
|
||||
};
|
||||
|
||||
/* Flags for `struct mode_info'. */
|
||||
/* Flags for 'struct mode_info'. */
|
||||
#define SANE_SET 1 /* Set in 'sane' mode. */
|
||||
#define SANE_UNSET 2 /* Unset in 'sane' mode. */
|
||||
#define REV 4 /* Can be turned off by prepending '-'. */
|
||||
@ -366,7 +366,7 @@ static struct mode_info const mode_info[] =
|
||||
struct control_info
|
||||
{
|
||||
const char *name; /* Name given on command line. */
|
||||
cc_t saneval; /* Value to set for `stty sane'. */
|
||||
cc_t saneval; /* Value to set for 'stty sane'. */
|
||||
size_t offset; /* Offset in c_cc. */
|
||||
};
|
||||
|
||||
|
10
src/system.h
10
src/system.h
@ -50,7 +50,7 @@ you must include <sys/types.h> before including this file
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
|
||||
/* Since major is a function on SVR4, we can't use `ifndef major'. */
|
||||
/* Since major is a function on SVR4, we can't use 'ifndef major'. */
|
||||
#if MAJOR_IN_MKDEV
|
||||
# include <sys/mkdev.h>
|
||||
# define HAVE_MAJOR
|
||||
@ -147,7 +147,7 @@ enum
|
||||
- It's typically faster.
|
||||
POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
|
||||
isdigit unless it's important to use the locale's definition
|
||||
of `digit' even when the host does not conform to POSIX. */
|
||||
of 'digit' even when the host does not conform to POSIX. */
|
||||
#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
|
||||
|
||||
/* Convert a possibly-signed character to an unsigned character. This is
|
||||
@ -236,7 +236,7 @@ uid_t getuid ();
|
||||
#include "verify.h"
|
||||
|
||||
/* This is simply a shorthand for the common case in which
|
||||
the third argument to x2nrealloc would be `sizeof *(P)'.
|
||||
the third argument to x2nrealloc would be 'sizeof *(P)'.
|
||||
Ensure that sizeof *(P) is *not* 1. In that case, it'd be
|
||||
better to use X2REALLOC, although not strictly necessary. */
|
||||
#define X2NREALLOC(P, PN) ((void) verify_true (sizeof *(P) != 1), \
|
||||
@ -267,7 +267,7 @@ dot_or_dotdot (char const *file_name)
|
||||
return false;
|
||||
}
|
||||
|
||||
/* A wrapper for readdir so that callers don't see entries for `.' or `..'. */
|
||||
/* A wrapper for readdir so that callers don't see entries for '.' or '..'. */
|
||||
static inline struct dirent const *
|
||||
readdir_ignoring_dot_and_dotdot (DIR *dirp)
|
||||
{
|
||||
@ -403,7 +403,7 @@ enum
|
||||
# define PID_T_MAX TYPE_MAXIMUM (pid_t)
|
||||
#endif
|
||||
|
||||
/* Use this to suppress gcc's `...may be used before initialized' warnings. */
|
||||
/* Use this to suppress gcc's '...may be used before initialized' warnings. */
|
||||
#ifdef lint
|
||||
# define IF_LINT(Code) Code
|
||||
#else
|
||||
|
@ -1688,7 +1688,7 @@ tail_lines (const char *pretty_filename, int fd, uintmax_t n_lines,
|
||||
{
|
||||
/* Under very unlikely circumstances, it is possible to reach
|
||||
this point after positioning the file pointer to end of file
|
||||
via the `lseek (...SEEK_END)' above. In that case, reposition
|
||||
via the 'lseek (...SEEK_END)' above. In that case, reposition
|
||||
the file pointer back to start_pos before calling pipe_lines. */
|
||||
if (start_pos != -1)
|
||||
xlseek (fd, start_pos, SEEK_SET, pretty_filename);
|
||||
@ -2110,8 +2110,8 @@ main (int argc, char **argv)
|
||||
parse_options (argc, argv, &n_units, &header_mode, &sleep_interval);
|
||||
|
||||
/* To start printing with item N_UNITS from the start of the file, skip
|
||||
N_UNITS - 1 items. `tail -n +0' is actually meaningless, but for Unix
|
||||
compatibility it's treated the same as `tail -n +1'. */
|
||||
N_UNITS - 1 items. 'tail -n +0' is actually meaningless, but for Unix
|
||||
compatibility it's treated the same as 'tail -n +1'. */
|
||||
if (from_start)
|
||||
{
|
||||
if (n_units)
|
||||
|
@ -139,7 +139,7 @@ touch (const char *file)
|
||||
default_permissions);
|
||||
|
||||
/* Don't save a copy of errno if it's EISDIR, since that would lead
|
||||
touch to give a bogus diagnostic for e.g., `touch /' (assuming
|
||||
touch to give a bogus diagnostic for e.g., 'touch /' (assuming
|
||||
we don't own / or have write access to it). On Solaris 5.6,
|
||||
and probably other systems, it is EINVAL. On SunOS4, it's EPERM. */
|
||||
if (fd == -1 && errno != EISDIR && errno != EINVAL && errno != EPERM)
|
||||
|
2
src/tr.c
2
src/tr.c
@ -1181,7 +1181,7 @@ card_of_complement (struct Spec_list *s)
|
||||
is problematic when they don't match in some locales.
|
||||
Also ensure the case conversion classes in string2 are
|
||||
aligned correctly with those in string1.
|
||||
Note POSIX says the behavior of `tr "[:upper:]" "[:upper:]"'
|
||||
Note POSIX says the behavior of 'tr "[:upper:]" "[:upper:]"'
|
||||
is undefined. Therefore we allow it (unlike Solaris)
|
||||
and treat it as a no-op. */
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* This is for the `uname' program. */
|
||||
/* This is for the 'uname' program. */
|
||||
#define UNAME_UNAME 1
|
||||
|
||||
/* This is for the `arch' program. */
|
||||
/* This is for the 'arch' program. */
|
||||
#define UNAME_ARCH 2
|
||||
|
||||
extern int uname_mode;
|
||||
|
2
src/wc.c
2
src/wc.c
@ -224,7 +224,7 @@ wc (int fd, char const *file_x, struct fstatus *fstatus)
|
||||
that wc reports is smaller than stats.st_size when the file is not
|
||||
positioned at its beginning. That's why the lseek calls below are
|
||||
necessary. For example the command
|
||||
`(dd ibs=99k skip=1 count=0; ./wc -c) < /etc/group'
|
||||
'(dd ibs=99k skip=1 count=0; ./wc -c) < /etc/group'
|
||||
should make wc report '0' bytes. */
|
||||
|
||||
if (count_bytes && !count_chars && !print_lines && !count_complicated)
|
||||
|
@ -103,7 +103,7 @@ static bool do_lookup;
|
||||
|
||||
/* If true, display only a list of usernames and count of
|
||||
the users logged on.
|
||||
Ignored for `who am i'. */
|
||||
Ignored for 'who am i'. */
|
||||
static bool short_list;
|
||||
|
||||
/* If true, display only name, line, and time fields. */
|
||||
|
@ -16,7 +16,7 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Equivalent to `id -un'. */
|
||||
/* Equivalent to 'id -un'. */
|
||||
/* Written by Richard Mlynarik. */
|
||||
|
||||
#include <config.h>
|
||||
|
Loading…
Reference in New Issue
Block a user