]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
merge with 3.8.1
authorJim Meyering <jim@meyering.net>
Thu, 5 Aug 1993 02:20:48 +0000 (02:20 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 5 Aug 1993 02:20:48 +0000 (02:20 +0000)
19 files changed:
lib/Makefile.in
old/fileutils/ChangeLog
src/chgrp.c
src/chmod.c
src/chown.c
src/cp.c
src/dd.c
src/df.c
src/du.c
src/install.c
src/ln.c
src/ls.c
src/mkdir.c
src/mkfifo.c
src/mknod.c
src/mv.c
src/rm.c
src/rmdir.c
src/touch.c

index 3377776edcd3020ff3f8d03bcd0ce837d7387e6e..834f23fde20966d957117ff16ddf289453a1d67f 100644 (file)
@@ -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
 
index e8b4215cdc96a012adf0e95092bb753990d25379..5583c9b2c116e0ebb326f375f85262586f433674 100644 (file)
@@ -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
index 65a0d41075ede5dbf1344489db86e4205b3f7f92..f9118cdbd993af97202f0220174e4501cb91efc0 100644 (file)
@@ -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)
index 870f9f100cd0f49a1f4d2dfbbb2dac0ab7887670..19c8cd8cd014c6a595a8e21582027b3972dbed9a 100644 (file)
@@ -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)
index 7a2f4989fa140c90bad547e3a8d11e0addcad3ae..37346aec955b6ff3ae2607a7e5252deb329ec3e3 100644 (file)
@@ -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)
index 8c2ba1ad3f90f069dc342bcaac7e8851c8140cbc..c782d611d314c8665385cc50ebfccf1f11cb4558 100644 (file)
--- 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}
 };
 \f
@@ -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)
index 323d72b67fef9bd00fc37e4881d8918b0dbfb1c6..172e665610d55eb3ad4d8161d3d6dabba689180a 100644 (file)
--- 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);
 }
index fc30226704def8abd6e2eb418196365c9ce7a69b..f3bea7152e87264c7d79ce7fb2d26b35f9cb7da4 100644 (file)
--- 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)
index 2aaf5130fcbf6b1eb5f68b42b85460e29f2fd5b4..4eb59c120b6ac986e306933d0f0924d6e8f6c1fa 100644 (file)
--- 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)
index c4593602b7ce52fff031e6156b84c40cebdf8aa5..9d579c22de1cd2343538c6ff4850c8a7675fbbe4 100644 (file)
@@ -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. */
index 6981e22ed4ee62f5f3a63f0da9ae687cfb36b9b1..95938f533fa08aef6d991abf59ccea8da60f6a5c 100644 (file)
--- 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)
index e659260e361dae7d6eb40f903d228bc137d13221..adaab8aef85905e70c2520e9e3fa965d36c07bf4 100644 (file)
--- 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);
     }
 }
 
index 360396b8d9c9d09d1a85bc446cb36ea0ba123e3c..f03f91f36a962d37c7a3ff9f785f010f0cae49ab 100644 (file)
@@ -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);
 }
 
index 1a0e27e03e318169adc12268b5fd49a386d73276..ce8a7924cd4ef914eed3f1c1728b8b2a01097af3 100644 (file)
@@ -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)
index 24930c1d34df69782db2d7e0313127fb6c7f70a0..e4e3ad2f76b7160b405fe85f54add938a1178aed 100644 (file)
@@ -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);
index 481c9534bb7e51aa06625a7005fc060ae933de40..5b6929100ddef2c93c59b615442d1fa7a8c3cecf 100644 (file)
--- 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)
index 8d36853a81d3d3268de36928b510f85f82b97aa8..607b23f64d55f754689fb2efc6bda965e58402ec 100644 (file)
--- 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)
index 7302f25d45980d355c547704abf706decf32d0d3..6c1341ec25ce8cff22007cfa5f0aee4e5f4803a4 100644 (file)
@@ -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);
 }
index 5833591620c63a5efe4e5131c8d7cb44f216ec3c..ae5b82c12612d80ad77ccc4f0eaf76fc29423db5 100644 (file)
@@ -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)