summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1994-10-20 16:16:39 +0000
committerJim Meyering <jim@meyering.net>1994-10-20 16:16:39 +0000
commit154bd660bbc3bfdde9f4bb43d1942375e8bb324f (patch)
tree42b1dd0158a22cd99ff532c65282f149be108c3e
parentadeff820d3380fd5d80599a3962cd13a9269d1d1 (diff)
downloadcoreutils-154bd660bbc3bfdde9f4bb43d1942375e8bb324f.tar.xz
merge with 3.9p
-rw-r--r--doc/Makefile.in3
-rw-r--r--lib/Makefile.in2
-rw-r--r--lib/dirname.c10
-rw-r--r--lib/fnmatch.c24
-rw-r--r--lib/rename.c2
-rw-r--r--lib/savedir.c2
-rw-r--r--old/fileutils/ChangeLog47
-rw-r--r--old/fileutils/NEWS1
-rw-r--r--src/du.c12
9 files changed, 79 insertions, 24 deletions
diff --git a/doc/Makefile.in b/doc/Makefile.in
index a44051f4d..d7432712f 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -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
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 7cfb5b676..7740eaf7d 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -23,7 +23,7 @@ VPATH = @srcdir@
CC = @CC@
AR = ar
RANLIB = @RANLIB@
-DEFS = -Dlint @DEFS@
+DEFS = @DEFS@
CFLAGS = @CFLAGS@
YACC = @YACC@
diff --git a/lib/dirname.c b/lib/dirname.c
index 929061480..15d25967a 100644
--- a/lib/dirname.c
+++ b/lib/dirname.c
@@ -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);
diff --git a/lib/fnmatch.c b/lib/fnmatch.c
index 2fb65b521..813e28168 100644
--- a/lib/fnmatch.c
+++ b/lib/fnmatch.c
@@ -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>
diff --git a/lib/rename.c b/lib/rename.c
index 63193973b..3788e900e 100644
--- a/lib/rename.c
+++ b/lib/rename.c
@@ -22,7 +22,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
-#ifndef STDC_HEADERS
+#ifndef errno
extern int errno;
#endif
diff --git a/lib/savedir.c b/lib/savedir.c
index 9a5736451..1992cf55b 100644
--- a/lib/savedir.c
+++ b/lib/savedir.c
@@ -57,10 +57,10 @@
#else
char *malloc ();
char *realloc ();
+#endif
#ifndef NULL
#define NULL 0
#endif
-#endif
char *stpcpy ();
diff --git a/old/fileutils/ChangeLog b/old/fileutils/ChangeLog
index 582a7c443..86a24b970 100644
--- a/old/fileutils/ChangeLog
+++ b/old/fileutils/ChangeLog
@@ -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.
diff --git a/old/fileutils/NEWS b/old/fileutils/NEWS
index 71a9f52a1..9fb2ce335 100644
--- a/old/fileutils/NEWS
+++ b/old/fileutils/NEWS
@@ -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,
diff --git a/src/du.c b/src/du.c
index ad22be0ea..16e9d5d33 100644
--- 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;