merge with 3.8.3a
authorJim Meyering <jim@meyering.net>
Wed, 6 Oct 1993 00:24:55 +0000 (00:24 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 6 Oct 1993 00:24:55 +0000 (00:24 +0000)
17 files changed:
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 f9118cd..6a6737a 100644 (file)
@@ -75,7 +75,7 @@ static char *groupname;
 /* If non-zero, display usage information and exit.  */
 static int show_help;
 
-/* If non-zero, print the version on standard error.  */
+/* If non-zero, print the version on standard output and exit.  */
 static int show_version;
 
 static struct option const long_options[] =
@@ -129,7 +129,7 @@ main (argc, argv)
 
   if (show_version)
     {
-      fprintf (stderr, "%s\n", version_string);
+      printf ("%s\n", version_string);
       exit (0);
     }
 
index 19c8cd8..eb3316c 100644 (file)
@@ -61,7 +61,7 @@ static int changes_only;
 /* If non-zero, display usage information and exit.  */
 static int show_help;
 
-/* If non-zero, print the version on standard error.  */
+/* If non-zero, print the version on standard output and exit.  */
 static int show_version;
 
 static struct option const long_options[] =
@@ -144,7 +144,7 @@ main (argc, argv)
 
   if (show_version)
     {
-      fprintf (stderr, "%s\n", version_string);
+      printf ("%s\n", version_string);
       exit (0);
     }
 
index 37346ae..6c96781 100644 (file)
@@ -85,7 +85,7 @@ static char *groupname;
 /* If non-zero, display usage information and exit.  */
 static int show_help;
 
-/* If non-zero, print the version on standard error.  */
+/* If non-zero, print the version on standard output and exit.  */
 static int show_version;
 
 static struct option const long_options[] =
@@ -141,7 +141,7 @@ main (argc, argv)
 
   if (show_version)
     {
-      fprintf (stderr, "%s\n", version_string);
+      printf ("%s\n", version_string);
       exit (0);
     }
 
index f6dd934..f0a5ce5 100644 (file)
--- a/src/cp.c
+++ b/src/cp.c
@@ -122,7 +122,7 @@ static uid_t myeuid;
 /* If non-zero, display usage information and exit.  */
 static int show_help;
 
-/* If non-zero, print the version on standard error.  */
+/* If non-zero, print the version on standard output and exit.  */
 static int show_version;
 
 static struct option const long_opts[] =
@@ -262,7 +262,7 @@ main (argc, argv)
 
   if (show_version)
     {
-      fprintf (stderr, "%s\n", version_string);
+      printf ("%s\n", version_string);
       exit (0);
     }
 
@@ -748,9 +748,10 @@ copy (src_path, dst_path, new_dst, device, ancestors)
 #ifdef S_ISLNK
   if (S_ISLNK (src_type))
     {
-      char link_val[PATH_MAX + 1];
+      char *link_val;
       int link_size;
 
+      link_val = (char *) alloca (PATH_MAX + 2);
       link_size = readlink (src_path, link_val, sizeof (link_val) - 1);
       if (link_size < 0)
        {
index 172e665..fd10914 100644 (file)
--- a/src/dd.c
+++ b/src/dd.c
@@ -311,7 +311,7 @@ static unsigned char const ebcdic_to_ascii[] =
 /* If non-zero, display usage information and exit.  */
 static int show_help;
 
-/* If non-zero, print the version on standard error.  */
+/* If non-zero, print the version on standard output and exit.  */
 static int show_version;
 
 static struct option const long_options[] =
@@ -342,7 +342,7 @@ main (argc, argv)
 
   if (show_version)
     {
-      fprintf (stderr, "%s\n", version_string);
+      printf ("%s\n", version_string);
       exit (0);
     }
 
index f3bea71..35b1896 100644 (file)
--- a/src/df.c
+++ b/src/df.c
@@ -112,7 +112,7 @@ static struct mount_entry *mount_list;
 /* If non-zero, display usage information and exit.  */
 static int show_help;
 
-/* If non-zero, print the version on standard error.  */
+/* If non-zero, print the version on standard output and exit.  */
 static int show_version;
 
 static struct option const long_options[] =
@@ -180,7 +180,7 @@ main (argc, argv)
 
   if (show_version)
     {
-      fprintf (stderr, "%s\n", version_string);
+      printf ("%s\n", version_string);
       exit (0);
     }
 
index 4eb59c1..4ea63f3 100644 (file)
--- a/src/du.c
+++ b/src/du.c
@@ -158,7 +158,7 @@ static int exit_status;
 /* If non-zero, display usage information and exit.  */
 static int show_help;
 
-/* If non-zero, print the version on standard error.  */
+/* If non-zero, print the version on standard output and exit.  */
 static int show_version;
 
 static struct option const long_options[] =
@@ -260,7 +260,7 @@ main (argc, argv)
 
   if (show_version)
     {
-      fprintf (stderr, "%s\n", version_string);
+      printf ("%s\n", version_string);
       exit (0);
     }
 
index e6fc162..31a15dd 100644 (file)
@@ -136,7 +136,7 @@ static int dir_arg;
 /* If non-zero, display usage information and exit.  */
 static int show_help;
 
-/* If non-zero, print the version on standard error.  */
+/* If non-zero, print the version on standard output and exit.  */
 static int show_version;
 
 static struct option const long_options[] =
@@ -199,7 +199,7 @@ main (argc, argv)
 
   if (show_version)
     {
-      fprintf (stderr, "%s\n", version_string);
+      printf ("%s\n", version_string);
       exit (0);
     }
 
index e2ddda9..f8cf11e 100644 (file)
--- a/src/ln.c
+++ b/src/ln.c
@@ -89,7 +89,7 @@ static int hard_dir_link;
 /* If non-zero, display usage information and exit.  */
 static int show_help;
 
-/* If non-zero, print the version on standard error.  */
+/* If non-zero, print the version on standard output and exit.  */
 static int show_version;
 
 static struct option const long_options[] = 
@@ -173,7 +173,7 @@ main (argc, argv)
 
   if (show_version)
     {
-      fprintf (stderr, "%s\n", version_string);
+      printf ("%s\n", version_string);
       exit (0);
     }
 
index b20b211..947e1b5 100644 (file)
--- a/src/ls.c
+++ b/src/ls.c
@@ -361,7 +361,7 @@ static int exit_status;
 /* If non-zero, display usage information and exit.  */
 static int show_help;
 
-/* If non-zero, print the version on standard error.  */
+/* If non-zero, print the version on standard output and exit.  */
 static int show_version;
 
 static struct option const long_options[] =
@@ -448,7 +448,7 @@ main (argc, argv)
 
   if (show_version)
     {
-      fprintf (stderr, "%s\n", version_string);
+      printf ("%s\n", version_string);
       exit (0);
     }
 
@@ -1076,9 +1076,10 @@ get_link_name (filename, f)
      char *filename;
      struct file *f;
 {
-  char linkbuf[PATH_MAX + 1];
+  char *linkbuf;
   register int linksize;
 
+  linkbuf = (char *) alloca (PATH_MAX + 2);
   /* Some automounters give incorrect st_size for mount points.
      I can't think of a good workaround for it, though.  */
   linksize = readlink (filename, linkbuf, sizeof (linkbuf) - 1);
index f03f91f..f5d89b7 100644 (file)
@@ -48,7 +48,7 @@ static int path_mode;
 /* If non-zero, display usage information and exit.  */
 static int show_help;
 
-/* If non-zero, print the version on standard error.  */
+/* If non-zero, print the version on standard output and exit.  */
 static int show_version;
 
 static struct option const longopts[] =
@@ -94,7 +94,7 @@ main (argc, argv)
 
   if (show_version)
     {
-      fprintf (stderr, "%s\n", version_string);
+      printf ("%s\n", version_string);
       exit (0);
     }
 
index ce8a792..4b16d12 100644 (file)
@@ -39,7 +39,7 @@ char *program_name;
 /* If non-zero, display usage information and exit.  */
 static int show_help;
 
-/* If non-zero, print the version on standard error.  */
+/* If non-zero, print the version on standard output and exit.  */
 static int show_version;
 
 static struct option const longopts[] =
@@ -83,7 +83,7 @@ main (argc, argv)
 
   if (show_version)
     {
-      fprintf (stderr, "%s\n", version_string);
+      printf ("%s\n", version_string);
       exit (0);
     }
 
index e4e3ad2..74efa86 100644 (file)
@@ -44,7 +44,7 @@ char *program_name;
 /* If non-zero, display usage information and exit.  */
 static int show_help;
 
-/* If non-zero, print the version on standard error.  */
+/* If non-zero, print the version on standard output and exit.  */
 static int show_version;
 
 static struct option const longopts[] =
@@ -84,7 +84,7 @@ main (argc, argv)
 
   if (show_version)
     {
-      fprintf (stderr, "%s\n", version_string);
+      printf ("%s\n", version_string);
       exit (0);
     }
 
index 220e14f..5029c7a 100644 (file)
--- a/src/mv.c
+++ b/src/mv.c
@@ -91,7 +91,7 @@ static uid_t myeuid;
 /* If non-zero, display usage information and exit.  */
 static int show_help;
 
-/* If non-zero, print the version on standard error.  */
+/* If non-zero, print the version on standard output and exit.  */
 static int show_version;
 
 static struct option const long_options[] =
@@ -164,7 +164,7 @@ main (argc, argv)
 
   if (show_version)
     {
-      fprintf (stderr, "%s\n", version_string);
+      printf ("%s\n", version_string);
       exit (0);
     }
 
index 3f331e4..2bd8db4 100644 (file)
--- a/src/rm.c
+++ b/src/rm.c
@@ -80,7 +80,7 @@ static int stdin_tty;
 /* If non-zero, display usage information and exit.  */
 static int show_help;
 
-/* If non-zero, print the version on standard error.  */
+/* If non-zero, print the version on standard output and exit.  */
 static int show_version;
 
 static struct option const long_opts[] =
@@ -140,7 +140,7 @@ main (argc, argv)
 
   if (show_version)
     {
-      fprintf (stderr, "%s\n", version_string);
+      printf ("%s\n", version_string);
       exit (0);
     }
 
index 6c1341e..7c497b4 100644 (file)
@@ -43,7 +43,7 @@ static int empty_paths;
 /* If non-zero, display usage information and exit.  */
 static int show_help;
 
-/* If non-zero, print the version on standard error.  */
+/* If non-zero, print the version on standard output and exit.  */
 static int show_version;
 
 static struct option const longopts[] =
@@ -82,7 +82,7 @@ main (argc, argv)
 
   if (show_version)
     {
-      fprintf (stderr, "%s\n", version_string);
+      printf ("%s\n", version_string);
       exit (0);
     }
 
index ae5b82c..152a27e 100644 (file)
@@ -95,7 +95,7 @@ static struct stat ref_stats;
 /* If non-zero, display usage information and exit.  */
 static int show_help;
 
-/* If non-zero, print the version on standard error.  */
+/* If non-zero, print the version on standard output and exit.  */
 static int show_version;
 
 static struct option const longopts[] =
@@ -195,7 +195,7 @@ main (argc, argv)
 
   if (show_version)
     {
-      fprintf (stderr, "%s\n", version_string);
+      printf ("%s\n", version_string);
       exit (0);
     }