1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-10 06:03:31 +02:00

merge with 3.9p

This commit is contained in:
Jim Meyering
1994-10-20 16:16:39 +00:00
parent adeff820d3
commit 154bd660bb
9 changed files with 79 additions and 24 deletions

View 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

View File

@@ -23,7 +23,7 @@ VPATH = @srcdir@
CC = @CC@
AR = ar
RANLIB = @RANLIB@
DEFS = -Dlint @DEFS@
DEFS = @DEFS@
CFLAGS = @CFLAGS@
YACC = @YACC@

View 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);

View 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>

View 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

View File

@@ -57,10 +57,10 @@
#else
char *malloc ();
char *realloc ();
#endif
#ifndef NULL
#define NULL 0
#endif
#endif
char *stpcpy ();

View 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.

View 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,

View File

@@ -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;