summaryrefslogtreecommitdiff
path: root/src/chown.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-11-09 17:02:23 +0000
committerJim Meyering <jim@meyering.net>1995-11-09 17:02:23 +0000
commitc0d94c89eca0f838ee5683726780110c2abcc14e (patch)
tree2c8dd672bd25296ff294a3d46fc91227d026c9cc /src/chown.c
parentdd3a08897371348fbcac1a951250273e28c4e26c (diff)
downloadcoreutils-c0d94c89eca0f838ee5683726780110c2abcc14e.tar.xz
Protoize.
Diffstat (limited to 'src/chown.c')
-rw-r--r--src/chown.c30
1 files changed, 9 insertions, 21 deletions
diff --git a/src/chown.c b/src/chown.c
index 0d2ddd9aa..536b6ed57 100644
--- a/src/chown.c
+++ b/src/chown.c
@@ -55,10 +55,10 @@ void strip_trailing_slashes ();
char *xmalloc ();
char *xrealloc ();
-static int change_file_owner ();
-static int change_dir_owner ();
-static void describe_change ();
-static void usage ();
+static int change_file_owner (char *file, uid_t user, gid_t group);
+static int change_dir_owner (char *dir, uid_t user, gid_t group, struct stat *statp);
+static void describe_change (char *file, int changed);
+static void usage (int status);
/* The name the program was run with. */
char *program_name;
@@ -100,9 +100,7 @@ static struct option const long_options[] =
};
void
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
uid_t user = (uid_t) -1; /* New uid; -1 if not to be changed. */
gid_t group = (uid_t) -1; /* New gid; -1 if not to be changed. */
@@ -173,10 +171,7 @@ main (argc, argv)
Return 0 if successful, 1 if errors occurred. */
static int
-change_file_owner (file, user, group)
- char *file;
- uid_t user;
- gid_t group;
+change_file_owner (char *file, uid_t user, gid_t group)
{
struct stat file_stats;
uid_t newuser;
@@ -217,11 +212,7 @@ change_file_owner (file, user, group)
Return 0 if successful, 1 if errors occurred. */
static int
-change_dir_owner (dir, user, group, statp)
- char *dir;
- uid_t user;
- gid_t group;
- struct stat *statp;
+change_dir_owner (char *dir, uid_t user, gid_t group, struct stat *statp)
{
char *name_space, *namep;
char *path; /* Full path of each entry to process. */
@@ -271,9 +262,7 @@ change_dir_owner (dir, user, group, statp)
has been given; if CHANGED is zero, FILE had those owners already. */
static void
-describe_change (file, changed)
- char *file;
- int changed;
+describe_change (char *file, int changed)
{
if (changed)
printf ("owner of %s changed to ", file);
@@ -286,8 +275,7 @@ describe_change (file, changed)
}
static void
-usage (status)
- int status;
+usage (int status)
{
if (status != 0)
fprintf (stderr, "Try `%s --help' for more information.\n",