summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1993-08-05 02:20:48 +0000
committerJim Meyering <jim@meyering.net>1993-08-05 02:20:48 +0000
commit410da16d0250bcf31c51a160de9eccb92667c7fe (patch)
treefb530f65b6ee0bc13a6cc8c1e9f576d9d92d447f
parent08701d38a4c4e746e79132651c4577a6c03b02f6 (diff)
downloadcoreutils-410da16d0250bcf31c51a160de9eccb92667c7fe.tar.xz
merge with 3.8.1
-rw-r--r--lib/Makefile.in22
-rw-r--r--old/fileutils/ChangeLog30
-rw-r--r--src/chgrp.c12
-rw-r--r--src/chmod.c12
-rw-r--r--src/chown.c12
-rw-r--r--src/cp.c12
-rw-r--r--src/dd.c20
-rw-r--r--src/df.c12
-rw-r--r--src/du.c12
-rw-r--r--src/install.c12
-rw-r--r--src/ln.c12
-rw-r--r--src/ls.c28
-rw-r--r--src/mkdir.c21
-rw-r--r--src/mkfifo.c12
-rw-r--r--src/mknod.c12
-rw-r--r--src/mv.c12
-rw-r--r--src/rm.c12
-rw-r--r--src/rmdir.c17
-rw-r--r--src/touch.c12
19 files changed, 162 insertions, 132 deletions
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 3377776ed..834f23fde 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -1,6 +1,5 @@
# Makefile for library files used by GNU fileutils.
-# Do not use this makefile directly, but only from `../Makefile'.
-# Copyright (C) 1990, 1991, 1992 Free Software Foundation, Inc.
+# Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,21 +20,28 @@ SHELL = /bin/sh
srcdir = @srcdir@
VPATH = @srcdir@
-SOURCES = argmatch.c backupfile.c basename.c dirname.c eaccess.c \
+CC = @CC@
+AR = ar
+RANLIB = @RANLIB@
+DEFS = @DEFS@
+CFLAGS = -g
+
+SOURCES = getdate.y posixtm.y \
+argmatch.c backupfile.c basename.c dirname.c eaccess.c \
error.c filemode.c fsusage.c getopt.c getopt1.c \
getversion.c idcache.c isdir.c makepath.c \
modechange.c mountlist.c savedir.c \
stripslash.c xgetcwd.c xmalloc.c xstrdup.c userspec.c yesno.c \
-getdate.y posixtm.y \
fileblocks.c fnmatch.c ftruncate.c mkdir.c mktime.c rename.c stpcpy.c \
strdup.c strstr.c alloca.c
-OBJECTS = argmatch.o backupfile.o basename.o dirname.o eaccess.o \
+OBJECTS = getdate.o posixtm.o \
+argmatch.o backupfile.o basename.o dirname.o eaccess.o \
error.o filemode.o getopt.o getopt1.o \
getversion.o idcache.o isdir.o makepath.o \
modechange.o savedir.o \
stripslash.o xgetcwd.o xmalloc.o xstrdup.o userspec.o yesno.o \
-getdate.o posixtm.o @LIBOBJS@ @ALLOCA@
+@LIBOBJS@ @ALLOCA@
DISTFILES = Makefile.in backupfile.h getopt.h modechange.h \
fnmatch.h fsusage.h mountlist.h pathmax.h system.h $(SOURCES)
@@ -43,7 +49,7 @@ fnmatch.h fsusage.h mountlist.h pathmax.h system.h $(SOURCES)
all: libfu.a
.c.o:
- $(CC) -c $(DEFS) -I$(srcdir) $(CPPFLAGS) $(CFLAGS) $<
+ $(CC) -c $(CPPFLAGS) $(DEFS) -I$(srcdir) $(CFLAGS) $<
install: all
@@ -52,6 +58,8 @@ uninstall:
TAGS: $(SOURCES)
etags $(SOURCES)
+check:
+
clean:
rm -f *.a *.o
diff --git a/old/fileutils/ChangeLog b/old/fileutils/ChangeLog
index e8b4215cd..5583c9b2c 100644
--- a/old/fileutils/ChangeLog
+++ b/old/fileutils/ChangeLog
@@ -1,3 +1,31 @@
+Wed Aug 4 17:43:18 1993 Jim Meyering (meyering@comco.com)
+
+ * ls.c (get_link_name): Don't ever use the stat field st_size as a
+ buffer size. Too many systems don't set it properly for mount points.
+ Instead, use a fixed-length buffer. From Michael Joosten
+ <joost@ori.CAdlab.DE>.
+
+Mon Jul 19 17:39:01 1993 Jim Meyering (meyering@comco.com)
+
+ * backupfile.c (concat): Temporary STR1_LENGTH should have type `int'
+ instead of `char.'
+
+Fri Jul 16 22:00:16 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu)
+
+ * dd.c (print_stats): Change message from "truncated blocks"
+ to "truncated records" for final POSIX.2 spec.
+
+Fri Jun 25 17:18:15 1993 Jim Meyering (meyering@comco.com)
+
+ * mkdir.c, rmdir.c: Change --path long option to --parents to avoid
+ confusion with search-path semantics of --path as an option to other
+ programs. --path will still work, but is no longer documented.
+
+Tue Jun 8 00:46:26 1993 Jim Meyering (meyering@comco.com)
+
+ * dd.c (parse_integer): Also accept `c' multiplier for consistency
+ with find's -size option.
+
Thu May 27 00:03:51 1993 Jim Meyering (meyering@comco.com)
* Version 3.8.
@@ -15,7 +43,7 @@ Wed May 26 00:57:46 1993 Jim Meyering (meyering@comco.com)
the executable built from ls.o should act like ls, dir, or vdir.
* ls.c (decode_switches): Use the variable instead of #ifdefs.
This is modelled after the approach used in GNU binutils 2.x for
- ar and ranlib. Here we avoid two rudundant compilations.
+ ar and ranlib. Here we avoid two redundant compilations.
* install.c (change_attributes, copy_file, install_file_in_file):
Don't call chown if we can efficiently determine that doing so is
diff --git a/src/chgrp.c b/src/chgrp.c
index 65a0d4107..f9118cdbd 100644
--- a/src/chgrp.c
+++ b/src/chgrp.c
@@ -73,10 +73,10 @@ static int changes_only;
static char *groupname;
/* If non-zero, display usage information and exit. */
-static int flag_help;
+static int show_help;
/* If non-zero, print the version on standard error. */
-static int flag_version;
+static int show_version;
static struct option const long_options[] =
{
@@ -85,8 +85,8 @@ static struct option const long_options[] =
{"silent", no_argument, 0, 'f'},
{"quiet", no_argument, 0, 'f'},
{"verbose", no_argument, 0, 'v'},
- {"help", no_argument, &flag_help, 1},
- {"version", no_argument, &flag_version, 1},
+ {"help", no_argument, &show_help, 1},
+ {"version", no_argument, &show_version, 1},
{0, 0, 0, 0}
};
@@ -127,13 +127,13 @@ main (argc, argv)
}
}
- if (flag_version)
+ if (show_version)
{
fprintf (stderr, "%s\n", version_string);
exit (0);
}
- if (flag_help)
+ if (show_help)
usage ();
if (optind >= argc - 1)
diff --git a/src/chmod.c b/src/chmod.c
index 870f9f100..19c8cd8cd 100644
--- a/src/chmod.c
+++ b/src/chmod.c
@@ -59,10 +59,10 @@ static int verbose;
static int changes_only;
/* If non-zero, display usage information and exit. */
-static int flag_help;
+static int show_help;
/* If non-zero, print the version on standard error. */
-static int flag_version;
+static int show_version;
static struct option const long_options[] =
{
@@ -71,8 +71,8 @@ static struct option const long_options[] =
{"silent", no_argument, 0, 'f'},
{"quiet", no_argument, 0, 'f'},
{"verbose", no_argument, 0, 'v'},
- {"help", no_argument, &flag_help, 1},
- {"version", no_argument, &flag_version, 1},
+ {"help", no_argument, &show_help, 1},
+ {"version", no_argument, &show_version, 1},
{0, 0, 0, 0}
};
@@ -142,13 +142,13 @@ main (argc, argv)
}
}
- if (flag_version)
+ if (show_version)
{
fprintf (stderr, "%s\n", version_string);
exit (0);
}
- if (flag_help)
+ if (show_help)
usage ();
if (modeind == 0)
diff --git a/src/chown.c b/src/chown.c
index 7a2f4989f..37346aec9 100644
--- a/src/chown.c
+++ b/src/chown.c
@@ -83,10 +83,10 @@ static char *username;
static char *groupname;
/* If non-zero, display usage information and exit. */
-static int flag_help;
+static int show_help;
/* If non-zero, print the version on standard error. */
-static int flag_version;
+static int show_version;
static struct option const long_options[] =
{
@@ -95,8 +95,8 @@ static struct option const long_options[] =
{"silent", no_argument, 0, 'f'},
{"quiet", no_argument, 0, 'f'},
{"verbose", no_argument, 0, 'v'},
- {"help", no_argument, &flag_help, 1},
- {"version", no_argument, &flag_version, 1},
+ {"help", no_argument, &show_help, 1},
+ {"version", no_argument, &show_version, 1},
{0, 0, 0, 0}
};
@@ -139,13 +139,13 @@ main (argc, argv)
}
}
- if (flag_version)
+ if (show_version)
{
fprintf (stderr, "%s\n", version_string);
exit (0);
}
- if (flag_help)
+ if (show_help)
usage ();
if (optind >= argc - 1)
diff --git a/src/cp.c b/src/cp.c
index 8c2ba1ad3..c782d611d 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -119,10 +119,10 @@ static int umask_kill;
static uid_t myeuid;
/* If non-zero, display usage information and exit. */
-static int flag_help;
+static int show_help;
/* If non-zero, print the version on standard error. */
-static int flag_version;
+static int show_version;
static struct option const long_opts[] =
{
@@ -141,8 +141,8 @@ static struct option const long_opts[] =
{"update", no_argument, &flag_update, 1},
{"verbose", no_argument, &flag_verbose, 1},
{"version-control", required_argument, NULL, 'V'},
- {"help", no_argument, &flag_help, 1},
- {"version", no_argument, &flag_version, 1},
+ {"help", no_argument, &show_help, 1},
+ {"version", no_argument, &show_version, 1},
{NULL, 0, NULL, 0}
};
@@ -258,13 +258,13 @@ main (argc, argv)
}
}
- if (flag_version)
+ if (show_version)
{
fprintf (stderr, "%s\n", version_string);
exit (0);
}
- if (flag_help)
+ if (show_help)
usage (NULL);
if (flag_hard_link && flag_symbolic_link)
diff --git a/src/dd.c b/src/dd.c
index 323d72b67..172e66561 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -20,7 +20,7 @@
/* Options:
Numbers can be followed by a multiplier:
- b=512, k=1024, w=2, xm=number m
+ b=512, c=1, k=1024, w=2, xm=number m
if=FILE Read from FILE instead of stdin.
of=FILE Write to FILE instead of stdout; don't
@@ -309,15 +309,15 @@ static unsigned char const ebcdic_to_ascii[] =
};
/* If non-zero, display usage information and exit. */
-static int flag_help;
+static int show_help;
/* If non-zero, print the version on standard error. */
-static int flag_version;
+static int show_version;
static struct option const long_options[] =
{
- {"help", no_argument, &flag_help, 1},
- {"version", no_argument, &flag_version, 1},
+ {"help", no_argument, &show_help, 1},
+ {"version", no_argument, &show_version, 1},
{0, 0, 0, 0}
};
@@ -340,13 +340,13 @@ main (argc, argv)
/* Decode arguments. */
scanargs (argc, argv);
- if (flag_version)
+ if (show_version)
{
fprintf (stderr, "%s\n", version_string);
exit (0);
}
- if (flag_help)
+ if (show_help)
usage ();
apply_translations ();
@@ -905,6 +905,8 @@ loop:
case 'b':
n *= 512;
goto loop;
+ case 'c':
+ goto loop;
case 'k':
n *= 1024;
goto loop;
@@ -1032,7 +1034,7 @@ print_stats ()
fprintf (stderr, "%u+%u records in\n", r_full, r_partial);
fprintf (stderr, "%u+%u records out\n", w_full, w_partial);
if (r_truncate > 0)
- fprintf (stderr, "%u truncated block%s\n", r_truncate,
+ fprintf (stderr, "%u truncated record%s\n", r_truncate,
r_truncate == 1 ? "" : "s");
}
@@ -1064,7 +1066,7 @@ Usage: %s [if=file] [of=file] [ibs=bytes] [obs=bytes] [bs=bytes] [cbs=bytes]\n\
[conv={ascii,ebcdic,ibm,block,unblock,lcase,ucase,swab,noerror,notrunc,\n\
sync}] [--help] [--version]\n\
Numbers can be followed by a multiplier:\n\
-b=512, k=1024, w=2, xm=number m\n",
+b=512, c=1, k=1024, w=2, xm=number m\n",
program_name);
exit (1);
}
diff --git a/src/df.c b/src/df.c
index fc3022670..f3bea7152 100644
--- a/src/df.c
+++ b/src/df.c
@@ -110,10 +110,10 @@ static struct fs_type_list *fs_exclude_list;
static struct mount_entry *mount_list;
/* If non-zero, display usage information and exit. */
-static int flag_help;
+static int show_help;
/* If non-zero, print the version on standard error. */
-static int flag_version;
+static int show_version;
static struct option const long_options[] =
{
@@ -123,8 +123,8 @@ static struct option const long_options[] =
{"portability", no_argument, &posix_format, 1},
{"type", required_argument, 0, 't'},
{"exclude-type", required_argument, 0, 'x'},
- {"help", no_argument, &flag_help, 1},
- {"version", no_argument, &flag_version, 1},
+ {"help", no_argument, &show_help, 1},
+ {"version", no_argument, &show_version, 1},
{NULL, 0, NULL, 0}
};
@@ -178,13 +178,13 @@ main (argc, argv)
}
}
- if (flag_version)
+ if (show_version)
{
fprintf (stderr, "%s\n", version_string);
exit (0);
}
- if (flag_help)
+ if (show_help)
usage ();
if (optind != argc)
diff --git a/src/du.c b/src/du.c
index 2aaf5130f..4eb59c120 100644
--- a/src/du.c
+++ b/src/du.c
@@ -156,10 +156,10 @@ static int (*xstat) ();
static int exit_status;
/* If non-zero, display usage information and exit. */
-static int flag_help;
+static int show_help;
/* If non-zero, print the version on standard error. */
-static int flag_version;
+static int show_version;
static struct option const long_options[] =
{
@@ -173,8 +173,8 @@ static struct option const long_options[] =
{"separate-dirs", no_argument, &opt_separate_dirs, 1},
{"summarize", no_argument, &opt_summarize_only, 1},
{"total", no_argument, &opt_combined_arguments, 1},
- {"help", no_argument, &flag_help, 1},
- {"version", no_argument, &flag_version, 1},
+ {"help", no_argument, &show_help, 1},
+ {"version", no_argument, &show_version, 1},
{NULL, 0, NULL, 0}
};
@@ -258,13 +258,13 @@ main (argc, argv)
}
}
- if (flag_version)
+ if (show_version)
{
fprintf (stderr, "%s\n", version_string);
exit (0);
}
- if (flag_help)
+ if (show_help)
usage (NULL);
if (opt_all && opt_summarize_only)
diff --git a/src/install.c b/src/install.c
index c4593602b..9d579c22d 100644
--- a/src/install.c
+++ b/src/install.c
@@ -133,10 +133,10 @@ static int strip_files;
static int dir_arg;
/* If non-zero, display usage information and exit. */
-static int flag_help;
+static int show_help;
/* If non-zero, print the version on standard error. */
-static int flag_version;
+static int show_version;
static struct option const long_options[] =
{
@@ -145,8 +145,8 @@ static struct option const long_options[] =
{"group", required_argument, NULL, 'g'},
{"mode", required_argument, NULL, 'm'},
{"owner", required_argument, NULL, 'o'},
- {"help", no_argument, &flag_help, 1},
- {"version", no_argument, &flag_version, 1},
+ {"help", no_argument, &show_help, 1},
+ {"version", no_argument, &show_version, 1},
{NULL, 0, NULL, 0}
};
@@ -196,13 +196,13 @@ main (argc, argv)
}
}
- if (flag_version)
+ if (show_version)
{
fprintf (stderr, "%s\n", version_string);
exit (0);
}
- if (flag_help)
+ if (show_help)
usage ();
/* Check for invalid combinations of arguments. */
diff --git a/src/ln.c b/src/ln.c
index 6981e22ed..95938f533 100644
--- a/src/ln.c
+++ b/src/ln.c
@@ -66,10 +66,10 @@ static int verbose;
static int hard_dir_link;
/* If non-zero, display usage information and exit. */
-static int flag_help;
+static int show_help;
/* If non-zero, print the version on standard error. */
-static int flag_version;
+static int show_version;
static struct option const long_options[] =
{
@@ -81,8 +81,8 @@ static struct option const long_options[] =
{"symbolic", no_argument, &symbolic_link, 1},
{"verbose", no_argument, &verbose, 1},
{"version-control", required_argument, NULL, 'V'},
- {"help", no_argument, &flag_help, 1},
- {"version", no_argument, &flag_version, 1},
+ {"help", no_argument, &show_help, 1},
+ {"version", no_argument, &show_version, 1},
{NULL, 0, NULL, 0}
};
@@ -150,13 +150,13 @@ main (argc, argv)
}
}
- if (flag_version)
+ if (show_version)
{
fprintf (stderr, "%s\n", version_string);
exit (0);
}
- if (flag_help)
+ if (show_help)
usage ();
if (optind == argc)
diff --git a/src/ls.c b/src/ls.c
index e659260e3..adaab8aef 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -359,10 +359,10 @@ static int format_needs_stat;
static int exit_status;
/* If non-zero, display usage information and exit. */
-static int flag_help;
+static int show_help;
/* If non-zero, print the version on standard error. */
-static int flag_version;
+static int show_version;
static struct option const long_options[] =
{
@@ -391,8 +391,8 @@ static struct option const long_options[] =
{"sort", required_argument, 0, 10},
{"tabsize", required_argument, 0, 'T'},
{"time", required_argument, 0, 11},
- {"help", no_argument, &flag_help, 1},
- {"version", no_argument, &flag_version, 1},
+ {"help", no_argument, &show_help, 1},
+ {"version", no_argument, &show_version, 1},
{0, 0, 0, 0}
};
@@ -446,13 +446,13 @@ main (argc, argv)
program_name = argv[0];
i = decode_switches (argc, argv);
- if (flag_version)
+ if (show_version)
{
fprintf (stderr, "%s\n", version_string);
exit (0);
}
- if (flag_help)
+ if (show_help)
usage ();
format_needs_stat = sort_type == sort_time || sort_type == sort_size
@@ -1076,31 +1076,21 @@ get_link_name (filename, f)
char *filename;
struct file *f;
{
- register char *linkbuf;
-#ifdef _AIX
- register int bufsiz = PATH_MAX; /* st_size is wrong. */
-#else
- register int bufsiz = f->stat.st_size;
-#endif
+ char linkbuf[PATH_MAX + 1];
register int linksize;
- linkbuf = (char *) xmalloc (bufsiz + 1);
/* Some automounters give incorrect st_size for mount points.
I can't think of a good workaround for it, though. */
- linksize = readlink (filename, linkbuf, bufsiz);
+ linksize = readlink (filename, linkbuf, sizeof (linkbuf));
if (linksize < 0)
{
error (0, errno, "%s", filename);
exit_status = 1;
- free (linkbuf);
}
else
{
-#ifdef _AIX
- linkbuf = (char *) xrealloc (linkbuf, linksize + 1);
-#endif
linkbuf[linksize] = '\0';
- f->linkname = linkbuf;
+ f->linkname = xstrdup (linkbuf);
}
}
diff --git a/src/mkdir.c b/src/mkdir.c
index 360396b8d..f03f91f36 100644
--- a/src/mkdir.c
+++ b/src/mkdir.c
@@ -16,7 +16,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Options:
- -p, --path Ensure that the given path(s) exist:
+ -p, --parent Ensure that the given path(s) exist:
Make any missing parent directories for each argument.
Parent dirs default to umask modified by `u+wx'.
Do not consider an argument directory that already
@@ -42,21 +42,22 @@ static void usage ();
/* The name this program was run with. */
char *program_name;
-/* If nonzero, ensure that a path exists. */
+/* If nonzero, ensure that all parents of the specified directory exist. */
static int path_mode;
/* If non-zero, display usage information and exit. */
-static int flag_help;
+static int show_help;
/* If non-zero, print the version on standard error. */
-static int flag_version;
+static int show_version;
static struct option const longopts[] =
{
{"mode", required_argument, NULL, 'm'},
{"path", no_argument, &path_mode, 1},
- {"help", no_argument, &flag_help, 1},
- {"version", no_argument, &flag_version, 1},
+ {"parents", no_argument, &path_mode, 1},
+ {"help", no_argument, &show_help, 1},
+ {"version", no_argument, &show_version, 1},
{NULL, 0, NULL, 0}
};
@@ -91,13 +92,13 @@ main (argc, argv)
}
}
- if (flag_version)
+ if (show_version)
{
fprintf (stderr, "%s\n", version_string);
exit (0);
}
- if (flag_help)
+ if (show_help)
usage ();
if (optind == argc)
@@ -133,8 +134,8 @@ static void
usage ()
{
fprintf (stderr, "\
-Usage: %s [-p] [-m mode] [--path] [--mode=mode] [--help] [--version] dir...\n",
- program_name);
+Usage: %s [-p] [-m mode] [--parents] [--mode=mode]\n\
+ [--help] [--version] dir...\n", program_name);
exit (1);
}
diff --git a/src/mkfifo.c b/src/mkfifo.c
index 1a0e27e03..ce8a7924c 100644
--- a/src/mkfifo.c
+++ b/src/mkfifo.c
@@ -37,16 +37,16 @@ static void usage ();
char *program_name;
/* If non-zero, display usage information and exit. */
-static int flag_help;
+static int show_help;
/* If non-zero, print the version on standard error. */
-static int flag_version;
+static int show_version;
static struct option const longopts[] =
{
{"mode", required_argument, NULL, 'm'},
- {"help", no_argument, &flag_help, 1},
- {"version", no_argument, &flag_version, 1},
+ {"help", no_argument, &show_help, 1},
+ {"version", no_argument, &show_version, 1},
{NULL, 0, NULL, 0}
};
@@ -81,13 +81,13 @@ main (argc, argv)
}
}
- if (flag_version)
+ if (show_version)
{
fprintf (stderr, "%s\n", version_string);
exit (0);
}
- if (flag_help)
+ if (show_help)
usage ();
if (optind == argc)
diff --git a/src/mknod.c b/src/mknod.c
index 24930c1d3..e4e3ad2f7 100644
--- a/src/mknod.c
+++ b/src/mknod.c
@@ -42,16 +42,16 @@ static void usage ();
char *program_name;
/* If non-zero, display usage information and exit. */
-static int flag_help;
+static int show_help;
/* If non-zero, print the version on standard error. */
-static int flag_version;
+static int show_version;
static struct option const longopts[] =
{
{"mode", required_argument, NULL, 'm'},
- {"help", no_argument, &flag_help, 1},
- {"version", no_argument, &flag_version, 1},
+ {"help", no_argument, &show_help, 1},
+ {"version", no_argument, &show_version, 1},
{NULL, 0, NULL, 0}
};
@@ -82,13 +82,13 @@ main (argc, argv)
}
}
- if (flag_version)
+ if (show_version)
{
fprintf (stderr, "%s\n", version_string);
exit (0);
}
- if (flag_help)
+ if (show_help)
usage ();
newmode = 0666 & ~umask (0);
diff --git a/src/mv.c b/src/mv.c
index 481c9534b..5b6929100 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -88,10 +88,10 @@ static int stdin_tty;
static uid_t myeuid;
/* If non-zero, display usage information and exit. */
-static int flag_help;
+static int show_help;
/* If non-zero, print the version on standard error. */
-static int flag_version;
+static int show_version;
static struct option const long_options[] =
{
@@ -102,8 +102,8 @@ static struct option const long_options[] =
{"update", no_argument, &update, 1},
{"verbose", no_argument, &verbose, 1},
{"version-control", required_argument, NULL, 'V'},
- {"help", no_argument, &flag_help, 1},
- {"version", no_argument, &flag_version, 1},
+ {"help", no_argument, &show_help, 1},
+ {"version", no_argument, &show_version, 1},
{NULL, 0, NULL, 0}
};
@@ -161,13 +161,13 @@ main (argc, argv)
}
}
- if (flag_version)
+ if (show_version)
{
fprintf (stderr, "%s\n", version_string);
exit (0);
}
- if (flag_help)
+ if (show_help)
usage ();
if (argc < optind + 2)
diff --git a/src/rm.c b/src/rm.c
index 8d36853a8..607b23f64 100644
--- a/src/rm.c
+++ b/src/rm.c
@@ -78,10 +78,10 @@ static int unlink_dirs;
static int stdin_tty;
/* If non-zero, display usage information and exit. */
-static int flag_help;
+static int show_help;
/* If non-zero, print the version on standard error. */
-static int flag_version;
+static int show_version;
static struct option const long_opts[] =
{
@@ -90,8 +90,8 @@ static struct option const long_opts[] =
{"interactive", no_argument, NULL, 'i'},
{"recursive", no_argument, &recursive, 1},
{"verbose", no_argument, &verbose, 1},
- {"help", no_argument, &flag_help, 1},
- {"version", no_argument, &flag_version, 1},
+ {"help", no_argument, &show_help, 1},
+ {"version", no_argument, &show_version, 1},
{NULL, 0, NULL, 0}
};
@@ -138,13 +138,13 @@ main (argc, argv)
}
}
- if (flag_version)
+ if (show_version)
{
fprintf (stderr, "%s\n", version_string);
exit (0);
}
- if (flag_help)
+ if (show_help)
usage ();
if (optind == argc)
diff --git a/src/rmdir.c b/src/rmdir.c
index 7302f25d4..6c1341ec2 100644
--- a/src/rmdir.c
+++ b/src/rmdir.c
@@ -16,7 +16,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Options:
- -p, --path Remove any parent dirs that are explicitly mentioned
+ -p, --parent Remove any parent dirs that are explicitly mentioned
in an argument, if they become empty after the
argument file is removed.
@@ -41,16 +41,17 @@ char *program_name;
static int empty_paths;
/* If non-zero, display usage information and exit. */
-static int flag_help;
+static int show_help;
/* If non-zero, print the version on standard error. */
-static int flag_version;
+static int show_version;
static struct option const longopts[] =
{
{"path", no_argument, &empty_paths, 1},
- {"help", no_argument, &flag_help, 1},
- {"version", no_argument, &flag_version, 1},
+ {"parents", no_argument, &empty_paths, 1},
+ {"help", no_argument, &show_help, 1},
+ {"version", no_argument, &show_version, 1},
{NULL, 0, NULL, 0}
};
@@ -79,13 +80,13 @@ main (argc, argv)
}
}
- if (flag_version)
+ if (show_version)
{
fprintf (stderr, "%s\n", version_string);
exit (0);
}
- if (flag_help)
+ if (show_help)
usage ();
if (optind == argc)
@@ -134,7 +135,7 @@ remove_parents (path)
static void
usage ()
{
- fprintf (stderr, "Usage: %s [-p] [--path] [--help] [--version] dir...\n",
+ fprintf (stderr, "Usage: %s [-p] [--parents] [--help] [--version] dir...\n",
program_name);
exit (1);
}
diff --git a/src/touch.c b/src/touch.c
index 583359162..ae5b82c12 100644
--- a/src/touch.c
+++ b/src/touch.c
@@ -93,10 +93,10 @@ static char *ref_file;
static struct stat ref_stats;
/* If non-zero, display usage information and exit. */
-static int flag_help;
+static int show_help;
/* If non-zero, print the version on standard error. */
-static int flag_version;
+static int show_version;
static struct option const longopts[] =
{
@@ -104,8 +104,8 @@ static struct option const longopts[] =
{"no-create", no_argument, 0, 'c'},
{"date", required_argument, 0, 'd'},
{"file", required_argument, 0, 'r'},
- {"help", no_argument, &flag_help, 1},
- {"version", no_argument, &flag_version, 1},
+ {"help", no_argument, &show_help, 1},
+ {"version", no_argument, &show_version, 1},
{0, 0, 0, 0}
};
@@ -193,13 +193,13 @@ main (argc, argv)
}
}
- if (flag_version)
+ if (show_version)
{
fprintf (stderr, "%s\n", version_string);
exit (0);
}
- if (flag_help)
+ if (show_help)
usage ();
if (change_times == 0)