mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
Compare commits
58 Commits
FILEUTILS-
...
FILEUTILS-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
05d9a7233b | ||
|
|
f664e44a2f | ||
|
|
5705eaaee2 | ||
|
|
0e69432852 | ||
|
|
2d69426882 | ||
|
|
5d4f8ebdfd | ||
|
|
b246280c27 | ||
|
|
60e021ee4e | ||
|
|
63c0f480ad | ||
|
|
e375f4e9c8 | ||
|
|
109b9c5f94 | ||
|
|
126c1a40e5 | ||
|
|
2440fd8bac | ||
|
|
98b9c4bed7 | ||
|
|
40f708f534 | ||
|
|
ebc5dc0b0c | ||
|
|
e0ed4e6a77 | ||
|
|
c24393e0fd | ||
|
|
e15db4ca81 | ||
|
|
1059e96721 | ||
|
|
234ea05171 | ||
|
|
0fa007e352 | ||
|
|
9e6b379dbf | ||
|
|
d46bab3a59 | ||
|
|
541699c01c | ||
|
|
23a8ea7992 | ||
|
|
6b4321fd1b | ||
|
|
2fb86e2eb8 | ||
|
|
53bc7b04cb | ||
|
|
43c2a5f62b | ||
|
|
b3d19ee824 | ||
|
|
2c2fa642c4 | ||
|
|
cb5e8a14c2 | ||
|
|
48221eb8bd | ||
|
|
3e6934d53e | ||
|
|
741e2bd94b | ||
|
|
0327bae400 | ||
|
|
e3d35f6789 | ||
|
|
b76a453304 | ||
|
|
069e564d89 | ||
|
|
cadfe29978 | ||
|
|
da111683d5 | ||
|
|
57da248b85 | ||
|
|
b66148ba39 | ||
|
|
86d2f9eaa8 | ||
|
|
25e06fece0 | ||
|
|
d1de57abbc | ||
|
|
5cc8090de2 | ||
|
|
e2ed51f99e | ||
|
|
134ed86e33 | ||
|
|
f7d4fc0e38 | ||
|
|
3531b69552 | ||
|
|
ce9923ab87 | ||
|
|
6d02c37081 | ||
|
|
b2e7f8b0af | ||
|
|
08c3f260a1 | ||
|
|
cde7e42dde | ||
|
|
4656a7e55b |
2
THANKS
2
THANKS
@@ -28,7 +28,7 @@ Noel Cragg: noel@red-bean.com
|
||||
Peter Eriksson: peter@ifm.liu.se
|
||||
Paul Eggert: eggert@twinsun.com
|
||||
Ross Ridge: rridge@calum.csclub.uwaterloo.ca
|
||||
Santiago Vila Doncel: sanvila@ctv.es
|
||||
Santiago Vila Doncel: sanvila@unex.es
|
||||
Stuart Kemp: skemp@peter.bmc.com
|
||||
Thomas Bushnell, n/BSG: thomas@gnu.ai.mit.edu
|
||||
Torbjorn Lindgren: tl@funcom.no
|
||||
|
||||
@@ -10,7 +10,8 @@ EXTRA_DIST = chown.c getgroups.c getline.c lstat.c malloc.c mktime.c \
|
||||
INCLUDES = -I.. -I$(srcdir) -I../intl
|
||||
|
||||
libfu_a_SOURCES = getdate.y posixtm.y getopt.c getopt1.c \
|
||||
addext.c argmatch.c backupfile.c basename.c dirname.c exclude.c filemode.c \
|
||||
addext.c argmatch.c backupfile.c basename.c \
|
||||
closeout.c dirname.c exclude.c filemode.c \
|
||||
full-write.c human.c idcache.c \
|
||||
isdir.c long-options.c makepath.c modechange.c hash.c path-concat.c \
|
||||
safe-read.c save-cwd.c savedir.c stripslash.c userspec.c xgetcwd.c \
|
||||
@@ -19,7 +20,8 @@ xmalloc.c xstrdup.c xstrtol.c xstrtoul.c yesno.c
|
||||
libfu_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||
libfu_a_DEPENDENCIES = $(libfu_a_LIBADD)
|
||||
|
||||
noinst_HEADERS = argmatch.h backupfile.h error.h exclude.h fnmatch.h fsusage.h \
|
||||
noinst_HEADERS = argmatch.h backupfile.h closeout.h \
|
||||
error.h exclude.h fnmatch.h fsusage.h \
|
||||
getdate.h getline.h getopt.h group-member.h human.h long-options.h \
|
||||
makepath.h modechange.h mountlist.h hash.h path-concat.h pathmax.h \
|
||||
save-cwd.h savedir.h strverscmp.h xalloc.h xstrtol.h xstrtoul.h
|
||||
|
||||
125
lib/Makefile.in
125
lib/Makefile.in
@@ -98,7 +98,8 @@ EXTRA_DIST = chown.c getgroups.c getline.c lstat.c malloc.c mktime.c \
|
||||
INCLUDES = -I.. -I$(srcdir) -I../intl
|
||||
|
||||
libfu_a_SOURCES = getdate.y posixtm.y getopt.c getopt1.c \
|
||||
addext.c argmatch.c backupfile.c basename.c dirname.c exclude.c filemode.c \
|
||||
addext.c argmatch.c backupfile.c basename.c \
|
||||
closeout.c dirname.c exclude.c filemode.c \
|
||||
full-write.c human.c idcache.c \
|
||||
isdir.c long-options.c makepath.c modechange.c hash.c path-concat.c \
|
||||
safe-read.c save-cwd.c savedir.c stripslash.c userspec.c xgetcwd.c \
|
||||
@@ -107,7 +108,8 @@ xmalloc.c xstrdup.c xstrtol.c xstrtoul.c yesno.c
|
||||
libfu_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||
libfu_a_DEPENDENCIES = $(libfu_a_LIBADD)
|
||||
|
||||
noinst_HEADERS = argmatch.h backupfile.h error.h exclude.h fnmatch.h fsusage.h \
|
||||
noinst_HEADERS = argmatch.h backupfile.h closeout.h \
|
||||
error.h exclude.h fnmatch.h fsusage.h \
|
||||
getdate.h getline.h getopt.h group-member.h human.h long-options.h \
|
||||
makepath.h modechange.h mountlist.h hash.h path-concat.h pathmax.h \
|
||||
save-cwd.h savedir.h strverscmp.h xalloc.h xstrtol.h xstrtoul.h
|
||||
@@ -125,11 +127,12 @@ LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
ANSI2KNR = ../src/ansi2knr
|
||||
libfu_a_OBJECTS = getdate$U.o posixtm$U.o getopt$U.o getopt1$U.o \
|
||||
addext$U.o argmatch$U.o backupfile$U.o basename$U.o dirname$U.o \
|
||||
exclude$U.o filemode$U.o full-write$U.o human$U.o idcache$U.o isdir$U.o \
|
||||
long-options$U.o makepath$U.o modechange$U.o hash$U.o path-concat$U.o \
|
||||
safe-read$U.o save-cwd$U.o savedir$U.o stripslash$U.o userspec$U.o \
|
||||
xgetcwd$U.o xmalloc$U.o xstrdup$U.o xstrtol$U.o xstrtoul$U.o yesno$U.o
|
||||
addext$U.o argmatch$U.o backupfile$U.o basename$U.o closeout$U.o \
|
||||
dirname$U.o exclude$U.o filemode$U.o full-write$U.o human$U.o \
|
||||
idcache$U.o isdir$U.o long-options$U.o makepath$U.o modechange$U.o \
|
||||
hash$U.o path-concat$U.o safe-read$U.o save-cwd$U.o savedir$U.o \
|
||||
stripslash$U.o userspec$U.o xgetcwd$U.o xmalloc$U.o xstrdup$U.o \
|
||||
xstrtol$U.o xstrtoul$U.o yesno$U.o
|
||||
AR = ar
|
||||
YLWRAP = $(srcdir)/ylwrap
|
||||
CFLAGS = @CFLAGS@
|
||||
@@ -151,15 +154,15 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
TAR = tar
|
||||
GZIP = --best
|
||||
DEP_FILES = .deps/addext.P .deps/alloca.P .deps/argmatch.P \
|
||||
.deps/backupfile.P .deps/basename.P .deps/chown.P .deps/dirname.P \
|
||||
.deps/error.P .deps/euidaccess.P .deps/exclude.P .deps/fileblocks.P \
|
||||
.deps/filemode.P .deps/fnmatch.P .deps/fsusage.P .deps/ftruncate.P \
|
||||
.deps/full-write.P .deps/getdate.P .deps/getgroups.P .deps/getline.P \
|
||||
.deps/getopt.P .deps/getopt1.P .deps/group-member.P .deps/hash.P \
|
||||
.deps/human.P .deps/idcache.P .deps/isdir.P .deps/long-options.P \
|
||||
.deps/lstat.P .deps/makepath.P .deps/malloc.P .deps/memcmp.P \
|
||||
.deps/memcpy.P .deps/memset.P .deps/mkdir.P .deps/mktime.P \
|
||||
.deps/modechange.P .deps/mountlist.P .deps/obstack.P \
|
||||
.deps/backupfile.P .deps/basename.P .deps/chown.P .deps/closeout.P \
|
||||
.deps/dirname.P .deps/error.P .deps/euidaccess.P .deps/exclude.P \
|
||||
.deps/fileblocks.P .deps/filemode.P .deps/fnmatch.P .deps/fsusage.P \
|
||||
.deps/ftruncate.P .deps/full-write.P .deps/getdate.P .deps/getgroups.P \
|
||||
.deps/getline.P .deps/getopt.P .deps/getopt1.P .deps/group-member.P \
|
||||
.deps/hash.P .deps/human.P .deps/idcache.P .deps/isdir.P \
|
||||
.deps/long-options.P .deps/lstat.P .deps/makepath.P .deps/malloc.P \
|
||||
.deps/memcmp.P .deps/memcpy.P .deps/memset.P .deps/mkdir.P \
|
||||
.deps/mktime.P .deps/modechange.P .deps/mountlist.P .deps/obstack.P \
|
||||
.deps/path-concat.P .deps/posixtm.P .deps/realloc.P .deps/regex.P \
|
||||
.deps/rename.P .deps/rmdir.P .deps/rpmatch.P .deps/rx.P \
|
||||
.deps/safe-read.P .deps/save-cwd.P .deps/savedir.P .deps/stat.P \
|
||||
@@ -233,26 +236,50 @@ libfu.a: $(libfu_a_OBJECTS) $(libfu_a_DEPENDENCIES)
|
||||
$(SHELL) $(YLWRAP) "$(YACC)" $< y.tab.c $*.c y.tab.h $*.h -- $(YFLAGS)
|
||||
addext_.c: addext.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/addext.c; then echo $(srcdir)/addext.c; else echo addext.c; fi` addext_.c
|
||||
alloca_.c: alloca.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/alloca.c; then echo $(srcdir)/alloca.c; else echo alloca.c; fi` alloca_.c
|
||||
argmatch_.c: argmatch.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/argmatch.c; then echo $(srcdir)/argmatch.c; else echo argmatch.c; fi` argmatch_.c
|
||||
backupfile_.c: backupfile.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/backupfile.c; then echo $(srcdir)/backupfile.c; else echo backupfile.c; fi` backupfile_.c
|
||||
basename_.c: basename.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/basename.c; then echo $(srcdir)/basename.c; else echo basename.c; fi` basename_.c
|
||||
chown_.c: chown.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/chown.c; then echo $(srcdir)/chown.c; else echo chown.c; fi` chown_.c
|
||||
closeout_.c: closeout.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/closeout.c; then echo $(srcdir)/closeout.c; else echo closeout.c; fi` closeout_.c
|
||||
dirname_.c: dirname.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/dirname.c; then echo $(srcdir)/dirname.c; else echo dirname.c; fi` dirname_.c
|
||||
error_.c: error.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/error.c; then echo $(srcdir)/error.c; else echo error.c; fi` error_.c
|
||||
euidaccess_.c: euidaccess.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/euidaccess.c; then echo $(srcdir)/euidaccess.c; else echo euidaccess.c; fi` euidaccess_.c
|
||||
exclude_.c: exclude.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/exclude.c; then echo $(srcdir)/exclude.c; else echo exclude.c; fi` exclude_.c
|
||||
fileblocks_.c: fileblocks.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/fileblocks.c; then echo $(srcdir)/fileblocks.c; else echo fileblocks.c; fi` fileblocks_.c
|
||||
filemode_.c: filemode.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/filemode.c; then echo $(srcdir)/filemode.c; else echo filemode.c; fi` filemode_.c
|
||||
fnmatch_.c: fnmatch.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/fnmatch.c; then echo $(srcdir)/fnmatch.c; else echo fnmatch.c; fi` fnmatch_.c
|
||||
fsusage_.c: fsusage.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/fsusage.c; then echo $(srcdir)/fsusage.c; else echo fsusage.c; fi` fsusage_.c
|
||||
ftruncate_.c: ftruncate.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/ftruncate.c; then echo $(srcdir)/ftruncate.c; else echo ftruncate.c; fi` ftruncate_.c
|
||||
full-write_.c: full-write.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/full-write.c; then echo $(srcdir)/full-write.c; else echo full-write.c; fi` full-write_.c
|
||||
getdate_.c: getdate.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/getdate.c; then echo $(srcdir)/getdate.c; else echo getdate.c; fi` getdate_.c
|
||||
getgroups_.c: getgroups.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/getgroups.c; then echo $(srcdir)/getgroups.c; else echo getgroups.c; fi` getgroups_.c
|
||||
getline_.c: getline.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/getline.c; then echo $(srcdir)/getline.c; else echo getline.c; fi` getline_.c
|
||||
getopt_.c: getopt.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/getopt.c; then echo $(srcdir)/getopt.c; else echo getopt.c; fi` getopt_.c
|
||||
getopt1_.c: getopt1.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/getopt1.c; then echo $(srcdir)/getopt1.c; else echo getopt1.c; fi` getopt1_.c
|
||||
group-member_.c: group-member.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/group-member.c; then echo $(srcdir)/group-member.c; else echo group-member.c; fi` group-member_.c
|
||||
hash_.c: hash.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/hash.c; then echo $(srcdir)/hash.c; else echo hash.c; fi` hash_.c
|
||||
human_.c: human.c $(ANSI2KNR)
|
||||
@@ -263,22 +290,72 @@ isdir_.c: isdir.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/isdir.c; then echo $(srcdir)/isdir.c; else echo isdir.c; fi` isdir_.c
|
||||
long-options_.c: long-options.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/long-options.c; then echo $(srcdir)/long-options.c; else echo long-options.c; fi` long-options_.c
|
||||
lstat_.c: lstat.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/lstat.c; then echo $(srcdir)/lstat.c; else echo lstat.c; fi` lstat_.c
|
||||
makepath_.c: makepath.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/makepath.c; then echo $(srcdir)/makepath.c; else echo makepath.c; fi` makepath_.c
|
||||
malloc_.c: malloc.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/malloc.c; then echo $(srcdir)/malloc.c; else echo malloc.c; fi` malloc_.c
|
||||
memcmp_.c: memcmp.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/memcmp.c; then echo $(srcdir)/memcmp.c; else echo memcmp.c; fi` memcmp_.c
|
||||
memcpy_.c: memcpy.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/memcpy.c; then echo $(srcdir)/memcpy.c; else echo memcpy.c; fi` memcpy_.c
|
||||
memset_.c: memset.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/memset.c; then echo $(srcdir)/memset.c; else echo memset.c; fi` memset_.c
|
||||
mkdir_.c: mkdir.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/mkdir.c; then echo $(srcdir)/mkdir.c; else echo mkdir.c; fi` mkdir_.c
|
||||
mktime_.c: mktime.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/mktime.c; then echo $(srcdir)/mktime.c; else echo mktime.c; fi` mktime_.c
|
||||
modechange_.c: modechange.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/modechange.c; then echo $(srcdir)/modechange.c; else echo modechange.c; fi` modechange_.c
|
||||
mountlist_.c: mountlist.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/mountlist.c; then echo $(srcdir)/mountlist.c; else echo mountlist.c; fi` mountlist_.c
|
||||
obstack_.c: obstack.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/obstack.c; then echo $(srcdir)/obstack.c; else echo obstack.c; fi` obstack_.c
|
||||
path-concat_.c: path-concat.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/path-concat.c; then echo $(srcdir)/path-concat.c; else echo path-concat.c; fi` path-concat_.c
|
||||
posixtm_.c: posixtm.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/posixtm.c; then echo $(srcdir)/posixtm.c; else echo posixtm.c; fi` posixtm_.c
|
||||
realloc_.c: realloc.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/realloc.c; then echo $(srcdir)/realloc.c; else echo realloc.c; fi` realloc_.c
|
||||
regex_.c: regex.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/regex.c; then echo $(srcdir)/regex.c; else echo regex.c; fi` regex_.c
|
||||
rename_.c: rename.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/rename.c; then echo $(srcdir)/rename.c; else echo rename.c; fi` rename_.c
|
||||
rmdir_.c: rmdir.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/rmdir.c; then echo $(srcdir)/rmdir.c; else echo rmdir.c; fi` rmdir_.c
|
||||
rpmatch_.c: rpmatch.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/rpmatch.c; then echo $(srcdir)/rpmatch.c; else echo rpmatch.c; fi` rpmatch_.c
|
||||
rx_.c: rx.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/rx.c; then echo $(srcdir)/rx.c; else echo rx.c; fi` rx_.c
|
||||
safe-read_.c: safe-read.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/safe-read.c; then echo $(srcdir)/safe-read.c; else echo safe-read.c; fi` safe-read_.c
|
||||
save-cwd_.c: save-cwd.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/save-cwd.c; then echo $(srcdir)/save-cwd.c; else echo save-cwd.c; fi` save-cwd_.c
|
||||
savedir_.c: savedir.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/savedir.c; then echo $(srcdir)/savedir.c; else echo savedir.c; fi` savedir_.c
|
||||
stat_.c: stat.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/stat.c; then echo $(srcdir)/stat.c; else echo stat.c; fi` stat_.c
|
||||
stpcpy_.c: stpcpy.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/stpcpy.c; then echo $(srcdir)/stpcpy.c; else echo stpcpy.c; fi` stpcpy_.c
|
||||
strcasecmp_.c: strcasecmp.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/strcasecmp.c; then echo $(srcdir)/strcasecmp.c; else echo strcasecmp.c; fi` strcasecmp_.c
|
||||
strdup_.c: strdup.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/strdup.c; then echo $(srcdir)/strdup.c; else echo strdup.c; fi` strdup_.c
|
||||
strftime_.c: strftime.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/strftime.c; then echo $(srcdir)/strftime.c; else echo strftime.c; fi` strftime_.c
|
||||
stripslash_.c: stripslash.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/stripslash.c; then echo $(srcdir)/stripslash.c; else echo stripslash.c; fi` stripslash_.c
|
||||
strndup_.c: strndup.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/strndup.c; then echo $(srcdir)/strndup.c; else echo strndup.c; fi` strndup_.c
|
||||
strstr_.c: strstr.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/strstr.c; then echo $(srcdir)/strstr.c; else echo strstr.c; fi` strstr_.c
|
||||
strtol_.c: strtol.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/strtol.c; then echo $(srcdir)/strtol.c; else echo strtol.c; fi` strtol_.c
|
||||
strtoul_.c: strtoul.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/strtoul.c; then echo $(srcdir)/strtoul.c; else echo strtoul.c; fi` strtoul_.c
|
||||
strverscmp_.c: strverscmp.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/strverscmp.c; then echo $(srcdir)/strverscmp.c; else echo strverscmp.c; fi` strverscmp_.c
|
||||
userspec_.c: userspec.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/userspec.c; then echo $(srcdir)/userspec.c; else echo userspec.c; fi` userspec_.c
|
||||
xgetcwd_.c: xgetcwd.c $(ANSI2KNR)
|
||||
@@ -293,11 +370,17 @@ xstrtoul_.c: xstrtoul.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/xstrtoul.c; then echo $(srcdir)/xstrtoul.c; else echo xstrtoul.c; fi` xstrtoul_.c
|
||||
yesno_.c: yesno.c $(ANSI2KNR)
|
||||
$(ANSI2KNR) `if test -f $(srcdir)/yesno.c; then echo $(srcdir)/yesno.c; else echo yesno.c; fi` yesno_.c
|
||||
addext_.o argmatch_.o backupfile_.o basename_.o dirname_.o exclude_.o \
|
||||
filemode_.o full-write_.o getdate_.o getopt_.o getopt1_.o hash_.o \
|
||||
human_.o idcache_.o isdir_.o long-options_.o makepath_.o modechange_.o \
|
||||
path-concat_.o posixtm_.o safe-read_.o save-cwd_.o savedir_.o \
|
||||
stripslash_.o userspec_.o xgetcwd_.o xmalloc_.o xstrdup_.o xstrtol_.o \
|
||||
addext_.o alloca_.o argmatch_.o backupfile_.o basename_.o chown_.o \
|
||||
closeout_.o dirname_.o error_.o euidaccess_.o exclude_.o fileblocks_.o \
|
||||
filemode_.o fnmatch_.o fsusage_.o ftruncate_.o full-write_.o getdate_.o \
|
||||
getgroups_.o getline_.o getopt_.o getopt1_.o group-member_.o hash_.o \
|
||||
human_.o idcache_.o isdir_.o long-options_.o lstat_.o makepath_.o \
|
||||
malloc_.o memcmp_.o memcpy_.o memset_.o mkdir_.o mktime_.o \
|
||||
modechange_.o mountlist_.o obstack_.o path-concat_.o posixtm_.o \
|
||||
realloc_.o regex_.o rename_.o rmdir_.o rpmatch_.o rx_.o safe-read_.o \
|
||||
save-cwd_.o savedir_.o stat_.o stpcpy_.o strcasecmp_.o strdup_.o \
|
||||
strftime_.o stripslash_.o strndup_.o strstr_.o strtol_.o strtoul_.o \
|
||||
strverscmp_.o userspec_.o xgetcwd_.o xmalloc_.o xstrdup_.o xstrtol_.o \
|
||||
xstrtoul_.o yesno_.o : $(ANSI2KNR)
|
||||
|
||||
tags: TAGS
|
||||
|
||||
@@ -39,9 +39,7 @@
|
||||
or -2 if it is ambiguous (is a prefix of more than one element). */
|
||||
|
||||
int
|
||||
argmatch (arg, optlist)
|
||||
const char *arg;
|
||||
const char *const *optlist;
|
||||
argmatch (const char *arg, const char *const *optlist)
|
||||
{
|
||||
int i; /* Temporary index in OPTLIST. */
|
||||
size_t arglen; /* Length of ARG. */
|
||||
@@ -78,15 +76,10 @@ argmatch (arg, optlist)
|
||||
PROBLEM is the return value from argmatch. */
|
||||
|
||||
void
|
||||
invalid_arg (kind, value, problem)
|
||||
const char *kind;
|
||||
const char *value;
|
||||
int problem;
|
||||
invalid_arg (const char *kind, const char *value, int problem)
|
||||
{
|
||||
fprintf (stderr, "%s: ", program_name);
|
||||
if (problem == -1)
|
||||
fprintf (stderr, "invalid");
|
||||
else /* Assume -2. */
|
||||
fprintf (stderr, "ambiguous");
|
||||
fprintf (stderr, " %s `%s'\n", kind, value);
|
||||
const char *fmt = (problem == -1
|
||||
? "%s: invalid %s `%s'\n"
|
||||
: "%s: ambiguous %s `%s'\n");
|
||||
fprintf (stderr, fmt, program_name, kind, value);
|
||||
}
|
||||
|
||||
60
lib/closeout.c
Normal file
60
lib/closeout.c
Normal file
@@ -0,0 +1,60 @@
|
||||
/* closeout.c - close standard output
|
||||
Copyright (C) 1998 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
|
||||
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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if ENABLE_NLS
|
||||
# include <libintl.h>
|
||||
# define _(Text) gettext (Text)
|
||||
#else
|
||||
# define _(Text) Text
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#ifndef EXIT_FAILURE
|
||||
# define EXIT_FAILURE 1
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include "closeout.h"
|
||||
#include "error.h"
|
||||
|
||||
/* Close standard output, exiting with status STATUS on failure. */
|
||||
void
|
||||
close_stdout_status (int status)
|
||||
{
|
||||
if (ferror (stdout))
|
||||
error (status, 0, _("write error"));
|
||||
if (fclose (stdout) != 0)
|
||||
error (status, errno, _("write error"));
|
||||
}
|
||||
|
||||
/* Close standard output, exiting with status EXIT_FAILURE on failure. */
|
||||
void
|
||||
close_stdout (void)
|
||||
{
|
||||
close_stdout_status (EXIT_FAILURE);
|
||||
}
|
||||
10
lib/closeout.h
Normal file
10
lib/closeout.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
void close_stdout PARAMS ((void));
|
||||
void close_stdout_status PARAMS ((int status));
|
||||
@@ -31,8 +31,8 @@ extern int errno;
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
void *xmalloc __EXCLUDE_P ((size_t));
|
||||
void *xrealloc __EXCLUDE_P ((void *, size_t));
|
||||
void *xmalloc PARAMS ((size_t));
|
||||
void *xrealloc PARAMS ((void *, size_t));
|
||||
|
||||
/* Keep track of excluded file name patterns. */
|
||||
|
||||
|
||||
@@ -18,17 +18,17 @@
|
||||
|
||||
/* Written by Paul Eggert <eggert@twinsun.com> */
|
||||
|
||||
#ifndef __EXCLUDE_P
|
||||
# if defined __STDC__ || __GNUC__
|
||||
# define __EXCLUDE_P(args) args
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define __EXCLUDE_P(args) ()
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
struct exclude;
|
||||
|
||||
struct exclude *new_exclude __EXCLUDE_P ((void));
|
||||
void add_exclude __EXCLUDE_P ((struct exclude *, char const *));
|
||||
int add_exclude_file __EXCLUDE_P ((struct exclude *, char const *, char));
|
||||
int excluded_filename __EXCLUDE_P ((struct exclude const *, char const *));
|
||||
struct exclude *new_exclude PARAMS ((void));
|
||||
void add_exclude PARAMS ((struct exclude *, char const *));
|
||||
int add_exclude_file PARAMS ((struct exclude *, char const *, char));
|
||||
int excluded_filename PARAMS ((struct exclude const *, char const *));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1995 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995, 1997 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
|
||||
@@ -18,13 +18,13 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined (__GNUC__) || __STDC__
|
||||
# define PARAMS(args) args
|
||||
# else
|
||||
# define PARAMS(args) ()
|
||||
# endif
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(args) args
|
||||
# else
|
||||
# define PARAMS(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined (vms)
|
||||
# include <types.h>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* group-member.c -- determine whether group id is in calling user's group list
|
||||
Copyright (C) 1994 Free Software Foundation, Inc.
|
||||
Copyright (C) 1994, 1997 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
|
||||
@@ -44,15 +44,14 @@ struct group_info
|
||||
#ifdef HAVE_GETGROUPS
|
||||
|
||||
static void
|
||||
free_group_info (g)
|
||||
struct group_info *g;
|
||||
free_group_info (struct group_info *g)
|
||||
{
|
||||
free (g->group);
|
||||
free (g);
|
||||
}
|
||||
|
||||
static struct group_info *
|
||||
get_group_info ()
|
||||
get_group_info (void)
|
||||
{
|
||||
int n_groups;
|
||||
int n_group_slots;
|
||||
@@ -96,8 +95,7 @@ get_group_info ()
|
||||
either of the current or effective group IDs. */
|
||||
|
||||
int
|
||||
group_member (gid)
|
||||
gid_t gid;
|
||||
group_member (gid_t gid)
|
||||
{
|
||||
#ifndef HAVE_GETGROUPS
|
||||
return ((gid == getgid ()) || (gid == getegid ()));
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
#ifndef GROUP_MEMBER_H_
|
||||
# define GROUP_MEMBER_H_ 1
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
int
|
||||
group_member ();
|
||||
group_member PARAMS ((gid_t));
|
||||
|
||||
#endif /* GROUP_MEMBER_H_ */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Utility to accept --help and --version options as unobtrusively as possible.
|
||||
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
|
||||
Copyright (C) 1993, 1994, 1998 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
|
||||
@@ -18,11 +18,12 @@
|
||||
/* Written by Jim Meyering. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <getopt.h>
|
||||
#include "closeout.h"
|
||||
#include "long-options.h"
|
||||
|
||||
static struct option const long_options[] =
|
||||
@@ -62,6 +63,8 @@ parse_long_options (argc, argv, command_name, package, version, usage)
|
||||
|
||||
case 'v':
|
||||
printf ("%s (%s) %s\n", command_name, package, version);
|
||||
close_stdout (); /* FIXME: output failure exit status
|
||||
should be settable via an arg. */
|
||||
exit (0);
|
||||
|
||||
default:
|
||||
|
||||
@@ -71,6 +71,16 @@ extern int errno;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef S_IWUSR
|
||||
# define S_IWUSR 0200
|
||||
#endif
|
||||
|
||||
#ifndef S_IXUSR
|
||||
# define S_IXUSR 0100
|
||||
#endif
|
||||
|
||||
#define WX_USR (S_IWUSR | S_IXUSR)
|
||||
|
||||
#ifdef __MSDOS__
|
||||
typedef int uid_t;
|
||||
typedef int gid_t;
|
||||
@@ -123,7 +133,6 @@ void strip_trailing_slashes ();
|
||||
Return 0 if ARGPATH exists as a directory with the proper
|
||||
ownership and permissions when done, otherwise 1. */
|
||||
|
||||
#if __STDC__
|
||||
int
|
||||
make_path (const char *argpath,
|
||||
int mode,
|
||||
@@ -132,18 +141,6 @@ make_path (const char *argpath,
|
||||
gid_t group,
|
||||
int preserve_existing,
|
||||
const char *verbose_fmt_string)
|
||||
#else
|
||||
int
|
||||
make_path (argpath, mode, parent_mode, owner, group, preserve_existing,
|
||||
verbose_fmt_string)
|
||||
const char *argpath;
|
||||
int mode;
|
||||
int parent_mode;
|
||||
uid_t owner;
|
||||
gid_t group;
|
||||
int preserve_existing;
|
||||
const char *verbose_fmt_string;
|
||||
#endif
|
||||
{
|
||||
struct stat stats;
|
||||
int retval = 0;
|
||||
@@ -175,8 +172,8 @@ make_path (argpath, mode, parent_mode, owner, group, preserve_existing,
|
||||
/* If leading directories shouldn't be writable or executable,
|
||||
or should have set[ug]id or sticky bits set and we are setting
|
||||
their owners, we need to fix their permissions after making them. */
|
||||
if (((parent_mode & 0300) != 0300)
|
||||
|| (owner != (uid_t) -1 && group != (gid_t) -1
|
||||
if (((parent_mode & WX_USR) != WX_USR)
|
||||
|| ((owner != (uid_t) -1 || group != (gid_t) -1)
|
||||
&& (parent_mode & 07000) != 0))
|
||||
{
|
||||
tmp_mode = 0700;
|
||||
@@ -245,7 +242,8 @@ make_path (argpath, mode, parent_mode, owner, group, preserve_existing,
|
||||
if (newly_created_dir && verbose_fmt_string != NULL)
|
||||
fprintf (stderr, verbose_fmt_string, dirpath);
|
||||
|
||||
if (owner != (uid_t) -1 && group != (gid_t) -1
|
||||
if (newly_created_dir
|
||||
&& (owner != (uid_t) -1 || group != (gid_t) -1)
|
||||
&& chown (basename_dir, owner, group)
|
||||
#if defined(AFS) && defined (EPERM)
|
||||
&& errno != EPERM
|
||||
@@ -361,7 +359,7 @@ make_path (argpath, mode, parent_mode, owner, group, preserve_existing,
|
||||
On System V, users can give away files with chown and then not
|
||||
be able to chmod them. So don't give files away. */
|
||||
|
||||
if (owner != (uid_t) -1 && group != (gid_t) -1
|
||||
if ((owner != (uid_t) -1 || group != (gid_t) -1)
|
||||
&& chown (dirpath, owner, group)
|
||||
#ifdef AFS
|
||||
&& errno != EPERM
|
||||
|
||||
@@ -8,7 +8,7 @@ struct saved_cwd
|
||||
};
|
||||
|
||||
# ifndef PARAMS
|
||||
# if __STDC__
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
|
||||
@@ -64,7 +64,6 @@ CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DF_PROG = @DF_PROG@
|
||||
GENCAT = @GENCAT@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
@@ -79,17 +78,16 @@ MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MVDIR_PROG = @MVDIR_PROG@
|
||||
PACKAGE = @PACKAGE@
|
||||
PERL = @PERL@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
POW_LIBM = @POW_LIBM@
|
||||
RANLIB = @RANLIB@
|
||||
U = @U@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
l = @l@
|
||||
|
||||
EXTRA_DIST = README \
|
||||
|
||||
@@ -1,3 +1,111 @@
|
||||
1998-01-04 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* Version 3.16j.
|
||||
|
||||
* lib/Makefile.in: Regenerated with patched automake-1.2d.
|
||||
See README-alpha.
|
||||
|
||||
* src/chgrp.c: Use a single enumerated type, Verbosity, instead of
|
||||
the two booleans, verbose and changes_only. This fixes a bug whereby
|
||||
--change had the same effect as --verbose.
|
||||
* src/chmod.c: Likewise.
|
||||
* src/chown.c: Likewise.
|
||||
Reported by Paul Eggert.
|
||||
|
||||
1998-01-04 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Check for write errors more carefully.
|
||||
|
||||
* lib/Makefile.am (libfu_a_SOURCES): Add closeout.c.
|
||||
(noinst_HEADERS): Add closeout.h.
|
||||
* lib/closeout.c, lib/closeout.h: New files.
|
||||
* lib/long-options.c (parse_long_options),
|
||||
src/chgrp.c, src/chmod.c, src/chown.c, src/cp.c, src/dd.c,
|
||||
src/df.c, src/dircolors.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/mvdir.c, src/rm.c, src/rmdir.c, src/sync.c, src/touch.c
|
||||
(main, usage): Check for write error to stdout before exiting.
|
||||
Include "closeout.h".
|
||||
|
||||
1998-01-03 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* src/df.c (show_dev): Treat `fsu.fsu_bavail == (unsigned long) -1'
|
||||
just like `fsu.fsu_blocks == 0' as an indicator that usage information
|
||||
is invalid. This happens with Solaris-5.5.1 CD-ROM mount points.
|
||||
|
||||
* lib/save-cwd.h: Guard PARAMS-enabling definition with
|
||||
`defined PROTOTYPES || (defined __STDC__ && __STDC__)' to avoid
|
||||
problems with Irix4's cc. From Kaveh Ghazi.
|
||||
* lib/getdate.h: Likewise, but just to be consistent.
|
||||
|
||||
* configure.in: Convert the .o suffix on files in LIBOBJS to $U.o so
|
||||
those files will be built via the ANSI2KNR-filtering rules if necessary.
|
||||
Reported by Kaveh Ghazi.
|
||||
|
||||
1998-01-02 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* Version 3.16i.
|
||||
|
||||
Fix problem with `install -d'. Reported by Marty Leisner.
|
||||
|
||||
* src/install.c (get_ids): When otherwise unspecified,
|
||||
set uid and gid to -1.
|
||||
* lib/makepath.c (make_path): Try to change ownership only if we've
|
||||
just created the directory. Fix latent bug (s/&&/||/ in two places --
|
||||
also, note that it could not be exercised via install or mkdir)
|
||||
whereby chown would not be invoked when only one of owner/group is
|
||||
not -1.
|
||||
|
||||
1998-01-01 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* src/rm.c (remove_cwd_entries): Initialize the entry-name obstack
|
||||
only once and never free it.
|
||||
|
||||
1997-12-31 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
If the -h or -H options are given, print inode counts and
|
||||
disk allocations using a human readable format.
|
||||
|
||||
* src/df.c (show_dev): Print inode counts human readably.
|
||||
* src/ls.c (decode_switches): -h and -H override output units.
|
||||
(print_dir, gobble_file, print_long_format,
|
||||
print_file_name_and_frills): Print disk allocations human readably.
|
||||
* doc/fileutils.texi: Document the above changes.
|
||||
|
||||
1997-12-31 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* src/df.c (show_dev): Move declarations and computation of
|
||||
blocks_used etc. and blocks_percent_used and
|
||||
inodes_used etc. and inodes_percent_used into respective branches
|
||||
of the `if (inode_format)' statement where they're actually used.
|
||||
|
||||
* lib/exclude.h: Define and use PARAMS, not __EXCLUDE_P.
|
||||
* lib/exclude.c: Use PARAMS, not __EXCLUDE_P.
|
||||
|
||||
1997-12-29 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* src/rm.c (remove_cwd_entries): Plug a gross leak -- don't call
|
||||
obstack_init inside the loop.
|
||||
|
||||
* src/du.c (usage): Replace TABs with spaces in --help message.
|
||||
From Santiago Vila.
|
||||
|
||||
* lib/argmatch.c (invalid_arg): Use a single fprintf and whole
|
||||
format statements to ease translation.
|
||||
From Santiago Vila.
|
||||
Convert from K&R to ANSI function dcls.
|
||||
|
||||
1997-12-28 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* lib/group-member.c: Use ANSI syntax, not K&R.
|
||||
|
||||
* lib/makepath.c (make_path) [!__STDC__]: Remove K&R-style definition.
|
||||
|
||||
* lib/group-member.h: Add PARAMS.
|
||||
* src/chgrp.c: Remove incorrect declaration of group_member.
|
||||
Include group-member.h instead.
|
||||
Based on suggestion from Ulrich Drepper.
|
||||
|
||||
1997-12-27 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* Version 3.16h.
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
Changes in release 3.17:
|
||||
[3.16h]
|
||||
[3.16j]
|
||||
* du accepts new options, --exclude=PAT and --exclude-from=FILE (-X FILE)
|
||||
* ls now quotes file names for the shell by default, if they contain
|
||||
characters that need quoting. Use -N to get the old default behavior.
|
||||
The new behavior is also enabled by the new option -e or --quote-shell.
|
||||
[3.16g]
|
||||
* ln --backup is now consistent with cp and mv in that --force is no longer
|
||||
required when the destination is an existing non-directory.
|
||||
* install accepts new option, --verbose (-v)
|
||||
@@ -27,7 +26,8 @@ Changes in release 3.17:
|
||||
* du accepts new option --max-depth=N
|
||||
* rmdir accepts new options: --ignore-fail-on-non-empty and --verbose
|
||||
* on most hosts df, du, and ls now overflow at 2**64 bytes, not 2**31 bytes
|
||||
* all programs now work on large files on LFS hosts like Solaris 2.6
|
||||
* all programs now work on large files on LFS systems like Solaris 2.6 and
|
||||
Linux with the pre-2.1 development version of GNU libc.
|
||||
* df now works with OpenBSD 2.1 beta
|
||||
* cp -d FILE SYMLINK-TO-FILE doesn't erase FILE. Now it gives an error.
|
||||
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
1998-01-03 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* lib/Makefile.am (AUTOMAKE_OPTIONS): Define to ../src/ansi2knr.
|
||||
|
||||
* configure.in: Convert the .o suffix on files in LIBOBJS to $U.o so
|
||||
those files will be built via the ANSI2KNR-filtering rules if necessary.
|
||||
|
||||
1997-12-25 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* configure.in: Remove AC_DEFINE of _GNU_SOURCE.
|
||||
|
||||
@@ -1,3 +1,22 @@
|
||||
1998-01-03 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* lib/Makefile.am (AUTOMAKE_OPTIONS): Define to ../src/ansi2knr.
|
||||
|
||||
* configure.in: Convert the .o suffix on files in LIBOBJS to $U.o so
|
||||
those files will be built via the ANSI2KNR-filtering rules if necessary.
|
||||
|
||||
1997-12-25 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* configure.in: Remove AC_DEFINE of _GNU_SOURCE.
|
||||
* acconfig.h (_GNU_SOURCE): Define if not already defined.
|
||||
Put this code in @TOP@ section.
|
||||
(_GNU_SOURCE): Remove #undef.
|
||||
|
||||
1997-12-22 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* configure.in: AC_DEFINE _GNU_SOURCE.
|
||||
* acconfig.h: Add _GNU_SOURCE.
|
||||
|
||||
1997-12-21 Jim Meyering <meyering@na-net.ornl.gov>
|
||||
|
||||
* configure.in (AC_CHECK_HEADERS): Add stdlib.h.
|
||||
|
||||
38
src/chgrp.c
38
src/chgrp.c
@@ -1,5 +1,5 @@
|
||||
/* chgrp -- change group ownership of files
|
||||
Copyright (C) 89, 90, 91, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 89, 90, 91, 95, 96, 97, 1998 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
|
||||
@@ -25,8 +25,10 @@
|
||||
|
||||
#include "system.h"
|
||||
#include "xstrtoul.h"
|
||||
#include "closeout.h"
|
||||
#include "error.h"
|
||||
#include "savedir.h"
|
||||
#include "group-member.h"
|
||||
|
||||
/* MAXUID may come from limits.h *or* sys/params.h (via system.h) above. */
|
||||
#ifndef MAXUID
|
||||
@@ -54,7 +56,17 @@ enum Change_status
|
||||
CH_NO_CHANGE_REQUESTED
|
||||
};
|
||||
|
||||
char *group_member ();
|
||||
enum Verbosity
|
||||
{
|
||||
/* Print a message for each file that is processed. */
|
||||
V_high,
|
||||
|
||||
/* Print a message for each file whose attributes we change. */
|
||||
V_changes_only,
|
||||
|
||||
/* Do not be verbose. This is the default. */
|
||||
V_off
|
||||
};
|
||||
|
||||
static int change_dir_group PARAMS ((const char *dir, int group,
|
||||
const struct stat *statp));
|
||||
@@ -72,11 +84,8 @@ static int recurse;
|
||||
/* If nonzero, force silence (no error messages). */
|
||||
static int force_silent;
|
||||
|
||||
/* If nonzero, describe the files we process. */
|
||||
static int verbose;
|
||||
|
||||
/* If nonzero, describe only owners or groups that change. */
|
||||
static int changes_only;
|
||||
/* Level of verbosity. */
|
||||
static enum Verbosity verbosity = V_off;
|
||||
|
||||
/* The name of the group to which ownership of the files is being given. */
|
||||
static const char *groupname;
|
||||
@@ -189,7 +198,7 @@ change_file_group (const char *file, int group)
|
||||
else
|
||||
fail = chown (file, (uid_t) -1, group);
|
||||
|
||||
if (verbose || (changes_only && !fail))
|
||||
if (verbosity == V_high || (verbosity == V_changes_only && !fail))
|
||||
describe_change (file, (fail ? CH_FAILED : CH_SUCCEEDED));
|
||||
|
||||
if (fail)
|
||||
@@ -216,7 +225,7 @@ change_file_group (const char *file, int group)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (verbose && changes_only == 0)
|
||||
else if (verbosity == V_high)
|
||||
{
|
||||
describe_change (file, CH_NO_CHANGE_REQUESTED);
|
||||
}
|
||||
@@ -306,6 +315,7 @@ Change the group membership of each FILE to GROUP.\n\
|
||||
--version output version information and exit\n\
|
||||
"));
|
||||
puts (_("\nReport bugs to <fileutils-bugs@gnu.org>."));
|
||||
close_stdout ();
|
||||
}
|
||||
exit (status);
|
||||
}
|
||||
@@ -322,7 +332,7 @@ main (int argc, char **argv)
|
||||
bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
textdomain (PACKAGE);
|
||||
|
||||
recurse = force_silent = verbose = changes_only = 0;
|
||||
recurse = force_silent = 0;
|
||||
|
||||
while ((optc = getopt_long (argc, argv, "Rcfhv", long_options, NULL)) != -1)
|
||||
{
|
||||
@@ -337,8 +347,7 @@ main (int argc, char **argv)
|
||||
recurse = 1;
|
||||
break;
|
||||
case 'c':
|
||||
verbose = 1;
|
||||
changes_only = 1;
|
||||
verbosity = V_changes_only;
|
||||
break;
|
||||
case 'f':
|
||||
force_silent = 1;
|
||||
@@ -347,7 +356,7 @@ main (int argc, char **argv)
|
||||
change_symlinks = 1;
|
||||
break;
|
||||
case 'v':
|
||||
verbose = 1;
|
||||
verbosity = V_high;
|
||||
break;
|
||||
default:
|
||||
usage (1);
|
||||
@@ -357,6 +366,7 @@ main (int argc, char **argv)
|
||||
if (show_version)
|
||||
{
|
||||
printf ("chgrp (%s) %s\n", GNU_PACKAGE, VERSION);
|
||||
close_stdout ();
|
||||
exit (0);
|
||||
}
|
||||
|
||||
@@ -390,5 +400,7 @@ main (int argc, char **argv)
|
||||
for (; optind < argc; ++optind)
|
||||
errors |= change_file_group (argv[optind], group);
|
||||
|
||||
if (verbosity != V_off)
|
||||
close_stdout ();
|
||||
exit (errors);
|
||||
}
|
||||
|
||||
36
src/chmod.c
36
src/chmod.c
@@ -1,5 +1,5 @@
|
||||
/* chmod -- change permission modes of files
|
||||
Copyright (C) 89, 90, 91, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 89, 90, 91, 95, 96, 97, 1998 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
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include "modechange.h"
|
||||
#include "system.h"
|
||||
#include "closeout.h"
|
||||
#include "error.h"
|
||||
#include "savedir.h"
|
||||
|
||||
@@ -34,6 +35,18 @@ enum Change_status
|
||||
CH_NO_CHANGE_REQUESTED
|
||||
};
|
||||
|
||||
enum Verbosity
|
||||
{
|
||||
/* Print a message for each file that is processed. */
|
||||
V_high,
|
||||
|
||||
/* Print a message for each file whose attributes we change. */
|
||||
V_changes_only,
|
||||
|
||||
/* Do not be verbose. This is the default. */
|
||||
V_off
|
||||
};
|
||||
|
||||
void mode_string ();
|
||||
void strip_trailing_slashes ();
|
||||
|
||||
@@ -50,16 +63,13 @@ static int recurse;
|
||||
/* If nonzero, force silence (no error messages). */
|
||||
static int force_silent;
|
||||
|
||||
/* If nonzero, describe the modes we set. */
|
||||
static int verbose;
|
||||
/* Level of verbosity. */
|
||||
static enum Verbosity verbosity = V_off;
|
||||
|
||||
/* The argument to the --reference option. Use the owner and group IDs
|
||||
of this file. This file must exist. */
|
||||
static char *reference_file;
|
||||
|
||||
/* If nonzero, describe only modes that change. */
|
||||
static int changes_only;
|
||||
|
||||
/* If nonzero, display usage information and exit. */
|
||||
static int show_help;
|
||||
|
||||
@@ -148,7 +158,7 @@ change_file_mode (const char *file, const struct mode_change *changes,
|
||||
{
|
||||
int fail = chmod (file, (int) newmode);
|
||||
|
||||
if (verbose || (changes_only && !fail))
|
||||
if (verbosity == V_high || (verbosity == V_changes_only && !fail))
|
||||
describe_change (file, newmode, (fail ? CH_FAILED : CH_SUCCEEDED));
|
||||
|
||||
if (fail)
|
||||
@@ -158,7 +168,7 @@ change_file_mode (const char *file, const struct mode_change *changes,
|
||||
errors = 1;
|
||||
}
|
||||
}
|
||||
else if (verbose && changes_only == 0)
|
||||
else if (verbosity == V_high)
|
||||
describe_change (file, newmode, CH_NO_CHANGE_REQUESTED);
|
||||
|
||||
if (recurse && S_ISDIR (file_stats.st_mode))
|
||||
@@ -247,6 +257,7 @@ Each MODE is one or more of the letters ugoa, one of the symbols +-= and\n\
|
||||
one or more of the letters rwxXstugo.\n\
|
||||
"));
|
||||
puts (_("\nReport bugs to <fileutils-bugs@gnu.org>."));
|
||||
close_stdout ();
|
||||
}
|
||||
exit (status);
|
||||
}
|
||||
@@ -268,7 +279,7 @@ main (int argc, char **argv)
|
||||
bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
textdomain (PACKAGE);
|
||||
|
||||
recurse = force_silent = verbose = changes_only = 0;
|
||||
recurse = force_silent = 0;
|
||||
|
||||
while (1)
|
||||
{
|
||||
@@ -307,13 +318,13 @@ main (int argc, char **argv)
|
||||
recurse = 1;
|
||||
break;
|
||||
case 'c':
|
||||
changes_only = 1;
|
||||
verbosity = V_changes_only;
|
||||
break;
|
||||
case 'f':
|
||||
force_silent = 1;
|
||||
break;
|
||||
case 'v':
|
||||
verbose = 1;
|
||||
verbosity = V_high;
|
||||
break;
|
||||
default:
|
||||
usage (1);
|
||||
@@ -323,6 +334,7 @@ main (int argc, char **argv)
|
||||
if (show_version)
|
||||
{
|
||||
printf ("chmod (%s) %s\n", GNU_PACKAGE, VERSION);
|
||||
close_stdout ();
|
||||
exit (0);
|
||||
}
|
||||
|
||||
@@ -354,5 +366,7 @@ main (int argc, char **argv)
|
||||
errors |= change_file_mode (argv[optind], changes, 1);
|
||||
}
|
||||
|
||||
if (verbosity != V_off)
|
||||
close_stdout ();
|
||||
exit (errors);
|
||||
}
|
||||
|
||||
37
src/chown.c
37
src/chown.c
@@ -1,5 +1,5 @@
|
||||
/* chown -- change user and group ownership of files
|
||||
Copyright (C) 89, 90, 91, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 89, 90, 91, 95, 96, 97, 1998 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
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <getopt.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "closeout.h"
|
||||
#include "error.h"
|
||||
#include "savedir.h"
|
||||
|
||||
@@ -65,6 +66,18 @@ enum Change_status
|
||||
CH_NO_CHANGE_REQUESTED
|
||||
};
|
||||
|
||||
enum Verbosity
|
||||
{
|
||||
/* Print a message for each file that is processed. */
|
||||
V_high,
|
||||
|
||||
/* Print a message for each file whose attributes we change. */
|
||||
V_changes_only,
|
||||
|
||||
/* Do not be verbose. This is the default. */
|
||||
V_off
|
||||
};
|
||||
|
||||
static int change_dir_owner PARAMS ((const char *dir, uid_t user, gid_t group,
|
||||
struct stat *statp));
|
||||
|
||||
@@ -81,11 +94,8 @@ static int recurse;
|
||||
/* If nonzero, force silence (no error messages). */
|
||||
static int force_silent;
|
||||
|
||||
/* If nonzero, describe the files we process. */
|
||||
static int verbose;
|
||||
|
||||
/* If nonzero, describe only owners or groups that change. */
|
||||
static int changes_only;
|
||||
/* Level of verbosity. */
|
||||
static enum Verbosity verbosity = V_off;
|
||||
|
||||
/* The name of the user to which ownership of the files is being given. */
|
||||
static char *username;
|
||||
@@ -175,7 +185,7 @@ change_file_owner (const char *file, uid_t user, gid_t group)
|
||||
else
|
||||
fail = chown (file, newuser, newgroup);
|
||||
|
||||
if (verbose || (changes_only && !fail))
|
||||
if (verbosity == V_high || (verbosity == V_changes_only && !fail))
|
||||
describe_change (file, (fail ? CH_FAILED : CH_SUCCEEDED));
|
||||
|
||||
if (fail)
|
||||
@@ -185,7 +195,7 @@ change_file_owner (const char *file, uid_t user, gid_t group)
|
||||
errors = 1;
|
||||
}
|
||||
}
|
||||
else if (verbose && changes_only == 0)
|
||||
else if (verbosity == V_high)
|
||||
{
|
||||
describe_change (file, CH_NO_CHANGE_REQUESTED);
|
||||
}
|
||||
@@ -280,6 +290,7 @@ Owner is unchanged if missing. Group is unchanged if missing, but changed\n\
|
||||
to login group if implied by a period. A colon may replace the period.\n\
|
||||
"));
|
||||
puts (_("\nReport bugs to <fileutils-bugs@gnu.org>."));
|
||||
close_stdout ();
|
||||
}
|
||||
exit (status);
|
||||
}
|
||||
@@ -298,7 +309,7 @@ main (int argc, char **argv)
|
||||
bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
textdomain (PACKAGE);
|
||||
|
||||
recurse = force_silent = verbose = changes_only = 0;
|
||||
recurse = force_silent = 0;
|
||||
|
||||
while ((optc = getopt_long (argc, argv, "Rcfhv", long_options, NULL)) != -1)
|
||||
{
|
||||
@@ -313,8 +324,7 @@ main (int argc, char **argv)
|
||||
recurse = 1;
|
||||
break;
|
||||
case 'c':
|
||||
verbose = 1;
|
||||
changes_only = 1;
|
||||
verbosity = V_changes_only;
|
||||
break;
|
||||
case 'f':
|
||||
force_silent = 1;
|
||||
@@ -323,7 +333,7 @@ main (int argc, char **argv)
|
||||
change_symlinks = 1;
|
||||
break;
|
||||
case 'v':
|
||||
verbose = 1;
|
||||
verbosity = V_high;
|
||||
break;
|
||||
default:
|
||||
usage (1);
|
||||
@@ -333,6 +343,7 @@ main (int argc, char **argv)
|
||||
if (show_version)
|
||||
{
|
||||
printf ("chown (%s) %s\n", GNU_PACKAGE, VERSION);
|
||||
close_stdout ();
|
||||
exit (0);
|
||||
}
|
||||
|
||||
@@ -379,5 +390,7 @@ main (int argc, char **argv)
|
||||
errors |= change_file_owner (argv[optind], user, group);
|
||||
}
|
||||
|
||||
if (verbosity != V_off)
|
||||
close_stdout ();
|
||||
exit (errors);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* cp-hash.c -- file copying (hash search routines)
|
||||
Copyright (C) 89, 90, 91, 95, 1996, 1997 Free Software Foundation.
|
||||
Copyright (C) 89, 90, 91, 95, 96, 97, 1998 Free Software Foundation.
|
||||
|
||||
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
|
||||
|
||||
7
src/cp.c
7
src/cp.c
@@ -1,5 +1,5 @@
|
||||
/* cp.c -- file copying (main routines)
|
||||
Copyright (C) 89, 90, 91, 95, 1996, 1997 Free Software Foundation.
|
||||
Copyright (C) 89, 90, 91, 95, 96, 97, 1998 Free Software Foundation.
|
||||
|
||||
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
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "backupfile.h"
|
||||
#include "argmatch.h"
|
||||
#include "path-concat.h"
|
||||
#include "closeout.h"
|
||||
#include "cp-hash.h"
|
||||
#include "copy.h"
|
||||
#include "error.h"
|
||||
@@ -176,6 +177,7 @@ options are given and SOURCE and DEST are the same name for an existing,\n\
|
||||
regular file.\n\
|
||||
"));
|
||||
puts (_("\nReport bugs to <fileutils-bugs@gnu.org>."));
|
||||
close_stdout ();
|
||||
}
|
||||
exit (status);
|
||||
}
|
||||
@@ -728,6 +730,7 @@ main (int argc, char **argv)
|
||||
if (show_version)
|
||||
{
|
||||
printf ("cp (%s) %s\n", GNU_PACKAGE, VERSION);
|
||||
close_stdout ();
|
||||
exit (0);
|
||||
}
|
||||
|
||||
@@ -760,5 +763,7 @@ main (int argc, char **argv)
|
||||
|
||||
exit_status |= do_copy (argc, argv, &x);
|
||||
|
||||
if (x.verbose)
|
||||
close_stdout ();
|
||||
exit (exit_status);
|
||||
}
|
||||
|
||||
5
src/dd.c
5
src/dd.c
@@ -1,5 +1,5 @@
|
||||
/* dd -- convert a file while copying it.
|
||||
Copyright (C) 85, 90, 91, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 85, 90, 91, 95, 96, 97, 1998 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
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include "human.h"
|
||||
#include "system.h"
|
||||
#include "closeout.h"
|
||||
#include "error.h"
|
||||
|
||||
#ifndef SIGINFO
|
||||
@@ -351,6 +352,7 @@ main (int argc, char **argv)
|
||||
if (show_version)
|
||||
{
|
||||
printf ("dd (%s) %s\n", GNU_PACKAGE, VERSION);
|
||||
close_stdout ();
|
||||
exit (0);
|
||||
}
|
||||
|
||||
@@ -1137,6 +1139,7 @@ by w for x2, by b for x512, by k for x1024. Each KEYWORD may be:\n\
|
||||
sync pad every input block with NULs to ibs-size\n\
|
||||
"));
|
||||
puts (_("\nReport bugs to <fileutils-bugs@gnu.org>."));
|
||||
close_stdout ();
|
||||
}
|
||||
exit (status);
|
||||
}
|
||||
|
||||
71
src/df.c
71
src/df.c
@@ -1,5 +1,5 @@
|
||||
/* df - summarize free disk space
|
||||
Copyright (C) 91, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 91, 95, 96, 97, 1998 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
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "fsusage.h"
|
||||
#include "system.h"
|
||||
#include "save-cwd.h"
|
||||
#include "closeout.h"
|
||||
#include "error.h"
|
||||
#include "human.h"
|
||||
|
||||
@@ -195,10 +196,6 @@ static void
|
||||
show_dev (const char *disk, const char *mount_point, const char *fstype)
|
||||
{
|
||||
struct fs_usage fsu;
|
||||
uintmax_t blocks_used;
|
||||
double blocks_percent_used;
|
||||
uintmax_t inodes_used;
|
||||
double inodes_percent_used;
|
||||
const char *stat_file;
|
||||
|
||||
if (!selected_fstype (fstype) || excluded_fstype (fstype))
|
||||
@@ -217,28 +214,8 @@ show_dev (const char *disk, const char *mount_point, const char *fstype)
|
||||
return;
|
||||
}
|
||||
|
||||
if (fsu.fsu_blocks == 0)
|
||||
{
|
||||
if (!show_all_fs && !show_listed_fs)
|
||||
return;
|
||||
blocks_used = fsu.fsu_bavail = blocks_percent_used = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
blocks_used = fsu.fsu_blocks - fsu.fsu_bfree;
|
||||
blocks_percent_used =
|
||||
blocks_used * 100.0 / (blocks_used + fsu.fsu_bavail);
|
||||
}
|
||||
|
||||
if (fsu.fsu_files == 0)
|
||||
{
|
||||
inodes_used = fsu.fsu_ffree = inodes_percent_used = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
inodes_used = fsu.fsu_files - fsu.fsu_ffree;
|
||||
inodes_percent_used = inodes_used * 100.0 / fsu.fsu_files;
|
||||
}
|
||||
if (fsu.fsu_blocks == 0 && !show_all_fs && !show_listed_fs)
|
||||
return;
|
||||
|
||||
if (! disk)
|
||||
disk = "-"; /* unknown */
|
||||
@@ -255,16 +232,47 @@ show_dev (const char *disk, const char *mount_point, const char *fstype)
|
||||
if (inode_format)
|
||||
{
|
||||
char buf[3][LONGEST_HUMAN_READABLE + 1];
|
||||
double inodes_percent_used;
|
||||
uintmax_t inodes_used;
|
||||
|
||||
if (fsu.fsu_files == 0)
|
||||
{
|
||||
inodes_used = 0;
|
||||
fsu.fsu_ffree = 0;
|
||||
inodes_percent_used = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
inodes_used = fsu.fsu_files - fsu.fsu_ffree;
|
||||
inodes_percent_used = inodes_used * 100.0 / fsu.fsu_files;
|
||||
}
|
||||
|
||||
printf (" %7s %7s %7s %5.0f%%",
|
||||
human_readable (fsu.fsu_files, buf[0], 1, 1, 0),
|
||||
human_readable (inodes_used, buf[1], 1, 1, 0),
|
||||
human_readable (fsu.fsu_ffree, buf[2], 1, 1, 0),
|
||||
human_readable (fsu.fsu_files, buf[0], 1, 1, human_readable_base),
|
||||
human_readable (inodes_used, buf[1], 1, 1, human_readable_base),
|
||||
human_readable (fsu.fsu_ffree, buf[2], 1, 1, human_readable_base),
|
||||
inodes_percent_used);
|
||||
}
|
||||
else
|
||||
{
|
||||
int w = human_readable_base ? 5 : 7;
|
||||
char buf[3][LONGEST_HUMAN_READABLE + 1];
|
||||
double blocks_percent_used;
|
||||
uintmax_t blocks_used;
|
||||
|
||||
if (fsu.fsu_blocks == 0 || fsu.fsu_bavail == (unsigned long) -1)
|
||||
{
|
||||
blocks_used = 0;
|
||||
fsu.fsu_bavail = 0;
|
||||
blocks_percent_used = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
blocks_used = fsu.fsu_blocks - fsu.fsu_bfree;
|
||||
blocks_percent_used =
|
||||
blocks_used * 100.0 / (blocks_used + fsu.fsu_bavail);
|
||||
}
|
||||
|
||||
printf (" %*s %*s %*s %5.0f%% ",
|
||||
w, human_readable (fsu.fsu_blocks, buf[0], fsu.fsu_blocksize,
|
||||
output_units, human_readable_base),
|
||||
@@ -511,6 +519,7 @@ or all filesystems by default.\n\
|
||||
--version output version information and exit\n\
|
||||
"));
|
||||
puts (_("\nReport bugs to <fileutils-bugs@gnu.org>."));
|
||||
close_stdout ();
|
||||
}
|
||||
exit (status);
|
||||
}
|
||||
@@ -618,6 +627,7 @@ main (int argc, char **argv)
|
||||
if (show_version)
|
||||
{
|
||||
printf ("df (%s) %s\n", GNU_PACKAGE, VERSION);
|
||||
close_stdout ();
|
||||
exit (0);
|
||||
}
|
||||
|
||||
@@ -709,6 +719,7 @@ with the portable output format"));
|
||||
show_entry (argv[i], &stats[i - optind]);
|
||||
}
|
||||
|
||||
close_stdout ();
|
||||
exit (exit_status);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* dircolors - output commands to set the LS_COLOR environment variable
|
||||
Copyright (C) 1994, 1995, 1997 H. Peter Anvin
|
||||
Copyright (C) 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 96, 97, 1998 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
|
||||
@@ -28,6 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
#include "system.h"
|
||||
#include "getline.h"
|
||||
#include "long-options.h"
|
||||
#include "closeout.h"
|
||||
#include "error.h"
|
||||
#include "obstack.h"
|
||||
#include "dircolors.h"
|
||||
@@ -114,6 +115,7 @@ file types and extensions. Otherwise, a precompiled database is used.\n\
|
||||
For details on the format of these files, run `dircolors --print-database'.\n\
|
||||
"));
|
||||
puts (_("\nReport bugs to <fileutils-bugs@gnu.org>."));
|
||||
close_stdout ();
|
||||
}
|
||||
|
||||
exit (status == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
|
||||
@@ -516,8 +518,7 @@ dircolors' internal database"));
|
||||
}
|
||||
}
|
||||
|
||||
if (fclose (stdout) == EOF)
|
||||
error (EXIT_FAILURE, errno, _("write error"));
|
||||
close_stdout ();
|
||||
|
||||
if (have_read_stdin && fclose (stdin) == EOF)
|
||||
error (EXIT_FAILURE, errno, _("standard input"));
|
||||
|
||||
10
src/du.c
10
src/du.c
@@ -1,5 +1,5 @@
|
||||
/* du -- summarize disk usage
|
||||
Copyright (C) 88, 89, 90, 91, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 88, 89, 90, 91, 95, 96, 97, 1998 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
|
||||
@@ -54,6 +54,7 @@
|
||||
#include "exclude.h"
|
||||
#include "system.h"
|
||||
#include "save-cwd.h"
|
||||
#include "closeout.h"
|
||||
#include "error.h"
|
||||
#include "human.h"
|
||||
#include "xstrtol.h"
|
||||
@@ -231,13 +232,14 @@ Summarize disk usage of each FILE, recursively for directories.\n\
|
||||
-X FILE, --exclude-from=FILE Exclude files that match any pattern in FILE.\n\
|
||||
--exclude=PAT Exclude files that match PAT.\n\
|
||||
--max-depth=N print the total for a directory (or file, with --all)\n\
|
||||
only if it is N or fewer levels below the command\n\
|
||||
line argument; --max-depth=0 is the same as\n\
|
||||
only if it is N or fewer levels below the command\n\
|
||||
line argument; --max-depth=0 is the same as\n\
|
||||
--summarize\n\
|
||||
--help display this help and exit\n\
|
||||
--version output version information and exit\n\
|
||||
"));
|
||||
puts (_("\nReport bugs to <fileutils-bugs@gnu.org>."));
|
||||
close_stdout ();
|
||||
}
|
||||
exit (status);
|
||||
}
|
||||
@@ -372,6 +374,7 @@ main (int argc, char **argv)
|
||||
if (show_version)
|
||||
{
|
||||
printf ("du (%s) %s\n", GNU_PACKAGE, VERSION);
|
||||
close_stdout ();
|
||||
exit (0);
|
||||
}
|
||||
|
||||
@@ -405,6 +408,7 @@ main (int argc, char **argv)
|
||||
|
||||
du_files (optind == argc ? cwd_only : argv + optind);
|
||||
|
||||
close_stdout ();
|
||||
exit (exit_status);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* install - copy files and set attributes
|
||||
Copyright (C) 89, 90, 91, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 89, 90, 91, 95, 96, 97, 1998 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
|
||||
@@ -70,6 +70,7 @@
|
||||
#include "backupfile.h"
|
||||
#include "modechange.h"
|
||||
#include "makepath.h"
|
||||
#include "closeout.h"
|
||||
#include "error.h"
|
||||
#include "xstrtol.h"
|
||||
|
||||
@@ -257,6 +258,7 @@ main (int argc, char **argv)
|
||||
if (show_version)
|
||||
{
|
||||
printf ("install (%s) %s\n", GNU_PACKAGE, VERSION);
|
||||
close_stdout ();
|
||||
exit (0);
|
||||
}
|
||||
|
||||
@@ -318,6 +320,8 @@ main (int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (verbose)
|
||||
close_stdout ();
|
||||
exit (errors);
|
||||
}
|
||||
|
||||
@@ -607,7 +611,7 @@ get_ids (void)
|
||||
endpwent ();
|
||||
}
|
||||
else
|
||||
owner_id = getuid ();
|
||||
owner_id = (uid_t) -1;
|
||||
|
||||
if (group_name)
|
||||
{
|
||||
@@ -625,7 +629,7 @@ get_ids (void)
|
||||
endgrent ();
|
||||
}
|
||||
else
|
||||
group_id = getgid ();
|
||||
group_id = (gid_t) -1;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -672,6 +676,7 @@ version control may be set with VERSION_CONTROL, values are:\n\
|
||||
never, simple always make simple backups\n\
|
||||
"));
|
||||
puts (_("\nReport bugs to <fileutils-bugs@gnu.org>."));
|
||||
close_stdout ();
|
||||
}
|
||||
exit (status);
|
||||
}
|
||||
|
||||
7
src/ln.c
7
src/ln.c
@@ -1,5 +1,5 @@
|
||||
/* `ln' program to create links between files.
|
||||
Copyright (C) 86, 89, 90, 91, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 86, 89, 90, 91, 95, 96, 97, 1998 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
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
#include "system.h"
|
||||
#include "backupfile.h"
|
||||
#include "closeout.h"
|
||||
#include "error.h"
|
||||
|
||||
int link (); /* Some systems don't declare this anywhere. */
|
||||
@@ -353,6 +354,7 @@ version control may be set with VERSION_CONTROL, values are:\n\
|
||||
never, simple always make simple backups\n\
|
||||
"));
|
||||
puts (_("\nReport bugs to <fileutils-bugs@gnu.org>."));
|
||||
close_stdout ();
|
||||
}
|
||||
exit (status);
|
||||
}
|
||||
@@ -429,6 +431,7 @@ main (int argc, char **argv)
|
||||
if (show_version)
|
||||
{
|
||||
printf ("ln (%s) %s\n", GNU_PACKAGE, VERSION);
|
||||
close_stdout ();
|
||||
exit (0);
|
||||
}
|
||||
|
||||
@@ -499,5 +502,7 @@ main (int argc, char **argv)
|
||||
errors += do_link (argv[optind], to);
|
||||
}
|
||||
|
||||
if (verbose)
|
||||
close_stdout ();
|
||||
exit (errors != 0);
|
||||
}
|
||||
|
||||
22
src/ls.c
22
src/ls.c
@@ -1,5 +1,5 @@
|
||||
/* `dir', `vdir' and `ls' directory listing programs for GNU.
|
||||
Copyright (C) 85, 88, 90, 91, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 85, 88, 90, 91, 95, 96, 97, 1998 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
|
||||
@@ -65,6 +65,7 @@
|
||||
|
||||
#include "obstack.h"
|
||||
#include "ls.h"
|
||||
#include "closeout.h"
|
||||
#include "error.h"
|
||||
#include "human.h"
|
||||
#include "argmatch.h"
|
||||
@@ -698,6 +699,7 @@ main (int argc, char **argv)
|
||||
(ls_mode == LS_LS ? "ls"
|
||||
: (ls_mode == LS_MULTI_COL ? "dir" : "vdir")),
|
||||
GNU_PACKAGE, VERSION);
|
||||
close_stdout ();
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -782,9 +784,6 @@ main (int argc, char **argv)
|
||||
dired_dump_obstack ("//SUBDIRED//", quoting_style, &subdired_obstack);
|
||||
}
|
||||
|
||||
if (fclose (stdout) == EOF)
|
||||
error (EXIT_FAILURE, errno, _("write error"));
|
||||
|
||||
/* Restore default color before exiting */
|
||||
if (print_with_color)
|
||||
{
|
||||
@@ -792,6 +791,7 @@ main (int argc, char **argv)
|
||||
put_indicator (&color_indicator[C_RIGHT]);
|
||||
}
|
||||
|
||||
close_stdout ();
|
||||
exit (exit_status);
|
||||
}
|
||||
|
||||
@@ -1179,6 +1179,9 @@ decode_switches (int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (human_readable_base)
|
||||
output_units = 1;
|
||||
|
||||
return optind;
|
||||
}
|
||||
|
||||
@@ -1594,7 +1597,8 @@ print_dir (const char *name, const char *realname)
|
||||
p = _("total");
|
||||
FPUTS (p, stdout, strlen (p));
|
||||
PUTCHAR (' ');
|
||||
p = human_readable (total_blocks, buf, ST_NBLOCKSIZE, output_units, 0);
|
||||
p = human_readable (total_blocks, buf, ST_NBLOCKSIZE, output_units,
|
||||
human_readable_base);
|
||||
FPUTS (p, stdout, strlen (p));
|
||||
PUTCHAR ('\n');
|
||||
}
|
||||
@@ -1782,7 +1786,7 @@ gobble_file (const char *name, int explicit_arg, const char *dirname)
|
||||
{
|
||||
char buf[LONGEST_HUMAN_READABLE + 1];
|
||||
int len = strlen (human_readable (blocks, buf, ST_NBLOCKSIZE,
|
||||
output_units, 0));
|
||||
output_units, human_readable_base));
|
||||
if (block_size_size < len)
|
||||
block_size_size = len < 7 ? len : 7;
|
||||
}
|
||||
@@ -2205,7 +2209,8 @@ print_long_format (const struct fileinfo *f)
|
||||
char hbuf[LONGEST_HUMAN_READABLE + 1];
|
||||
sprintf (p, "%*s ", block_size_size,
|
||||
human_readable ((uintmax_t) ST_NBLOCKS (f->stat), hbuf,
|
||||
ST_NBLOCKSIZE, output_units, 0));
|
||||
ST_NBLOCKSIZE, output_units,
|
||||
human_readable_base));
|
||||
p += strlen (p);
|
||||
}
|
||||
|
||||
@@ -2482,7 +2487,7 @@ print_file_name_and_frills (const struct fileinfo *f)
|
||||
if (print_block_size)
|
||||
printf ("%*s ", block_size_size,
|
||||
human_readable ((uintmax_t) ST_NBLOCKS (f->stat), buf,
|
||||
ST_NBLOCKSIZE, output_units, 0));
|
||||
ST_NBLOCKSIZE, output_units, human_readable_base));
|
||||
|
||||
print_name_with_quoting (f->name, f->stat.st_mode, f->linkok, NULL);
|
||||
|
||||
@@ -2985,6 +2990,7 @@ optional WHEN argument is equivalent to using --color=always. With\n\
|
||||
to a terminal (tty).\n\
|
||||
"));
|
||||
puts (_("\nReport bugs to <fileutils-bugs@gnu.org>."));
|
||||
close_stdout ();
|
||||
}
|
||||
exit (status);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* mkdir -- make directories
|
||||
Copyright (C) 90, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 90, 95, 96, 97, 1998 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
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "system.h"
|
||||
#include "modechange.h"
|
||||
#include "makepath.h"
|
||||
#include "closeout.h"
|
||||
#include "error.h"
|
||||
|
||||
/* The name this program was run with. */
|
||||
@@ -68,6 +69,7 @@ Create the DIRECTORY(ies), if they do not already exist.\n\
|
||||
--version output version information and exit\n\
|
||||
"));
|
||||
puts (_("\nReport bugs to <fileutils-bugs@gnu.org>."));
|
||||
close_stdout ();
|
||||
}
|
||||
exit (status);
|
||||
}
|
||||
@@ -112,6 +114,7 @@ main (int argc, char **argv)
|
||||
if (show_version)
|
||||
{
|
||||
printf ("mkdir (%s) %s\n", GNU_PACKAGE, VERSION);
|
||||
close_stdout ();
|
||||
exit (0);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* mkfifo -- make fifo's (named pipes)
|
||||
Copyright (C) 90, 91, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 90, 91, 95, 96, 97, 1998 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
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#include "system.h"
|
||||
#include "modechange.h"
|
||||
#include "closeout.h"
|
||||
#include "error.h"
|
||||
|
||||
/* The name this program was run with. */
|
||||
@@ -66,6 +67,7 @@ Create named pipes (FIFOs) with the given NAMEs.\n\
|
||||
--version output version information and exit\n\
|
||||
"));
|
||||
puts (_("\nReport bugs to <fileutils-bugs@gnu.org>."));
|
||||
close_stdout ();
|
||||
}
|
||||
exit (status);
|
||||
}
|
||||
@@ -107,6 +109,7 @@ main (int argc, char **argv)
|
||||
if (show_version)
|
||||
{
|
||||
printf ("mkfifo (%s) %s\n", GNU_PACKAGE, VERSION);
|
||||
close_stdout ();
|
||||
exit (0);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* mknod -- make special files
|
||||
Copyright (C) 90, 91, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 90, 91, 95, 96, 97, 1998 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
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
#include "system.h"
|
||||
#include "modechange.h"
|
||||
#include "closeout.h"
|
||||
#include "error.h"
|
||||
#include "xstrtol.h"
|
||||
|
||||
@@ -77,6 +78,7 @@ MAJOR MINOR are forbidden for TYPE p, mandatory otherwise. TYPE may be:\n\
|
||||
p create a FIFO\n\
|
||||
"));
|
||||
puts (_("\nReport bugs to <fileutils-bugs@gnu.org>."));
|
||||
close_stdout ();
|
||||
}
|
||||
exit (status);
|
||||
}
|
||||
@@ -116,6 +118,7 @@ main (int argc, char **argv)
|
||||
if (show_version)
|
||||
{
|
||||
printf ("mknod (%s) %s\n", GNU_PACKAGE, VERSION);
|
||||
close_stdout ();
|
||||
exit (0);
|
||||
}
|
||||
|
||||
|
||||
7
src/mv.c
7
src/mv.c
@@ -1,5 +1,5 @@
|
||||
/* mv -- move or rename files
|
||||
Copyright (C) 86, 89, 90, 91, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 86, 89, 90, 91, 95, 96, 97, 1998 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
|
||||
@@ -49,6 +49,7 @@
|
||||
#include "system.h"
|
||||
#include "path-concat.h"
|
||||
#include "backupfile.h"
|
||||
#include "closeout.h"
|
||||
#include "error.h"
|
||||
|
||||
#ifdef HAVE_LCHOWN
|
||||
@@ -454,6 +455,7 @@ version control may be set with VERSION_CONTROL, values are:\n\
|
||||
never, simple always make simple backups\n\
|
||||
"));
|
||||
puts (_("\nReport bugs to <fileutils-bugs@gnu.org>."));
|
||||
close_stdout ();
|
||||
}
|
||||
exit (status);
|
||||
}
|
||||
@@ -517,6 +519,7 @@ main (int argc, char **argv)
|
||||
if (show_version)
|
||||
{
|
||||
printf ("mv (%s) %s\n", GNU_PACKAGE, VERSION);
|
||||
close_stdout ();
|
||||
exit (0);
|
||||
}
|
||||
|
||||
@@ -545,5 +548,7 @@ main (int argc, char **argv)
|
||||
for (; optind < argc - 1; ++optind)
|
||||
errors |= movefile (argv[optind], argv[argc - 1], dest_is_dir);
|
||||
|
||||
if (verbose)
|
||||
close_stdout ();
|
||||
exit (errors);
|
||||
}
|
||||
|
||||
24
src/rm.c
24
src/rm.c
@@ -1,5 +1,5 @@
|
||||
/* `rm' file deletion utility for GNU.
|
||||
Copyright (C) 88, 90, 91, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 88, 90, 91, 94, 95, 96, 97, 1998 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
|
||||
@@ -51,6 +51,7 @@
|
||||
|
||||
#include "save-cwd.h"
|
||||
#include "system.h"
|
||||
#include "closeout.h"
|
||||
#include "error.h"
|
||||
#include "obstack.h"
|
||||
#include "hash.h"
|
||||
@@ -307,6 +308,7 @@ Remove (unlink) the FILE(s).\n\
|
||||
--version output version information and exit\n\
|
||||
"));
|
||||
puts (_("\nReport bugs to <fileutils-bugs@gnu.org>."));
|
||||
close_stdout ();
|
||||
}
|
||||
exit (status);
|
||||
}
|
||||
@@ -529,10 +531,17 @@ remove_cwd_entries (void)
|
||||
struct HT *ht = NULL;
|
||||
|
||||
/* FIXME: describe */
|
||||
struct obstack entry_name_pool;
|
||||
static struct obstack entry_name_pool;
|
||||
static int first_call = 1;
|
||||
|
||||
enum RM_status status = RM_OK;
|
||||
|
||||
if (first_call)
|
||||
{
|
||||
first_call = 0;
|
||||
obstack_init (&entry_name_pool);
|
||||
}
|
||||
|
||||
if (dirp)
|
||||
{
|
||||
if (CLOSEDIR (dirp))
|
||||
@@ -567,8 +576,6 @@ remove_cwd_entries (void)
|
||||
enum RM_status tmp_status;
|
||||
struct dirent *dp;
|
||||
|
||||
obstack_init (&entry_name_pool);
|
||||
|
||||
/* FILE should be skipped if it is `.' or `..', or if it is in
|
||||
the table, HT, of entries we've already processed. */
|
||||
#define SKIPPABLE(Ht, File) (DOT_OR_DOTDOT(File) \
|
||||
@@ -593,8 +600,7 @@ remove_cwd_entries (void)
|
||||
|
||||
dp = readdir (dirp);
|
||||
|
||||
/* FIXME: add autoconf test to detect this. */
|
||||
#ifndef HAVE_WORKING_READDIR
|
||||
#if ! HAVE_WORKING_READDIR
|
||||
if (dp == NULL)
|
||||
{
|
||||
/* Since we have probably modified the directory since it
|
||||
@@ -675,7 +681,8 @@ remove_cwd_entries (void)
|
||||
hash_free (ht);
|
||||
}
|
||||
|
||||
obstack_free (&entry_name_pool, NULL);
|
||||
if (obstack_object_size (&entry_name_pool) > 0)
|
||||
obstack_free (&entry_name_pool, obstack_base (&entry_name_pool));
|
||||
|
||||
return status;
|
||||
}
|
||||
@@ -987,6 +994,7 @@ main (int argc, char **argv)
|
||||
if (show_version)
|
||||
{
|
||||
printf ("rm (%s) %s\n", GNU_PACKAGE, VERSION);
|
||||
close_stdout ();
|
||||
exit (0);
|
||||
}
|
||||
|
||||
@@ -1035,5 +1043,7 @@ main (int argc, char **argv)
|
||||
hash_free (active_dir_map);
|
||||
#endif
|
||||
|
||||
if (verbose)
|
||||
close_stdout ();
|
||||
exit (fail);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* rmdir -- remove directories
|
||||
Copyright (C) 90, 91, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 90, 91, 95, 96, 97, 1998 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
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "closeout.h"
|
||||
#include "error.h"
|
||||
|
||||
void strip_trailing_slashes ();
|
||||
@@ -126,6 +127,7 @@ Remove the DIRECTORY(ies), if they are empty.\n\
|
||||
--version output version information and exit\n\
|
||||
"));
|
||||
puts (_("\nReport bugs to <fileutils-bugs@gnu.org>."));
|
||||
close_stdout ();
|
||||
}
|
||||
exit (status);
|
||||
}
|
||||
@@ -166,6 +168,7 @@ main (int argc, char **argv)
|
||||
if (show_version)
|
||||
{
|
||||
printf ("rmdir (%s) %s\n", GNU_PACKAGE, VERSION);
|
||||
close_stdout ();
|
||||
exit (0);
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ PREFIX is `x'. With no INPUT, or when INPUT is -, read standard input.\n\
|
||||
-l, --lines=NUMBER put NUMBER lines per output file\n\
|
||||
-NUMBER same as -l NUMBER\n\
|
||||
--verbose print a diagnostic to standard error just\n\
|
||||
before each output file is opened\n\
|
||||
before each output file is opened\n\
|
||||
--help display this help and exit\n\
|
||||
--version output version information and exit\n\
|
||||
\n\
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* sync - update the super block
|
||||
Copyright (C) 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 94, 95, 96, 97, 1998 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
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#include "system.h"
|
||||
#include "long-options.h"
|
||||
#include "closeout.h"
|
||||
#include "error.h"
|
||||
|
||||
/* The name this program was run with. */
|
||||
@@ -44,6 +45,7 @@ Force changed blocks to disk, update the super block.\n\
|
||||
--version output version information and exit\n\
|
||||
"));
|
||||
puts (_("\nReport bugs to <fileutils-bugs@gnu.org>."));
|
||||
close_stdout ();
|
||||
}
|
||||
exit (status);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* system-dependent definitions for fileutils, textutils, and sh-utils packages.
|
||||
Copyright (C) 89, 91, 92, 93, 94, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 89, 91, 92, 93, 94, 96, 97, 1998 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* touch -- change modification and access times of files
|
||||
Copyright (C) 87, 89, 90, 91, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 87, 89, 90, 91, 95, 96, 97, 1998 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
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "system.h"
|
||||
#include "closeout.h"
|
||||
#include "error.h"
|
||||
#include "argmatch.h"
|
||||
|
||||
@@ -260,6 +261,7 @@ Update the access and modification times of each FILE to the current time.\n\
|
||||
STAMP may be used without -t if none of -drt, nor --, are used.\n\
|
||||
"));
|
||||
puts (_("\nReport bugs to <fileutils-bugs@gnu.org>."));
|
||||
close_stdout ();
|
||||
}
|
||||
exit (status);
|
||||
}
|
||||
@@ -340,6 +342,7 @@ main (int argc, char **argv)
|
||||
if (show_version)
|
||||
{
|
||||
printf ("touch (%s) %s\n", GNU_PACKAGE, VERSION);
|
||||
close_stdout ();
|
||||
exit (0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user