RC_error
};
-extern void
+void
chopt_init (struct Chown_option *chopt)
{
chopt->verbosity = V_off;
chopt->group_name = nullptr;
}
-extern void
+void
chopt_free (struct Chown_option *chopt)
{
free (chopt->user_name);
and return it. If there's no corresponding group name, use the decimal
representation of the ID. */
-extern char *
+char *
gid_to_name (gid_t gid)
{
struct group *grp = getgrgid (gid);
and return it. If there's no corresponding user name, use the decimal
representation of the ID. */
-extern char *
+char *
uid_to_name (uid_t uid)
{
struct passwd *pwd = getpwuid (uid);
If REQUIRED_UID and/or REQUIRED_GID is not -1, then change only
files with user ID and group ID that match the non-(-1) value(s).
Return true if successful. */
-extern bool
+bool
chown_files (char **files, int bit_flags,
uid_t uid, gid_t gid,
uid_t required_uid, gid_t required_gid,
/* Initialize the hash table implementing a set of F_triple entries
corresponding to destination files. */
-extern void
+void
dest_info_init (struct cp_options *x)
{
x->dest_info
/* Initialize the hash table implementing a set of F_triple entries
corresponding to source files listed on the command line. */
-extern void
+void
src_info_init (struct cp_options *x)
{
the source was simply renamed to the destination.
Return true if successful. */
-extern bool
+bool
copy (char const *src_name, char const *dst_name,
int dst_dirfd, char const *dst_relname,
int nonexistent_dst, const struct cp_options *options,
/* Set *X to the default options for a value of type struct cp_options. */
-extern void
+void
cp_options_default (struct cp_options *x)
{
memset (x, 0, sizeof *x);
the error number that chown failed with and X is the copying
option set. */
-extern bool
+bool
chown_failure_ok (struct cp_options const *x)
{
/* If non-root uses -p, it's ok if we can't preserve ownership.
some operating systems (e.g., GNU/Linux's "POSIX" ACLs) use that
ACL's mask rather than the process umask. Currently, the callers
of cached_umask incorrectly assume that this situation cannot occur. */
-extern mode_t
+mode_t
cached_umask (void)
{
static mode_t mask = (mode_t) -1;
/* Remove the entry matching INO/DEV from the table
that maps source ino/dev to destination file name. */
-extern void
+void
forget_created (ino_t ino, dev_t dev)
{
struct Src_to_dest probe;
/* If INO/DEV correspond to an already-copied source file, return the
name of the corresponding destination file. Otherwise, return nullptr. */
-extern char *
+char *
src_to_dest_lookup (ino_t ino, dev_t dev)
{
struct Src_to_dest ent;
to the list of files we have copied.
Return nullptr if inserted, otherwise a non-null pointer. */
-extern char *
+char *
remember_copied (char const *name, ino_t ino, dev_t dev)
{
struct Src_to_dest *ent;
}
/* Initialize the hash table. */
-extern void
+void
hash_init (void)
{
src_to_dest = hash_initialize (INITIAL_TABLE_SIZE, nullptr,
exit (EXIT_FAILURE);
}
-extern void
+void
xalloc_die (void)
{
error (0, 0, "%s", _("memory exhausted"));
/* Add tab stop TABVAL to the end of 'tab_list'. */
-extern void
+void
add_tab_stop (colno tabval)
{
colno prev_column = first_free_tab ? tab_list[first_free_tab - 1] : 0;
/* Add the comma or blank separated list of tab stops STOPS
to the list of tab stops. */
-extern void
+void
parse_tab_stops (char const *stops)
{
bool have_tabval = false;
tab-stops = N (if value N specified as the only value).
tab-stops = distinct values given on command line (if multiple values given).
*/
-extern void
+void
finalize_tab_stops (void)
{
validate_tab_stops (tab_list, first_free_tab);
amny multiple tab-sizes. Set *LAST_TAB depending on whether we are
returning COLUMN + 1 merely because we're past the last tab.
If the number would overflow, diagnose this and exit. */
-extern colno
+colno
get_next_tab_column (colno column, idx_t *tab_index, bool *last_tab)
{
*last_tab = false;
/* Sets new file-list */
-extern void
+void
set_file_list (char **list)
{
have_read_stdin = false;
Open a filename of '-' as the standard input.
Return nullptr if there are no more input files. */
-extern FILE *
+FILE *
next_file (FILE *fp)
{
static char *prev_file;
}
/* */
-extern void
+void
cleanup_file_list_stdin (void)
{
if (have_read_stdin && fclose (stdin) != 0)
}
-extern void
+void
emit_tab_list_info (void)
{
/* suppress syntax check for emit_mandatory_arg_note() */
malloced storage. FILE_STAT should be the result of stating FILE.
Give a diagnostic and return nullptr if unable to determine the mount point.
Exit if unable to restore current working directory. */
-extern char *
+char *
find_mount_point (char const *file, struct stat const *file_stat)
{
struct saved_cwd cwd;
-1 if successful and DSTNAME already existed,
0 if successful and DSTNAME did not already exist, and
a positive errno value on failure. */
-extern int
+int
force_linkat (int srcdir, char const *srcname,
int dstdir, char const *dstname, int flags, bool force,
int linkat_errno)
-1 if successful and DSTNAME already existed,
0 if successful and DSTNAME did not already exist, and
a positive errno value on failure. */
-extern int
+int
force_symlinkat (char const *srcname, int dstdir, char const *dstname,
bool force, int symlinkat_errno)
{
/* Print all of the distinct groups the user is in. */
-extern bool
+bool
print_group_list (char const *username,
uid_t ruid, gid_t rgid, gid_t egid,
bool use_names, char delim)
}
/* Print the name or value of group ID GID. */
-extern bool
+bool
print_group (gid_t gid, bool use_name)
{
struct group *grp = nullptr;
return IOPOLL_ERROR;
}
-extern int
+int
iopoll (int fdin, int fdout, bool block)
{
return iopoll_internal (fdin, fdout, block, true);
An fd is not relevant for iopoll() if it is always ready for reading,
which is the case for a regular file or block device. */
-extern bool
+bool
iopoll_input_ok (int fdin)
{
struct stat st;
/* Return true if fdout is suitable for iopoll().
Namely, fdout refers to a pipe. */
-extern bool
+bool
iopoll_output_ok (int fdout)
{
return isapipe (fdout) > 0;
/* wrapper for fclose() that also waits for F if non blocking. */
-extern bool
+bool
fclose_wait (FILE *f)
{
for (;;)
/* wrapper for fwrite() that also waits for F if non blocking. */
-extern bool
+bool
fwrite_wait (char const *buf, ssize_t size, FILE *f)
{
for (;;)
#include "sig2str.h"
#include "operand2sig.h"
-extern int
+int
operand2sig (char const *operand)
{
int signum;
If unsuccessful and ON_ERROR_PRINT_UNFORMATTED, also prints WHEN.TV_SEC
to STDOUT. */
-extern bool
+bool
show_date (char const *format, struct timespec when, timezone_t tz)
{
struct tm tm;
#include <x86intrin.h>
/* Read FD and return a summary. */
-extern struct wc_lines
+struct wc_lines
wc_lines_avx2 (int fd)
{
intmax_t lines = 0;