]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
merge with 3.9p
authorJim Meyering <jim@meyering.net>
Thu, 20 Oct 1994 16:16:39 +0000 (16:16 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 20 Oct 1994 16:16:39 +0000 (16:16 +0000)
doc/Makefile.in
lib/Makefile.in
lib/dirname.c
lib/fnmatch.c
lib/rename.c
lib/savedir.c
old/fileutils/ChangeLog
old/fileutils/NEWS
src/du.c

index a44051f4da9f0d9d3a2c7202609f55e94fd1c120..d7432712f85ae746527930c1d3f171f940876896 100644 (file)
@@ -30,7 +30,8 @@ infodir = $(prefix)/info
 
 .SUFFIXES:
 
-DISTFILES = Makefile.in fileutils.texi texinfo.tex fileutils.info version.texi
+DISTFILES = Makefile.in fileutils.texi texinfo.tex fileutils.info \
+perm.texi version.texi
 
 all: fileutils.info
 
index 7cfb5b676bd8a312eefbff263378b8920bcb94e9..7740eaf7db2da6c16c1a10b0329479df767cf642 100644 (file)
@@ -23,7 +23,7 @@ VPATH = @srcdir@
 CC = @CC@
 AR = ar
 RANLIB = @RANLIB@
-DEFS = -Dlint @DEFS@
+DEFS = @DEFS@
 CFLAGS = @CFLAGS@
 YACC = @YACC@
 
index 929061480594ee42f85b0dbd1d10ec7961778609..15d25967afe88d8422f25503a89b6cdbc39b1df2 100644 (file)
@@ -26,11 +26,11 @@ char *malloc ();
 #endif
 #if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
 #include <string.h>
-#ifndef rindex
-#define rindex strrchr
-#endif
 #else
 #include <strings.h>
+#ifndef strrchr
+#define strrchr rindex
+#endif
 #endif
 
 /* Return the leading directories part of PATH,
@@ -46,7 +46,7 @@ dirname (path)
   char *slash;
   int length;                  /* Length of result, not including NUL.  */
 
-  slash = rindex (path, '/');
+  slash = strrchr (path, '/');
   if (slash == 0)
     {
       /* File is in the current directory.  */
@@ -61,7 +61,7 @@ dirname (path)
 
       length = slash - path + 1;
     }
-  newpath = malloc (length + 1);
+  newpath = (char *) malloc (length + 1);
   if (newpath == 0)
     return 0;
   strncpy (newpath, path, length);
index 2fb65b521604bf4306e494cdcfd1d31755bbc941..813e28168527c58749ab42ad1d11d85cbfb05afd 100644 (file)
@@ -1,19 +1,21 @@
 /* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
 
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+NOTE: The canonical source of this file is maintained with the GNU C Library.
+Bugs can be reported to bug-glibc@prep.ai.mit.edu.
 
-This library is distributed in the hope that it will be useful,
+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 the
+Free Software Foundation; either version 2, or (at your option) any
+later version.
+
+This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-Library General Public License for more details.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
 
-You should have received a copy of the GNU Library General Public
-License along with this library; see the file COPYING.LIB.  If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA.  */
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
index 63193973b6f30116c14bffdd1489fe7b0acd616c..3788e900eb482cc36b701d0e20885c81ead7cac6 100644 (file)
@@ -22,7 +22,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <errno.h>
-#ifndef STDC_HEADERS
+#ifndef errno
 extern int errno;
 #endif
 
index 9a5736451ce8955149350e250fe263378a4671ed..1992cf55bffa11024cd2026b42f52d6d9f9b2072 100644 (file)
 #else
 char *malloc ();
 char *realloc ();
+#endif
 #ifndef NULL
 #define NULL 0
 #endif
-#endif
 
 char *stpcpy ();
 
index 582a7c443ff2dfb29337d8de2bbcf8a80cf288af..86a24b970cfe20490d22b3dd7ef49d84bf349fb9 100644 (file)
@@ -1,3 +1,50 @@
+Thu Oct 20 00:52:59 1994  Jim Meyering  (meyering@comco.com)
+
+       * system.h [!S_IEXEC]: Define as S_IXUSR.
+
+       * cp.h [S_IEXEC]: Remove definition.  cp.c doesn't use it.
+
+       * ls.c [!INT_MAX]: Define to 2^31 - 1 so subsequent #if test works.
+       [S_IEXEC]: Remove definition.  It's in system.h now.
+
+       * ls.c: Support for new option: --dired (-D).
+       (dired, dired_pos, dired_obstack, subdired_obstack): Global variables.
+       [PUTCHAR, FPUTS, FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS]: New macros
+       (dired_dump_obstack, quote_filename): New functions.
+       (main): Initialize obstacks.
+       (decode_switches): Recognize -D.
+       (print_dir): Make arguments `const.'
+       Record directory name indices in obstack.
+       (print_dir, print_long_format, print_type_indicator): Use macros
+       FPUTS, FPUTS_LITERAL, PUTCHAR for output.
+       (print_long_format): Record file name indices in obstack.
+       (print_name_with_quoting): Just call quote_filename and output the
+       result.
+
+Mon Oct 17 23:56:36 1994  Jim Meyering  (meyering@comco.com)
+
+       * savedir.c: Indent CPP conditionals.  Change some #ifdefs to #ifs.
+       From Franc,ois Pinard.
+
+Mon Oct 17 10:27:26 1994  David J. MacKenzie  (djm@duality.gnu.ai.mit.edu)
+
+       * lib/dirname.c: Use strrchr, not rindex.
+
+Sun Oct 16 07:53:27 1994  Jim Meyering  (meyering@comco.com)
+
+       * system.h (S_IXUSR, S_IXGRP, S_IXOTH): Define these in terms of
+       S_IEXEC if they're not already defined. From Kaveh Ghazi.
+
+       * eaccess.c (eaccess_stat): Don't use NULL in comparison.
+       Some systems don't define it except in stdio.h -- and including
+       (yes, just including) stdio.h has been known to significantly
+       increase object code size (though admittedly, that probably
+       happens only on old systems).  Kaveh Ghazi reported the problem.
+
+       * src/Makfile.in lib/Makfile.in (DEFS): Remove -Dlint.
+       It causes problems on broken pyramid system.
+       From Kaveh Ghazi.
+
 Sat Oct 08 10:39:32 1994  Jim Meyering  (meyering@comco.com)
 
        * mountlist.c: Always include <sys/param.h> if it exists.
index 71a9f52a1bc45ffe3b8b082d48c93ed01e74a790..9fb2ce335fbd5cade42cd55a84a427b8f47b79f2 100644 (file)
@@ -1,4 +1,5 @@
 User-visible changes in release 3.10:
+* ls accepts a new option, --dired, that makes emacs' dired mode more efficient
 * skeletal texinfo documentation (mainly just the `invoking' nodes)
 * ln accepts a new option: --no-dereference (-n).  With this option,
   if the destination command line argument is a symlink to a directory,
index ad22be0ea995eed31fadb2d35c5bcfd95ef74448..16e9d5d33cab65ec9855f169a8c5155236e04133 100644 (file)
--- a/src/du.c
+++ b/src/du.c
@@ -491,10 +491,14 @@ count_entry (ent, top, last_dev)
     }
   else if (opt_all || top)
     {
-      printf ("%ld\t%s\n", output_size == size_bytes ? size
-             : convert_blocks (size, output_size == size_kilobytes),
-             path->text);
-      fflush (stdout);
+      int print_only_dir_size = 1;
+      if (!print_only_dir_size)
+       {
+         printf ("%ld\t%s\n", output_size == size_bytes ? size
+                 : convert_blocks (size, output_size == size_kilobytes),
+                 path->text);
+         fflush (stdout);
+       }
     }
 
   return size;