mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
Compare commits
301 Commits
FILEUTILS-
...
FILEUTILS-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b15af47b49 | ||
|
|
9199178402 | ||
|
|
f82c03de2d | ||
|
|
1a162983f4 | ||
|
|
63ceb4f304 | ||
|
|
12838cec9b | ||
|
|
b5bfb1d399 | ||
|
|
9497429d9b | ||
|
|
b80e127286 | ||
|
|
e53076d42c | ||
|
|
01fe7e76f4 | ||
|
|
bcf9971e84 | ||
|
|
e107deb940 | ||
|
|
7bf1f374e0 | ||
|
|
ede498bfb0 | ||
|
|
2b00f4f4b6 | ||
|
|
e93093d5e1 | ||
|
|
f2606a6ba0 | ||
|
|
58a77bf4f6 | ||
|
|
344f43313d | ||
|
|
e68c81a48f | ||
|
|
0e49de1acb | ||
|
|
a3e473c522 | ||
|
|
6408b52640 | ||
|
|
e28821d5f8 | ||
|
|
621691b296 | ||
|
|
72c9472cc0 | ||
|
|
7dfd5ca1cd | ||
|
|
c5195207db | ||
|
|
8a644a90ef | ||
|
|
29ab746b79 | ||
|
|
7cf7f3706f | ||
|
|
297e2cb744 | ||
|
|
9507d3559a | ||
|
|
876d24a3ed | ||
|
|
1384f07f77 | ||
|
|
8ff77278a2 | ||
|
|
8c97b5c46e | ||
|
|
4ff6b43025 | ||
|
|
af36c75750 | ||
|
|
fd65b86607 | ||
|
|
bc0c0e635c | ||
|
|
0e65b3e861 | ||
|
|
458aad90ab | ||
|
|
74235b07fa | ||
|
|
a17cdb1173 | ||
|
|
b2747b91a8 | ||
|
|
0963c4ba11 | ||
|
|
b4640ed990 | ||
|
|
1698d53f72 | ||
|
|
5ae5d486a9 | ||
|
|
ef234641de | ||
|
|
52dedbfebb | ||
|
|
f5e9896c18 | ||
|
|
572632b8eb | ||
|
|
a467be8ae8 | ||
|
|
5551e54672 | ||
|
|
b7e610bfdb | ||
|
|
7e6c89fc63 | ||
|
|
7273e22923 | ||
|
|
6f5e749ea6 | ||
|
|
376d67374f | ||
|
|
7d60769bea | ||
|
|
604b3b397d | ||
|
|
a68f3dee80 | ||
|
|
dd3bad9b7c | ||
|
|
6207f6f804 | ||
|
|
16c8a66a54 | ||
|
|
9069b306dc | ||
|
|
76223aedef | ||
|
|
2ec7385fb0 | ||
|
|
46dd5092ee | ||
|
|
e5f51be9f1 | ||
|
|
1e422ea7ec | ||
|
|
9d7c18290e | ||
|
|
90dbea92c4 | ||
|
|
d9878753d1 | ||
|
|
4dbf57ed78 | ||
|
|
438a33770b | ||
|
|
f7cd44c64c | ||
|
|
32df3704e4 | ||
|
|
955d2c6ae5 | ||
|
|
75d5ed8b58 | ||
|
|
b9c6c84a8c | ||
|
|
3c6a1e9f08 | ||
|
|
bb6a835cc1 | ||
|
|
78f7236408 | ||
|
|
976ca67266 | ||
|
|
aba712c3bc | ||
|
|
3ec7a99af6 | ||
|
|
d60ac7e850 | ||
|
|
4c15e09a2c | ||
|
|
a1d63c6f15 | ||
|
|
e781ee9e60 | ||
|
|
9764f6e3e1 | ||
|
|
e77961586a | ||
|
|
11135e1307 | ||
|
|
d8a0eef528 | ||
|
|
b7657496c3 | ||
|
|
01c7f17f33 | ||
|
|
a211252152 | ||
|
|
24c0a0a99d | ||
|
|
df521a1b29 | ||
|
|
686a7e9ff3 | ||
|
|
1d738b51d1 | ||
|
|
84c2d0e52e | ||
|
|
6c0c08eb29 | ||
|
|
7de9edecfc | ||
|
|
9e3f43b368 | ||
|
|
d7b702d0d0 | ||
|
|
ed5b1cad23 | ||
|
|
532074e1c7 | ||
|
|
deef42170f | ||
|
|
b808de586b | ||
|
|
ac7f057d98 | ||
|
|
2daa912c53 | ||
|
|
7bf8c634eb | ||
|
|
c091e6fe83 | ||
|
|
dc61111cc6 | ||
|
|
920680fe4f | ||
|
|
c9f0e3d343 | ||
|
|
b4c9bd2b7e | ||
|
|
453be366da | ||
|
|
f51e80f564 | ||
|
|
993a56e8e0 | ||
|
|
d8e4dccdca | ||
|
|
427e67b196 | ||
|
|
90ffddc87e | ||
|
|
8458f55338 | ||
|
|
bf5ef10371 | ||
|
|
d087967041 | ||
|
|
cfb54dec88 | ||
|
|
e1958a7253 | ||
|
|
cf50a06294 | ||
|
|
c96d9a880f | ||
|
|
25bf05e45e | ||
|
|
99b35637c4 | ||
|
|
09b8756e33 | ||
|
|
9c5d11d5c5 | ||
|
|
bf6c2a07af | ||
|
|
c729fe037e | ||
|
|
02cde32c0a | ||
|
|
7741f87086 | ||
|
|
9e630b86cb | ||
|
|
2e19f14a91 | ||
|
|
65b1a6ec82 | ||
|
|
06d1a87e3b | ||
|
|
f417e8b9d4 | ||
|
|
4fb556ee0e | ||
|
|
c850393032 | ||
|
|
61ece919c6 | ||
|
|
843b44b3f7 | ||
|
|
5edb65b5c4 | ||
|
|
a71cb7cad1 | ||
|
|
e2d1b297e7 | ||
|
|
70bea7fd3e | ||
|
|
ec936db8d7 | ||
|
|
2b69ce2d89 | ||
|
|
0a25bc498d | ||
|
|
6cc7e13732 | ||
|
|
0e1c643956 | ||
|
|
2e29b32116 | ||
|
|
082787996c | ||
|
|
edef42bf40 | ||
|
|
efce5c3bdf | ||
|
|
18ac22d2fc | ||
|
|
c20eae80c7 | ||
|
|
6f43239736 | ||
|
|
c6b7de061f | ||
|
|
10d64e02c4 | ||
|
|
852a30165b | ||
|
|
e4d0cf679c | ||
|
|
57c0968203 | ||
|
|
761ed79f4d | ||
|
|
f49ea966c3 | ||
|
|
8c6d49c84d | ||
|
|
061a10d1ff | ||
|
|
787dfe9c83 | ||
|
|
9e3949fa6f | ||
|
|
62b64a0e92 | ||
|
|
37c289ea31 | ||
|
|
297a13a5a3 | ||
|
|
2aae4df6ef | ||
|
|
8670ecb6cb | ||
|
|
1b1bcc5e29 | ||
|
|
03d1ff2dea | ||
|
|
1381664a56 | ||
|
|
3ed45d5062 | ||
|
|
dfd3465715 | ||
|
|
86488adef8 | ||
|
|
3564013e18 | ||
|
|
a019f34623 | ||
|
|
0e2247a55b | ||
|
|
253d68786d | ||
|
|
f6a19e2c78 | ||
|
|
f7880af3db | ||
|
|
ce55ab29b1 | ||
|
|
6bbbdce4d8 | ||
|
|
5027e9d281 | ||
|
|
701e23d1e4 | ||
|
|
516e60ed10 | ||
|
|
61c04cdaed | ||
|
|
3d58b592ed | ||
|
|
71aa0114bb | ||
|
|
cbd698b247 | ||
|
|
bf887b6800 | ||
|
|
d8827d033a | ||
|
|
434df90510 | ||
|
|
483b1367bc | ||
|
|
df694b9339 | ||
|
|
dcd55a5277 | ||
|
|
742600e30d | ||
|
|
62db78c613 | ||
|
|
f439fa811c | ||
|
|
169bead160 | ||
|
|
2ebff08169 | ||
|
|
5b1af11410 | ||
|
|
62ff4ae63c | ||
|
|
9ef5ce0581 | ||
|
|
d21a17dbb4 | ||
|
|
cfd0d53368 | ||
|
|
432e6df3e4 | ||
|
|
95fd28c290 | ||
|
|
2239a0ff2c | ||
|
|
0345ac460a | ||
|
|
8b0f15401b | ||
|
|
af988b5428 | ||
|
|
2e4ebbf522 | ||
|
|
84fd56fe2a | ||
|
|
a23ce11f2a | ||
|
|
a7dea23c83 | ||
|
|
453a3cbd73 | ||
|
|
3da2cfc475 | ||
|
|
22c794bf9b | ||
|
|
0c47bc711f | ||
|
|
cdd0e0a757 | ||
|
|
0bb1cba1bc | ||
|
|
662777cad5 | ||
|
|
b7e1eadbf8 | ||
|
|
685d842096 | ||
|
|
a3e6379a2c | ||
|
|
3e99e73234 | ||
|
|
efcde72ce7 | ||
|
|
7155f1e45a | ||
|
|
59463cd869 | ||
|
|
998842665b | ||
|
|
63a8243257 | ||
|
|
9d806a54bf | ||
|
|
855f6816d6 | ||
|
|
2b53ea5791 | ||
|
|
80768df1f5 | ||
|
|
61f48952f2 | ||
|
|
095d748e53 | ||
|
|
f5df8ad7f0 | ||
|
|
aaa4b67c31 | ||
|
|
4a5b97a91e | ||
|
|
8589763111 | ||
|
|
1ff7800b19 | ||
|
|
fbe115a9e4 | ||
|
|
3f17755a74 | ||
|
|
fbb1fb519f | ||
|
|
dc68d2454e | ||
|
|
80499598c1 | ||
|
|
b6dcafff11 | ||
|
|
219c7a280d | ||
|
|
3f9e8072e8 | ||
|
|
72f8c0a17c | ||
|
|
d679ddd839 | ||
|
|
cded303e29 | ||
|
|
050e7dcf7c | ||
|
|
ad37e45e20 | ||
|
|
2b8279f893 | ||
|
|
ef679d9871 | ||
|
|
3ba504d409 | ||
|
|
c11fa3240a | ||
|
|
ca22f0d886 | ||
|
|
23b298e107 | ||
|
|
6aaf307bc4 | ||
|
|
efcc24f9d4 | ||
|
|
24a8bf2d3e | ||
|
|
ef67832eae | ||
|
|
6eb0392a41 | ||
|
|
6880f434c0 | ||
|
|
6606de8b81 | ||
|
|
08cfef16a2 | ||
|
|
2f235c5843 | ||
|
|
fde72176e8 | ||
|
|
7c43d59107 | ||
|
|
dfb1f6a5b0 | ||
|
|
19ff66c384 | ||
|
|
d7a781ab5a | ||
|
|
48c8542657 | ||
|
|
b73a1b844f | ||
|
|
59f3e7dfea | ||
|
|
78df00cae0 | ||
|
|
745cee714a | ||
|
|
6d16699fff | ||
|
|
ea44cc33ca | ||
|
|
4db847ce3c | ||
|
|
231813e179 | ||
|
|
1c3a5c6ff8 |
@@ -18,7 +18,7 @@ cvs-dist: maintainer-check
|
||||
ver=`echo "$(VERSION)" | sed 's/\./_/g'`; \
|
||||
tag="$$pkg-$$ver"; \
|
||||
echo tag=$$tag; \
|
||||
if cvs -n log -h README| grep -e $$tag > /dev/null; then \
|
||||
if cvs -n log -h README| grep -e $$tag: > /dev/null; then \
|
||||
echo "VERSION not new; not tagging" 1>&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
@@ -33,22 +33,25 @@ my-distcheck: dist
|
||||
GZIP=$(GZIP) $(TAR) -C $(t) -zxf $(distdir).tar.gz
|
||||
cd $(t)/$(distdir) \
|
||||
&& ./configure --disable-nls \
|
||||
&& $(MAKE) \
|
||||
&& $(MAKE) CFLAGS='-Wformat -Werror' \
|
||||
&& $(MAKE) dvi \
|
||||
&& $(MAKE) check \
|
||||
&& $(MAKE) distclean
|
||||
cd $(t) && $(TAR) --diff -z -f ../$(distdir).tar.gz
|
||||
cd $(t) && mv $(distdir) $(distdir).old \
|
||||
&& $(TAR) -zxf ../$(distdir).tar.gz
|
||||
diff -ur $(t)/$(distdir).old $(t)/$(distdir)
|
||||
-rm -rf $(t)
|
||||
@echo "========================"; \
|
||||
echo "$(distdir).tar.gz is ready for distribution"; \
|
||||
echo "========================"
|
||||
|
||||
THIS_VERSION_REGEXP := $(shell echo $(VERSION)|sed 's/\./\\./g')
|
||||
# FIXME: this works only for test releases.
|
||||
THIS_VERSION_REGEXP = $(subst .,\.,$(VERSION))
|
||||
# FIXME: this works only for Gnits-style test releases.
|
||||
PREV_VERSION := $(shell echo $(VERSION)|tr a-z Xa-y)
|
||||
PREV_VERSION_REGEXP := $(shell echo $(PREV_VERSION)|sed 's/\./\\./g')
|
||||
v = Version
|
||||
url = ftp://alpha.gnu.org/gnu/$(distdir).tar.gz
|
||||
url-host-prefix = ftp://alpha.gnu.org
|
||||
url = $(url-host-prefix)/gnu/fetish/$(distdir).tar.gz
|
||||
md5 = $(shell md5sum < $(distdir).tar.gz|sed 's/ -//')
|
||||
|
||||
rel-check:
|
||||
@@ -75,6 +78,18 @@ announcement: NEWS ChangeLog $(distdir).tar.gz
|
||||
| grep -v '^\['; \
|
||||
echo; \
|
||||
echo ChangeLog entries:; \
|
||||
sed -n "/$v $(THIS_VERSION_REGEXP)/,/$v $(PREV_VERSION_REGEXP)/p" \
|
||||
ChangeLog | grep -v '\* $v'; \
|
||||
sed -n "1,/$v $(PREV_VERSION_REGEXP)/p" \
|
||||
ChangeLog; \
|
||||
)
|
||||
|
||||
alpha:
|
||||
$(MAKE) cvs-dist
|
||||
$(MAKE) -s announcement > /tmp/announcement
|
||||
ln $(distdir).tar.gz ../release
|
||||
chmod a-w $(distdir).tar.gz
|
||||
@echo =====================================
|
||||
@echo 'ncftp -u $(url-host-prefix)/fs/share/ftp/gnu/fetish/'
|
||||
@echo '# put $(distdir).tar.gz'
|
||||
@echo '# send the /tmp/announcement e-mail'
|
||||
@echo 'pot-mail $(distdir).tar.gz | bash'
|
||||
@echo =====================================
|
||||
|
||||
12
THANKS
12
THANKS
@@ -2,12 +2,18 @@ This is just a start at listing e-mail addresses of contributors.
|
||||
The rest of the addresses are still in the ChangeLog.
|
||||
|
||||
Achim Blumensath: blume@corona.oche.de
|
||||
aldomel: aldomel@ix.netcom.com
|
||||
Akim Demaille: demaille@inf.enst.fr
|
||||
Andreas Jaeger: jaeger@gnu.org
|
||||
Andreas Schwab: schwab@issan.informatik.uni-dortmund.de
|
||||
Andries Brouwer: Andries.Brouwer@cwi.nl
|
||||
Arne Henrik Juul: arnej@imf.unit.no
|
||||
Bauke Jan Douma: bjdouma@xs4all.nl
|
||||
Bengt Martensson: bengt@mathematik.uni-Bremen.de
|
||||
Bernd Leibing: bernd.leibing@rz.uni-ulm.de
|
||||
Bjorn Helgaas: helgaas@rsn.hp.com
|
||||
Bob McCracken: kerouac@ravenet.com
|
||||
Brendan O'Dea: bod@compusol.com.au
|
||||
Charles Karney: karney@pppl.gov
|
||||
Christian von Roques: roques@pond.sub.org
|
||||
Dirk Lattermann: dlatt@t-online.de
|
||||
@@ -25,18 +31,24 @@ James Antill: jmanti%essex.ac.uk@seralph21.essex.ac.uk
|
||||
James Tanis: jtt@soscorp.com
|
||||
Jesse Thilo: jgt2@eecs.lehigh.edu
|
||||
Joakim Rosqvist: dvljrt@cs.umu.se
|
||||
Johan Danielsson: joda@pdc.kth.se
|
||||
John Gatewood Ham: zappaman@alphabox.compsci.buu.ac.th
|
||||
Karl Heuer: kwzh@gnu.org
|
||||
Kjetil Torgrim Homme: kjetilho@ifi.uio.no
|
||||
Lars Hecking: lhecking@nmrc.ucc.ie
|
||||
Lorne Baker: lbaker@nitro.avint.net
|
||||
Marcus Daniels: marcus@sysc.pdx.edu
|
||||
Mark A. Thomas: thommark@access.digex.net
|
||||
Mark Harris: mark@monitor.designacc.com
|
||||
Mark Kettenis: kettenis@phys.uva.nl
|
||||
Marty Leisner: leisner@sdsp.mc.xerox.com
|
||||
Masami Takikawa: takikawm@CS.ORST.EDU
|
||||
Matthew S. Levine: mslevine@theory.lcs.mit.edu
|
||||
Michiel Bacchiani: bacchian@raven.bu.edu
|
||||
Miles Bader: miles@gnu.ai.mit.edu
|
||||
Noel Cragg: noel@red-bean.com
|
||||
Olav Morkrid: olav@funcom.com
|
||||
Per Kristian Hove: perhov@math.ntnu.no
|
||||
Peter Eriksson: peter@ifm.liu.se
|
||||
Paul Eggert: eggert@twinsun.com
|
||||
Philippe De Muyter: phdm@macqel.be
|
||||
|
||||
@@ -3,8 +3,12 @@ info_TEXINFOS = fileutils.texi
|
||||
|
||||
EXTRA_DIST = perm.texi getdate.texi
|
||||
|
||||
# Tell makeinfo to put everything in a single info file: sh-utils.info.
|
||||
# Otherwise, it would also generate files with names like sh-utils.info-[123],
|
||||
# and those names all map to one 14-byte name (sh-utils.info-) on some crufty
|
||||
# The following is necessary if the package name is 8 characters or longer.
|
||||
# If the info documentation would be split into 10 or more separate files,
|
||||
# then this is necessary even if the package name is 7 characters long.
|
||||
#
|
||||
# Tell makeinfo to put everything in a single info file: <package>.info.
|
||||
# Otherwise, it would also generate files with names like <package>.info-[123],
|
||||
# and those names all map to one 14-byte name (<package>.info-) on some crufty
|
||||
# old systems.
|
||||
MAKEINFO = makeinfo --no-split
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.3b from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
@@ -31,7 +32,7 @@ mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
@@ -92,9 +93,13 @@ info_TEXINFOS = fileutils.texi
|
||||
|
||||
EXTRA_DIST = perm.texi getdate.texi
|
||||
|
||||
# Tell makeinfo to put everything in a single info file: sh-utils.info.
|
||||
# Otherwise, it would also generate files with names like sh-utils.info-[123],
|
||||
# and those names all map to one 14-byte name (sh-utils.info-) on some crufty
|
||||
# The following is necessary if the package name is 8 characters or longer.
|
||||
# If the info documentation would be split into 10 or more separate files,
|
||||
# then this is necessary even if the package name is 7 characters long.
|
||||
#
|
||||
# Tell makeinfo to put everything in a single info file: <package>.info.
|
||||
# Otherwise, it would also generate files with names like <package>.info-[123],
|
||||
# and those names all map to one 14-byte name (<package>.info-) on some crufty
|
||||
# old systems.
|
||||
MAKEINFO = makeinfo --no-split
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
@@ -244,10 +249,11 @@ dist-info: $(INFO_DEPS)
|
||||
|
||||
mostlyclean-aminfo:
|
||||
-rm -f fileutils.aux fileutils.cp fileutils.cps fileutils.dvi \
|
||||
fileutils.fn fileutils.fns fileutils.ky fileutils.kys \
|
||||
fileutils.ps fileutils.log fileutils.pg fileutils.toc \
|
||||
fileutils.tp fileutils.tps fileutils.vr fileutils.vrs \
|
||||
fileutils.op fileutils.tr fileutils.cv fileutils.cn
|
||||
fileutils.fl fileutils.fn fileutils.fns fileutils.ky \
|
||||
fileutils.kys fileutils.ps fileutils.log fileutils.pg \
|
||||
fileutils.toc fileutils.tp fileutils.tps fileutils.vr \
|
||||
fileutils.vrs fileutils.op fileutils.tr fileutils.cv \
|
||||
fileutils.cn
|
||||
|
||||
clean-aminfo:
|
||||
|
||||
@@ -280,11 +286,10 @@ distdir: $(DISTFILES)
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
done
|
||||
$(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
|
||||
$(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
|
||||
info: $(INFO_DEPS)
|
||||
dvi: $(DVIS)
|
||||
check: all
|
||||
$(MAKE)
|
||||
installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
@@ -298,25 +303,20 @@ install: install-exec install-data all
|
||||
uninstall: uninstall-info
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(infodir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-vti mostlyclean-aminfo mostlyclean-generic
|
||||
|
||||
clean: clean-vti clean-aminfo clean-generic mostlyclean
|
||||
|
||||
@@ -166,7 +166,7 @@ The GNU shell utilities are mostly compatible with the POSIX.2 standard.
|
||||
@c This paragraph appears in all of fileutils.texi, textutils.texi, and
|
||||
@c sh-utils.texi too -- so be sure to keep them consistent.
|
||||
@cindex bugs, reporting
|
||||
Please report bugs to @samp{sh-utils-bugs@@gnu.org}. Remember
|
||||
Please report bugs to @samp{bug-sh-utils@@gnu.org}. Remember
|
||||
to include the version number, machine architecture, input files, and
|
||||
any other information needed to reproduce the bug: your input, what you
|
||||
expected, what you got, and why it is wrong. Diffs are welcome, but
|
||||
|
||||
1754
doc/texinfo.tex
1754
doc/texinfo.tex
File diff suppressed because it is too large
Load Diff
@@ -220,7 +220,7 @@ The GNU text utilities are mostly compatible with the @sc{POSIX.2} standard.
|
||||
@c This paragraph appears in all of fileutils.texi, textutils.texi, and
|
||||
@c sh-utils.texi too -- so be sure to keep them consistent.
|
||||
@cindex bugs, reporting
|
||||
Please report bugs to @email{textutils-bugs@@gnu.org}. Remember
|
||||
Please report bugs to @email{bug-textutils@@gnu.org}. Remember
|
||||
to include the version number, machine architecture, input files, and
|
||||
any other information needed to reproduce the bug: your input, what you
|
||||
expected, what you got, and why it is wrong. Diffs are welcome, but
|
||||
@@ -2327,7 +2327,7 @@ all GNU extensions and revert to traditional mode, thus introducing some
|
||||
limitations, and changes several of the program's default option values.
|
||||
When @samp{-G} is not specified, GNU extensions are always enabled. GNU
|
||||
extensions to @code{ptx} are documented wherever appropriate in this
|
||||
document. See @xref{Compatibility in ptx} for an explicit list of them.
|
||||
document. For the full list, see @xref{Compatibility in ptx}.
|
||||
|
||||
Individual options are explained in incoming sections.
|
||||
|
||||
@@ -2471,9 +2471,9 @@ only if it is given in the Only file and not given in the Ignore file.
|
||||
|
||||
On each input line, the leading sequence of non white characters will be
|
||||
taken to be a reference that has the purpose of identifying this input
|
||||
line on the produced permuted index. See @xref{Output formatting in ptx} for
|
||||
more information about reference production. Using this option change
|
||||
the default value for option @code{-S}.
|
||||
line on the produced permuted index. For more information about reference
|
||||
production, see @xref{Output formatting in ptx}.
|
||||
Using this option changes the default value for option @code{-S}.
|
||||
|
||||
Using this option, the program does not try very hard to remove
|
||||
references from contexts in output, but it succeeds in doing so
|
||||
|
||||
@@ -6,3 +6,5 @@ safe-lstat.c
|
||||
safe-lstat.h
|
||||
getdate.tab.c
|
||||
.deps
|
||||
stat.c
|
||||
lstat.c
|
||||
|
||||
@@ -18,10 +18,19 @@ libfu_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||
libfu_a_DEPENDENCIES = $(libfu_a_LIBADD)
|
||||
|
||||
noinst_HEADERS = argmatch.h backupfile.h closeout.h \
|
||||
error.h exclude.h filemode.h fnmatch.h fsusage.h \
|
||||
dirname.h error.h exclude.h filemode.h fnmatch.h fsusage.h \
|
||||
getdate.h getline.h getopt.h group-member.h human.h lchown.h long-options.h \
|
||||
makepath.h modechange.h mountlist.h hash.h path-concat.h pathmax.h \
|
||||
posixtm.h quotearg.h regex.h safe-read.h save-cwd.h savedir.h strverscmp.h \
|
||||
xalloc.h xstrtol.h xstrtoul.h
|
||||
|
||||
BUILT_SOURCES = getdate.c
|
||||
BUILT_SOURCES = getdate.c lstat.c stat.c
|
||||
|
||||
EXTRA_DIST = xstat.in
|
||||
lstat.c: xstat.in
|
||||
sed -e '/@IGNORE@/d' -e 's/@xstat@/lstat/g' $(srcdir)/xstat.in > $@-t
|
||||
mv $@-t $@
|
||||
|
||||
stat.c: xstat.in
|
||||
sed -e '/@IGNORE@/d' -e 's/@xstat@/stat/g' $(srcdir)/xstat.in > $@-t
|
||||
mv $@-t $@
|
||||
|
||||
202
lib/Makefile.in
202
lib/Makefile.in
@@ -1,9 +1,10 @@
|
||||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.3b from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
@@ -31,7 +32,7 @@ mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
@@ -107,13 +108,15 @@ libfu_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||
libfu_a_DEPENDENCIES = $(libfu_a_LIBADD)
|
||||
|
||||
noinst_HEADERS = argmatch.h backupfile.h closeout.h \
|
||||
error.h exclude.h filemode.h fnmatch.h fsusage.h \
|
||||
dirname.h error.h exclude.h filemode.h fnmatch.h fsusage.h \
|
||||
getdate.h getline.h getopt.h group-member.h human.h lchown.h long-options.h \
|
||||
makepath.h modechange.h mountlist.h hash.h path-concat.h pathmax.h \
|
||||
posixtm.h quotearg.h regex.h safe-read.h save-cwd.h savedir.h strverscmp.h \
|
||||
xalloc.h xstrtol.h xstrtoul.h
|
||||
|
||||
BUILT_SOURCES = getdate.c
|
||||
BUILT_SOURCES = getdate.c lstat.c stat.c
|
||||
|
||||
EXTRA_DIST = xstat.in
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
@@ -134,8 +137,8 @@ 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
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in TODO alloca.c chown.c error.c \
|
||||
@@ -158,17 +161,18 @@ DEP_FILES = .deps/addext.P .deps/alloca.P .deps/argmatch.P \
|
||||
.deps/ftruncate.P .deps/full-write.P .deps/getdate .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/lchown.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/quotearg.P .deps/realloc.P .deps/regex.P .deps/rename.P \
|
||||
.deps/rmdir.P .deps/rpmatch.P .deps/safe-read.P .deps/save-cwd.P \
|
||||
.deps/savedir.P .deps/stat.P .deps/stpcpy.P .deps/strcasecmp.P \
|
||||
.deps/strdup.P .deps/strftime.P .deps/stripslash.P .deps/strndup.P \
|
||||
.deps/strstr.P .deps/strtol.P .deps/strtoul.P .deps/strverscmp.P \
|
||||
.deps/userspec.P .deps/utime.P .deps/xgetcwd.P .deps/xmalloc.P \
|
||||
.deps/xstrdup.P .deps/xstrtol.P .deps/xstrtoul.P .deps/yesno.P
|
||||
.deps/isdir.P .deps/lchown.P .deps/long-options.P .deps/lstat \
|
||||
.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/quotearg.P .deps/realloc.P \
|
||||
.deps/regex.P .deps/rename.P .deps/rmdir.P .deps/rpmatch.P \
|
||||
.deps/safe-read.P .deps/save-cwd.P .deps/savedir.P .deps/stat \
|
||||
.deps/stat.P .deps/stpcpy.P .deps/strcasecmp.P .deps/strdup.P \
|
||||
.deps/strftime.P .deps/stripslash.P .deps/strndup.P .deps/strstr.P \
|
||||
.deps/strtol.P .deps/strtoul.P .deps/strverscmp.P .deps/userspec.P \
|
||||
.deps/utime.P .deps/xgetcwd.P .deps/xmalloc.P .deps/xstrdup.P \
|
||||
.deps/xstrtol.P .deps/xstrtoul.P .deps/yesno.P
|
||||
SOURCES = $(libfu_a_SOURCES)
|
||||
OBJECTS = $(libfu_a_OBJECTS)
|
||||
|
||||
@@ -209,10 +213,10 @@ distclean-compile:
|
||||
|
||||
maintainer-clean-compile:
|
||||
../src/ansi2knr: ../src/ansi2knr.o
|
||||
cd ../src && $(MAKE) ansi2knr
|
||||
cd ../src && $(MAKE) $(AM_MAKEFLAGS) ansi2knr
|
||||
|
||||
../src/ansi2knr.o:
|
||||
cd ../src && $(MAKE) ansi2knr.o
|
||||
cd ../src && $(MAKE) $(AM_MAKEFLAGS) ansi2knr.o
|
||||
|
||||
|
||||
mostlyclean-kr:
|
||||
@@ -229,152 +233,152 @@ libfu.a: $(libfu_a_OBJECTS) $(libfu_a_DEPENDENCIES)
|
||||
$(AR) cru libfu.a $(libfu_a_OBJECTS) $(libfu_a_LIBADD)
|
||||
$(RANLIB) libfu.a
|
||||
.y.c:
|
||||
$(YACC) $(YFLAGS) $< && mv y.tab.c $*.c
|
||||
$(YACC) $(AM_YFLAGS) $(YFLAGS) $< && mv y.tab.c $*.c
|
||||
if test -f y.tab.h; then \
|
||||
if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
|
||||
else :; fi
|
||||
getdate.h: getdate.c
|
||||
|
||||
addext_.c: addext.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/addext.c; then echo $(srcdir)/addext.c; else echo addext.c; fi` | $(ANSI2KNR) > addext_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/addext.c; then echo $(srcdir)/addext.c; else echo addext.c; fi` | $(ANSI2KNR) > addext_.c
|
||||
alloca_.c: alloca.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/alloca.c; then echo $(srcdir)/alloca.c; else echo alloca.c; fi` | $(ANSI2KNR) > alloca_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/alloca.c; then echo $(srcdir)/alloca.c; else echo alloca.c; fi` | $(ANSI2KNR) > alloca_.c
|
||||
argmatch_.c: argmatch.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/argmatch.c; then echo $(srcdir)/argmatch.c; else echo argmatch.c; fi` | $(ANSI2KNR) > argmatch_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/argmatch.c; then echo $(srcdir)/argmatch.c; else echo argmatch.c; fi` | $(ANSI2KNR) > argmatch_.c
|
||||
backupfile_.c: backupfile.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/backupfile.c; then echo $(srcdir)/backupfile.c; else echo backupfile.c; fi` | $(ANSI2KNR) > backupfile_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/backupfile.c; then echo $(srcdir)/backupfile.c; else echo backupfile.c; fi` | $(ANSI2KNR) > backupfile_.c
|
||||
basename_.c: basename.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/basename.c; then echo $(srcdir)/basename.c; else echo basename.c; fi` | $(ANSI2KNR) > basename_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/basename.c; then echo $(srcdir)/basename.c; else echo basename.c; fi` | $(ANSI2KNR) > basename_.c
|
||||
chown_.c: chown.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/chown.c; then echo $(srcdir)/chown.c; else echo chown.c; fi` | $(ANSI2KNR) > chown_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/chown.c; then echo $(srcdir)/chown.c; else echo chown.c; fi` | $(ANSI2KNR) > chown_.c
|
||||
closeout_.c: closeout.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/closeout.c; then echo $(srcdir)/closeout.c; else echo closeout.c; fi` | $(ANSI2KNR) > closeout_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/closeout.c; then echo $(srcdir)/closeout.c; else echo closeout.c; fi` | $(ANSI2KNR) > closeout_.c
|
||||
dirname_.c: dirname.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/dirname.c; then echo $(srcdir)/dirname.c; else echo dirname.c; fi` | $(ANSI2KNR) > dirname_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dirname.c; then echo $(srcdir)/dirname.c; else echo dirname.c; fi` | $(ANSI2KNR) > dirname_.c
|
||||
error_.c: error.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/error.c; then echo $(srcdir)/error.c; else echo error.c; fi` | $(ANSI2KNR) > error_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/error.c; then echo $(srcdir)/error.c; else echo error.c; fi` | $(ANSI2KNR) > error_.c
|
||||
euidaccess_.c: euidaccess.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/euidaccess.c; then echo $(srcdir)/euidaccess.c; else echo euidaccess.c; fi` | $(ANSI2KNR) > euidaccess_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/euidaccess.c; then echo $(srcdir)/euidaccess.c; else echo euidaccess.c; fi` | $(ANSI2KNR) > euidaccess_.c
|
||||
exclude_.c: exclude.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/exclude.c; then echo $(srcdir)/exclude.c; else echo exclude.c; fi` | $(ANSI2KNR) > exclude_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/exclude.c; then echo $(srcdir)/exclude.c; else echo exclude.c; fi` | $(ANSI2KNR) > exclude_.c
|
||||
fileblocks_.c: fileblocks.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/fileblocks.c; then echo $(srcdir)/fileblocks.c; else echo fileblocks.c; fi` | $(ANSI2KNR) > fileblocks_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/fileblocks.c; then echo $(srcdir)/fileblocks.c; else echo fileblocks.c; fi` | $(ANSI2KNR) > fileblocks_.c
|
||||
filemode_.c: filemode.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/filemode.c; then echo $(srcdir)/filemode.c; else echo filemode.c; fi` | $(ANSI2KNR) > filemode_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/filemode.c; then echo $(srcdir)/filemode.c; else echo filemode.c; fi` | $(ANSI2KNR) > filemode_.c
|
||||
fnmatch_.c: fnmatch.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/fnmatch.c; then echo $(srcdir)/fnmatch.c; else echo fnmatch.c; fi` | $(ANSI2KNR) > fnmatch_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/fnmatch.c; then echo $(srcdir)/fnmatch.c; else echo fnmatch.c; fi` | $(ANSI2KNR) > fnmatch_.c
|
||||
fsusage_.c: fsusage.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/fsusage.c; then echo $(srcdir)/fsusage.c; else echo fsusage.c; fi` | $(ANSI2KNR) > fsusage_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/fsusage.c; then echo $(srcdir)/fsusage.c; else echo fsusage.c; fi` | $(ANSI2KNR) > fsusage_.c
|
||||
ftruncate_.c: ftruncate.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/ftruncate.c; then echo $(srcdir)/ftruncate.c; else echo ftruncate.c; fi` | $(ANSI2KNR) > ftruncate_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ftruncate.c; then echo $(srcdir)/ftruncate.c; else echo ftruncate.c; fi` | $(ANSI2KNR) > ftruncate_.c
|
||||
full-write_.c: full-write.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/full-write.c; then echo $(srcdir)/full-write.c; else echo full-write.c; fi` | $(ANSI2KNR) > full-write_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/full-write.c; then echo $(srcdir)/full-write.c; else echo full-write.c; fi` | $(ANSI2KNR) > full-write_.c
|
||||
getdate_.c: getdate.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/getdate.c; then echo $(srcdir)/getdate.c; else echo getdate.c; fi` | $(ANSI2KNR) > getdate_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getdate.c; then echo $(srcdir)/getdate.c; else echo getdate.c; fi` | $(ANSI2KNR) > getdate_.c
|
||||
getgroups_.c: getgroups.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/getgroups.c; then echo $(srcdir)/getgroups.c; else echo getgroups.c; fi` | $(ANSI2KNR) > getgroups_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getgroups.c; then echo $(srcdir)/getgroups.c; else echo getgroups.c; fi` | $(ANSI2KNR) > getgroups_.c
|
||||
getline_.c: getline.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/getline.c; then echo $(srcdir)/getline.c; else echo getline.c; fi` | $(ANSI2KNR) > getline_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getline.c; then echo $(srcdir)/getline.c; else echo getline.c; fi` | $(ANSI2KNR) > getline_.c
|
||||
getopt_.c: getopt.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/getopt.c; then echo $(srcdir)/getopt.c; else echo getopt.c; fi` | $(ANSI2KNR) > getopt_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getopt.c; then echo $(srcdir)/getopt.c; else echo getopt.c; fi` | $(ANSI2KNR) > getopt_.c
|
||||
getopt1_.c: getopt1.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/getopt1.c; then echo $(srcdir)/getopt1.c; else echo getopt1.c; fi` | $(ANSI2KNR) > getopt1_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getopt1.c; then echo $(srcdir)/getopt1.c; else echo getopt1.c; fi` | $(ANSI2KNR) > getopt1_.c
|
||||
group-member_.c: group-member.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/group-member.c; then echo $(srcdir)/group-member.c; else echo group-member.c; fi` | $(ANSI2KNR) > group-member_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/group-member.c; then echo $(srcdir)/group-member.c; else echo group-member.c; fi` | $(ANSI2KNR) > group-member_.c
|
||||
hash_.c: hash.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/hash.c; then echo $(srcdir)/hash.c; else echo hash.c; fi` | $(ANSI2KNR) > hash_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/hash.c; then echo $(srcdir)/hash.c; else echo hash.c; fi` | $(ANSI2KNR) > hash_.c
|
||||
human_.c: human.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/human.c; then echo $(srcdir)/human.c; else echo human.c; fi` | $(ANSI2KNR) > human_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/human.c; then echo $(srcdir)/human.c; else echo human.c; fi` | $(ANSI2KNR) > human_.c
|
||||
idcache_.c: idcache.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/idcache.c; then echo $(srcdir)/idcache.c; else echo idcache.c; fi` | $(ANSI2KNR) > idcache_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/idcache.c; then echo $(srcdir)/idcache.c; else echo idcache.c; fi` | $(ANSI2KNR) > idcache_.c
|
||||
isdir_.c: isdir.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/isdir.c; then echo $(srcdir)/isdir.c; else echo isdir.c; fi` | $(ANSI2KNR) > isdir_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/isdir.c; then echo $(srcdir)/isdir.c; else echo isdir.c; fi` | $(ANSI2KNR) > isdir_.c
|
||||
lchown_.c: lchown.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/lchown.c; then echo $(srcdir)/lchown.c; else echo lchown.c; fi` | $(ANSI2KNR) > lchown_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lchown.c; then echo $(srcdir)/lchown.c; else echo lchown.c; fi` | $(ANSI2KNR) > lchown_.c
|
||||
long-options_.c: long-options.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/long-options.c; then echo $(srcdir)/long-options.c; else echo long-options.c; fi` | $(ANSI2KNR) > long-options_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/long-options.c; then echo $(srcdir)/long-options.c; else echo long-options.c; fi` | $(ANSI2KNR) > long-options_.c
|
||||
lstat_.c: lstat.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/lstat.c; then echo $(srcdir)/lstat.c; else echo lstat.c; fi` | $(ANSI2KNR) > lstat_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lstat.c; then echo $(srcdir)/lstat.c; else echo lstat.c; fi` | $(ANSI2KNR) > lstat_.c
|
||||
makepath_.c: makepath.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/makepath.c; then echo $(srcdir)/makepath.c; else echo makepath.c; fi` | $(ANSI2KNR) > makepath_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/makepath.c; then echo $(srcdir)/makepath.c; else echo makepath.c; fi` | $(ANSI2KNR) > makepath_.c
|
||||
malloc_.c: malloc.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/malloc.c; then echo $(srcdir)/malloc.c; else echo malloc.c; fi` | $(ANSI2KNR) > malloc_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/malloc.c; then echo $(srcdir)/malloc.c; else echo malloc.c; fi` | $(ANSI2KNR) > malloc_.c
|
||||
memcmp_.c: memcmp.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/memcmp.c; then echo $(srcdir)/memcmp.c; else echo memcmp.c; fi` | $(ANSI2KNR) > memcmp_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memcmp.c; then echo $(srcdir)/memcmp.c; else echo memcmp.c; fi` | $(ANSI2KNR) > memcmp_.c
|
||||
memcpy_.c: memcpy.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/memcpy.c; then echo $(srcdir)/memcpy.c; else echo memcpy.c; fi` | $(ANSI2KNR) > memcpy_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memcpy.c; then echo $(srcdir)/memcpy.c; else echo memcpy.c; fi` | $(ANSI2KNR) > memcpy_.c
|
||||
memset_.c: memset.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/memset.c; then echo $(srcdir)/memset.c; else echo memset.c; fi` | $(ANSI2KNR) > memset_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memset.c; then echo $(srcdir)/memset.c; else echo memset.c; fi` | $(ANSI2KNR) > memset_.c
|
||||
mkdir_.c: mkdir.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/mkdir.c; then echo $(srcdir)/mkdir.c; else echo mkdir.c; fi` | $(ANSI2KNR) > mkdir_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mkdir.c; then echo $(srcdir)/mkdir.c; else echo mkdir.c; fi` | $(ANSI2KNR) > mkdir_.c
|
||||
mktime_.c: mktime.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/mktime.c; then echo $(srcdir)/mktime.c; else echo mktime.c; fi` | $(ANSI2KNR) > mktime_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mktime.c; then echo $(srcdir)/mktime.c; else echo mktime.c; fi` | $(ANSI2KNR) > mktime_.c
|
||||
modechange_.c: modechange.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/modechange.c; then echo $(srcdir)/modechange.c; else echo modechange.c; fi` | $(ANSI2KNR) > modechange_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/modechange.c; then echo $(srcdir)/modechange.c; else echo modechange.c; fi` | $(ANSI2KNR) > modechange_.c
|
||||
mountlist_.c: mountlist.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/mountlist.c; then echo $(srcdir)/mountlist.c; else echo mountlist.c; fi` | $(ANSI2KNR) > mountlist_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mountlist.c; then echo $(srcdir)/mountlist.c; else echo mountlist.c; fi` | $(ANSI2KNR) > mountlist_.c
|
||||
obstack_.c: obstack.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/obstack.c; then echo $(srcdir)/obstack.c; else echo obstack.c; fi` | $(ANSI2KNR) > obstack_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/obstack.c; then echo $(srcdir)/obstack.c; else echo obstack.c; fi` | $(ANSI2KNR) > obstack_.c
|
||||
path-concat_.c: path-concat.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/path-concat.c; then echo $(srcdir)/path-concat.c; else echo path-concat.c; fi` | $(ANSI2KNR) > path-concat_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/path-concat.c; then echo $(srcdir)/path-concat.c; else echo path-concat.c; fi` | $(ANSI2KNR) > path-concat_.c
|
||||
posixtm_.c: posixtm.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/posixtm.c; then echo $(srcdir)/posixtm.c; else echo posixtm.c; fi` | $(ANSI2KNR) > posixtm_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/posixtm.c; then echo $(srcdir)/posixtm.c; else echo posixtm.c; fi` | $(ANSI2KNR) > posixtm_.c
|
||||
quotearg_.c: quotearg.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/quotearg.c; then echo $(srcdir)/quotearg.c; else echo quotearg.c; fi` | $(ANSI2KNR) > quotearg_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/quotearg.c; then echo $(srcdir)/quotearg.c; else echo quotearg.c; fi` | $(ANSI2KNR) > quotearg_.c
|
||||
realloc_.c: realloc.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/realloc.c; then echo $(srcdir)/realloc.c; else echo realloc.c; fi` | $(ANSI2KNR) > realloc_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/realloc.c; then echo $(srcdir)/realloc.c; else echo realloc.c; fi` | $(ANSI2KNR) > realloc_.c
|
||||
regex_.c: regex.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/regex.c; then echo $(srcdir)/regex.c; else echo regex.c; fi` | $(ANSI2KNR) > regex_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/regex.c; then echo $(srcdir)/regex.c; else echo regex.c; fi` | $(ANSI2KNR) > regex_.c
|
||||
rename_.c: rename.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/rename.c; then echo $(srcdir)/rename.c; else echo rename.c; fi` | $(ANSI2KNR) > rename_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/rename.c; then echo $(srcdir)/rename.c; else echo rename.c; fi` | $(ANSI2KNR) > rename_.c
|
||||
rmdir_.c: rmdir.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/rmdir.c; then echo $(srcdir)/rmdir.c; else echo rmdir.c; fi` | $(ANSI2KNR) > rmdir_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/rmdir.c; then echo $(srcdir)/rmdir.c; else echo rmdir.c; fi` | $(ANSI2KNR) > rmdir_.c
|
||||
rpmatch_.c: rpmatch.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/rpmatch.c; then echo $(srcdir)/rpmatch.c; else echo rpmatch.c; fi` | $(ANSI2KNR) > rpmatch_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/rpmatch.c; then echo $(srcdir)/rpmatch.c; else echo rpmatch.c; fi` | $(ANSI2KNR) > rpmatch_.c
|
||||
safe-read_.c: safe-read.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/safe-read.c; then echo $(srcdir)/safe-read.c; else echo safe-read.c; fi` | $(ANSI2KNR) > safe-read_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/safe-read.c; then echo $(srcdir)/safe-read.c; else echo safe-read.c; fi` | $(ANSI2KNR) > safe-read_.c
|
||||
save-cwd_.c: save-cwd.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/save-cwd.c; then echo $(srcdir)/save-cwd.c; else echo save-cwd.c; fi` | $(ANSI2KNR) > save-cwd_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/save-cwd.c; then echo $(srcdir)/save-cwd.c; else echo save-cwd.c; fi` | $(ANSI2KNR) > save-cwd_.c
|
||||
savedir_.c: savedir.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/savedir.c; then echo $(srcdir)/savedir.c; else echo savedir.c; fi` | $(ANSI2KNR) > savedir_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/savedir.c; then echo $(srcdir)/savedir.c; else echo savedir.c; fi` | $(ANSI2KNR) > savedir_.c
|
||||
stat_.c: stat.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/stat.c; then echo $(srcdir)/stat.c; else echo stat.c; fi` | $(ANSI2KNR) > stat_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/stat.c; then echo $(srcdir)/stat.c; else echo stat.c; fi` | $(ANSI2KNR) > stat_.c
|
||||
stpcpy_.c: stpcpy.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/stpcpy.c; then echo $(srcdir)/stpcpy.c; else echo stpcpy.c; fi` | $(ANSI2KNR) > stpcpy_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/stpcpy.c; then echo $(srcdir)/stpcpy.c; else echo stpcpy.c; fi` | $(ANSI2KNR) > stpcpy_.c
|
||||
strcasecmp_.c: strcasecmp.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/strcasecmp.c; then echo $(srcdir)/strcasecmp.c; else echo strcasecmp.c; fi` | $(ANSI2KNR) > strcasecmp_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strcasecmp.c; then echo $(srcdir)/strcasecmp.c; else echo strcasecmp.c; fi` | $(ANSI2KNR) > strcasecmp_.c
|
||||
strdup_.c: strdup.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/strdup.c; then echo $(srcdir)/strdup.c; else echo strdup.c; fi` | $(ANSI2KNR) > strdup_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strdup.c; then echo $(srcdir)/strdup.c; else echo strdup.c; fi` | $(ANSI2KNR) > strdup_.c
|
||||
strftime_.c: strftime.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/strftime.c; then echo $(srcdir)/strftime.c; else echo strftime.c; fi` | $(ANSI2KNR) > strftime_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strftime.c; then echo $(srcdir)/strftime.c; else echo strftime.c; fi` | $(ANSI2KNR) > strftime_.c
|
||||
stripslash_.c: stripslash.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/stripslash.c; then echo $(srcdir)/stripslash.c; else echo stripslash.c; fi` | $(ANSI2KNR) > stripslash_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/stripslash.c; then echo $(srcdir)/stripslash.c; else echo stripslash.c; fi` | $(ANSI2KNR) > stripslash_.c
|
||||
strndup_.c: strndup.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/strndup.c; then echo $(srcdir)/strndup.c; else echo strndup.c; fi` | $(ANSI2KNR) > strndup_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strndup.c; then echo $(srcdir)/strndup.c; else echo strndup.c; fi` | $(ANSI2KNR) > strndup_.c
|
||||
strstr_.c: strstr.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/strstr.c; then echo $(srcdir)/strstr.c; else echo strstr.c; fi` | $(ANSI2KNR) > strstr_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strstr.c; then echo $(srcdir)/strstr.c; else echo strstr.c; fi` | $(ANSI2KNR) > strstr_.c
|
||||
strtol_.c: strtol.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/strtol.c; then echo $(srcdir)/strtol.c; else echo strtol.c; fi` | $(ANSI2KNR) > strtol_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strtol.c; then echo $(srcdir)/strtol.c; else echo strtol.c; fi` | $(ANSI2KNR) > strtol_.c
|
||||
strtoul_.c: strtoul.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/strtoul.c; then echo $(srcdir)/strtoul.c; else echo strtoul.c; fi` | $(ANSI2KNR) > strtoul_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strtoul.c; then echo $(srcdir)/strtoul.c; else echo strtoul.c; fi` | $(ANSI2KNR) > strtoul_.c
|
||||
strverscmp_.c: strverscmp.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/strverscmp.c; then echo $(srcdir)/strverscmp.c; else echo strverscmp.c; fi` | $(ANSI2KNR) > strverscmp_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strverscmp.c; then echo $(srcdir)/strverscmp.c; else echo strverscmp.c; fi` | $(ANSI2KNR) > strverscmp_.c
|
||||
userspec_.c: userspec.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/userspec.c; then echo $(srcdir)/userspec.c; else echo userspec.c; fi` | $(ANSI2KNR) > userspec_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/userspec.c; then echo $(srcdir)/userspec.c; else echo userspec.c; fi` | $(ANSI2KNR) > userspec_.c
|
||||
utime_.c: utime.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/utime.c; then echo $(srcdir)/utime.c; else echo utime.c; fi` | $(ANSI2KNR) > utime_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/utime.c; then echo $(srcdir)/utime.c; else echo utime.c; fi` | $(ANSI2KNR) > utime_.c
|
||||
xgetcwd_.c: xgetcwd.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/xgetcwd.c; then echo $(srcdir)/xgetcwd.c; else echo xgetcwd.c; fi` | $(ANSI2KNR) > xgetcwd_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xgetcwd.c; then echo $(srcdir)/xgetcwd.c; else echo xgetcwd.c; fi` | $(ANSI2KNR) > xgetcwd_.c
|
||||
xmalloc_.c: xmalloc.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/xmalloc.c; then echo $(srcdir)/xmalloc.c; else echo xmalloc.c; fi` | $(ANSI2KNR) > xmalloc_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xmalloc.c; then echo $(srcdir)/xmalloc.c; else echo xmalloc.c; fi` | $(ANSI2KNR) > xmalloc_.c
|
||||
xstrdup_.c: xstrdup.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/xstrdup.c; then echo $(srcdir)/xstrdup.c; else echo xstrdup.c; fi` | $(ANSI2KNR) > xstrdup_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xstrdup.c; then echo $(srcdir)/xstrdup.c; else echo xstrdup.c; fi` | $(ANSI2KNR) > xstrdup_.c
|
||||
xstrtol_.c: xstrtol.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/xstrtol.c; then echo $(srcdir)/xstrtol.c; else echo xstrtol.c; fi` | $(ANSI2KNR) > xstrtol_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xstrtol.c; then echo $(srcdir)/xstrtol.c; else echo xstrtol.c; fi` | $(ANSI2KNR) > xstrtol_.c
|
||||
xstrtoul_.c: xstrtoul.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/xstrtoul.c; then echo $(srcdir)/xstrtoul.c; else echo xstrtoul.c; fi` | $(ANSI2KNR) > xstrtoul_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/xstrtoul.c; then echo $(srcdir)/xstrtoul.c; else echo xstrtoul.c; fi` | $(ANSI2KNR) > xstrtoul_.c
|
||||
yesno_.c: yesno.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS) `if test -f $(srcdir)/yesno.c; then echo $(srcdir)/yesno.c; else echo yesno.c; fi` | $(ANSI2KNR) > yesno_.c
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/yesno.c; then echo $(srcdir)/yesno.c; else echo yesno.c; fi` | $(ANSI2KNR) > yesno_.c
|
||||
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 \
|
||||
@@ -456,7 +460,6 @@ maintainer-clean-depend:
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE)
|
||||
installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
@@ -470,24 +473,20 @@ install: install-exec install-data all
|
||||
uninstall:
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
-test -z "getdatehgetdatec$(BUILT_SOURCES)" || rm -f getdateh getdatec $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-noinstLIBRARIES mostlyclean-compile \
|
||||
mostlyclean-kr mostlyclean-tags mostlyclean-depend \
|
||||
mostlyclean-generic
|
||||
@@ -517,6 +516,13 @@ install-data install uninstall all installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
|
||||
lstat.c: xstat.in
|
||||
sed -e '/@IGNORE@/d' -e 's/@xstat@/lstat/g' $(srcdir)/xstat.in > $@-t
|
||||
mv $@-t $@
|
||||
|
||||
stat.c: xstat.in
|
||||
sed -e '/@IGNORE@/d' -e 's/@xstat@/stat/g' $(srcdir)/xstat.in > $@-t
|
||||
mv $@-t $@
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
||||
@@ -161,8 +161,7 @@ static header *last_alloca_header = NULL; /* -> last alloca header. */
|
||||
implementations of C, for example under Gould's UTX/32. */
|
||||
|
||||
pointer
|
||||
alloca (size)
|
||||
unsigned size;
|
||||
alloca (unsigned size)
|
||||
{
|
||||
auto char probe; /* Probes stack depth: */
|
||||
register char *depth = ADDRESS_FUNCTION (probe);
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
If not, write to the Free Software Foundation,
|
||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifndef BACKUPFILE_H_
|
||||
# define BACKUPFILE_H_
|
||||
|
||||
/* When to make backup files. */
|
||||
enum backup_type
|
||||
{
|
||||
@@ -33,7 +36,7 @@ enum backup_type
|
||||
numbered
|
||||
};
|
||||
|
||||
#define VALID_BACKUP_TYPE(Type) \
|
||||
# define VALID_BACKUP_TYPE(Type) \
|
||||
((Type) == none \
|
||||
|| (Type) == simple \
|
||||
|| (Type) == numbered_existing \
|
||||
@@ -41,15 +44,17 @@ enum backup_type
|
||||
|
||||
extern char const *simple_backup_suffix;
|
||||
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
char *base_name PARAMS ((char const *));
|
||||
char *find_backup_file_name PARAMS ((char const *, enum backup_type));
|
||||
enum backup_type get_version PARAMS ((char const *));
|
||||
void addext PARAMS ((char *, char const *, int));
|
||||
|
||||
#endif /* ! BACKUPFILE_H_ */
|
||||
|
||||
@@ -34,10 +34,7 @@
|
||||
/* FIXME: describe. */
|
||||
|
||||
int
|
||||
rpl_chown (file, uid, gid)
|
||||
const char *file;
|
||||
uid_t uid;
|
||||
gid_t gid;
|
||||
rpl_chown (const char *file, uid_t uid, gid_t gid)
|
||||
{
|
||||
if (gid == (gid_t) -1 || uid == (uid_t) -1)
|
||||
{
|
||||
|
||||
@@ -33,14 +33,15 @@ char *malloc ();
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "dirname.h"
|
||||
|
||||
/* Return the leading directories part of PATH,
|
||||
allocated with malloc. If out of memory, return 0.
|
||||
Assumes that trailing slashes have already been
|
||||
removed. */
|
||||
|
||||
char *
|
||||
dirname (path)
|
||||
char *path;
|
||||
dir_name (const char *path)
|
||||
{
|
||||
char *newpath;
|
||||
char *slash;
|
||||
|
||||
31
lib/dirname.h
Normal file
31
lib/dirname.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/* 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. */
|
||||
|
||||
#ifndef DIRNAME_H_
|
||||
# define DIRNAME_H_ 1
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
char *
|
||||
dir_name PARAMS ((const char *path));
|
||||
|
||||
#endif /* not DIRNAME_H_ */
|
||||
@@ -152,7 +152,10 @@ error (status, errnum, message, va_alist)
|
||||
{
|
||||
#if defined HAVE_STRERROR_R || defined _LIBC
|
||||
char errbuf[1024];
|
||||
fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
|
||||
/* Don't use __strerror_r's return value because on some systems
|
||||
(at least DEC UNIX 4.0[A-D]) strerror_r returns `int'. */
|
||||
__strerror_r (errnum, errbuf, sizeof errbuf);
|
||||
fprintf (stderr, ": %s", errbuf);
|
||||
#else
|
||||
fprintf (stderr, ": %s", strerror (errnum));
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* euidaccess -- check if effective user id can access file
|
||||
Copyright (C) 1990, 1991, 1995 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990, 1991, 1995, 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@@ -127,9 +127,7 @@ int group_member ();
|
||||
filesystem, text busy, etc. */
|
||||
|
||||
int
|
||||
euidaccess (path, mode)
|
||||
const char *path;
|
||||
int mode;
|
||||
euidaccess (const char *path, int mode)
|
||||
{
|
||||
struct stat stats;
|
||||
int granted;
|
||||
|
||||
@@ -50,8 +50,7 @@ typedef long daddr_t; /* for disk address */
|
||||
/* Return the number of 512-byte blocks in a file of SIZE bytes. */
|
||||
|
||||
off_t
|
||||
st_blocks (size)
|
||||
off_t size;
|
||||
st_blocks (off_t size)
|
||||
{
|
||||
off_t datablks = size / 512 + (size % 512 != 0);
|
||||
off_t indrblks = 0;
|
||||
|
||||
@@ -55,10 +55,7 @@ extern int errno;
|
||||
/* Match STRING against the filename pattern PATTERN, returning zero if
|
||||
it matches, nonzero if not. */
|
||||
int
|
||||
fnmatch (pattern, string, flags)
|
||||
const char *pattern;
|
||||
const char *string;
|
||||
int flags;
|
||||
fnmatch (const char *pattern, const char *string, int flags)
|
||||
{
|
||||
register const char *p = pattern, *n = string;
|
||||
register char c;
|
||||
|
||||
@@ -101,10 +101,7 @@ int safe_read ();
|
||||
ERRNO is either a system error value, or zero if DISK is NULL
|
||||
on a system that requires a non-NULL value. */
|
||||
int
|
||||
get_fs_usage (path, disk, fsp)
|
||||
const char *path;
|
||||
const char *disk;
|
||||
struct fs_usage *fsp;
|
||||
get_fs_usage (const char *path, const char *disk, struct fs_usage *fsp)
|
||||
{
|
||||
#ifdef STAT_STATFS3_OSF1
|
||||
|
||||
@@ -262,9 +259,7 @@ get_fs_usage (path, disk, fsp)
|
||||
/* AIX PS/2 does not supply statfs. */
|
||||
|
||||
int
|
||||
statfs (path, fsb)
|
||||
char *path;
|
||||
struct statfs *fsb;
|
||||
statfs (char *path, struct statfs *fsb)
|
||||
{
|
||||
struct stat stats;
|
||||
struct dustat fsd;
|
||||
|
||||
@@ -11,9 +11,7 @@
|
||||
#ifdef F_CHSIZE
|
||||
|
||||
int
|
||||
ftruncate (fd, length)
|
||||
int fd;
|
||||
off_t length;
|
||||
ftruncate (int fd, off_t length)
|
||||
{
|
||||
return fcntl (fd, F_CHSIZE, length);
|
||||
}
|
||||
@@ -30,9 +28,7 @@ ftruncate (fd, length)
|
||||
# endif
|
||||
|
||||
int
|
||||
ftruncate (fd, length)
|
||||
int fd;
|
||||
off_t length;
|
||||
ftruncate (int fd, off_t length)
|
||||
{
|
||||
struct flock fl;
|
||||
struct stat filebuf;
|
||||
@@ -75,9 +71,7 @@ ftruncate (fd, length)
|
||||
# if HAVE_CHSIZE
|
||||
|
||||
int
|
||||
ftruncate (fd, length)
|
||||
int fd;
|
||||
off_t length;
|
||||
ftruncate (int fd, off_t length)
|
||||
{
|
||||
return chsize (fd, length);
|
||||
}
|
||||
@@ -90,9 +84,7 @@ extern int errno;
|
||||
# endif
|
||||
|
||||
int
|
||||
ftruncate (fd, length)
|
||||
int fd;
|
||||
off_t length;
|
||||
ftruncate (int fd, off_t length)
|
||||
{
|
||||
errno = EIO;
|
||||
return -1;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* getline.c -- Replacement for GNU C library function getline
|
||||
|
||||
Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 1993, 1996, 1997, 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
|
||||
@@ -34,10 +34,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
#if defined __GNU_LIBRARY__ && HAVE_GETDELIM
|
||||
|
||||
int
|
||||
getline (lineptr, n, stream)
|
||||
char **lineptr;
|
||||
size_t *n;
|
||||
FILE *stream;
|
||||
getline (char **lineptr, size_t *n, FILE *stream)
|
||||
{
|
||||
return getdelim (lineptr, n, '\n', stream);
|
||||
}
|
||||
@@ -64,12 +61,7 @@ char *malloc (), *realloc ();
|
||||
null terminator), or -1 on error or EOF. */
|
||||
|
||||
int
|
||||
getstr (lineptr, n, stream, terminator, offset)
|
||||
char **lineptr;
|
||||
size_t *n;
|
||||
FILE *stream;
|
||||
char terminator;
|
||||
size_t offset;
|
||||
getstr (char **lineptr, size_t *n, FILE *stream, char terminator, size_t offset)
|
||||
{
|
||||
int nchars_avail; /* Allocated but unused chars in *LINEPTR. */
|
||||
char *read_pos; /* Where we're reading into *LINEPTR. */
|
||||
@@ -138,20 +130,13 @@ getstr (lineptr, n, stream, terminator, offset)
|
||||
}
|
||||
|
||||
int
|
||||
getline (lineptr, n, stream)
|
||||
char **lineptr;
|
||||
size_t *n;
|
||||
FILE *stream;
|
||||
getline (char **lineptr, size_t *n, FILE *stream)
|
||||
{
|
||||
return getstr (lineptr, n, stream, '\n', 0);
|
||||
}
|
||||
|
||||
int
|
||||
getdelim (lineptr, n, delimiter, stream)
|
||||
char **lineptr;
|
||||
size_t *n;
|
||||
int delimiter;
|
||||
FILE *stream;
|
||||
getdelim (char **lineptr, size_t *n, int delimiter, FILE *stream)
|
||||
{
|
||||
return getstr (lineptr, n, stream, delimiter, 0);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* getversion.c -- select backup filename type
|
||||
Copyright (C) 1990 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990, 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
|
||||
@@ -46,8 +46,7 @@ static const enum backup_type backup_types[] =
|
||||
Unique abbreviations are accepted. */
|
||||
|
||||
enum backup_type
|
||||
get_version (version)
|
||||
char *version;
|
||||
get_version (const char *version)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* idcache.c -- map user and group IDs, cached for speed
|
||||
Copyright (C) 1985, 1988, 1989, 1990, 1997, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1985, 1988, 1989, 1990, 1997, 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,8 +34,7 @@
|
||||
return nonzero, else 0. */
|
||||
|
||||
int
|
||||
isdir (path)
|
||||
char *path;
|
||||
isdir (const char *path)
|
||||
{
|
||||
struct stat stats;
|
||||
|
||||
|
||||
50
lib/lstat.c
50
lib/lstat.c
@@ -1,50 +0,0 @@
|
||||
/* Work around the bug in some systems whereby lstat succeeds when
|
||||
given the zero-length file name argument. The lstat from SunOS4.1.4
|
||||
has this bug.
|
||||
Copyright (C) 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
|
||||
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. */
|
||||
|
||||
/* written by Jim Meyering */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* Disable the definition of lstat to rpl_lstat (from config.h) in this
|
||||
file. Otherwise, we'd get conflicting prototypes for rpl_lstat on
|
||||
most systems. */
|
||||
#undef lstat
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
/* FIXME: describe. */
|
||||
|
||||
int
|
||||
rpl_lstat (file, sbuf)
|
||||
const char *file;
|
||||
struct stat *sbuf;
|
||||
{
|
||||
if (file && *file == 0)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return lstat (file, sbuf);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Work around bug on some systems where malloc (0) fails.
|
||||
Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 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
|
||||
@@ -30,8 +30,7 @@ char *malloc ();
|
||||
If N is zero, allocate a 1-byte block. */
|
||||
|
||||
char *
|
||||
rpl_malloc (n)
|
||||
size_t n;
|
||||
rpl_malloc (size_t n)
|
||||
{
|
||||
if (n == 0)
|
||||
n = 1;
|
||||
|
||||
18
lib/memcmp.c
18
lib/memcmp.c
@@ -104,8 +104,7 @@ static int memcmp_bytes __P((op_t, op_t));
|
||||
__inline
|
||||
# endif
|
||||
static int
|
||||
memcmp_bytes (a, b)
|
||||
op_t a, b;
|
||||
memcmp_bytes (long unsigned int a, long unsigned int b)
|
||||
{
|
||||
long int srcp1 = (long int) &a;
|
||||
long int srcp2 = (long int) &b;
|
||||
@@ -132,10 +131,7 @@ static int memcmp_common_alignment __P((long, long, size_t));
|
||||
__inline
|
||||
#endif
|
||||
static int
|
||||
memcmp_common_alignment (srcp1, srcp2, len)
|
||||
long int srcp1;
|
||||
long int srcp2;
|
||||
size_t len;
|
||||
memcmp_common_alignment (long int srcp1, long int srcp2, size_t len)
|
||||
{
|
||||
op_t a0, a1;
|
||||
op_t b0, b1;
|
||||
@@ -222,10 +218,7 @@ static int memcmp_not_common_alignment __P((long, long, size_t));
|
||||
__inline
|
||||
#endif
|
||||
static int
|
||||
memcmp_not_common_alignment (srcp1, srcp2, len)
|
||||
long int srcp1;
|
||||
long int srcp2;
|
||||
size_t len;
|
||||
memcmp_not_common_alignment (long int srcp1, long int srcp2, size_t len)
|
||||
{
|
||||
op_t a0, a1, a2, a3;
|
||||
op_t b0, b1, b2, b3;
|
||||
@@ -325,10 +318,7 @@ memcmp_not_common_alignment (srcp1, srcp2, len)
|
||||
}
|
||||
|
||||
int
|
||||
rpl_memcmp (s1, s2, len)
|
||||
const __ptr_t s1;
|
||||
const __ptr_t s2;
|
||||
size_t len;
|
||||
rpl_memcmp (const void *s1, const void *s2, size_t len)
|
||||
{
|
||||
op_t a0;
|
||||
op_t b0;
|
||||
|
||||
@@ -16,10 +16,7 @@
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
char *
|
||||
memset (str, c, len)
|
||||
char *str;
|
||||
int c;
|
||||
unsigned len;
|
||||
memset (char *str, int c, unsigned int len)
|
||||
{
|
||||
register char *st = str;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* BSD compatible make directory function for System V
|
||||
Copyright (C) 1988, 1990 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988, 1990, 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
|
||||
@@ -48,9 +48,7 @@ extern int errno;
|
||||
subroutine didn't return EEXIST. It does now. */
|
||||
|
||||
int
|
||||
mkdir (dpath, dmode)
|
||||
char *dpath;
|
||||
int dmode;
|
||||
mkdir (const char *dpath, int dmode)
|
||||
{
|
||||
int cpid, status;
|
||||
struct stat statbuf;
|
||||
|
||||
78
lib/mktime.c
78
lib/mktime.c
@@ -1,4 +1,4 @@
|
||||
/* mktime: convert a `struct tm' to a time_t value zzzzzz
|
||||
/* mktime: convert a `struct tm' to a time_t value
|
||||
Copyright (C) 1993-1997, 1998 Free Software Foundation, Inc.
|
||||
Contributed by Paul Eggert (eggert@twinsun.com).
|
||||
|
||||
@@ -28,14 +28,8 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
/* Some systems need this in order to declare localtime_r properly. */
|
||||
#ifndef _REENTRANT
|
||||
# define _REENTRANT 1
|
||||
#endif
|
||||
|
||||
#ifdef _LIBC
|
||||
# define HAVE_LIMITS_H 1
|
||||
# define HAVE_LOCALTIME_R 1
|
||||
# define STDC_HEADERS 1
|
||||
#endif
|
||||
|
||||
@@ -125,16 +119,14 @@ time_t __mktime_internal __P ((struct tm *,
|
||||
|
||||
|
||||
#ifdef _LIBC
|
||||
# define localtime_r __localtime_r
|
||||
# define my_mktime_localtime_r __localtime_r
|
||||
#else
|
||||
# if ! HAVE_LOCALTIME_R && ! defined localtime_r
|
||||
/* Approximate localtime_r as best we can in its absence. */
|
||||
# define localtime_r my_mktime_localtime_r
|
||||
static struct tm *localtime_r __P ((const time_t *, struct tm *));
|
||||
/* If we're a mktime substitute in a GNU program, then prefer
|
||||
localtime to localtime_r, since many localtime_r implementations
|
||||
are buggy. */
|
||||
static struct tm *my_mktime_localtime_r __P ((const time_t *, struct tm *));
|
||||
static struct tm *
|
||||
localtime_r (t, tp)
|
||||
const time_t *t;
|
||||
struct tm *tp;
|
||||
my_mktime_localtime_r (const time_t *t, struct tm *tp)
|
||||
{
|
||||
struct tm *l = localtime (t);
|
||||
if (! l)
|
||||
@@ -142,7 +134,6 @@ localtime_r (t, tp)
|
||||
*tp = *l;
|
||||
return tp;
|
||||
}
|
||||
# endif /* ! HAVE_LOCALTIME_R && ! defined (localtime_r) */
|
||||
#endif /* ! _LIBC */
|
||||
|
||||
|
||||
@@ -153,9 +144,8 @@ localtime_r (t, tp)
|
||||
If TP is null, return a nonzero value.
|
||||
If overflow occurs, yield the low order bits of the correct answer. */
|
||||
static time_t
|
||||
ydhms_tm_diff (year, yday, hour, min, sec, tp)
|
||||
int year, yday, hour, min, sec;
|
||||
const struct tm *tp;
|
||||
ydhms_tm_diff (int year, int yday, int hour, int min, int sec,
|
||||
const struct tm *tp)
|
||||
{
|
||||
if (!tp)
|
||||
return 1;
|
||||
@@ -187,8 +177,7 @@ static time_t localtime_offset;
|
||||
|
||||
/* Convert *TP to a time_t value. */
|
||||
time_t
|
||||
mktime (tp)
|
||||
struct tm *tp;
|
||||
mktime (struct tm *tp)
|
||||
{
|
||||
#ifdef _LIBC
|
||||
/* POSIX.1 8.1.1 requires that whenever mktime() is called, the
|
||||
@@ -197,17 +186,15 @@ mktime (tp)
|
||||
__tzset ();
|
||||
#endif
|
||||
|
||||
return __mktime_internal (tp, localtime_r, &localtime_offset);
|
||||
return __mktime_internal (tp, my_mktime_localtime_r, &localtime_offset);
|
||||
}
|
||||
|
||||
/* Use CONVERT to convert *T to a broken down time in *TP.
|
||||
If *T is out of range for conversion, adjust it so that
|
||||
it is the nearest in-range value and then convert that. */
|
||||
static struct tm *
|
||||
ranged_convert (convert, t, tp)
|
||||
struct tm *(*convert) __P ((const time_t *, struct tm *));
|
||||
time_t *t;
|
||||
struct tm *tp;
|
||||
ranged_convert (struct tm *(*convert) (const time_t *, struct tm *),
|
||||
time_t *t, struct tm *tp)
|
||||
{
|
||||
struct tm *r;
|
||||
|
||||
@@ -254,19 +241,18 @@ ranged_convert (convert, t, tp)
|
||||
compared to what the result would be for UTC without leap seconds.
|
||||
If *OFFSET's guess is correct, only one CONVERT call is needed. */
|
||||
time_t
|
||||
__mktime_internal (tp, convert, offset)
|
||||
struct tm *tp;
|
||||
struct tm *(*convert) __P ((const time_t *, struct tm *));
|
||||
time_t *offset;
|
||||
__mktime_internal (struct tm *tp,
|
||||
struct tm *(*convert) (const time_t *, struct tm *),
|
||||
time_t *offset)
|
||||
{
|
||||
time_t t, dt, t0;
|
||||
time_t t, dt, t0, t1, t2;
|
||||
struct tm tm;
|
||||
|
||||
/* The maximum number of probes (calls to CONVERT) should be enough
|
||||
to handle any combinations of time zone rule changes, solar time,
|
||||
and leap seconds. POSIX.1 prohibits leap seconds, but some hosts
|
||||
have them anyway. */
|
||||
int remaining_probes = 4;
|
||||
leap seconds, and oscillations around a spring-forward gap.
|
||||
POSIX.1 prohibits leap seconds, but some hosts have them anyway. */
|
||||
int remaining_probes = 6;
|
||||
|
||||
/* Time requested. Copy it in case CONVERT modifies *TP; this can
|
||||
occur if TP is localtime's returned value and CONVERT is localtime. */
|
||||
@@ -312,15 +298,27 @@ __mktime_internal (tp, convert, offset)
|
||||
tm.tm_yday = tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
|
||||
t0 = ydhms_tm_diff (year, yday, hour, min, sec, &tm);
|
||||
|
||||
for (t = t0 + *offset;
|
||||
for (t = t1 = t2 = t0 + *offset;
|
||||
(dt = ydhms_tm_diff (year, yday, hour, min, sec,
|
||||
ranged_convert (convert, &t, &tm)));
|
||||
t += dt)
|
||||
if (--remaining_probes == 0)
|
||||
t1 = t2, t2 = t, t += dt)
|
||||
if (t == t1 && t != t2
|
||||
&& (isdst < 0 || tm.tm_isdst < 0
|
||||
|| (isdst != 0) != (tm.tm_isdst != 0)))
|
||||
/* We can't possibly find a match, as we are oscillating
|
||||
between two values. The requested time probably falls
|
||||
within a spring-forward gap of size DT. Follow the common
|
||||
practice in this case, which is to return a time that is DT
|
||||
away from the requested time, preferring a time whose
|
||||
tm_isdst differs from the requested value. In practice,
|
||||
this is more useful than returning -1. */
|
||||
break;
|
||||
else if (--remaining_probes == 0)
|
||||
return -1;
|
||||
|
||||
/* Check whether tm.tm_isdst has the requested value, if any. */
|
||||
if (0 <= isdst && 0 <= tm.tm_isdst)
|
||||
/* If we have a match, check whether tm.tm_isdst has the requested
|
||||
value, if any. */
|
||||
if (dt == 0 && 0 <= isdst && 0 <= tm.tm_isdst)
|
||||
{
|
||||
int dst_diff = (isdst != 0) - (tm.tm_isdst != 0);
|
||||
if (dst_diff)
|
||||
@@ -531,6 +529,6 @@ main (argc, argv)
|
||||
|
||||
/*
|
||||
Local Variables:
|
||||
compile-command: "gcc -DDEBUG -D__EXTENSIONS__ -DHAVE_LIMITS_H -DHAVE_LOCALTIME_R -DSTDC_HEADERS -Wall -W -O -g mktime.c -o mktime"
|
||||
compile-command: "gcc -DDEBUG -DHAVE_LIMITS_H -DSTDC_HEADERS -Wall -W -O -g mktime.c -o mktime"
|
||||
End:
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* modechange.c -- file mode manipulation
|
||||
Copyright (C) 1989, 1990, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 1989, 1990, 1997, 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
|
||||
@@ -55,7 +55,22 @@ char *malloc ();
|
||||
|
||||
#define isodigit(c) ((c) >= '0' && (c) <= '7')
|
||||
|
||||
static int oatoi ();
|
||||
/* Return a positive integer containing the value of the ASCII
|
||||
octal number S. If S is not an octal number, return -1. */
|
||||
|
||||
static int
|
||||
oatoi (const char *s)
|
||||
{
|
||||
register int i;
|
||||
|
||||
if (*s == 0)
|
||||
return -1;
|
||||
for (i = 0; isodigit (*s); ++s)
|
||||
i = i * 8 + *s - '0';
|
||||
if (*s)
|
||||
return -1;
|
||||
return i;
|
||||
}
|
||||
|
||||
/* Return a linked list of file mode change operations created from
|
||||
MODE_STRING, an ASCII string that contains either an octal number
|
||||
@@ -71,9 +86,7 @@ static int oatoi ();
|
||||
return MODE_MEMORY_EXHAUSTED if there is insufficient memory. */
|
||||
|
||||
struct mode_change *
|
||||
mode_compile (mode_string, masked_ops)
|
||||
const char *mode_string;
|
||||
unsigned masked_ops;
|
||||
mode_compile (const char *mode_string, unsigned int masked_ops)
|
||||
{
|
||||
struct mode_change *head; /* First element of the linked list. */
|
||||
struct mode_change *change; /* An element of the linked list. */
|
||||
@@ -240,8 +253,7 @@ invalid:
|
||||
of REF_FILE. Return MODE_BAD_REFERENCE if REF_FILE can't be accessed. */
|
||||
|
||||
struct mode_change *
|
||||
mode_create_from_ref (ref_file)
|
||||
const char *ref_file;
|
||||
mode_create_from_ref (const char *ref_file)
|
||||
{
|
||||
struct mode_change *change; /* the only change element */
|
||||
struct stat ref_stats;
|
||||
@@ -269,9 +281,7 @@ mode_create_from_ref (ref_file)
|
||||
The returned value has the S_IFMT bits cleared. */
|
||||
|
||||
unsigned short
|
||||
mode_adjust (oldmode, changes)
|
||||
unsigned oldmode;
|
||||
const struct mode_change *changes;
|
||||
mode_adjust (unsigned int oldmode, const struct mode_change *changes)
|
||||
{
|
||||
unsigned short newmode; /* The adjusted mode and one operand. */
|
||||
unsigned short value; /* The other operand. */
|
||||
@@ -336,8 +346,7 @@ mode_adjust (oldmode, changes)
|
||||
CHANGES. */
|
||||
|
||||
void
|
||||
mode_free (changes)
|
||||
register struct mode_change *changes;
|
||||
mode_free (register struct mode_change *changes)
|
||||
{
|
||||
register struct mode_change *next;
|
||||
|
||||
@@ -348,21 +357,3 @@ mode_free (changes)
|
||||
changes = next;
|
||||
}
|
||||
}
|
||||
|
||||
/* Return a positive integer containing the value of the ASCII
|
||||
octal number S. If S is not an octal number, return -1. */
|
||||
|
||||
static int
|
||||
oatoi (s)
|
||||
char *s;
|
||||
{
|
||||
register int i;
|
||||
|
||||
if (*s == 0)
|
||||
return -1;
|
||||
for (i = 0; isodigit (*s); ++s)
|
||||
i = i * 8 + *s - '0';
|
||||
if (*s)
|
||||
return -1;
|
||||
return i;
|
||||
}
|
||||
|
||||
@@ -42,10 +42,7 @@ char *malloc ();
|
||||
BASE in the returned concatenation. */
|
||||
|
||||
char *
|
||||
path_concat (dir, base, base_in_result)
|
||||
const char *dir;
|
||||
const char *base;
|
||||
char **base_in_result;
|
||||
path_concat (const char *dir, const char *base, char **base_in_result)
|
||||
{
|
||||
char *p;
|
||||
char *p_concat;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Parse dates for touch.
|
||||
/* Parse dates for touch and date.
|
||||
Copyright (C) 1989, 1990, 1991, 1998 Free Software Foundation Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
||||
@@ -7,10 +7,18 @@
|
||||
# define PDS_CENTURY 4
|
||||
# define PDS_SECONDS 8
|
||||
|
||||
# ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
# endif
|
||||
|
||||
time_t
|
||||
posixtime (const char *s, unsigned int syntax_bits);
|
||||
posixtime PARAMS ((const char *s, unsigned int syntax_bits));
|
||||
|
||||
struct tm *
|
||||
posixtm (const char *s, unsigned int syntax_bits);
|
||||
posixtm PARAMS ((const char *s, unsigned int syntax_bits));
|
||||
|
||||
#endif
|
||||
|
||||
242
lib/posixtm.y
242
lib/posixtm.y
@@ -1,242 +0,0 @@
|
||||
/* Parse dates for touch.
|
||||
Copyright (C) 1989, 1990, 1991 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. */
|
||||
|
||||
/* Written by Jim Kingdon and David MacKenzie. */
|
||||
%{
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
/* The following block of alloca-related preprocessor directives is here
|
||||
solely to allow compilation by non GNU-C compilers of the C parser
|
||||
produced from this file by old versions of bison. Newer versions of
|
||||
bison include a block similar to this one in bison.simple. */
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define alloca __builtin_alloca
|
||||
#else
|
||||
#ifdef HAVE_ALLOCA_H
|
||||
#include <alloca.h>
|
||||
#else
|
||||
#ifdef _AIX
|
||||
#pragma alloca
|
||||
#else
|
||||
void *alloca ();
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef TM_IN_SYS_TIME
|
||||
#include <sys/time.h>
|
||||
#else
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
/* Some old versions of bison generate parsers that use bcopy.
|
||||
That loses on systems that don't provide the function, so we have
|
||||
to redefine it here. */
|
||||
#if !defined (HAVE_BCOPY) && defined (HAVE_MEMCPY) && !defined (bcopy)
|
||||
#define bcopy(from, to, len) memcpy ((to), (from), (len))
|
||||
#endif
|
||||
|
||||
#define YYDEBUG 1
|
||||
|
||||
/* Lexical analyzer's current scan position in the input string. */
|
||||
static char *curpos;
|
||||
|
||||
/* The return value. */
|
||||
static struct tm t;
|
||||
|
||||
time_t mktime ();
|
||||
|
||||
/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
|
||||
as well as gratuitiously global symbol names, so we can have multiple
|
||||
yacc generated parsers in the same program. Note that these are only
|
||||
the variables produced by yacc. If other parser generators (bison,
|
||||
byacc, etc) produce additional global names that conflict at link time,
|
||||
then those parser generators need to be fixed instead of adding those
|
||||
names to this list. */
|
||||
|
||||
#define yymaxdepth pt_maxdepth
|
||||
#define yyparse pt_parse
|
||||
#define yylex pt_lex
|
||||
#define yyerror pt_error
|
||||
#define yylval pt_lval
|
||||
#define yychar pt_char
|
||||
#define yydebug pt_debug
|
||||
#define yypact pt_pact
|
||||
#define yyr1 pt_r1
|
||||
#define yyr2 pt_r2
|
||||
#define yydef pt_def
|
||||
#define yychk pt_chk
|
||||
#define yypgo pt_pgo
|
||||
#define yyact pt_act
|
||||
#define yyexca pt_exca
|
||||
#define yyerrflag pt_errflag
|
||||
#define yynerrs pt_nerrs
|
||||
#define yyps pt_ps
|
||||
#define yypv pt_pv
|
||||
#define yys pt_s
|
||||
#define yy_yys pt_yys
|
||||
#define yystate pt_state
|
||||
#define yytmp pt_tmp
|
||||
#define yyv pt_v
|
||||
#define yy_yyv pt_yyv
|
||||
#define yyval pt_val
|
||||
#define yylloc pt_lloc
|
||||
#define yyreds pt_reds /* With YYDEBUG defined */
|
||||
#define yytoks pt_toks /* With YYDEBUG defined */
|
||||
#define yylhs pt_yylhs
|
||||
#define yylen pt_yylen
|
||||
#define yydefred pt_yydefred
|
||||
#define yydgoto pt_yydgoto
|
||||
#define yysindex pt_yysindex
|
||||
#define yyrindex pt_yyrindex
|
||||
#define yygindex pt_yygindex
|
||||
#define yytable pt_yytable
|
||||
#define yycheck pt_yycheck
|
||||
|
||||
static int yylex ();
|
||||
static int yyerror ();
|
||||
|
||||
%}
|
||||
|
||||
%token DIGIT
|
||||
|
||||
%%
|
||||
date :
|
||||
digitpair /* month */
|
||||
digitpair /* day */
|
||||
digitpair /* hours */
|
||||
digitpair /* minutes */
|
||||
year
|
||||
seconds {
|
||||
if ($1 >= 1 && $1 <= 12)
|
||||
t.tm_mon = $1 - 1;
|
||||
else {
|
||||
YYABORT;
|
||||
}
|
||||
if ($2 >= 1 && $2 <= 31)
|
||||
t.tm_mday = $2;
|
||||
else {
|
||||
YYABORT;
|
||||
}
|
||||
if ($3 >= 0 && $3 <= 23)
|
||||
t.tm_hour = $3;
|
||||
else {
|
||||
YYABORT;
|
||||
}
|
||||
if ($4 >= 0 && $4 <= 59)
|
||||
t.tm_min = $4;
|
||||
else {
|
||||
YYABORT;
|
||||
}
|
||||
}
|
||||
|
||||
year : digitpair {
|
||||
t.tm_year = $1;
|
||||
/* Deduce the century based on the year.
|
||||
See POSIX.2 section 4.63.3. */
|
||||
if ($1 <= 68)
|
||||
t.tm_year += 100;
|
||||
}
|
||||
| digitpair digitpair {
|
||||
t.tm_year = $1 * 100 + $2;
|
||||
if (t.tm_year < 1900) {
|
||||
YYABORT;
|
||||
} else
|
||||
t.tm_year -= 1900;
|
||||
}
|
||||
| /* empty */ {
|
||||
time_t now;
|
||||
struct tm *tmp;
|
||||
|
||||
/* Use current year. */
|
||||
time (&now);
|
||||
tmp = localtime (&now);
|
||||
t.tm_year = tmp->tm_year;
|
||||
}
|
||||
;
|
||||
|
||||
seconds : /* empty */ {
|
||||
t.tm_sec = 0;
|
||||
}
|
||||
| '.' digitpair {
|
||||
if ($2 >= 0 && $2 <= 61)
|
||||
t.tm_sec = $2;
|
||||
else {
|
||||
YYABORT;
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
digitpair : DIGIT DIGIT {
|
||||
$$ = $1 * 10 + $2;
|
||||
}
|
||||
;
|
||||
%%
|
||||
static int
|
||||
yylex ()
|
||||
{
|
||||
char ch = *curpos++;
|
||||
|
||||
if (ch >= '0' && ch <= '9')
|
||||
{
|
||||
yylval = ch - '0';
|
||||
return DIGIT;
|
||||
}
|
||||
else if (ch == '.' || ch == 0)
|
||||
return ch;
|
||||
else
|
||||
return '?'; /* Cause an error. */
|
||||
}
|
||||
|
||||
static int
|
||||
yyerror ()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Parse a POSIX-style date and return it, or (time_t)-1 for an error. */
|
||||
|
||||
time_t
|
||||
posixtime (s)
|
||||
char *s;
|
||||
{
|
||||
curpos = s;
|
||||
/* Let mktime decide whether it is daylight savings time. */
|
||||
t.tm_isdst = -1;
|
||||
if (yyparse ())
|
||||
return (time_t)-1;
|
||||
else
|
||||
return mktime (&t);
|
||||
}
|
||||
|
||||
/* Parse a POSIX-style date and return it, or NULL for an error. */
|
||||
|
||||
struct tm *
|
||||
posixtm (s)
|
||||
char *s;
|
||||
{
|
||||
if (posixtime (s) == -1)
|
||||
return NULL;
|
||||
return &t;
|
||||
}
|
||||
18
lib/putenv.c
18
lib/putenv.c
@@ -23,16 +23,15 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
/* Disable the definition of putenv to rpl_putenv (from config.h) in this
|
||||
file. Otherwise, we'd get conflicting prototypes for rpl_putenv on
|
||||
systems like Irix 5.3. */
|
||||
#undef putenv
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#if defined (__GNU_LIBRARY__) || defined (HAVE_STDLIB_H)
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
/* Don't include stdlib.h because some (e.g., Solaris 2.7) declare putenv
|
||||
with a non-const argument. That would conflict with the declaration of
|
||||
rpl_putenv below (due to the #define putenv rpl_putenv from config.h). */
|
||||
|
||||
char *malloc ();
|
||||
void free ();
|
||||
|
||||
#if defined (__GNU_LIBRARY__) || defined (HAVE_STRING_H)
|
||||
# include <string.h>
|
||||
#endif
|
||||
@@ -60,8 +59,7 @@ extern char **environ;
|
||||
|
||||
/* Put STRING, which is of the form "NAME=VALUE", in the environment. */
|
||||
int
|
||||
rpl_putenv (string)
|
||||
const char *string;
|
||||
rpl_putenv (const char *string)
|
||||
{
|
||||
const char *const name_end = strchr (string, '=');
|
||||
register size_t size;
|
||||
|
||||
@@ -258,8 +258,8 @@ quotearg_buffer (char *buffer, size_t buffersize,
|
||||
{
|
||||
STORE ('\\');
|
||||
STORE ('0' + (c >> 6));
|
||||
STORE ('0' + ((c >> 3) & 3));
|
||||
c = '0' + (c & 3);
|
||||
STORE ('0' + ((c >> 3) & 7));
|
||||
c = '0' + (c & 7);
|
||||
goto store_c;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -38,9 +38,7 @@ extern int errno;
|
||||
Return 0 if successful, -1 if not. */
|
||||
|
||||
int
|
||||
rename (from, to)
|
||||
char *from;
|
||||
char *to;
|
||||
rename (char *from, char *to)
|
||||
{
|
||||
struct stat from_stats, to_stats;
|
||||
int pid, status;
|
||||
|
||||
@@ -29,24 +29,15 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <regex.h>
|
||||
|
||||
#if ENABLE_NLS
|
||||
# include <sys/types.h>
|
||||
# include <regex.h>
|
||||
# include <libintl.h>
|
||||
# define _(Text) gettext (Text)
|
||||
#else
|
||||
# define _(Text) Text
|
||||
#endif
|
||||
|
||||
static int
|
||||
try (response, pattern, match, nomatch, lastp, re)
|
||||
const char *response;
|
||||
const char *pattern;
|
||||
const int match;
|
||||
const int nomatch;
|
||||
const char **lastp;
|
||||
regex_t *re;
|
||||
try (const char *response, const char *pattern, const int match,
|
||||
const int nomatch, const char **lastp, regex_t *re)
|
||||
{
|
||||
if (pattern != *lastp)
|
||||
{
|
||||
@@ -66,12 +57,13 @@ try (response, pattern, match, nomatch, lastp, re)
|
||||
/* See if the regular expression matches RESPONSE. */
|
||||
return regexec (re, response, 0, NULL, 0) == 0 ? match : nomatch;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
int
|
||||
rpmatch (response)
|
||||
const char *response;
|
||||
rpmatch (const char *response)
|
||||
{
|
||||
#if ENABLE_NLS
|
||||
/* Match against one of the response patterns, compiling the pattern
|
||||
first if necessary. */
|
||||
|
||||
@@ -84,4 +76,9 @@ rpmatch (response)
|
||||
&yesexpr, &yesre))
|
||||
? result
|
||||
: try (response, _("^[nN]"), 0, -1, &noexpr, &nore));
|
||||
#else
|
||||
/* Test against "^[yY]" and "^[nN]", hardcoded to avoid requiring regex */
|
||||
return (*response == 'y' || *response == 'Y' ? 1
|
||||
: *response == 'n' || *response == 'N' ? 0 : -1);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -57,8 +57,7 @@ char *xgetcwd PARAMS ((void));
|
||||
called, but doing so is ok. Otherwise, return zero. */
|
||||
|
||||
int
|
||||
save_cwd (cwd)
|
||||
struct saved_cwd *cwd;
|
||||
save_cwd (struct saved_cwd *cwd)
|
||||
{
|
||||
static int have_working_fchdir = 1;
|
||||
|
||||
@@ -118,10 +117,7 @@ save_cwd (cwd)
|
||||
*/
|
||||
|
||||
int
|
||||
restore_cwd (cwd, dest, from)
|
||||
const struct saved_cwd *cwd;
|
||||
const char *dest;
|
||||
const char *from;
|
||||
restore_cwd (const struct saved_cwd *cwd, const char *dest, const char *from)
|
||||
{
|
||||
int fail = 0;
|
||||
if (cwd->desc >= 0)
|
||||
@@ -144,8 +140,7 @@ restore_cwd (cwd, dest, from)
|
||||
}
|
||||
|
||||
void
|
||||
free_cwd (cwd)
|
||||
struct saved_cwd *cwd;
|
||||
free_cwd (struct saved_cwd *cwd)
|
||||
{
|
||||
if (cwd->desc >= 0)
|
||||
close (cwd->desc);
|
||||
|
||||
@@ -76,9 +76,7 @@ char *stpcpy ();
|
||||
Return NULL if DIR cannot be opened or if out of memory. */
|
||||
|
||||
char *
|
||||
savedir (dir, name_size)
|
||||
const char *dir;
|
||||
unsigned int name_size;
|
||||
savedir (const char *dir, unsigned int name_size)
|
||||
{
|
||||
DIR *dirp;
|
||||
struct dirent *dp;
|
||||
|
||||
@@ -34,9 +34,7 @@
|
||||
|
||||
/* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */
|
||||
char *
|
||||
__stpcpy (dest, src)
|
||||
char *dest;
|
||||
const char *src;
|
||||
__stpcpy (char *dest, const char *src)
|
||||
{
|
||||
register char *d = dest;
|
||||
register const char *s = src;
|
||||
|
||||
@@ -31,8 +31,7 @@ char *strcpy ();
|
||||
or 0 if out of memory. */
|
||||
|
||||
char *
|
||||
strdup (str)
|
||||
const char *str;
|
||||
strdup (const char *str)
|
||||
{
|
||||
char *newstr;
|
||||
|
||||
|
||||
257
lib/strftime.c
257
lib/strftime.c
@@ -22,11 +22,6 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
/* Some systems need this in order to declare localtime_r properly. */
|
||||
#ifndef _REENTRANT
|
||||
# define _REENTRANT 1
|
||||
#endif
|
||||
|
||||
#ifdef _LIBC
|
||||
# define HAVE_LIMITS_H 1
|
||||
# define HAVE_MBLEN 1
|
||||
@@ -136,7 +131,7 @@ extern char *tzname[];
|
||||
add one for integer division truncation;
|
||||
add one more for a minus sign if t is signed. */
|
||||
#define INT_STRLEN_BOUND(t) \
|
||||
((sizeof (t) * CHAR_BIT - TYPE_SIGNED (t)) * 302 / 100 + 1 + TYPE_SIGNED (t))
|
||||
((sizeof (t) * CHAR_BIT - TYPE_SIGNED (t)) * 302 / 1000 + 1 + TYPE_SIGNED (t))
|
||||
|
||||
#define TM_YEAR_BASE 1900
|
||||
|
||||
@@ -149,21 +144,20 @@ extern char *tzname[];
|
||||
|
||||
|
||||
#ifdef _LIBC
|
||||
# define gmtime_r __gmtime_r
|
||||
# define localtime_r __localtime_r
|
||||
# define my_strftime_gmtime_r __gmtime_r
|
||||
# define my_strftime_localtime_r __localtime_r
|
||||
# define tzname __tzname
|
||||
# define tzset __tzset
|
||||
#else
|
||||
# if ! HAVE_LOCALTIME_R
|
||||
# if ! HAVE_TM_GMTOFF
|
||||
/* Approximate gmtime_r as best we can in its absence. */
|
||||
# undef gmtime_r
|
||||
# define gmtime_r my_gmtime_r
|
||||
static struct tm *gmtime_r __P ((const time_t *, struct tm *));
|
||||
|
||||
/* If we're a strftime substitute in a GNU program, then prefer gmtime
|
||||
to gmtime_r, since many gmtime_r implementations are buggy.
|
||||
Similarly for localtime_r. */
|
||||
|
||||
# if ! HAVE_TM_GMTOFF
|
||||
static struct tm *my_strftime_gmtime_r __P ((const time_t *, struct tm *));
|
||||
static struct tm *
|
||||
gmtime_r (t, tp)
|
||||
const time_t *t;
|
||||
struct tm *tp;
|
||||
my_strftime_gmtime_r (const time_t *t, struct tm *tp)
|
||||
{
|
||||
struct tm *l = gmtime (t);
|
||||
if (! l)
|
||||
@@ -171,16 +165,11 @@ gmtime_r (t, tp)
|
||||
*tp = *l;
|
||||
return tp;
|
||||
}
|
||||
# endif /* ! HAVE_TM_GMTOFF */
|
||||
# endif /* ! HAVE_TM_GMTOFF */
|
||||
|
||||
/* Approximate localtime_r as best we can in its absence. */
|
||||
# undef localtime_r
|
||||
# define localtime_r my_ftime_localtime_r
|
||||
static struct tm *localtime_r __P ((const time_t *, struct tm *));
|
||||
static struct tm *my_strftime_localtime_r __P ((const time_t *, struct tm *));
|
||||
static struct tm *
|
||||
localtime_r (t, tp)
|
||||
const time_t *t;
|
||||
struct tm *tp;
|
||||
my_strftime_localtime_r (const time_t *t, struct tm *tp)
|
||||
{
|
||||
struct tm *l = localtime (t);
|
||||
if (! l)
|
||||
@@ -188,7 +177,6 @@ localtime_r (t, tp)
|
||||
*tp = *l;
|
||||
return tp;
|
||||
}
|
||||
# endif /* ! HAVE_LOCALTIME_R */
|
||||
#endif /* ! defined _LIBC */
|
||||
|
||||
|
||||
@@ -282,10 +270,7 @@ static const char zeroes[16] = /* "0000000000000000" */
|
||||
static char *memcpy_lowcase __P ((char *dest, const char *src, size_t len));
|
||||
|
||||
static char *
|
||||
memcpy_lowcase (dest, src, len)
|
||||
char *dest;
|
||||
const char *src;
|
||||
size_t len;
|
||||
memcpy_lowcase (char *dest, const char *src, size_t len)
|
||||
{
|
||||
while (len-- > 0)
|
||||
dest[len] = TOLOWER ((unsigned char) src[len]);
|
||||
@@ -295,10 +280,7 @@ memcpy_lowcase (dest, src, len)
|
||||
static char *memcpy_uppcase __P ((char *dest, const char *src, size_t len));
|
||||
|
||||
static char *
|
||||
memcpy_uppcase (dest, src, len)
|
||||
char *dest;
|
||||
const char *src;
|
||||
size_t len;
|
||||
memcpy_uppcase (char *dest, const char *src, size_t len)
|
||||
{
|
||||
while (len-- > 0)
|
||||
dest[len] = TOUPPER ((unsigned char) src[len]);
|
||||
@@ -312,9 +294,7 @@ memcpy_uppcase (dest, src, len)
|
||||
# define tm_diff ftime_tm_diff
|
||||
static int tm_diff __P ((const struct tm *, const struct tm *));
|
||||
static int
|
||||
tm_diff (a, b)
|
||||
const struct tm *a;
|
||||
const struct tm *b;
|
||||
tm_diff (const struct tm *a, const struct tm *b)
|
||||
{
|
||||
/* Compute intervening leap days correctly even if year is negative.
|
||||
Take care to avoid int overflow in leap day calculations,
|
||||
@@ -349,9 +329,7 @@ static int iso_week_days __P ((int, int));
|
||||
__inline__
|
||||
#endif
|
||||
static int
|
||||
iso_week_days (yday, wday)
|
||||
int yday;
|
||||
int wday;
|
||||
iso_week_days (int yday, int wday)
|
||||
{
|
||||
/* Add enough to the first operand of % to make it nonnegative. */
|
||||
int big_enough_multiple_of_7 = (-YDAY_MINIMUM / 7 + 2) * 7;
|
||||
@@ -376,34 +354,35 @@ static char const month_name[][10] =
|
||||
|
||||
|
||||
#ifdef emacs
|
||||
# define my_strftime emacs_strftime
|
||||
/* Emacs 20.2 uses `-Dstrftime=emacs_strftime' when compiling,
|
||||
because that's how strftime used to be configured.
|
||||
Undo this, since it gets in the way of accessing the underlying strftime,
|
||||
which is needed for things like %Ec in Solaris.
|
||||
The following two lines can be removed once Emacs stops compiling with
|
||||
`-Dstrftime=emacs_strftime'. */
|
||||
# undef strftime
|
||||
size_t strftime __P ((char *, size_t, const char *, const struct tm *));
|
||||
# define my_strftime emacs_strftimeu
|
||||
# define ut_argument , ut
|
||||
# define ut_argument_spec int ut;
|
||||
# define ut_argument_spec_iso , int ut
|
||||
#else
|
||||
# define my_strftime strftime
|
||||
# define ut_argument
|
||||
# define ut_argument_spec
|
||||
# define ut_argument_spec_iso
|
||||
/* We don't have this information in general. */
|
||||
# define ut 0
|
||||
#endif
|
||||
|
||||
#if !defined _LIBC && HAVE_TZNAME && HAVE_TZSET
|
||||
/* Solaris 2.5 tzset sometimes modifies the storage returned by localtime.
|
||||
Work around this bug by copying *tp before it might be munged. */
|
||||
size_t _strftime_copytm __P ((char *, size_t, const char *,
|
||||
const struct tm *));
|
||||
const struct tm * ut_argument_spec_iso));
|
||||
size_t
|
||||
my_strftime (s, maxsize, format, tp)
|
||||
my_strftime (s, maxsize, format, tp ut_argument)
|
||||
char *s;
|
||||
size_t maxsize;
|
||||
const char *format;
|
||||
const struct tm *tp;
|
||||
ut_argument_spec
|
||||
{
|
||||
struct tm tmcopy;
|
||||
tmcopy = *tp;
|
||||
return _strftime_copytm (s, maxsize, format, &tmcopy);
|
||||
return _strftime_copytm (s, maxsize, format, &tmcopy ut_argument);
|
||||
}
|
||||
# undef my_strftime
|
||||
# define my_strftime(S, Maxsize, Format, Tp) \
|
||||
@@ -418,41 +397,40 @@ size_t strftime __P ((char *, size_t, const char *, const struct tm *));
|
||||
anywhere, so to determine how many characters would be
|
||||
written, use NULL for S and (size_t) UINT_MAX for MAXSIZE. */
|
||||
size_t
|
||||
my_strftime (s, maxsize, format, tp)
|
||||
char *s;
|
||||
size_t maxsize;
|
||||
const char *format;
|
||||
const struct tm *tp;
|
||||
my_strftime (char *s, size_t maxsize, const char *format, const struct tm *tp
|
||||
ut_argument_spec)
|
||||
{
|
||||
int hour12 = tp->tm_hour;
|
||||
#ifdef _NL_CURRENT
|
||||
const char *const a_wkday = _NL_CURRENT (LC_TIME, ABDAY_1 + tp->tm_wday);
|
||||
const char *const f_wkday = _NL_CURRENT (LC_TIME, DAY_1 + tp->tm_wday);
|
||||
const char *const a_month = _NL_CURRENT (LC_TIME, ABMON_1 + tp->tm_mon);
|
||||
const char *const f_month = _NL_CURRENT (LC_TIME, MON_1 + tp->tm_mon);
|
||||
const char *const ampm = _NL_CURRENT (LC_TIME,
|
||||
hour12 > 11 ? PM_STR : AM_STR);
|
||||
size_t aw_len = strlen (a_wkday);
|
||||
size_t am_len = strlen (a_month);
|
||||
size_t ap_len = strlen (ampm);
|
||||
/* We cannot make the following values variables since we must delay
|
||||
the evaluation of these values until really needed since some
|
||||
expressions might not be valid in every situation. The `struct tm'
|
||||
might be generated by a strptime() call that initialized
|
||||
only a few elements. Dereference the pointers only if the format
|
||||
requires this. Then it is ok to fail if the pointers are invalid. */
|
||||
# define a_wkday _NL_CURRENT (LC_TIME, ABDAY_1 + tp->tm_wday)
|
||||
# define f_wkday _NL_CURRENT (LC_TIME, DAY_1 + tp->tm_wday)
|
||||
# define a_month _NL_CURRENT (LC_TIME, ABMON_1 + tp->tm_mon)
|
||||
# define f_month _NL_CURRENT (LC_TIME, MON_1 + tp->tm_mon)
|
||||
# define ampm _NL_CURRENT (LC_TIME, tp->tm_hour > 11 ? PM_STR : AM_STR)
|
||||
|
||||
# define aw_len strlen (a_wkday)
|
||||
# define am_len strlen (a_month)
|
||||
# define ap_len strlen (ampm)
|
||||
#else
|
||||
# if !HAVE_STRFTIME
|
||||
const char *const f_wkday = weekday_name[tp->tm_wday];
|
||||
const char *const f_month = month_name[tp->tm_mon];
|
||||
const char *const a_wkday = f_wkday;
|
||||
const char *const a_month = f_month;
|
||||
const char *const ampm = "AMPM" + 2 * (hour12 > 11);
|
||||
# define f_wkday (weekday_name[tp->tm_wday])
|
||||
# define f_month (month_name[tp->tm_mon])
|
||||
# define a_wkday f_wkday
|
||||
# define a_month f_month
|
||||
# define ampm ("AMPM" + 2 * (tp->tm_hour > 11))
|
||||
|
||||
size_t aw_len = 3;
|
||||
size_t am_len = 3;
|
||||
size_t ap_len = 2;
|
||||
# endif
|
||||
#endif
|
||||
#if defined _NL_CURRENT || !HAVE_STRFTIME
|
||||
size_t wkday_len = strlen (f_wkday);
|
||||
size_t month_len = strlen (f_month);
|
||||
#endif
|
||||
const char *zone;
|
||||
size_t zonelen;
|
||||
size_t i = 0;
|
||||
char *p = s;
|
||||
const char *f;
|
||||
@@ -468,25 +446,27 @@ my_strftime (s, maxsize, format, tp)
|
||||
zone = (const char *) tp->tm_zone;
|
||||
#endif
|
||||
#if HAVE_TZNAME
|
||||
/* POSIX.1 8.1.1 requires that whenever strftime() is called, the
|
||||
time zone names contained in the external variable `tzname' shall
|
||||
be set as if the tzset() function had been called. */
|
||||
if (ut)
|
||||
{
|
||||
if (! (zone && *zone))
|
||||
zone = "GMT";
|
||||
}
|
||||
else
|
||||
{
|
||||
/* POSIX.1 8.1.1 requires that whenever strftime() is called, the
|
||||
time zone names contained in the external variable `tzname' shall
|
||||
be set as if the tzset() function had been called. */
|
||||
# if HAVE_TZSET
|
||||
tzset ();
|
||||
tzset ();
|
||||
# endif
|
||||
|
||||
if (!(zone && *zone) && tp->tm_isdst >= 0)
|
||||
zone = tzname[tp->tm_isdst];
|
||||
}
|
||||
#endif
|
||||
if (! zone)
|
||||
zone = ""; /* POSIX.2 requires the empty string here. */
|
||||
|
||||
zonelen = strlen (zone);
|
||||
|
||||
if (hour12 > 12)
|
||||
hour12 -= 12;
|
||||
else
|
||||
if (hour12 == 0) hour12 = 12;
|
||||
if (hour12 == 0)
|
||||
hour12 = 12;
|
||||
|
||||
for (f = format; *f != '\0'; ++f)
|
||||
{
|
||||
@@ -552,7 +532,13 @@ my_strftime (s, maxsize, format, tp)
|
||||
if (bytes == 0)
|
||||
break;
|
||||
|
||||
if (bytes == (size_t) -2 || bytes == (size_t) -1)
|
||||
if (bytes == (size_t) -2)
|
||||
{
|
||||
len += strlen (f + len);
|
||||
break;
|
||||
}
|
||||
|
||||
if (bytes == (size_t) -1)
|
||||
{
|
||||
len++;
|
||||
break;
|
||||
@@ -563,6 +549,7 @@ my_strftime (s, maxsize, format, tp)
|
||||
while (! mbsinit (&mbstate));
|
||||
|
||||
cpy (len, f);
|
||||
f += len - 1;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -672,7 +659,7 @@ my_strftime (s, maxsize, format, tp)
|
||||
to_lowcase = 0;
|
||||
}
|
||||
#if defined _NL_CURRENT || !HAVE_STRFTIME
|
||||
cpy (wkday_len, f_wkday);
|
||||
cpy (strlen (f_wkday), f_wkday);
|
||||
break;
|
||||
#else
|
||||
goto underlying_strftime;
|
||||
@@ -698,7 +685,7 @@ my_strftime (s, maxsize, format, tp)
|
||||
to_lowcase = 0;
|
||||
}
|
||||
#if defined _NL_CURRENT || !HAVE_STRFTIME
|
||||
cpy (month_len, f_month);
|
||||
cpy (strlen (f_month), f_month);
|
||||
break;
|
||||
#else
|
||||
goto underlying_strftime;
|
||||
@@ -722,9 +709,7 @@ my_strftime (s, maxsize, format, tp)
|
||||
subformat:
|
||||
{
|
||||
char *old_start = p;
|
||||
size_t len = my_strftime (NULL, maxsize - i, subfmt, tp);
|
||||
if (len == 0 && *subfmt)
|
||||
return 0;
|
||||
size_t len = my_strftime (NULL, (size_t) -1, subfmt, tp);
|
||||
add (len, my_strftime (p, maxsize - i, subfmt, tp));
|
||||
|
||||
if (to_uppcase)
|
||||
@@ -751,7 +736,7 @@ my_strftime (s, maxsize, format, tp)
|
||||
*u++ = format_char;
|
||||
*u = '\0';
|
||||
len = strftime (ubuf, sizeof ubuf, ufmt, tp);
|
||||
if (len == 0)
|
||||
if (len == 0 && ubuf[0] != '\0')
|
||||
return 0;
|
||||
cpy (len, ubuf);
|
||||
}
|
||||
@@ -1149,7 +1134,16 @@ my_strftime (s, maxsize, format, tp)
|
||||
to_uppcase = 0;
|
||||
to_lowcase = 1;
|
||||
}
|
||||
cpy (zonelen, zone);
|
||||
|
||||
#if HAVE_TZNAME
|
||||
/* The tzset() call might have changed the value. */
|
||||
if (!(zone && *zone) && tp->tm_isdst >= 0)
|
||||
zone = tzname[tp->tm_isdst];
|
||||
#endif
|
||||
if (! zone)
|
||||
zone = ""; /* POSIX.2 requires the empty string here. */
|
||||
|
||||
cpy (strlen (zone), zone);
|
||||
break;
|
||||
|
||||
case 'z': /* GNU extension. */
|
||||
@@ -1161,34 +1155,39 @@ my_strftime (s, maxsize, format, tp)
|
||||
#if HAVE_TM_GMTOFF
|
||||
diff = tp->tm_gmtoff;
|
||||
#else
|
||||
struct tm gtm;
|
||||
struct tm ltm;
|
||||
time_t lt;
|
||||
|
||||
ltm = *tp;
|
||||
lt = mktime (<m);
|
||||
|
||||
if (lt == (time_t) -1)
|
||||
if (ut)
|
||||
diff = 0;
|
||||
else
|
||||
{
|
||||
/* mktime returns -1 for errors, but -1 is also a
|
||||
valid time_t value. Check whether an error really
|
||||
occurred. */
|
||||
struct tm tm;
|
||||
localtime_r (<, &tm);
|
||||
struct tm gtm;
|
||||
struct tm ltm;
|
||||
time_t lt;
|
||||
|
||||
if ((ltm.tm_sec ^ tm.tm_sec)
|
||||
| (ltm.tm_min ^ tm.tm_min)
|
||||
| (ltm.tm_hour ^ tm.tm_hour)
|
||||
| (ltm.tm_mday ^ tm.tm_mday)
|
||||
| (ltm.tm_mon ^ tm.tm_mon)
|
||||
| (ltm.tm_year ^ tm.tm_year))
|
||||
ltm = *tp;
|
||||
lt = mktime (<m);
|
||||
|
||||
if (lt == (time_t) -1)
|
||||
{
|
||||
/* mktime returns -1 for errors, but -1 is also a
|
||||
valid time_t value. Check whether an error really
|
||||
occurred. */
|
||||
struct tm tm;
|
||||
|
||||
if (! my_strftime_localtime_r (<, &tm)
|
||||
|| ((ltm.tm_sec ^ tm.tm_sec)
|
||||
| (ltm.tm_min ^ tm.tm_min)
|
||||
| (ltm.tm_hour ^ tm.tm_hour)
|
||||
| (ltm.tm_mday ^ tm.tm_mday)
|
||||
| (ltm.tm_mon ^ tm.tm_mon)
|
||||
| (ltm.tm_year ^ tm.tm_year)))
|
||||
break;
|
||||
}
|
||||
|
||||
if (! my_strftime_gmtime_r (<, >m))
|
||||
break;
|
||||
|
||||
diff = tm_diff (<m, >m);
|
||||
}
|
||||
|
||||
if (! gmtime_r (<, >m))
|
||||
break;
|
||||
|
||||
diff = tm_diff (<m, >m);
|
||||
#endif
|
||||
|
||||
if (diff < 0)
|
||||
@@ -1221,7 +1220,23 @@ my_strftime (s, maxsize, format, tp)
|
||||
}
|
||||
}
|
||||
|
||||
if (p)
|
||||
if (p && i < maxsize)
|
||||
*p = '\0';
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
#ifdef emacs
|
||||
/* For Emacs we have a separate interface which corresponds to the normal
|
||||
strftime function and does not have the extra information whether the
|
||||
TP arguments comes from a `gmtime' call or not. */
|
||||
size_t
|
||||
emacs_strftime (s, maxsize, format, tp)
|
||||
char *s;
|
||||
size_t maxsize;
|
||||
const char *format;
|
||||
const struct tm *tp;
|
||||
{
|
||||
return my_strftime (s, maxsize, format, tp, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -32,8 +32,7 @@
|
||||
when given a path that ends in "/" (except for the root directory). */
|
||||
|
||||
void
|
||||
strip_trailing_slashes (path)
|
||||
char *path;
|
||||
strip_trailing_slashes (char *path)
|
||||
{
|
||||
int last;
|
||||
|
||||
|
||||
@@ -33,9 +33,7 @@ char *malloc ();
|
||||
|
||||
/* Duplicate S, returning an identical malloc'd string. */
|
||||
char *
|
||||
strndup (s, n)
|
||||
const char *s;
|
||||
size_t n;
|
||||
strndup (const char *s, size_t n)
|
||||
{
|
||||
char *new = malloc (n + 1);
|
||||
|
||||
|
||||
@@ -30,9 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
typedef unsigned chartype;
|
||||
|
||||
char *
|
||||
strstr (phaystack, pneedle)
|
||||
const char *phaystack;
|
||||
const char *pneedle;
|
||||
strstr (const char *phaystack, const char *pneedle)
|
||||
{
|
||||
register const unsigned char *haystack, *needle;
|
||||
register chartype b, c;
|
||||
|
||||
@@ -43,9 +43,7 @@
|
||||
*/
|
||||
|
||||
int
|
||||
strverscmp (s1, s2)
|
||||
const char *s1;
|
||||
const char *s2;
|
||||
strverscmp (const char *s1, const char *s2)
|
||||
{
|
||||
const unsigned char *p1 = (const unsigned char *) s1;
|
||||
const unsigned char *p2 = (const unsigned char *) s2;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* userspec.c -- Parse a user and group string.
|
||||
Copyright (C) 1989, 1990, 1991, 1992, 1997, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1989-1992, 1997, 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
|
||||
@@ -93,8 +93,7 @@ char *strdup ();
|
||||
otherwise return 0. */
|
||||
|
||||
static int
|
||||
is_number (str)
|
||||
const char *str;
|
||||
is_number (const char *str)
|
||||
{
|
||||
for (; *str; str++)
|
||||
if (!isdigit (*str))
|
||||
@@ -115,11 +114,8 @@ is_number (str)
|
||||
Return NULL if successful, a static error message string if not. */
|
||||
|
||||
const char *
|
||||
parse_user_spec (spec_arg, uid, gid, username_arg, groupname_arg)
|
||||
const char *spec_arg;
|
||||
uid_t *uid;
|
||||
gid_t *gid;
|
||||
char **username_arg, **groupname_arg;
|
||||
parse_user_spec (const char *spec_arg, uid_t *uid, gid_t *gid,
|
||||
char **username_arg, char **groupname_arg)
|
||||
{
|
||||
static const char *tired = "virtual memory exhausted";
|
||||
const char *error_msg;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* xmalloc.c -- malloc with out of memory checking
|
||||
Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-1997, 98 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
|
||||
@@ -78,7 +78,7 @@ void error ();
|
||||
#endif
|
||||
|
||||
static void
|
||||
xalloc_fail ()
|
||||
xalloc_fail (void)
|
||||
{
|
||||
if (xalloc_fail_func)
|
||||
(*xalloc_fail_func) ();
|
||||
@@ -88,8 +88,7 @@ xalloc_fail ()
|
||||
/* Allocate N bytes of memory dynamically, with error checking. */
|
||||
|
||||
void *
|
||||
xmalloc (n)
|
||||
size_t n;
|
||||
xmalloc (size_t n)
|
||||
{
|
||||
void *p;
|
||||
|
||||
@@ -104,9 +103,7 @@ xmalloc (n)
|
||||
If P is NULL, run xmalloc. */
|
||||
|
||||
void *
|
||||
xrealloc (p, n)
|
||||
void *p;
|
||||
size_t n;
|
||||
xrealloc (void *p, size_t n)
|
||||
{
|
||||
p = realloc (p, n);
|
||||
if (p == 0)
|
||||
@@ -119,8 +116,7 @@ xrealloc (p, n)
|
||||
/* Allocate memory for N elements of S bytes, with error checking. */
|
||||
|
||||
void *
|
||||
xcalloc (n, s)
|
||||
size_t n, s;
|
||||
xcalloc (size_t n, size_t s)
|
||||
{
|
||||
void *p;
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
/* Work around the bug in some systems whereby stat succeeds when
|
||||
given the zero-length file name argument. The stat from SunOS4.1.4
|
||||
/* @IGNORE@ -*- c -*- */
|
||||
/* @IGNORE@ This file is a template from which both stat.c and lstat.c
|
||||
@IGNORE@ are generated. */
|
||||
/* Work around the bug in some systems whereby @xstat@ succeeds when
|
||||
given the zero-length file name argument. The @xstat@ from SunOS4.1.4
|
||||
has this bug.
|
||||
Copyright (C) 1997, 1998 Free Software Foundation, Inc.
|
||||
|
||||
@@ -21,11 +24,6 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* Disable the definition of stat to rpl_stat (from config.h) in this
|
||||
file. Otherwise, we'd get conflicting prototypes for rpl_stat on
|
||||
most systems. */
|
||||
#undef stat
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
@@ -33,18 +31,16 @@
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
/* This is a wrapper for stat(2).
|
||||
/* This is a wrapper for @xstat@(2).
|
||||
If FILE is the empty string, fail with errno == ENOENT.
|
||||
Otherwise, return the result of calling the real stat.
|
||||
Otherwise, return the result of calling the real @xstat@.
|
||||
|
||||
This works around the bug in some systems whereby stat succeeds when
|
||||
given the zero-length file name argument. The stat from SunOS4.1.4
|
||||
This works around the bug in some systems whereby @xstat@ succeeds when
|
||||
given the zero-length file name argument. The @xstat@ from SunOS4.1.4
|
||||
has this bug. */
|
||||
|
||||
int
|
||||
rpl_stat (file, sbuf)
|
||||
const char *file;
|
||||
struct stat *sbuf;
|
||||
rpl_@xstat@ (const char *file, struct stat *sbuf)
|
||||
{
|
||||
if (file && *file == 0)
|
||||
{
|
||||
@@ -52,5 +48,5 @@ rpl_stat (file, sbuf)
|
||||
return -1;
|
||||
}
|
||||
|
||||
return stat (file, sbuf);
|
||||
return @xstat@ (file, sbuf);
|
||||
}
|
||||
@@ -69,6 +69,18 @@ extern int errno;
|
||||
# define LONG_MAX TYPE_MAXIMUM (long int)
|
||||
#endif
|
||||
|
||||
#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
|
||||
# define IN_CTYPE_DOMAIN(c) 1
|
||||
#else
|
||||
# define IN_CTYPE_DOMAIN(c) isascii(c)
|
||||
#endif
|
||||
|
||||
#ifdef isblank
|
||||
# define ISBLANK(c) (IN_CTYPE_DOMAIN (c) && isblank (c))
|
||||
#else
|
||||
# define ISBLANK(c) ((c) == ' ' || (c) == '\t')
|
||||
#endif
|
||||
|
||||
#include "xstrtol.h"
|
||||
|
||||
__unsigned long int __strtol ();
|
||||
@@ -107,6 +119,18 @@ __xstrtol (const char *s, char **ptr, int strtol_base,
|
||||
|
||||
p = (ptr ? ptr : &t_ptr);
|
||||
|
||||
#if STRING_TO_UNSIGNED
|
||||
{
|
||||
const char *q = s;
|
||||
while (ISBLANK (*q))
|
||||
{
|
||||
++q;
|
||||
}
|
||||
if (*q == '-')
|
||||
return LONGINT_INVALID;
|
||||
}
|
||||
#endif
|
||||
|
||||
errno = 0;
|
||||
tmp = __strtol (s, p, strtol_base);
|
||||
if (errno != 0)
|
||||
|
||||
66
m4/ChangeLog
66
m4/ChangeLog
@@ -1,3 +1,69 @@
|
||||
1998-12-18 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* Makefile.am.in (Makefile.am): Simplify rule.
|
||||
Based on a suggestion from Lars Hecking.
|
||||
|
||||
1998-11-16 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* lfs.m4: Double-quote the `uname...` expression.
|
||||
|
||||
1998-11-16 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
|
||||
|
||||
1998-11-14 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* lstat.m4: Correct comment. POSIX does not permit it to succeed.
|
||||
* stat.m4: Likewise.
|
||||
|
||||
1998-11-03 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
|
||||
* lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
|
||||
|
||||
1998-10-18 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
|
||||
|
||||
1998-10-17 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
|
||||
include, though we still hard-code the `require'-like AC_CHECK_HEADERS
|
||||
calls for those previously hard-coded headers. Instead, take a new
|
||||
parameter.
|
||||
(jm_CHECK_DECLARATIONS): Reflect interface change.
|
||||
* check-decl.m4 (jm_CHECK_DECLS): Likewise.
|
||||
(jm_CHECK_DECL_LOCALTIME_R): New macro.
|
||||
|
||||
* mktime.m4: Test for spring-forward gap before long-running test.
|
||||
|
||||
1998-10-14 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
|
||||
instead of "TZ=America/Vancouver". From Paul Eggert.
|
||||
|
||||
1998-10-11 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
|
||||
This adds a test for a recently added compatibility fix for mktime.c.
|
||||
* jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
|
||||
|
||||
1998-09-27 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
|
||||
|
||||
* fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro. Extracted from
|
||||
../configure.in, including a change from Gordon Matzigkeit to allow
|
||||
cross-compiling for the Hurd.
|
||||
|
||||
* glibc.m4: New file/macro to test for the GNU C Library
|
||||
versions 1 and 2. From Gordon Matzigkeit.
|
||||
Indent.
|
||||
|
||||
1998-09-21 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* chown.m4: Declare locals: before, after. From Andries Brouwer.
|
||||
|
||||
1998-08-18 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
Port nanosecond-resolution times to UnixWare 2.1.2 and
|
||||
|
||||
@@ -2,23 +2,22 @@
|
||||
|
||||
##m4-files-begin
|
||||
EXTRA_DIST = README Makefile.am.in assert.m4 check-decl.m4 check-type.m4 \
|
||||
chown.m4 const.m4 d-ino.m4 d-type.m4 decl.m4 error.m4 fstypename.m4 \
|
||||
getgroups.m4 getline.m4 getloadavg.m4 gettext.m4 inttypes_h.m4 \
|
||||
isc-posix.m4 jm-glibc-io.m4 jm-macros.m4 jm-mktime.m4 jm-winsz1.m4 \
|
||||
jm-winsz2.m4 lchown.m4 lcmessage.m4 lfs.m4 ls-mntd-fs.m4 lstat.m4 \
|
||||
malloc.m4 memcmp.m4 perl.m4 prereq.m4 progtest.m4 putenv.m4 readdir.m4 \
|
||||
realloc.m4 regex.m4 st_dm_mode.m4 st_mtim.m4 stat.m4 strftime.m4 \
|
||||
uintmax_t.m4 uptime.m4 utimbuf.m4 utime.m4 utimes.m4
|
||||
chown.m4 const.m4 d-ino.m4 d-type.m4 decl.m4 error.m4 fnmatch.m4 \
|
||||
fstypename.m4 getgroups.m4 getline.m4 getloadavg.m4 gettext.m4 glibc.m4 \
|
||||
inttypes_h.m4 isc-posix.m4 jm-glibc-io.m4 jm-macros.m4 jm-mktime.m4 \
|
||||
jm-winsz1.m4 jm-winsz2.m4 lchown.m4 lcmessage.m4 lfs.m4 ls-mntd-fs.m4 \
|
||||
lstat.m4 malloc.m4 memcmp.m4 mktime.m4 perl.m4 prereq.m4 progtest.m4 \
|
||||
putenv.m4 readdir.m4 realloc.m4 regex.m4 st_dm_mode.m4 st_mtim.m4 stat.m4 \
|
||||
strftime.m4 uintmax_t.m4 uptime.m4 utimbuf.m4 utime.m4 utimes.m4
|
||||
|
||||
##m4-files-end
|
||||
|
||||
Makefile.am: Makefile.am.in
|
||||
rm -f $@ $@t
|
||||
sed -n '1,/^##m4-files-begin/p' $< > $@t
|
||||
( echo EXTRA_DIST = README Makefile.am.in; \
|
||||
find . -type f -name '*.m4' -print |sed 's,^\./,,' |sort ) \
|
||||
|fmt | (tr '\012' @; echo) \
|
||||
|sed 's/@$$/%/;s/@/ \\@/g' |tr @% '\012\012' \
|
||||
echo EXTRA_DIST = README Makefile.am.in *.m4 \
|
||||
|fmt | (tr '\012' @; echo) \
|
||||
|sed 's/@$$/%/;s/@/ \\@/g' |tr @% '\012\012' \
|
||||
>> $@t
|
||||
sed -n '/^##m4-files-end/,$$p' $< >> $@t
|
||||
chmod a-w $@t
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
Makefile.am: Makefile.am.in
|
||||
rm -f $@ $@t
|
||||
sed -n '1,/^##m4-files-begin/p' $< > $@t
|
||||
( echo EXTRA_DIST = README Makefile.am.in; \
|
||||
find . -type f -name '*.m4' -print |sed 's,^\./,,' |sort ) \
|
||||
|fmt | (tr '\012' @; echo) \
|
||||
|sed 's/@$$/%/;s/@/ \\@/g' |tr @% '\012\012' \
|
||||
echo EXTRA_DIST = README Makefile.am.in *.m4 \
|
||||
|fmt | (tr '\012' @; echo) \
|
||||
|sed 's/@$$/%/;s/@/ \\@/g' |tr @% '\012\012' \
|
||||
>> $@t
|
||||
sed -n '/^##m4-files-end/,$$p' $< >> $@t
|
||||
chmod a-w $@t
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.3b from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
@@ -31,7 +32,7 @@ mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
@@ -90,13 +91,13 @@ YACC = @YACC@
|
||||
l = @l@
|
||||
|
||||
EXTRA_DIST = README Makefile.am.in assert.m4 check-decl.m4 check-type.m4 \
|
||||
chown.m4 const.m4 d-ino.m4 d-type.m4 decl.m4 error.m4 fstypename.m4 \
|
||||
getgroups.m4 getline.m4 getloadavg.m4 gettext.m4 inttypes_h.m4 \
|
||||
isc-posix.m4 jm-glibc-io.m4 jm-macros.m4 jm-mktime.m4 jm-winsz1.m4 \
|
||||
jm-winsz2.m4 lchown.m4 lcmessage.m4 lfs.m4 ls-mntd-fs.m4 lstat.m4 \
|
||||
malloc.m4 memcmp.m4 perl.m4 prereq.m4 progtest.m4 putenv.m4 readdir.m4 \
|
||||
realloc.m4 regex.m4 st_dm_mode.m4 st_mtim.m4 stat.m4 strftime.m4 \
|
||||
uintmax_t.m4 uptime.m4 utimbuf.m4 utime.m4 utimes.m4
|
||||
chown.m4 const.m4 d-ino.m4 d-type.m4 decl.m4 error.m4 fnmatch.m4 \
|
||||
fstypename.m4 getgroups.m4 getline.m4 getloadavg.m4 gettext.m4 glibc.m4 \
|
||||
inttypes_h.m4 isc-posix.m4 jm-glibc-io.m4 jm-macros.m4 jm-mktime.m4 \
|
||||
jm-winsz1.m4 jm-winsz2.m4 lchown.m4 lcmessage.m4 lfs.m4 ls-mntd-fs.m4 \
|
||||
lstat.m4 malloc.m4 memcmp.m4 mktime.m4 perl.m4 prereq.m4 progtest.m4 \
|
||||
putenv.m4 readdir.m4 realloc.m4 regex.m4 st_dm_mode.m4 st_mtim.m4 stat.m4 \
|
||||
strftime.m4 uintmax_t.m4 uptime.m4 utimbuf.m4 utime.m4 utimes.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
@@ -140,7 +141,6 @@ distdir: $(DISTFILES)
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE)
|
||||
installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
@@ -154,24 +154,19 @@ install: install-exec install-data all
|
||||
uninstall:
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-generic
|
||||
|
||||
clean: clean-generic mostlyclean
|
||||
@@ -192,10 +187,9 @@ maintainer-clean
|
||||
Makefile.am: Makefile.am.in
|
||||
rm -f $@ $@t
|
||||
sed -n '1,/^##m4-files-begin/p' $< > $@t
|
||||
( echo EXTRA_DIST = README Makefile.am.in; \
|
||||
find . -type f -name '*.m4' -print |sed 's,^\./,,' |sort ) \
|
||||
|fmt | (tr '\012' @; echo) \
|
||||
|sed 's/@$$/%/;s/@/ \\@/g' |tr @% '\012\012' \
|
||||
echo EXTRA_DIST = README Makefile.am.in *.m4 \
|
||||
|fmt | (tr '\012' @; echo) \
|
||||
|sed 's/@$$/%/;s/@/ \\@/g' |tr @% '\012\012' \
|
||||
>> $@t
|
||||
sed -n '/^##m4-files-end/,$$p' $< >> $@t
|
||||
chmod a-w $@t
|
||||
|
||||
@@ -4,5 +4,4 @@ used by autoconf to create the configure script at the the top level in
|
||||
this distribution.
|
||||
|
||||
The Makefile.am file in this directory is automatically generated
|
||||
from the template file, Makefile.am.in. The generation will fail
|
||||
if you don't have all the right tools.
|
||||
from the template file, Makefile.am.in.
|
||||
|
||||
@@ -1,10 +1,29 @@
|
||||
#serial 2
|
||||
#serial 4
|
||||
|
||||
dnl This is just a wrapper function to encapsulate this kludge.
|
||||
dnl Putting it in a separate file like this helps share it between
|
||||
dnl different packages.
|
||||
AC_DEFUN(jm_CHECK_DECLS,
|
||||
[
|
||||
headers='
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_STRING_H
|
||||
# if !STDC_HEADERS && HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
# endif
|
||||
# include <string.h>
|
||||
#else
|
||||
# ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
# endif
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
'
|
||||
if test x = y; then
|
||||
dnl This code is deliberately never run via ./configure.
|
||||
dnl FIXME: this is a gross hack to make autoheader put entries
|
||||
@@ -14,5 +33,6 @@ AC_DEFUN(jm_CHECK_DECLS,
|
||||
AC_CHECK_FUNCS(DECL_FREE DECL_LSEEK DECL_MALLOC DECL_MEMCHR DECL_REALLOC \
|
||||
DECL_STPCPY DECL_STRSTR)
|
||||
fi
|
||||
jm_CHECK_DECLARATIONS(free lseek malloc memchr realloc stpcpy strstr)
|
||||
jm_CHECK_DECLARATIONS($headers, free lseek malloc \
|
||||
memchr realloc stpcpy strstr)
|
||||
])
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 2
|
||||
#serial 3
|
||||
|
||||
dnl From Jim Meyering.
|
||||
dnl Determine whether chown accepts arguments of -1 for uid and gid.
|
||||
@@ -17,7 +17,7 @@ AC_DEFUN(jm_FUNC_CHOWN,
|
||||
AC_CACHE_CHECK([for working chown], jm_cv_func_working_chown,
|
||||
[AC_TRY_RUN([
|
||||
# include <sys/types.h>
|
||||
# include <stat.h>
|
||||
# include <sys/stat.h>
|
||||
# include <fcntl.h>
|
||||
# ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
@@ -27,6 +27,8 @@ AC_DEFUN(jm_FUNC_CHOWN,
|
||||
main ()
|
||||
{
|
||||
char *f = "conftestchown";
|
||||
struct stat before, after;
|
||||
|
||||
if (creat (f, 0600) < 0)
|
||||
exit (1);
|
||||
if (stat (f, &before) < 0)
|
||||
|
||||
33
m4/decl.m4
33
m4/decl.m4
@@ -1,4 +1,4 @@
|
||||
#serial 2
|
||||
#serial 3
|
||||
|
||||
AC_DEFUN(jm_CHECK_DECLARATION,
|
||||
[
|
||||
@@ -10,24 +10,7 @@ AC_DEFUN(jm_CHECK_DECLARATION,
|
||||
test -z "$ac_cv_header_unistd_h" && AC_CHECK_HEADERS(unistd.h)
|
||||
AC_MSG_CHECKING([whether $1 is declared])
|
||||
AC_CACHE_VAL(jm_cv_func_decl_$1,
|
||||
[AC_TRY_COMPILE([
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_STRING_H
|
||||
# if !STDC_HEADERS && HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
# endif
|
||||
# include <string.h>
|
||||
#else
|
||||
# ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
# endif
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif],
|
||||
[AC_TRY_COMPILE($2,
|
||||
[
|
||||
#ifndef $1
|
||||
char *(*pfn) = (char *(*)) $1
|
||||
@@ -38,23 +21,23 @@ char *(*pfn) = (char *(*)) $1
|
||||
|
||||
if eval "test \"`echo '$jm_cv_func_decl_'$1`\" = yes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$2], , :, [$2])
|
||||
ifelse([$3], , :, [$3])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
ifelse([$3], , , [$3
|
||||
ifelse([$4], , , [$4
|
||||
])dnl
|
||||
fi
|
||||
])dnl
|
||||
|
||||
dnl jm_CHECK_DECLARATIONS(FUNCTION... [, ACTION-IF-DECLARED
|
||||
dnl jm_CHECK_DECLARATIONS(INCLUDES, FUNCTION... [, ACTION-IF-DECLARED
|
||||
dnl [, ACTION-IF-NOT-DECLARED]])
|
||||
AC_DEFUN(jm_CHECK_DECLARATIONS,
|
||||
[
|
||||
for jm_func in $1
|
||||
for jm_func in $2
|
||||
do
|
||||
jm_CHECK_DECLARATION($jm_func,
|
||||
jm_CHECK_DECLARATION($jm_func, $1,
|
||||
[
|
||||
jm_tr_func=HAVE_DECL_`echo $jm_func | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
|
||||
AC_DEFINE_UNQUOTED($jm_tr_func) $2], $3)dnl
|
||||
AC_DEFINE_UNQUOTED($jm_tr_func) $3], $4)dnl
|
||||
done
|
||||
])
|
||||
|
||||
21
m4/fnmatch.m4
Normal file
21
m4/fnmatch.m4
Normal file
@@ -0,0 +1,21 @@
|
||||
#serial 1
|
||||
|
||||
dnl Determine whether to add fnmatch.o to LIBOBJS and to
|
||||
dnl define fnmatch to rpl_fnmatch.
|
||||
dnl
|
||||
dnl If you use this macro in a package, you should
|
||||
dnl add the following two lines to acconfig.h:
|
||||
dnl /* Define to rpl_fnmatch if the replacement function should be used. */
|
||||
dnl #undef fnmatch
|
||||
dnl
|
||||
|
||||
AC_DEFUN(jm_FUNC_FNMATCH,
|
||||
[
|
||||
AC_REQUIRE([AM_GLIBC])
|
||||
AC_FUNC_FNMATCH
|
||||
if test $ac_cv_func_fnmatch_works = no \
|
||||
&& test $ac_cv_gnu_library = no; then
|
||||
LIBOBJS="$LIBOBJS fnmatch.o"
|
||||
AC_DEFINE_UNQUOTED(fnmatch, rpl_fnmatch)
|
||||
fi
|
||||
])
|
||||
35
m4/glibc.m4
Normal file
35
m4/glibc.m4
Normal file
@@ -0,0 +1,35 @@
|
||||
#serial 2
|
||||
|
||||
dnl From Gordon Matzigkeit.
|
||||
dnl Test for the GNU C Library.
|
||||
dnl FIXME: this should migrate into libit.
|
||||
|
||||
AC_DEFUN(AM_GLIBC,
|
||||
[
|
||||
AC_CACHE_CHECK(whether we are using the GNU C Library,
|
||||
ac_cv_gnu_library,
|
||||
[AC_EGREP_CPP([Thanks for using GNU],
|
||||
[
|
||||
#include <features.h>
|
||||
#ifdef __GNU_LIBRARY__
|
||||
Thanks for using GNU
|
||||
#endif
|
||||
],
|
||||
ac_cv_gnu_library=yes,
|
||||
ac_cv_gnu_library=no)
|
||||
]
|
||||
)
|
||||
AC_CACHE_CHECK(for version 2 of the GNU C Library,
|
||||
ac_cv_glibc,
|
||||
[AC_EGREP_CPP([Thanks for using GNU too],
|
||||
[
|
||||
#include <features.h>
|
||||
#ifdef __GLIBC__
|
||||
Thanks for using GNU too
|
||||
#endif
|
||||
],
|
||||
ac_cv_glibc=yes, ac_cv_glibc=no)
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 1
|
||||
#serial 2
|
||||
|
||||
dnl Misc type-related macros for fileutils, sh-utils, textutils.
|
||||
|
||||
@@ -29,4 +29,5 @@ AC_DEFUN(jm_MACROS,
|
||||
AC_REQUIRE([jm_FUNC_READDIR])
|
||||
AC_REQUIRE([jm_FUNC_MEMCMP])
|
||||
AC_REQUIRE([jm_FUNC_GLIBC_UNLOCKED_IO])
|
||||
AC_REQUIRE([jm_FUNC_FNMATCH])
|
||||
])
|
||||
|
||||
@@ -7,12 +7,12 @@ dnl /* Define to rpl_mktime if the replacement function should be used. */
|
||||
dnl #undef mktime
|
||||
dnl
|
||||
AC_DEFUN(jm_FUNC_MKTIME,
|
||||
[AC_REQUIRE([AM_FUNC_MKTIME])dnl
|
||||
[AC_REQUIRE([jm_AM_FUNC_MKTIME])dnl
|
||||
|
||||
dnl mktime.c uses localtime_r if it exists. Check for it.
|
||||
AC_CHECK_FUNCS(localtime_r)
|
||||
|
||||
if test $am_cv_func_working_mktime = no; then
|
||||
if test $jm_am_cv_func_working_mktime = no; then
|
||||
AC_DEFINE_UNQUOTED(mktime, rpl_mktime)
|
||||
fi
|
||||
])
|
||||
|
||||
15
m4/lfs.m4
15
m4/lfs.m4
@@ -1,4 +1,4 @@
|
||||
#serial 1
|
||||
#serial 2
|
||||
|
||||
dnl The problem is that the default compilation flags in Solaris 2.6 won't
|
||||
dnl let programs access large files; you need to tell the compiler that
|
||||
@@ -28,6 +28,19 @@ AC_DEFUN(AC_LFS,
|
||||
ac_getconfs=$ac_getconfs$ac_getconf
|
||||
eval ac_test_$ac_shellvar=\$ac_getconf
|
||||
done
|
||||
case "$ac_result" in
|
||||
no)
|
||||
case "`(uname -s -r) 2>/dev/null`" in
|
||||
HP-UX' '?.10.[[2-9]][[0-9]]* | HP-UX' '?.1[[1-9]]* | HP-UX' '?.[[2-9]][[0-9]]*)
|
||||
# HP-UX 10.20 and later support large files,
|
||||
# but do not support `getconf LFS_CFLAGS'.
|
||||
ac_test_CPPFLAGS='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
|
||||
ac_test_LDFLAGS=
|
||||
ac_test_LIBS=
|
||||
ac_getconfs=nonempty
|
||||
ac_result=yes ;;
|
||||
esac ;;
|
||||
esac
|
||||
case "$ac_result$ac_getconfs" in
|
||||
yes) ac_result=no ;;
|
||||
esac
|
||||
|
||||
43
m4/lstat.m4
43
m4/lstat.m4
@@ -1,20 +1,18 @@
|
||||
#serial 1
|
||||
#serial 2
|
||||
|
||||
dnl From Jim Meyering.
|
||||
dnl Determine whether lstat has the bug that it succeeds when given the
|
||||
dnl zero-length file name argument. The lstat from SunOS4.1.4 does this.
|
||||
dnl zero-length file name argument. The lstat from SunOS4.1.4 and the Hurd
|
||||
dnl (as of 1998-11-01) do this.
|
||||
dnl
|
||||
dnl If it doesn't, arrange to use the replacement function.
|
||||
dnl
|
||||
dnl If you use this macro in a package, you should
|
||||
dnl add the following two lines to acconfig.h:
|
||||
dnl /* Define to rpl_lstat if the replacement function should be used. */
|
||||
dnl #undef lstat
|
||||
dnl If it does, then define HAVE_LSTAT_EMPTY_STRING_BUG and arrange to
|
||||
dnl compile the wrapper function.
|
||||
dnl
|
||||
|
||||
AC_DEFUN(jm_FUNC_LSTAT,
|
||||
[
|
||||
AC_CACHE_CHECK([for working lstat], jm_cv_func_working_lstat,
|
||||
AC_CACHE_CHECK([whether lstat accepts an empty string],
|
||||
jm_cv_func_lstat_empty_string_bug,
|
||||
[AC_TRY_RUN([
|
||||
# include <sys/types.h>
|
||||
# include <sys/stat.h>
|
||||
@@ -23,16 +21,31 @@ AC_DEFUN(jm_FUNC_LSTAT,
|
||||
main ()
|
||||
{
|
||||
struct stat sbuf;
|
||||
exit (lstat ("", &sbuf) == 0 ? 1 : 0);
|
||||
exit (lstat ("", &sbuf) ? 1 : 0);
|
||||
}
|
||||
],
|
||||
jm_cv_func_working_lstat=yes,
|
||||
jm_cv_func_working_lstat=no,
|
||||
jm_cv_func_lstat_empty_string_bug=yes,
|
||||
jm_cv_func_lstat_empty_string_bug=no,
|
||||
dnl When crosscompiling, assume lstat is broken.
|
||||
jm_cv_func_working_lstat=no)
|
||||
jm_cv_func_lstat_empty_string_bug=yes)
|
||||
])
|
||||
if test $jm_cv_func_working_lstat = no; then
|
||||
if test $jm_cv_func_lstat_empty_string_bug = yes; then
|
||||
|
||||
LIBOBJS="$LIBOBJS lstat.o"
|
||||
AC_DEFINE_UNQUOTED(lstat, rpl_lstat)
|
||||
|
||||
if test $jm_cv_func_lstat_empty_string_bug = yes; then
|
||||
if test x = y; then
|
||||
# This code is deliberately never run via ./configure.
|
||||
# FIXME: this is a hack to make autoheader put the corresponding
|
||||
# HAVE_* undef for this symbol in config.h.in. This saves me the
|
||||
# trouble of having to maintain the #undef in acconfig.h manually.
|
||||
AC_CHECK_FUNCS(LSTAT_EMPTY_STRING_BUG)
|
||||
fi
|
||||
# Defining it this way (rather than via AC_DEFINE) short-circuits the
|
||||
# autoheader check -- autoheader doesn't know it's already been taken
|
||||
# care of by the hack above.
|
||||
ac_kludge=HAVE_LSTAT_EMPTY_STRING_BUG
|
||||
AC_DEFINE_UNQUOTED($ac_kludge)
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
166
m4/mktime.m4
Normal file
166
m4/mktime.m4
Normal file
@@ -0,0 +1,166 @@
|
||||
#serial 1001
|
||||
|
||||
dnl Just like mktime.m4 from automake-1.3b, but with an additional test.
|
||||
dnl Renamed to have jm_ prefix and to use jm_ prefix on cache variable names.
|
||||
|
||||
AC_DEFUN(jm_AM_FUNC_MKTIME,
|
||||
[AC_REQUIRE([AC_HEADER_TIME])dnl
|
||||
AC_CHECK_HEADERS(sys/time.h unistd.h)
|
||||
AC_CHECK_FUNCS(alarm)
|
||||
AC_CACHE_CHECK([for working mktime], jm_am_cv_func_working_mktime,
|
||||
[AC_TRY_RUN(
|
||||
changequote(<<, >>)dnl
|
||||
<</* Test program from Paul Eggert (eggert@twinsun.com)
|
||||
and Tony Leneis (tony@plaza.ds.adp.com). */
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if !HAVE_ALARM
|
||||
# define alarm(X) /* empty */
|
||||
#endif
|
||||
|
||||
/* Work around redefinition to rpl_putenv by other config tests. */
|
||||
#undef putenv
|
||||
|
||||
static time_t time_t_max;
|
||||
|
||||
/* Values we'll use to set the TZ environment variable. */
|
||||
static const char *const tz_strings[] = {
|
||||
(const char *) 0, "TZ=GMT0", "TZ=JST-9",
|
||||
"TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
|
||||
};
|
||||
#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
|
||||
|
||||
/* Fail if mktime fails to convert a date in the spring-forward gap.
|
||||
Based on a problem report from Andreas Jaeger. */
|
||||
static void
|
||||
spring_forward_gap ()
|
||||
{
|
||||
/* glibc (up to about 1998-10-07) failed this test) */
|
||||
struct tm tm;
|
||||
|
||||
/* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
|
||||
instead of "TZ=America/Vancouver" in order to detect the bug even
|
||||
on systems that don't support the Olson extension, or don't have the
|
||||
full zoneinfo tables installed. */
|
||||
putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
|
||||
tm.tm_year = 98;
|
||||
tm.tm_mon = 3;
|
||||
tm.tm_mday = 5;
|
||||
tm.tm_hour = 2;
|
||||
tm.tm_min = 0;
|
||||
tm.tm_sec = 0;
|
||||
tm.tm_isdst = -1;
|
||||
if (mktime (&tm) == (time_t)-1)
|
||||
exit (1);
|
||||
}
|
||||
|
||||
static void
|
||||
mktime_test (now)
|
||||
time_t now;
|
||||
{
|
||||
struct tm *lt;
|
||||
if ((lt = localtime (&now)) && mktime (lt) != now)
|
||||
exit (1);
|
||||
now = time_t_max - now;
|
||||
if ((lt = localtime (&now)) && mktime (lt) != now)
|
||||
exit (1);
|
||||
}
|
||||
|
||||
static void
|
||||
irix_6_4_bug ()
|
||||
{
|
||||
/* Based on code from Ariel Faigon. */
|
||||
struct tm tm;
|
||||
tm.tm_year = 96;
|
||||
tm.tm_mon = 3;
|
||||
tm.tm_mday = 0;
|
||||
tm.tm_hour = 0;
|
||||
tm.tm_min = 0;
|
||||
tm.tm_sec = 0;
|
||||
tm.tm_isdst = -1;
|
||||
mktime (&tm);
|
||||
if (tm.tm_mon != 2 || tm.tm_mday != 31)
|
||||
exit (1);
|
||||
}
|
||||
|
||||
static void
|
||||
bigtime_test (j)
|
||||
int j;
|
||||
{
|
||||
struct tm tm;
|
||||
time_t now;
|
||||
tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
|
||||
/* This test makes some buggy mktime implementations loop.
|
||||
Give up after 10 seconds. */
|
||||
alarm (10);
|
||||
now = mktime (&tm);
|
||||
alarm (0);
|
||||
if (now != (time_t) -1)
|
||||
{
|
||||
struct tm *lt = localtime (&now);
|
||||
if (! (lt
|
||||
&& lt->tm_year == tm.tm_year
|
||||
&& lt->tm_mon == tm.tm_mon
|
||||
&& lt->tm_mday == tm.tm_mday
|
||||
&& lt->tm_hour == tm.tm_hour
|
||||
&& lt->tm_min == tm.tm_min
|
||||
&& lt->tm_sec == tm.tm_sec
|
||||
&& lt->tm_yday == tm.tm_yday
|
||||
&& lt->tm_wday == tm.tm_wday
|
||||
&& ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
|
||||
== (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
time_t t, delta;
|
||||
int i, j;
|
||||
|
||||
spring_forward_gap ();
|
||||
for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
|
||||
continue;
|
||||
time_t_max--;
|
||||
delta = time_t_max / 997; /* a suitable prime number */
|
||||
for (i = 0; i < N_STRINGS; i++)
|
||||
{
|
||||
if (tz_strings[i])
|
||||
putenv (tz_strings[i]);
|
||||
|
||||
for (t = 0; t <= time_t_max - delta; t += delta)
|
||||
mktime_test (t);
|
||||
mktime_test ((time_t) 60 * 60);
|
||||
mktime_test ((time_t) 60 * 60 * 24);
|
||||
|
||||
for (j = 1; 0 < j; j *= 2)
|
||||
bigtime_test (j);
|
||||
bigtime_test (j - 1);
|
||||
}
|
||||
irix_6_4_bug ();
|
||||
exit (0);
|
||||
}
|
||||
>>,
|
||||
changequote([, ])dnl
|
||||
jm_am_cv_func_working_mktime=yes, jm_am_cv_func_working_mktime=no,
|
||||
dnl When crosscompiling, assume mktime is missing or broken.
|
||||
jm_am_cv_func_working_mktime=no)
|
||||
])
|
||||
if test $jm_am_cv_func_working_mktime = no; then
|
||||
LIBOBJS="$LIBOBJS mktime.o"
|
||||
fi
|
||||
])
|
||||
43
m4/stat.m4
43
m4/stat.m4
@@ -1,20 +1,18 @@
|
||||
#serial 1
|
||||
#serial 2
|
||||
|
||||
dnl From Jim Meyering.
|
||||
dnl Determine whether stat has the bug that it succeeds when given the
|
||||
dnl zero-length file name argument. The stat from SunOS4.1.4 does this.
|
||||
dnl zero-length file name argument. The stat from SunOS4.1.4 and the Hurd
|
||||
dnl (as of 1998-11-01) do this.
|
||||
dnl
|
||||
dnl If it doesn't, arrange to use the replacement function.
|
||||
dnl
|
||||
dnl If you use this macro in a package, you should
|
||||
dnl add the following two lines to acconfig.h:
|
||||
dnl /* Define to rpl_stat if the replacement function should be used. */
|
||||
dnl #undef stat
|
||||
dnl If it does, then define HAVE_STAT_EMPTY_STRING_BUG and arrange to
|
||||
dnl compile the wrapper function.
|
||||
dnl
|
||||
|
||||
AC_DEFUN(jm_FUNC_STAT,
|
||||
[
|
||||
AC_CACHE_CHECK([for working stat], jm_cv_func_working_stat,
|
||||
AC_CACHE_CHECK([whether stat accepts an empty string],
|
||||
jm_cv_func_stat_empty_string_bug,
|
||||
[AC_TRY_RUN([
|
||||
# include <sys/types.h>
|
||||
# include <sys/stat.h>
|
||||
@@ -23,16 +21,31 @@ AC_DEFUN(jm_FUNC_STAT,
|
||||
main ()
|
||||
{
|
||||
struct stat sbuf;
|
||||
exit (stat ("", &sbuf) == 0 ? 1 : 0);
|
||||
exit (stat ("", &sbuf) ? 1 : 0);
|
||||
}
|
||||
],
|
||||
jm_cv_func_working_stat=yes,
|
||||
jm_cv_func_working_stat=no,
|
||||
jm_cv_func_stat_empty_string_bug=yes,
|
||||
jm_cv_func_stat_empty_string_bug=no,
|
||||
dnl When crosscompiling, assume stat is broken.
|
||||
jm_cv_func_working_stat=no)
|
||||
jm_cv_func_stat_empty_string_bug=yes)
|
||||
])
|
||||
if test $jm_cv_func_working_stat = no; then
|
||||
if test $jm_cv_func_stat_empty_string_bug = yes; then
|
||||
|
||||
LIBOBJS="$LIBOBJS stat.o"
|
||||
AC_DEFINE_UNQUOTED(stat, rpl_stat)
|
||||
|
||||
if test $jm_cv_func_stat_empty_string_bug = yes; then
|
||||
if test x = y; then
|
||||
# This code is deliberately never run via ./configure.
|
||||
# FIXME: this is a hack to make autoheader put the corresponding
|
||||
# HAVE_* undef for this symbol in config.h.in. This saves me the
|
||||
# trouble of having to maintain the #undef in acconfig.h manually.
|
||||
AC_CHECK_FUNCS(STAT_EMPTY_STRING_BUG)
|
||||
fi
|
||||
# Defining it this way (rather than via AC_DEFINE) short-circuits the
|
||||
# autoheader check -- autoheader doesn't know it's already been taken
|
||||
# care of by the hack above.
|
||||
ac_kludge=HAVE_STAT_EMPTY_STRING_BUG
|
||||
AC_DEFINE_UNQUOTED($ac_kludge)
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
2
man/basename.x
Normal file
2
man/basename.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
2
man/cat.x
Normal file
2
man/cat.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
2
man/chgrp.x
Normal file
2
man/chgrp.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
55
man/chmod.x
Normal file
55
man/chmod.x
Normal file
@@ -0,0 +1,55 @@
|
||||
[DESCRIPTION]
|
||||
This manual page
|
||||
documents the GNU version of
|
||||
.BR chmod .
|
||||
.B chmod
|
||||
changes the permissions of each given file according to
|
||||
.IR mode ,
|
||||
which can be either a symbolic representation of changes to make, or
|
||||
an octal number representing the bit pattern for the new permissions.
|
||||
.PP
|
||||
The format of a symbolic mode is
|
||||
`[ugoa...][[+-=][rwxXstugo...]...][,...]'. Multiple symbolic
|
||||
operations can be given, separated by commas.
|
||||
.PP
|
||||
A combination of the letters `ugoa' controls which users' access to
|
||||
the file will be changed: the user who owns it (u), other users in the
|
||||
file's group (g), other users not in the file's group (o), or all
|
||||
users (a). If none of these are given, the effect is as if `a' were
|
||||
given, but bits that are set in the umask are not affected.
|
||||
.PP
|
||||
The operator `+' causes the permissions selected to be added to the
|
||||
existing permissions of each file; `-' causes them to be removed; and
|
||||
`=' causes them to be the only permissions that the file has.
|
||||
.PP
|
||||
The letters `rwxXstugo' select the new permissions for the affected
|
||||
users: read (r), write (w), execute (or access for directories) (x),
|
||||
execute only if the file is a directory or already has execute
|
||||
permission for some user (X), set user or group ID on execution (s),
|
||||
save program text on swap device (t), the permissions that the user
|
||||
who owns the file currently has for it (u), the permissions that other
|
||||
users in the file's group have for it (g), and the permissions that
|
||||
other users not in the file's group have for it (o).
|
||||
.PP
|
||||
A numeric mode is from one to four octal digits (0-7), derived by
|
||||
adding up the bits with values 4, 2, and 1. Any omitted digits are
|
||||
assumed to be leading zeros. The first digit selects the set user ID
|
||||
(4) and set group ID (2) and save text image (1) attributes. The
|
||||
second digit selects permissions for the user who owns the file: read
|
||||
(4), write (2), and execute (1); the third selects permissions for
|
||||
other users in the file's group, with the same values; and the fourth
|
||||
for other users not in the file's group, with the same values.
|
||||
.PP
|
||||
.B chmod
|
||||
never changes the permissions of symbolic links; the
|
||||
.B chmod
|
||||
system call cannot change their permissions. This is not a problem
|
||||
since the permissions of symbolic links are never used.
|
||||
However, for each symbolic link listed on the command line,
|
||||
.B chmod
|
||||
changes the permissions of the pointed-to file.
|
||||
In contrast,
|
||||
.B chmod
|
||||
ignores symbolic links encountered during recursive directory
|
||||
traversals.
|
||||
.SH OPTIONS
|
||||
20
man/chown.x
Normal file
20
man/chown.x
Normal file
@@ -0,0 +1,20 @@
|
||||
[DESCRIPTION]
|
||||
This manual page
|
||||
documents the GNU version of
|
||||
.BR chown .
|
||||
.B chown
|
||||
changes the user and/or group ownership of each given file, according
|
||||
to its first non-option argument, which is interpreted as follows. If
|
||||
only a user name (or numeric user ID) is given, that user is made the
|
||||
owner of each given file, and the files' group is not changed. If the
|
||||
user name is followed by a colon or dot and a group name (or numeric group ID),
|
||||
with no spaces between them, the group ownership of the files is
|
||||
changed as well. If a colon or dot but no group name follows the user name,
|
||||
that user is made the owner of the files and the group of the files is
|
||||
changed to that user's login group. If the colon or dot and group are given,
|
||||
but the user name is omitted, only the group of the files is changed;
|
||||
in this case,
|
||||
.B chown
|
||||
performs the same function as
|
||||
.BR chgrp .
|
||||
.Sh OPTIONS
|
||||
2
man/chroot.x
Normal file
2
man/chroot.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
2
man/cksum.x
Normal file
2
man/cksum.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
2
man/comm.x
Normal file
2
man/comm.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
18
man/cp.x
Normal file
18
man/cp.x
Normal file
@@ -0,0 +1,18 @@
|
||||
.\" Copyright (C) 1994, 95, 96, 97 Free Software Foundation, Inc.
|
||||
.\"
|
||||
.\" Permission is granted to make and distribute verbatim copies of this
|
||||
.\" manual provided the copyright notice and this permission notice are
|
||||
.\" preserved on all copies.
|
||||
.\"
|
||||
.\" Permission is granted to copy and distribute modified versions of
|
||||
.\" this manual under the conditions for verbatim copying, provided that
|
||||
.\" the entire resulting derived work is distributed under the terms of a
|
||||
.\" permission notice identical to this one.
|
||||
.\"
|
||||
.\" Permission is granted to copy and distribute translations of this
|
||||
.\" manual into another language, under the above conditions for modified
|
||||
.\" versions, except that this permission notice may be stated in a
|
||||
.\" translation approved by the Foundation.
|
||||
.\"
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
2
man/csplit.x
Normal file
2
man/csplit.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
2
man/cut.x
Normal file
2
man/cut.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
2
man/date.x
Normal file
2
man/date.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
2
man/dd.x
Normal file
2
man/dd.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
39
man/df.x
Normal file
39
man/df.x
Normal file
@@ -0,0 +1,39 @@
|
||||
.\" Copyright (C) 1994, 95, 96, 97, 98 Free Software Foundation, Inc.
|
||||
.\"
|
||||
.\" Permission is granted to make and distribute verbatim copies of this
|
||||
.\" manual provided the copyright notice and this permission notice are
|
||||
.\" preserved on all copies.
|
||||
.\"
|
||||
.\" Permission is granted to copy and distribute modified versions of
|
||||
.\" this manual under the conditions for verbatim copying, provided that
|
||||
.\" the entire resulting derived work is distributed under the terms of a
|
||||
.\" permission notice identical to this one.
|
||||
.\"
|
||||
.\" Permission is granted to copy and distribute translations of this
|
||||
.\" manual into another language, under the above conditions for modified
|
||||
.\" versions, except that this permission notice may be stated in a
|
||||
.\" translation approved by the Foundation.
|
||||
.\"
|
||||
[DESCRIPTION]
|
||||
This manual page
|
||||
documents the GNU version of
|
||||
.BR df .
|
||||
.B df
|
||||
displays the amount of disk space available on the filesystem
|
||||
containing each file name argument. If no file name is given, the
|
||||
space available on all currently mounted filesystems is shown. Disk
|
||||
space is shown in 1K blocks by default, unless the environment
|
||||
variable POSIXLY_CORRECT is set, in which case 512-byte blocks are
|
||||
used.
|
||||
.PP
|
||||
If an argument is the absolute file name of a disk device node containing a
|
||||
mounted filesystem,
|
||||
.B df
|
||||
shows the space available on that filesystem rather than on the
|
||||
filesystem containing the device node (which is always the root
|
||||
filesystem). This version of
|
||||
.B df
|
||||
cannot show the space available on unmounted filesystems, because on
|
||||
most kinds of systems doing so requires very nonportable intimate
|
||||
knowledge of filesystem structures.
|
||||
.SH OPTIONS
|
||||
2
man/dir.x
Normal file
2
man/dir.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
2
man/dircolors.x
Normal file
2
man/dircolors.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
2
man/dirname.x
Normal file
2
man/dirname.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
2
man/du.x
Normal file
2
man/du.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
2
man/echo.x
Normal file
2
man/echo.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
2
man/env.x
Normal file
2
man/env.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
2
man/expand.x
Normal file
2
man/expand.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
2
man/expr.x
Normal file
2
man/expr.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
2
man/false.x
Normal file
2
man/false.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
2
man/fmt.x
Normal file
2
man/fmt.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
2
man/fold.x
Normal file
2
man/fold.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
2
man/groups.x
Normal file
2
man/groups.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
2
man/head.x
Normal file
2
man/head.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
375
man/help2man
Executable file
375
man/help2man
Executable file
@@ -0,0 +1,375 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
# Generate a short man page from --help and --version output.
|
||||
# Copyright © 1997, 98 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.
|
||||
|
||||
# Written by Brendan O'Dea <bod@compusol.com.au>
|
||||
|
||||
use 5.004;
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
use POSIX qw(strftime setlocale LC_TIME);
|
||||
|
||||
my $this_program = 'help2man';
|
||||
my $this_version = '1.006';
|
||||
my $version_info = <<EOT;
|
||||
$this_program $this_version
|
||||
|
||||
Copyright (C) 1997, 98 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
Written by Brendan O'Dea <bod\@compusol.com.au>
|
||||
EOT
|
||||
|
||||
my $help_info = <<EOT;
|
||||
`$this_program' generates a man page out of `--help' and `--version' output.
|
||||
|
||||
Usage: $this_program [OPTION]... EXECUTABLE
|
||||
|
||||
--name=STRING use `STRING' as the description for the NAME paragraph
|
||||
--include=FILE include material from `FILE'
|
||||
--opt-include=FILE include material from `FILE' if it exists
|
||||
--output=FILE send output to `FILE'
|
||||
--no-info suppress pointer to Texinfo manual
|
||||
--help print this help, then exit
|
||||
--version print $this_program program version number, then exit
|
||||
|
||||
EXECUTABLE should accept `--help' and `version' options.
|
||||
EOT
|
||||
|
||||
my ($include, $opt_name, $opt_include, $opt_output, $opt_no_info);
|
||||
|
||||
# Parse options.
|
||||
GetOptions (
|
||||
'name=s' => \$opt_name,
|
||||
'include=s' => \$include,
|
||||
'opt-include=s' => \$opt_include,
|
||||
'output=s' => \$opt_output,
|
||||
'no-info' => \$opt_no_info,
|
||||
help => sub { print $help_info; exit },
|
||||
version => sub { print $version_info; exit },
|
||||
) or die $help_info;
|
||||
|
||||
die $help_info unless @ARGV == 1;
|
||||
|
||||
my %include = ();
|
||||
my @include = (); # to retain order
|
||||
|
||||
# Process include file (if given). Format is:
|
||||
#
|
||||
# [section name]
|
||||
# verbatim text
|
||||
|
||||
if ($include or $opt_include)
|
||||
{
|
||||
if (open INC, $include || $opt_include)
|
||||
{
|
||||
my $sect;
|
||||
|
||||
while (<INC>)
|
||||
{
|
||||
if (/^\[([^]]+)\]/)
|
||||
{
|
||||
$sect = uc $1;
|
||||
$sect =~ s/^\s+//;
|
||||
$sect =~ s/\s+$//;
|
||||
next;
|
||||
}
|
||||
|
||||
# Silently ignore anything before the first
|
||||
# section--allows for comments and revision info.
|
||||
next unless $sect;
|
||||
|
||||
push @include, $sect unless $include{$sect};
|
||||
$include{$sect} ||= '';
|
||||
$include{$sect} .= $_;
|
||||
}
|
||||
|
||||
close INC;
|
||||
|
||||
die "$this_program: no valid information found in `$include'\n"
|
||||
unless %include;
|
||||
|
||||
# Compress trailing blank lines.
|
||||
for (keys %include)
|
||||
{
|
||||
$include{$_} =~ s/\n+$//;
|
||||
$include{$_} .= "\n" unless /^NAME$/;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
die "$this_program: can't open `$include' ($!)\n" if $include;
|
||||
}
|
||||
}
|
||||
|
||||
# Turn off localisation of executable's ouput.
|
||||
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
|
||||
|
||||
# Turn off localisation of date (for strftime)
|
||||
setlocale LC_TIME, 'C';
|
||||
|
||||
# Grab help and version paragraphs from executable
|
||||
my @help = split /\n\n+/, `$ARGV[0] --help 2>/dev/null`
|
||||
or die "$this_program: can't get `--help' info from $ARGV[0]\n";
|
||||
|
||||
my @version = split /\n\n+/, `$ARGV[0] --version 2>/dev/null`
|
||||
or die "$this_program: can't get `--version' info from $ARGV[0]\n";
|
||||
|
||||
my $date = strftime "%B %Y", localtime;
|
||||
(my $program = $ARGV[0]) =~ s!.*/!!;
|
||||
my $package = $program;
|
||||
my $version;
|
||||
|
||||
if ($opt_output)
|
||||
{
|
||||
unlink $opt_output
|
||||
or die "$this_program: can't unlink $opt_output ($!)\n"
|
||||
if -e $opt_output;
|
||||
|
||||
open STDOUT, ">$opt_output"
|
||||
or die "$this_program: can't create $opt_output ($!)\n";
|
||||
}
|
||||
|
||||
# The first line of the --version information is assumed to be in one
|
||||
# of the following formats:
|
||||
#
|
||||
# <version>
|
||||
# <program> <version>
|
||||
# GNU <program> <version>
|
||||
# <program> (GNU <package>) <version>
|
||||
# <program> - GNU <package> <version>
|
||||
#
|
||||
# and seperated from any copyright/author details by a blank line.
|
||||
|
||||
$_ = shift @version;
|
||||
|
||||
if (/^(\S+)\s+\((GNU\s+[^)]+)\)\s+(.*)/ or
|
||||
/^(\S+)\s+-\s*(GNU\s+\S+)\s+(.*)/)
|
||||
{
|
||||
$program = $1;
|
||||
$package = $2;
|
||||
$version = $3;
|
||||
}
|
||||
elsif (/^(GNU\s+)?(\S+)\s+(.*)/)
|
||||
{
|
||||
$program = $2;
|
||||
$package = $1 ? "$1$2" : $2;
|
||||
$version = $3;
|
||||
}
|
||||
else
|
||||
{
|
||||
$version = $_;
|
||||
}
|
||||
|
||||
$program =~ s!.*/!!;
|
||||
|
||||
# no info for `info' itself
|
||||
$opt_no_info = 1 if $program eq 'info';
|
||||
|
||||
# --name overrides --include contents
|
||||
$include{NAME} = "$program \\- $opt_name" if $opt_name;
|
||||
|
||||
# Default (useless) NAME paragraph
|
||||
$include{NAME} ||= "$program \\- manual page for $program $version";
|
||||
|
||||
# Man pages traditionally have the page title in caps.
|
||||
my $PROGRAM = uc $program;
|
||||
|
||||
# Header.
|
||||
print <<EOT;
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by $this_program $this_version.
|
||||
.TH $PROGRAM 1 "$date" "$package $version" "FSF"
|
||||
.SH NAME
|
||||
$include{NAME}
|
||||
EOT
|
||||
|
||||
my $accumulate = 1;
|
||||
my @description = ();
|
||||
|
||||
sub convert_option;
|
||||
|
||||
# Output converted --help information.
|
||||
for (@help)
|
||||
{
|
||||
chomp;
|
||||
|
||||
if (s/^Usage:\s+\S+\s+(.*)\n?//)
|
||||
{
|
||||
# Turn the usage clause into a synopsis.
|
||||
my $synopsis = '';
|
||||
|
||||
do {
|
||||
my $syn = $1;
|
||||
$syn =~ s/(([][]|\.\.+)+)/\\fR$1\\fI/g;
|
||||
$syn =~ s/^/\\fI/ unless $syn =~ s/^\\fR//;
|
||||
$syn .= '\fR';
|
||||
$syn =~ s/\\fI(\s*)\\fR/$1/g;
|
||||
|
||||
$synopsis .= ".br\n" unless $accumulate;
|
||||
$synopsis .= ".B $program\n";
|
||||
$synopsis .= "$syn\n";
|
||||
$accumulate = 0;
|
||||
} while s/^(?:Usage|\s*or):\s+\S+\s+(.*)\n?//;
|
||||
|
||||
# Include file overrides SYNOPSIS.
|
||||
print ".SH SYNOPSIS\n", $include{SYNOPSIS} || $synopsis;
|
||||
|
||||
# Dump any accumulated description text.
|
||||
print ".SH DESCRIPTION\n";
|
||||
print @description;
|
||||
|
||||
# Add additional description text from include file.
|
||||
if ($include{DESCRIPTION})
|
||||
{
|
||||
print ".PP\n" unless $include{DESCRIPTION} =~ /^\..P/;
|
||||
print $include{DESCRIPTION};
|
||||
}
|
||||
|
||||
next unless $_;
|
||||
}
|
||||
|
||||
# Accumulate text if the synopsis has not been produced yet.
|
||||
if ($accumulate)
|
||||
{
|
||||
push @description, ".PP\n" if @description;
|
||||
push @description, "$_\n";
|
||||
next;
|
||||
}
|
||||
|
||||
# Catch start of options.
|
||||
if (/^Options:/)
|
||||
{
|
||||
print qq(.SH OPTIONS\n);
|
||||
s/Options://;
|
||||
}
|
||||
|
||||
# Catch bug report text.
|
||||
if (/^Report bugs |^Email bug reports to /)
|
||||
{
|
||||
print qq(.SH "REPORTING BUGS"\n$_\n);
|
||||
next;
|
||||
}
|
||||
|
||||
# Special case for tar 1.12: --label=NAME\nPATTERN.
|
||||
s{(\n[ \t]*)(-V,[ \t]+--label=NAME.*)\n[ \t]+PATTERN[ \t]+}
|
||||
{$1$2$1\\&...=PATTERN };
|
||||
|
||||
# Convert options.
|
||||
s/(\s)(-[][\w=-]+|\\&\S+)/$1 . convert_option $2/ge;
|
||||
|
||||
# Option subsections have second line indented.
|
||||
print qq(.SS "$1"\n) if s/^(\S.*)\n(\s)/$2/;
|
||||
|
||||
# Lines indented more than about 10 spaces may be assumed to be
|
||||
# continuations of the previous line.
|
||||
s/\n {10,}/ /g;
|
||||
|
||||
# Lines following dotted (*) or numbered points may also be
|
||||
# continued if indented to the same level as the text following
|
||||
# the point.
|
||||
1 while s{((?:^|\n)(\s+)(?:[1-9][.)]|\*)(\s+)(?:[^\n]+))\n\2 \3(\S)}
|
||||
{$1 $4}g;
|
||||
|
||||
# Indented paragraph.
|
||||
if (/^\s/)
|
||||
{
|
||||
for (split /\n/)
|
||||
{
|
||||
s/^\s+//;
|
||||
s/([^,])\s+/$1\n/;
|
||||
print ".TP\n$_\n" if $_;
|
||||
}
|
||||
}
|
||||
# Anything else.
|
||||
else
|
||||
{
|
||||
print ".PP\n$_\n";
|
||||
}
|
||||
}
|
||||
|
||||
# Print any include items other than the ones we have already dealt
|
||||
# with.
|
||||
for (@include)
|
||||
{
|
||||
print qq(.SH "$_"\n$include{$_})
|
||||
unless /^(NAME|SYNOPSIS|DESCRIPTION|SEE ALSO)$/;
|
||||
}
|
||||
|
||||
# Refer to the real documentation.
|
||||
if ($include{'SEE ALSO'} or !$opt_no_info)
|
||||
{
|
||||
print qq(.SH "SEE ALSO"\n);
|
||||
print $include{'SEE ALSO'}, ".PP\n" if $include{'SEE ALSO'};
|
||||
|
||||
print <<EOT unless $opt_no_info;
|
||||
The full documentation for
|
||||
.B $program
|
||||
is maintained as a Texinfo manual. If the
|
||||
.B info
|
||||
and
|
||||
.B $program
|
||||
programs are properly installed at your site, the command
|
||||
.IP
|
||||
.B info $program
|
||||
.PP
|
||||
should give you access to the complete manual.
|
||||
EOT
|
||||
}
|
||||
|
||||
# Output converted --version information.
|
||||
for (@version)
|
||||
{
|
||||
chomp;
|
||||
|
||||
# Join hyphenated lines.
|
||||
s/([A-Za-z])-\n */$1/g;
|
||||
|
||||
# Convert copyright symbol or (c) to nroff character.
|
||||
s/Copyright\s+(?:\xa9|\([Cc]\))/Copyright \\(co/g;
|
||||
|
||||
# Insert appropriate headings for copyright and author.
|
||||
if (/^Copyright\s\\/) { print ".SH COPYRIGHT\n" }
|
||||
elsif (/^Written\s+by/) { print ".SH AUTHOR\n" }
|
||||
else { print ".PP\n"; }
|
||||
|
||||
# Insert line breaks before additional copyright messages and the
|
||||
# disclaimer.
|
||||
s/(.)\n(Copyright\s|This is free software)/$1\n.br\n$2/g;
|
||||
|
||||
print "$_\n";
|
||||
}
|
||||
|
||||
exit;
|
||||
|
||||
# Convert option dashes to \- to stop nroff from hyphenating 'em, and
|
||||
# embolden. Option arguments get italicised.
|
||||
sub convert_option
|
||||
{
|
||||
my $option = '\fB' . shift;
|
||||
|
||||
$option =~ s/-/\\-/g;
|
||||
unless ($option =~ s/\[=(.*)\]$/\\fR[=\\fI$1\\fR]/)
|
||||
{
|
||||
$option =~ s/=(.)/\\fR=\\fI$1/;
|
||||
$option =~ s/ (.)/ \\fI$1/;
|
||||
$option .= '\fR';
|
||||
}
|
||||
|
||||
$option;
|
||||
}
|
||||
2
man/hostid.x
Normal file
2
man/hostid.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
2
man/hostname.x
Normal file
2
man/hostname.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
2
man/id.x
Normal file
2
man/id.x
Normal file
@@ -0,0 +1,2 @@
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user