mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
Compare commits
440 Commits
SH-UTILS-2
...
FILEUTILS-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3abc240e82 | ||
|
|
ff8f4dde22 | ||
|
|
f880990daf | ||
|
|
7306126ef0 | ||
|
|
305e2306be | ||
|
|
2b10e67d59 | ||
|
|
dc74b3a1e7 | ||
|
|
2f21a269fe | ||
|
|
69408d229e | ||
|
|
f05badd230 | ||
|
|
6763fa97d2 | ||
|
|
b1b10e1e40 | ||
|
|
5810f4bee5 | ||
|
|
91b5e686d5 | ||
|
|
8c096b86ef | ||
|
|
698fd02798 | ||
|
|
28bac510d9 | ||
|
|
2413369d22 | ||
|
|
091109470c | ||
|
|
9481a7bd36 | ||
|
|
2be3dc067a | ||
|
|
c4542a7e8c | ||
|
|
6c9e0d702a | ||
|
|
062906c83a | ||
|
|
2c3fa56cef | ||
|
|
346edb7361 | ||
|
|
b9c91d0570 | ||
|
|
e20a9b89d2 | ||
|
|
0baa523154 | ||
|
|
d5f7b2a2db | ||
|
|
4c05896b20 | ||
|
|
ec974f5c39 | ||
|
|
15d2e7a86b | ||
|
|
069610a0f0 | ||
|
|
5617251659 | ||
|
|
398516f242 | ||
|
|
8e1452ffea | ||
|
|
6b36a017db | ||
|
|
30d2b031ab | ||
|
|
f72f631fa0 | ||
|
|
d10b18f2b9 | ||
|
|
511cd5b6ae | ||
|
|
09282a24f6 | ||
|
|
f36a801a9a | ||
|
|
1e219d6b71 | ||
|
|
2e0f5a2bac | ||
|
|
9234f12d32 | ||
|
|
bd2102efa4 | ||
|
|
6550d040a5 | ||
|
|
afdd1c5ca2 | ||
|
|
7af339b126 | ||
|
|
0d6c850979 | ||
|
|
a6db3e776e | ||
|
|
f5c9c07779 | ||
|
|
05de2104b9 | ||
|
|
22c0d963f1 | ||
|
|
6cfbe9468a | ||
|
|
630d0d3f8d | ||
|
|
d3af459dac | ||
|
|
b9cbaa7073 | ||
|
|
6c95094270 | ||
|
|
65c46d231a | ||
|
|
c401c7f12c | ||
|
|
5a7847d20f | ||
|
|
94129d72a5 | ||
|
|
e0e3f4ba72 | ||
|
|
61511d8bcb | ||
|
|
7eba3be340 | ||
|
|
971da27132 | ||
|
|
eff0f7cd2e | ||
|
|
b609a36366 | ||
|
|
e4dbcfc604 | ||
|
|
8a34174fb2 | ||
|
|
f22a30f1e5 | ||
|
|
4917680b1a | ||
|
|
3bd2800a3c | ||
|
|
783c48e864 | ||
|
|
07632c3ed9 | ||
|
|
808aa68e9c | ||
|
|
8c4882550e | ||
|
|
4a602cec80 | ||
|
|
6fdf590d36 | ||
|
|
5cbce55a86 | ||
|
|
9eda37263f | ||
|
|
57bb960867 | ||
|
|
320be1758d | ||
|
|
115758e03b | ||
|
|
24e8e8409d | ||
|
|
102caacbef | ||
|
|
cfe7b86608 | ||
|
|
7ec33cd342 | ||
|
|
2e05e2b7fa | ||
|
|
cc9b514f5d | ||
|
|
c49e7f4f22 | ||
|
|
f98d307bbb | ||
|
|
06c06bd6f7 | ||
|
|
8c63b56030 | ||
|
|
29e829a66a | ||
|
|
2f50c6930d | ||
|
|
a3fc960f32 | ||
|
|
91ac2fec34 | ||
|
|
55fa0c6a12 | ||
|
|
6bffd08ba5 | ||
|
|
0e09235c9f | ||
|
|
6b85baa502 | ||
|
|
d46a35bbff | ||
|
|
97523193b7 | ||
|
|
4f06def5c0 | ||
|
|
0ce2109a88 | ||
|
|
557af8f47e | ||
|
|
987955f7c5 | ||
|
|
c5187c959c | ||
|
|
7872d7c932 | ||
|
|
f1c24743b8 | ||
|
|
7cff7275f8 | ||
|
|
286e9d9766 | ||
|
|
acf8442f02 | ||
|
|
b6a764d8c6 | ||
|
|
07d20c7e44 | ||
|
|
1b6c640f46 | ||
|
|
101ae141c6 | ||
|
|
375c13c679 | ||
|
|
cbdf71ab00 | ||
|
|
05e6e5583e | ||
|
|
c4d7026cf9 | ||
|
|
baee6fd135 | ||
|
|
59339ab7e5 | ||
|
|
f5225442f8 | ||
|
|
1b5e676e38 | ||
|
|
cf6ad5dcca | ||
|
|
bb928b7ac4 | ||
|
|
8851d83616 | ||
|
|
41c5f76c2f | ||
|
|
0b23ffc1bf | ||
|
|
e2e5b7324e | ||
|
|
f706863aa6 | ||
|
|
c1e927ff6d | ||
|
|
717d76cf4b | ||
|
|
8bc2ecda80 | ||
|
|
5907ad7277 | ||
|
|
1645ace5e7 | ||
|
|
0af22e4bb2 | ||
|
|
7b165ea504 | ||
|
|
a21ac71b0a | ||
|
|
66964546be | ||
|
|
51ca1e585c | ||
|
|
bf43e9b11e | ||
|
|
b2e1221012 | ||
|
|
224fff6a3a | ||
|
|
7876eafaa1 | ||
|
|
8040d4c680 | ||
|
|
6e8ec1114f | ||
|
|
6cdbe93585 | ||
|
|
36daa470f4 | ||
|
|
5f9feb9aae | ||
|
|
6702048c64 | ||
|
|
9f5b324ec5 | ||
|
|
c13a28cc35 | ||
|
|
de9a877716 | ||
|
|
1df7091e3b | ||
|
|
30fc70c376 | ||
|
|
65851e8c38 | ||
|
|
3db1aef04e | ||
|
|
691513e7f3 | ||
|
|
a8871677d1 | ||
|
|
44dbec6a60 | ||
|
|
0d3ddaa85c | ||
|
|
637aa0759b | ||
|
|
e2c0a043f7 | ||
|
|
81718d1a58 | ||
|
|
9dc239aca7 | ||
|
|
ea525f532f | ||
|
|
476de46ee5 | ||
|
|
571d42e74b | ||
|
|
68e5120531 | ||
|
|
6b32b53027 | ||
|
|
8a25562446 | ||
|
|
764e739e01 | ||
|
|
a5bfc49347 | ||
|
|
386d762885 | ||
|
|
9df0229009 | ||
|
|
2d81adfab6 | ||
|
|
ac0c37fd78 | ||
|
|
65b35a9e36 | ||
|
|
67ec190a99 | ||
|
|
4b47f20e6a | ||
|
|
53d2086432 | ||
|
|
cec217ed93 | ||
|
|
0b7aeab254 | ||
|
|
b4e46d54f9 | ||
|
|
62dac2622f | ||
|
|
76f864a015 | ||
|
|
dcc7e653c9 | ||
|
|
1c04247f53 | ||
|
|
fcbef3a982 | ||
|
|
23d439f22b | ||
|
|
ff220fd012 | ||
|
|
670f9b2f8a | ||
|
|
789f74708c | ||
|
|
da60713a1d | ||
|
|
57808ffdb5 | ||
|
|
8c3db8987e | ||
|
|
373ced3924 | ||
|
|
f726258818 | ||
|
|
84e957d300 | ||
|
|
80871da192 | ||
|
|
dd1e7763d3 | ||
|
|
dab2c2f26f | ||
|
|
4aa83de94e | ||
|
|
67a257993d | ||
|
|
d45f587081 | ||
|
|
8d3deedb8d | ||
|
|
85f411e680 | ||
|
|
362c45be17 | ||
|
|
60b24ab5af | ||
|
|
95c67325f7 | ||
|
|
e16e6e2362 | ||
|
|
7179f4a0af | ||
|
|
7570ff1a15 | ||
|
|
ca1b49d35f | ||
|
|
61ef65be66 | ||
|
|
5398f98139 | ||
|
|
143c0051a7 | ||
|
|
c81b144d58 | ||
|
|
b9912b209f | ||
|
|
5f234e2759 | ||
|
|
70dbbd4077 | ||
|
|
cd2e512366 | ||
|
|
b8dc0dccca | ||
|
|
979fe5dc9a | ||
|
|
ec5d352d55 | ||
|
|
d34f5765a8 | ||
|
|
3c4c9446a6 | ||
|
|
063d10ae6c | ||
|
|
ac1e8485b3 | ||
|
|
f62bbb9cb9 | ||
|
|
d437084b93 | ||
|
|
9ddb95e93c | ||
|
|
e3bd3c1c39 | ||
|
|
ff4e97cf78 | ||
|
|
6d1aa48746 | ||
|
|
02ba1920dd | ||
|
|
fb829c2cd1 | ||
|
|
0a4ef2236d | ||
|
|
40c66374f4 | ||
|
|
0ec36fda44 | ||
|
|
84142eaa26 | ||
|
|
9d8529baea | ||
|
|
a579a9f85b | ||
|
|
767a68f512 | ||
|
|
f8c3b33277 | ||
|
|
77def80003 | ||
|
|
96018007df | ||
|
|
23d74f24e4 | ||
|
|
23d5af772e | ||
|
|
8bbc2e2937 | ||
|
|
5d694e4cc3 | ||
|
|
f893b3807d | ||
|
|
a374a307c5 | ||
|
|
b221905959 | ||
|
|
ff2333c835 | ||
|
|
bd4945f89c | ||
|
|
bda7fb978e | ||
|
|
535a5f905f | ||
|
|
34306581ac | ||
|
|
d25861b4da | ||
|
|
c9e90c55fa | ||
|
|
07feb846a6 | ||
|
|
0470b5dce9 | ||
|
|
449c9c39cc | ||
|
|
17c213ed3f | ||
|
|
42da57def9 | ||
|
|
eef13be7f9 | ||
|
|
3bea9c2f51 | ||
|
|
2de1a014ef | ||
|
|
764768f318 | ||
|
|
290848dd2b | ||
|
|
1ac0c21d89 | ||
|
|
17754acc90 | ||
|
|
0226382b34 | ||
|
|
1ca4f162fa | ||
|
|
84928ec02d | ||
|
|
46f2e4efeb | ||
|
|
6c4caf0dbf | ||
|
|
1003235282 | ||
|
|
fb4889bcd9 | ||
|
|
155695ed60 | ||
|
|
d5c47e9163 | ||
|
|
ea0df9b67d | ||
|
|
98ba27811d | ||
|
|
a66e71a1d2 | ||
|
|
4a03ccc044 | ||
|
|
57d52e5170 | ||
|
|
a7047bf647 | ||
|
|
6f3516dc97 | ||
|
|
057f710a76 | ||
|
|
168676d418 | ||
|
|
825a182517 | ||
|
|
34cc9acdd9 | ||
|
|
0f97cac340 | ||
|
|
6710abd4ae | ||
|
|
566b0c41e3 | ||
|
|
72a5a4b5af | ||
|
|
e105d08552 | ||
|
|
2e5a37a44e | ||
|
|
8e0c33f8ea | ||
|
|
16155b0807 | ||
|
|
1648386aa0 | ||
|
|
7447e09e2a | ||
|
|
96949ef7f5 | ||
|
|
44b1bde148 | ||
|
|
1e5c8f23ce | ||
|
|
f1029324fe | ||
|
|
c1eb26af14 | ||
|
|
93eaa3c661 | ||
|
|
67aaf0afa6 | ||
|
|
fc02691130 | ||
|
|
29f710b0e5 | ||
|
|
6c26ef5e0d | ||
|
|
a8d1ef1616 | ||
|
|
8bde83a334 | ||
|
|
85e0053136 | ||
|
|
b10b8369dd | ||
|
|
1aab3474a1 | ||
|
|
42a837c531 | ||
|
|
d1b4719534 | ||
|
|
81fde1922f | ||
|
|
7d2b2cc3f9 | ||
|
|
967bd9f5f0 | ||
|
|
f2a32f6e5b | ||
|
|
8e064c4377 | ||
|
|
5790705b19 | ||
|
|
fa36ee7ea2 | ||
|
|
8a29209450 | ||
|
|
82669abc1a | ||
|
|
794af09007 | ||
|
|
128307fa88 | ||
|
|
84f4450da4 | ||
|
|
038e5f009e | ||
|
|
4ab0a2a4c6 | ||
|
|
4b20f454fe | ||
|
|
33bebae5ae | ||
|
|
ccff4ede2b | ||
|
|
6f48cb1924 | ||
|
|
98ecd5b300 | ||
|
|
57e5f5a5b5 | ||
|
|
2a0b67dc3b | ||
|
|
805034d054 | ||
|
|
c180c51c79 | ||
|
|
e044763e67 | ||
|
|
b8da6c90b6 | ||
|
|
269630005b | ||
|
|
902d5e299d | ||
|
|
75789c4643 | ||
|
|
678cbc835e | ||
|
|
de8d09d22d | ||
|
|
b266f1a207 | ||
|
|
a61888be78 | ||
|
|
a3bafb3263 | ||
|
|
937c7d8bab | ||
|
|
b7af6cd62a | ||
|
|
09b7fb4252 | ||
|
|
f9ab8e8b03 | ||
|
|
fb9a0d3dff | ||
|
|
d45400c9a9 | ||
|
|
81eda26beb | ||
|
|
1a9b70d7a8 | ||
|
|
70c01e7963 | ||
|
|
bd4a3f044d | ||
|
|
13bc9dcc35 | ||
|
|
6b840273e0 | ||
|
|
9f92dfbf90 | ||
|
|
26656272e8 | ||
|
|
948cf23537 | ||
|
|
2395e90973 | ||
|
|
bb6f5c5913 | ||
|
|
d1b7514e91 | ||
|
|
53e173cca6 | ||
|
|
5157fd957e | ||
|
|
d39e2c5127 | ||
|
|
80e8a30f39 | ||
|
|
83d003e558 | ||
|
|
9715e45a87 | ||
|
|
5d3b030798 | ||
|
|
19a165cc9c | ||
|
|
7a7ef5ff5b | ||
|
|
2638bf642c | ||
|
|
9503681d86 | ||
|
|
7d8102bec2 | ||
|
|
b980775bb6 | ||
|
|
b96c6c60eb | ||
|
|
7de78927ed | ||
|
|
7a44e716a4 | ||
|
|
95b8288176 | ||
|
|
5a2d528081 | ||
|
|
8ab42dc273 | ||
|
|
705cf20084 | ||
|
|
fc08f1058a | ||
|
|
a343e68e00 | ||
|
|
e8e722d58e | ||
|
|
8313e867b2 | ||
|
|
4dac9be014 | ||
|
|
46554e300b | ||
|
|
8b5ed0399d | ||
|
|
e11d70c362 | ||
|
|
005c36b178 | ||
|
|
0e3b9af25b | ||
|
|
1ec1017a23 | ||
|
|
bab0581788 | ||
|
|
e23b334713 | ||
|
|
475a58337a | ||
|
|
1195909f5d | ||
|
|
0c44307f3b | ||
|
|
138cf56fdb | ||
|
|
a711e8e132 | ||
|
|
e32013660e | ||
|
|
b4e8324ac2 | ||
|
|
03455da71a | ||
|
|
c82037714e | ||
|
|
6faeb61968 | ||
|
|
82288821f0 | ||
|
|
28c95e39c1 | ||
|
|
47ac7c933a | ||
|
|
4ba5bee1a0 | ||
|
|
f063d2f7a2 | ||
|
|
ee81e2f472 | ||
|
|
c1e29b69ba | ||
|
|
13955cb7c1 | ||
|
|
e95aecb85e | ||
|
|
b66c78c236 | ||
|
|
b1d6d67405 | ||
|
|
086c4578e3 | ||
|
|
99d5294ab1 | ||
|
|
f99e33733b | ||
|
|
4d22e13282 | ||
|
|
18607df151 | ||
|
|
1b4fc0d733 | ||
|
|
1cea2b41a4 | ||
|
|
a2267a42f8 | ||
|
|
7228350401 |
@@ -43,11 +43,14 @@ my-distcheck:
|
||||
-rm -rf $(t)
|
||||
mkdir $(t)
|
||||
GZIP=$(GZIP) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
|
||||
# Removing $(DEPDIR) like this is a gross kludge to work around a bug
|
||||
# in automake. Remove that line once it's fixed.
|
||||
cd $(t)/$(distdir) \
|
||||
&& ./configure --disable-nls \
|
||||
&& $(MAKE) CFLAGS='-Wformat -Werror' \
|
||||
&& $(MAKE) dvi \
|
||||
&& $(MAKE) check \
|
||||
&& rm -rf $(DEPDIR) \
|
||||
&& $(MAKE) distclean
|
||||
cd $(t) && mv $(distdir) $(distdir).old \
|
||||
&& $(AMTAR) -zxf ../$(distdir).tar.gz
|
||||
|
||||
15
THANKS
15
THANKS
@@ -8,7 +8,8 @@ Akim Demaille: demaille@inf.enst.fr
|
||||
Alain Magloire: alain@qnx.com
|
||||
Alexey Solovyov: alekso@math.uu.se
|
||||
Andreas Jaeger: jaeger@gnu.org
|
||||
Andreas Schwab: schwab@issan.informatik.uni-dortmund.de
|
||||
Andreas Schwab: schwab@suse.de
|
||||
Andres Soolo: andres@soolo.matti.ee
|
||||
Andrew Dalke: dalke@bioreason.com
|
||||
Andrew Tridgell: tridge@samba.org
|
||||
Andries Brouwer: Andries.Brouwer@cwi.nl
|
||||
@@ -21,6 +22,7 @@ Bob McCracken: kerouac@ravenet.com
|
||||
Bob Proulx: rwp@fc.hp.com
|
||||
Brendan O'Dea: bod@compusol.com.au
|
||||
Charles Karney: karney@pppl.gov
|
||||
Chip Salzenberg: chip@valinux.com
|
||||
Chris Yeo: cyeo@biking.org
|
||||
Christian von Roques: roques@pond.sub.org
|
||||
Colin Plumb: colin@nyx.net
|
||||
@@ -35,9 +37,12 @@ Galen Hazelwood: galenh@micron.net
|
||||
Germano Leichsenring: germano@jedi.cs.kobe-u.ac.jp
|
||||
Göran Uddeborg: goeran@uddeborg.pp.se
|
||||
Greg McGary: gkm@eng.ascend.com
|
||||
Gabor Z. Papp: gzp@gzp.org.hu
|
||||
Holger Berger: hberger@ess.nec.de
|
||||
Hugh Daniel: hugh@xanadu.com
|
||||
James: james@albion.glarp.com
|
||||
James Antill: jmanti%essex.ac.uk@seralph21.essex.ac.uk
|
||||
James Sneeringer: jvs@ocslink.com
|
||||
James Tanis: jtt@soscorp.com
|
||||
Jamie Lokier: jamie@imbolc.ucc.ie
|
||||
Janos Farkas: chexum@shadow.banki.hu
|
||||
@@ -58,32 +63,40 @@ 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
|
||||
Martin Mitchell: martin@debian.org
|
||||
Marty Leisner: leisner@sdsp.mc.xerox.com
|
||||
Masami Takikawa: takikawm@CS.ORST.EDU
|
||||
Matthew S. Levine: mslevine@theory.lcs.mit.edu
|
||||
Matthew Swift: swift@alum.mit.edu
|
||||
Matthias Urlichs: smurf@noris.de
|
||||
Michiel Bacchiani: bacchian@raven.bu.edu
|
||||
Michael ???:michael@roka.net
|
||||
Michael Veksler: mveksler@techunix.technion.ac.il
|
||||
Michael Stone: mstone@debian.org
|
||||
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
|
||||
Peter Moulder: reiter@netspace.net.au
|
||||
Peter Samuelson: psamuels@sampo.creighton.edu
|
||||
Paul Eggert: eggert@twinsun.com
|
||||
Philippe De Muyter: phdm@macqel.be
|
||||
Rainer Orth: ro@TechFak.Uni-Bielefeld.DE
|
||||
Richard Braakman: dark@xs4all.nl
|
||||
Ross Ridge: rridge@calum.csclub.uwaterloo.ca
|
||||
Sami Farin: sfarin@ratol.fi
|
||||
Santiago Vila Doncel: sanvila@unex.es
|
||||
Scott Lurndal: slurn@griffin.engr.sgi.com
|
||||
Stuart Kemp: skemp@peter.bmc.com
|
||||
Thomas Bushnell, n/BSG: thomas@gnu.ai.mit.edu
|
||||
Ton Hospel: thospel@mail.dma.be
|
||||
Torbjorn Lindgren: tl@funcom.no
|
||||
Torsten Landschoff: torsten@pclab.ifg.uni-kiel.de
|
||||
Tony Leneis: tony@plaza.ds.adp.com
|
||||
Ulrich Drepper: drepper@cygnus.com
|
||||
Vin Shelton: acs@alumni.princeton.edu
|
||||
Volker Borchert: bt@teknon.de
|
||||
Wayne Stewart: wstewa@atl.com
|
||||
Wichert Akkerman: wichert@cistron.nl
|
||||
William Bader: william@nscs.fast.net
|
||||
|
||||
@@ -59,13 +59,17 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
AMTAR = @AMTAR@
|
||||
AMTARFLAGS = @AMTARFLAGS@
|
||||
AWK = @AWK@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
DF_PROG = @DF_PROG@
|
||||
GENCAT = @GENCAT@
|
||||
GETCONF = @GETCONF@
|
||||
@@ -82,7 +86,6 @@ INTLOBJS = @INTLOBJS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MVDIR_PROG = @MVDIR_PROG@
|
||||
PACKAGE = @PACKAGE@
|
||||
PERL = @PERL@
|
||||
POFILES = @POFILES@
|
||||
@@ -93,6 +96,7 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
install_sh = @install_sh@
|
||||
l = @l@
|
||||
|
||||
|
||||
@@ -215,7 +219,7 @@ install-info-am: $(INFO_DEPS)
|
||||
@list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
d=$(srcdir); \
|
||||
for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
|
||||
for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
|
||||
if test -f $$d/$$ifile; then \
|
||||
echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
|
||||
$(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
|
||||
@@ -236,9 +240,8 @@ uninstall-info:
|
||||
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
d=$(srcdir); \
|
||||
echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $$d/$$file"; \
|
||||
install-info --info-dir=$(DESTDIR)$(infodir) --remove $$d/$$file; \
|
||||
echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \
|
||||
install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file; \
|
||||
done; \
|
||||
else :; fi
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@@ -254,7 +257,7 @@ dist-info: $(INFO_DEPS)
|
||||
list='$(INFO_DEPS)'; \
|
||||
for base in $$list; do \
|
||||
d=$(srcdir); \
|
||||
for file in `cd $$d && eval echo $$base*`; do \
|
||||
for file in `CDPATH=: && cd $$d && eval echo $$base*`; do \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
@@ -267,7 +270,7 @@ mostlyclean-aminfo:
|
||||
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.cn fileutils.cm fileutils.ov
|
||||
|
||||
clean-aminfo:
|
||||
|
||||
@@ -287,15 +290,10 @@ TAGS:
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnits doc/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
cp -pR $$d/$$file $(distdir); \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
@@ -340,6 +338,7 @@ distclean-generic:
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
-rm -f Makefile.in
|
||||
mostlyclean-am: mostlyclean-vti mostlyclean-aminfo mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
@@ -114,7 +114,7 @@ numerically or literally. All these strings specify the same calendar date:
|
||||
|
||||
@example
|
||||
1970-09-17 # ISO 8601.
|
||||
70-9-17 # This century assumed by default.
|
||||
70-9-17 # Assume 19xx for 69 through 99, 20xx for 00 through 68.
|
||||
70-09-17 # Leading zeros are ignored.
|
||||
9/17/72 # Common U.S. writing.
|
||||
24 September 1972
|
||||
@@ -141,8 +141,9 @@ For numeric months, the ISO 8601 format
|
||||
@samp{@var{year}-@var{month}-@var{day}} is allowed, where @var{year} is
|
||||
any positive number, @var{month} is a number between 01 and 12, and
|
||||
@var{day} is a number between 01 and 31. A leading zero must be present
|
||||
if a number is less than ten. If @var{year} is less than 100, then 1900
|
||||
is added to it to force a date in this century. The construct
|
||||
if a number is less than ten. If @var{year} is 68 or smaller, then 2000
|
||||
is added to it; otherwise, if @var{year} is less than 100,
|
||||
then 1900 is added to it. The construct
|
||||
@samp{@var{month}/@var{day}/@var{year}}, popular in the United States,
|
||||
is accepted. Also @samp{@var{month}/@var{day}}, omitting the year.
|
||||
|
||||
|
||||
@@ -1176,7 +1176,7 @@ Print all current settings in human-readable form. This option may not
|
||||
be used in combination with any line settings.
|
||||
|
||||
@item -F @var{device}
|
||||
@itemx --file @var{device}
|
||||
@itemx --file=@var{device}
|
||||
@opindex -F
|
||||
@opindex --file
|
||||
Set the line opened by the filename specified in @var{device} instead of
|
||||
@@ -3041,7 +3041,7 @@ the values of the command line arguments.
|
||||
Synopsis:
|
||||
|
||||
@example
|
||||
sleep [@var{number}[smhd]]@dots{}
|
||||
sleep @var{number}[smhd]@dots{}
|
||||
@end example
|
||||
|
||||
@cindex time units
|
||||
@@ -3094,6 +3094,23 @@ numbers from standard input, delimited by newlines, tabs, or spaces.
|
||||
The only options are @samp{--help} and @samp{--version}. @xref{Common
|
||||
options}.
|
||||
|
||||
The algorithm it uses is not very sophisticated, so for some inputs
|
||||
@code{factor} runs for a long time. The hardest numbers to factor are
|
||||
the products of large primes. Factoring the square of the largest 32-bit
|
||||
prime number takes over 10 minutes of CPU time on a 400MHz Pentium II.
|
||||
|
||||
@example
|
||||
$ factor `echo '4294967291^2'|bc`
|
||||
18446744030759878681: 4294967291 4294967291
|
||||
@end example
|
||||
|
||||
In contrast, @code{factor} factors the largest 64-bit number in just
|
||||
over a tenth of a second:
|
||||
|
||||
@example
|
||||
$ factor `echo '2^64-1'|bc`
|
||||
18446744073709551615: 3 5 17 257 641 65537 6700417
|
||||
@end example
|
||||
|
||||
@node seq invocation
|
||||
@section @code{seq}: Print numeric sequences
|
||||
|
||||
223
doc/texinfo.tex
223
doc/texinfo.tex
@@ -3,7 +3,7 @@
|
||||
% Load plain if necessary, i.e., if running under initex.
|
||||
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
|
||||
%
|
||||
\def\texinfoversion{1999-07-22.19} % updated for pdfTeX
|
||||
\def\texinfoversion{1999-09-25.10}
|
||||
%
|
||||
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
|
||||
% Free Software Foundation, Inc.
|
||||
@@ -29,15 +29,15 @@
|
||||
%
|
||||
% Please try the latest version of texinfo.tex before submitting bug
|
||||
% reports; you can get the latest version from:
|
||||
% ftp://ftp.gnu.org/pub/gnu/texinfo.tex
|
||||
% ftp://ftp.gnu.org/gnu/texinfo.tex
|
||||
% (and all GNU mirrors, see http://www.gnu.org/order/ftp.html)
|
||||
% ftp://tug.org/tex/texinfo.tex
|
||||
% ftp://ctan.org/macros/texinfo/texinfo.tex
|
||||
% (and all CTAN mirrors, finger ctan@ctan.org for a list).
|
||||
% ftp://texinfo.org/tex/texinfo.tex
|
||||
% ftp://us.ctan.org/macros/texinfo/texinfo.tex
|
||||
% (and all CTAN mirrors, finger ctan@us.ctan.org for a list).
|
||||
% /home/gd/gnu/doc/texinfo.tex on the GNU machines.
|
||||
% The texinfo.tex in any given Texinfo distribution could well be out
|
||||
% of date, so if that's what you're using, please check.
|
||||
% There is a small home page for Texinfo at http://texinfo.org/.
|
||||
% Texinfo has a small home page at http://texinfo.org/.
|
||||
%
|
||||
% Send bug reports to bug-texinfo@gnu.org. Please include including a
|
||||
% complete document in each bug report with which we can reproduce the
|
||||
@@ -599,36 +599,42 @@ where each line of input produces a line of output.}
|
||||
%}}
|
||||
|
||||
\def\needx#1{%
|
||||
% Go into vertical mode, so we don't make a big box in the middle of a
|
||||
% Ensure vertical mode, so we don't make a big box in the middle of a
|
||||
% paragraph.
|
||||
\par
|
||||
%
|
||||
% Don't add any leading before our big empty box, but allow a page
|
||||
% break, since the best break might be right here.
|
||||
\allowbreak
|
||||
\nointerlineskip
|
||||
\vtop to #1\mil{\vfil}%
|
||||
%
|
||||
% TeX does not even consider page breaks if a penalty added to the
|
||||
% main vertical list is 10000 or more. But in order to see if the
|
||||
% empty box we just added fits on the page, we must make it consider
|
||||
% page breaks. On the other hand, we don't want to actually break the
|
||||
% page after the empty box. So we use a penalty of 9999.
|
||||
%
|
||||
% There is an extremely small chance that TeX will actually break the
|
||||
% page at this \penalty, if there are no other feasible breakpoints in
|
||||
% sight. (If the user is using lots of big @group commands, which
|
||||
% almost-but-not-quite fill up a page, TeX will have a hard time doing
|
||||
% good page breaking, for example.) However, I could not construct an
|
||||
% example where a page broke at this \penalty; if it happens in a real
|
||||
% document, then we can reconsider our strategy.
|
||||
\penalty9999
|
||||
%
|
||||
% Back up by the size of the box, whether we did a page break or not.
|
||||
\kern -#1\mil
|
||||
%
|
||||
% Do not allow a page break right after this kern.
|
||||
\nobreak
|
||||
% If the @need value is less than one line space, it's useless.
|
||||
\dimen0 = #1\mil
|
||||
\dimen2 = \ht\strutbox
|
||||
\advance\dimen2 by \dp\strutbox
|
||||
\ifdim\dimen0 > \dimen2
|
||||
%
|
||||
% Do a \strut just to make the height of this box be normal, so the
|
||||
% normal leading is inserted relative to the preceding line.
|
||||
% And a page break here is fine.
|
||||
\vtop to #1\mil{\strut\vfil}%
|
||||
%
|
||||
% TeX does not even consider page breaks if a penalty added to the
|
||||
% main vertical list is 10000 or more. But in order to see if the
|
||||
% empty box we just added fits on the page, we must make it consider
|
||||
% page breaks. On the other hand, we don't want to actually break the
|
||||
% page after the empty box. So we use a penalty of 9999.
|
||||
%
|
||||
% There is an extremely small chance that TeX will actually break the
|
||||
% page at this \penalty, if there are no other feasible breakpoints in
|
||||
% sight. (If the user is using lots of big @group commands, which
|
||||
% almost-but-not-quite fill up a page, TeX will have a hard time doing
|
||||
% good page breaking, for example.) However, I could not construct an
|
||||
% example where a page broke at this \penalty; if it happens in a real
|
||||
% document, then we can reconsider our strategy.
|
||||
\penalty9999
|
||||
%
|
||||
% Back up by the size of the box, whether we did a page break or not.
|
||||
\kern -#1\mil
|
||||
%
|
||||
% Do not allow a page break right after this kern.
|
||||
\nobreak
|
||||
\fi
|
||||
}
|
||||
|
||||
% @br forces paragraph break
|
||||
@@ -855,7 +861,6 @@ where each line of input produces a line of output.}
|
||||
\newtoks\toksD
|
||||
\newbox\boxA
|
||||
\newcount\countA
|
||||
\newcount\charcode
|
||||
\newif\ifpdf
|
||||
\newif\ifpdfmakepagedest
|
||||
|
||||
@@ -870,9 +875,9 @@ where each line of input produces a line of output.}
|
||||
\pdftrue
|
||||
\pdfoutput = 1
|
||||
\input pdfcolor
|
||||
\def\dopdfimage#1#2#3#4{
|
||||
\def\imagewidth{#2}
|
||||
\def\imageheight{#3}
|
||||
\def\dopdfimage#1#2#3{%
|
||||
\def\imagewidth{#2}%
|
||||
\def\imageheight{#3}%
|
||||
\ifnum\pdftexversion < 14
|
||||
\pdfimage
|
||||
\else
|
||||
@@ -880,9 +885,9 @@ where each line of input produces a line of output.}
|
||||
\fi
|
||||
\ifx\empty\imagewidth\else width \imagewidth \fi
|
||||
\ifx\empty\imageheight\else height \imageheight \fi
|
||||
{#1.pdf}
|
||||
{#1.pdf}%
|
||||
\ifnum\pdftexversion < 14 \else
|
||||
\pdfrefxform \pdflastxform
|
||||
\pdfrefximage \pdflastximage
|
||||
\fi}
|
||||
\def\pdfmkdest#1{\pdfdest name{#1@} xyz}
|
||||
\def\pdfmkpgn#1{#1@}
|
||||
@@ -1084,23 +1089,17 @@ where each line of input produces a line of output.}
|
||||
\setfont\deftt\ttshape{10}{\magstep1}
|
||||
\def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf}
|
||||
|
||||
% Fonts for indices and small examples (9pt).
|
||||
% We actually use the slanted font rather than the italic,
|
||||
% because texinfo normally uses the slanted fonts for that.
|
||||
% Do not make many font distinctions in general in the index, since they
|
||||
% aren't very useful.
|
||||
\setfont\ninett\ttshape{9}{1000}
|
||||
\setfont\ninettsl\ttslshape{10}{900}
|
||||
\setfont\indrm\rmshape{9}{1000}
|
||||
\setfont\indit\itshape{9}{1000}
|
||||
\setfont\indsl\slshape{9}{1000}
|
||||
\let\indtt=\ninett
|
||||
\let\indttsl=\ninettsl
|
||||
\let\indsf=\indrm
|
||||
\let\indbf=\indrm
|
||||
\setfont\indsc\scshape{10}{900}
|
||||
\font\indi=cmmi9
|
||||
\font\indsy=cmsy9
|
||||
% Fonts for indices, footnotes, small examples (9pt).
|
||||
\setfont\smallrm\rmshape{9}{1000}
|
||||
\setfont\smalltt\ttshape{9}{1000}
|
||||
\setfont\smallbf\bfshape{10}{900}
|
||||
\setfont\smallit\itshape{9}{1000}
|
||||
\setfont\smallsl\slshape{9}{1000}
|
||||
\setfont\smallsf\sfshape{9}{1000}
|
||||
\setfont\smallsc\scshape{10}{900}
|
||||
\setfont\smallttsl\ttslshape{10}{900}
|
||||
\font\smalli=cmmi9
|
||||
\font\smallsy=cmsy9
|
||||
|
||||
% Fonts for title page:
|
||||
\setfont\titlerm\rmbshape{12}{\magstep3}
|
||||
@@ -1214,11 +1213,12 @@ where each line of input produces a line of output.}
|
||||
\let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl
|
||||
\resetmathfonts \setleading{15pt}}
|
||||
\let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf?
|
||||
\def\indexfonts{%
|
||||
\let\tenrm=\indrm \let\tenit=\indit \let\tensl=\indsl
|
||||
\let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc
|
||||
\let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy \let\tenttsl=\indttsl
|
||||
\resetmathfonts \setleading{12pt}}
|
||||
\def\smallfonts{%
|
||||
\let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl
|
||||
\let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
|
||||
\let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
|
||||
\let\tenttsl=\smallttsl
|
||||
\resetmathfonts \setleading{11pt}}
|
||||
|
||||
% Set up the default fonts, so we can use them for creating boxes.
|
||||
%
|
||||
@@ -1267,9 +1267,9 @@ where each line of input produces a line of output.}
|
||||
}
|
||||
\let\ttfont=\t
|
||||
\def\samp#1{`\tclose{#1}'\null}
|
||||
\setfont\smallrm\rmshape{8}{1000}
|
||||
\font\smallsy=cmsy9
|
||||
\def\key#1{{\smallrm\textfont2=\smallsy \leavevmode\hbox{%
|
||||
\setfont\keyrm\rmshape{8}{1000}
|
||||
\font\keysy=cmsy9
|
||||
\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
|
||||
\raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
|
||||
\vbox{\hrule\kern-0.4pt
|
||||
\hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
|
||||
@@ -1380,7 +1380,8 @@ where each line of input produces a line of output.}
|
||||
% a hypertex \special here.
|
||||
%
|
||||
\def\uref#1{\douref #1,,,\finish}
|
||||
\def\douref#1,#2,#3,#4\finish{%
|
||||
\def\douref#1,#2,#3,#4\finish{\begingroup
|
||||
\unsepspaces
|
||||
\pdfurl{#1}%
|
||||
\setbox0 = \hbox{\ignorespaces #3}%
|
||||
\ifdim\wd0 > 0pt
|
||||
@@ -1398,7 +1399,7 @@ where each line of input produces a line of output.}
|
||||
\fi
|
||||
\fi
|
||||
\endlink
|
||||
}
|
||||
\endgroup}
|
||||
|
||||
% rms does not like angle brackets --karl, 17may97.
|
||||
% So now @email is just like @uref, unless we are pdf.
|
||||
@@ -1406,12 +1407,13 @@ where each line of input produces a line of output.}
|
||||
%\def\email#1{\angleleft{\tt #1}\angleright}
|
||||
\ifpdf
|
||||
\def\email#1{\doemail#1,,\finish}
|
||||
\def\doemail#1,#2,#3\finish{%
|
||||
\def\doemail#1,#2,#3\finish{\begingroup
|
||||
\unsepspaces
|
||||
\pdfurl{mailto:#1}%
|
||||
\setbox0 = \hbox{\ignorespaces #2}%
|
||||
\ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
|
||||
\endlink
|
||||
}
|
||||
\endgroup}
|
||||
\else
|
||||
\let\email=\uref
|
||||
\fi
|
||||
@@ -1539,7 +1541,6 @@ where each line of input produces a line of output.}
|
||||
}
|
||||
|
||||
\def\finishtitlepage{%
|
||||
\message{FINISH TITLE}
|
||||
\vskip4pt \hrule height 2pt width \hsize
|
||||
\vskip\titlepagebottomglue
|
||||
\finishedtitlepagetrue
|
||||
@@ -2186,15 +2187,18 @@ where each line of input produces a line of output.}
|
||||
% If so, do nothing. If not, give it an appropriate dimension based on
|
||||
% current baselineskip.
|
||||
\ifdim\multitablelinespace=0pt
|
||||
\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
|
||||
\global\advance\multitablelinespace by-\ht0
|
||||
%% strut to put in table in case some entry doesn't have descenders,
|
||||
%% to keep lines equally spaced
|
||||
\let\multistrut = \strut
|
||||
\else
|
||||
%% FIXME: what is \box0 supposed to be?
|
||||
\gdef\multistrut{\vrule height\multitablelinespace depth\dp0
|
||||
width0pt\relax} \fi
|
||||
%% Test to see if parskip is larger than space between lines of
|
||||
%% table. If not, do nothing.
|
||||
%% If so, set to same dimension as multitablelinespace.
|
||||
\else
|
||||
\gdef\multistrut{\vrule height\multitablelinespace depth\dp0
|
||||
width0pt\relax} \fi
|
||||
\ifdim\multitableparskip>\multitablelinespace
|
||||
\global\multitableparskip=\multitablelinespace
|
||||
\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
|
||||
@@ -2401,14 +2405,13 @@ width0pt\relax} \fi
|
||||
% stuff compared to the main input.
|
||||
%
|
||||
\nullfont
|
||||
\let\tenrm = \nullfont \let\tenit = \nullfont \let\tensl = \nullfont
|
||||
\let\tenbf = \nullfont \let\tentt = \nullfont \let\smallcaps = \nullfont
|
||||
\let\tensf = \nullfont
|
||||
% Similarly for index fonts (mostly for their use in
|
||||
% smallexample)
|
||||
\let\indrm = \nullfont \let\indit = \nullfont \let\indsl = \nullfont
|
||||
\let\indbf = \nullfont \let\indtt = \nullfont \let\indsc = \nullfont
|
||||
\let\indsf = \nullfont
|
||||
\let\tenrm=\nullfont \let\tenit=\nullfont \let\tensl=\nullfont
|
||||
\let\tenbf=\nullfont \let\tentt=\nullfont \let\smallcaps=\nullfont
|
||||
\let\tensf=\nullfont
|
||||
% Similarly for index fonts (mostly for their use in smallexample).
|
||||
\let\smallrm=\nullfont \let\smallit=\nullfont \let\smallsl=\nullfont
|
||||
\let\smallbf=\nullfont \let\smalltt=\nullfont \let\smallsc=\nullfont
|
||||
\let\smallsf=\nullfont
|
||||
%
|
||||
% Don't complain when characters are missing from the fonts.
|
||||
\tracinglostchars = 0
|
||||
@@ -2672,7 +2675,7 @@ width0pt\relax} \fi
|
||||
\def\@{@}% will be @@ when we switch to @ as escape char.
|
||||
% Need these in case \tex is in effect and \{ is a \delimiter again.
|
||||
% But can't use \lbracecmd and \rbracecmd because texindex assumes
|
||||
% braces and backslashes are used only as delimiters.
|
||||
% braces and backslashes are used only as delimiters.
|
||||
\let\{ = \mylbrace
|
||||
\let\} = \myrbrace
|
||||
\def\_{{\realbackslash _}}%
|
||||
@@ -2717,8 +2720,6 @@ width0pt\relax} \fi
|
||||
\def\dfn##1{\realbackslash dfn {##1}}%
|
||||
\def\emph##1{\realbackslash emph {##1}}%
|
||||
\def\acronym##1{\realbackslash acronym {##1}}%
|
||||
\def\{{\realbackslash mylbrace}%
|
||||
\def\}{\realbackslash myrbrace}%
|
||||
%
|
||||
% Handle some cases of @value -- where the variable name does not
|
||||
% contain - or _, and the value does not contain any
|
||||
@@ -2787,6 +2788,7 @@ width0pt\relax} \fi
|
||||
\let\url=\indexdummyfont
|
||||
\let\uref=\indexdummyfont
|
||||
\let\env=\indexdummyfont
|
||||
\let\acronym=\indexdummyfont
|
||||
\let\command=\indexdummyfont
|
||||
\let\option=\indexdummyfont
|
||||
\let\file=\indexdummyfont
|
||||
@@ -2940,7 +2942,7 @@ width0pt\relax} \fi
|
||||
\def\doprintindex#1{\begingroup
|
||||
\dobreak \chapheadingskip{10000}%
|
||||
%
|
||||
\indexfonts \rm
|
||||
\smallfonts \rm
|
||||
\tolerance = 9500
|
||||
\indexbreaks
|
||||
%
|
||||
@@ -3240,7 +3242,8 @@ width0pt\relax} \fi
|
||||
% This counter is funny since it counts through charcodes of letters A, B, ...
|
||||
\newcount\appendixno \appendixno = `\@
|
||||
% \def\appendixletter{\char\the\appendixno}
|
||||
% Now we do the following for the sake of pdftex.
|
||||
% We do the following for the sake of pdftex, which needs the actual
|
||||
% letter in the expansion, not just typeset.
|
||||
\def\appendixletter{%
|
||||
\ifnum\appendixno=`A A%
|
||||
\else\ifnum\appendixno=`B B%
|
||||
@@ -3867,10 +3870,14 @@ width0pt\relax} \fi
|
||||
% We could simplify the code here by writing out an \appendixentry
|
||||
% command in the toc file for appendices, instead of using \chapentry
|
||||
% for both, but it doesn't seem worth it.
|
||||
\setbox0 = \hbox{\shortcontrm \putwordAppendix }
|
||||
\newdimen\shortappendixwidth \shortappendixwidth = \wd0
|
||||
|
||||
%
|
||||
\newdimen\shortappendixwidth
|
||||
%
|
||||
\def\shortchaplabel#1{%
|
||||
% Compute width of word "Appendix", may change with language.
|
||||
\setbox0 = \hbox{\shortcontrm \putwordAppendix}%
|
||||
\shortappendixwidth = \wd0
|
||||
%
|
||||
% We typeset #1 in a box of constant width, regardless of the text of
|
||||
% #1, so the chapter titles will come out aligned.
|
||||
\setbox0 = \hbox{#1}%
|
||||
@@ -4207,7 +4214,7 @@ width0pt\relax} \fi
|
||||
\def\smalllispx{\begingroup
|
||||
\def\Esmalllisp{\nonfillfinish\endgroup}%
|
||||
\def\Esmallexample{\nonfillfinish\endgroup}%
|
||||
\indexfonts
|
||||
\smallfonts
|
||||
\lisp
|
||||
}
|
||||
|
||||
@@ -4223,7 +4230,7 @@ width0pt\relax} \fi
|
||||
%
|
||||
\def\smalldisplayx{\begingroup
|
||||
\def\Esmalldisplay{\nonfillfinish\endgroup}%
|
||||
\indexfonts \rm
|
||||
\smallfonts \rm
|
||||
\display
|
||||
}
|
||||
|
||||
@@ -4240,7 +4247,7 @@ width0pt\relax} \fi
|
||||
%
|
||||
\def\smallformatx{\begingroup
|
||||
\def\Esmallformat{\nonfillfinish\endgroup}%
|
||||
\indexfonts \rm
|
||||
\smallfonts \rm
|
||||
\format
|
||||
}
|
||||
|
||||
@@ -5117,7 +5124,14 @@ width0pt\relax} \fi
|
||||
|
||||
|
||||
% @alias.
|
||||
\def\alias#1=#2{\gdef#1{#2}}
|
||||
% We need some trickery to remove the optional spaces around the equal
|
||||
% sign. Just make them active and then expand them all to nothing.
|
||||
\def\alias{\begingroup\obeyspaces\parsearg\aliasxxx}
|
||||
\def\aliasxxx #1{\aliasyyy#1\relax}
|
||||
\def\aliasyyy #1=#2\relax{\ignoreactivespaces
|
||||
\edef\next{\global\let\expandafter\noexpand\csname#1\endcsname=%
|
||||
\expandafter\noexpand\csname#2\endcsname}%
|
||||
\expandafter\endgroup\next}
|
||||
|
||||
|
||||
\message{cross references,}
|
||||
@@ -5165,20 +5179,10 @@ width0pt\relax} \fi
|
||||
|
||||
% @anchor{NAME} -- define xref target at arbitrary point.
|
||||
%
|
||||
{ \catcode`\@ = 11
|
||||
% From latex.ltx, to make @anchor truely invisible.
|
||||
\newdimen\@savsk
|
||||
\newcount\@savsf
|
||||
\gdef\@bsphack{\relax
|
||||
\ifhmode \@savsk\lastskip \@savsf\spacefactor \fi
|
||||
}
|
||||
\gdef\@esphack{\relax
|
||||
\ifhmode \spacefactor\@savsf
|
||||
\ifdim\@savsk>\z@ \ignorespaces \fi
|
||||
\fi
|
||||
}
|
||||
\gdef\anchor#1{\@bsphack \setref{#1}{Ynothing}\@esphack}
|
||||
}
|
||||
\newcount\savesfregister
|
||||
\gdef\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi}
|
||||
\gdef\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi}
|
||||
\gdef\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces}
|
||||
|
||||
% \setref{NAME}{SNT} defines a cross-reference point NAME, namely
|
||||
% NAME-title, NAME-pg, and NAME-SNT. Called from \foonoderef. We have
|
||||
@@ -5188,7 +5192,7 @@ width0pt\relax} \fi
|
||||
%
|
||||
\def\setref#1#2{{%
|
||||
\indexdummies
|
||||
\pdfmkdest{#1}
|
||||
\pdfmkdest{#1}%
|
||||
\dosetq{#1-title}{Ytitle}%
|
||||
\dosetq{#1-pg}{Ypagenumber}%
|
||||
\dosetq{#1-snt}{#2}%
|
||||
@@ -5203,6 +5207,7 @@ width0pt\relax} \fi
|
||||
\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
|
||||
\def\ref#1{\xrefX[#1,,,,,,,]}
|
||||
\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
|
||||
\unsepspaces
|
||||
\def\printedmanual{\ignorespaces #5}%
|
||||
\def\printednodename{\ignorespaces #3}%
|
||||
\setbox1=\hbox{\printedmanual}%
|
||||
@@ -5505,6 +5510,8 @@ width0pt\relax} \fi
|
||||
\xspaceskip\z@skip
|
||||
\parindent\defaultparindent
|
||||
%
|
||||
\smallfonts \rm
|
||||
%
|
||||
% Hang the footnote text off the number.
|
||||
\hang
|
||||
\textindent{\thisfootno}%
|
||||
@@ -5519,7 +5526,7 @@ width0pt\relax} \fi
|
||||
\else\let\next\f@t\fi \next}
|
||||
\def\f@@t{\bgroup\aftergroup\@foot\let\next}
|
||||
\def\f@t#1{#1\@foot}
|
||||
\def\@foot{\strut\egroup}
|
||||
\def\@foot{\strut\par\egroup}
|
||||
|
||||
}%end \catcode `\@=11
|
||||
|
||||
|
||||
@@ -1543,6 +1543,8 @@ If you specify a @var{pid} that is not in use or that does not correspond
|
||||
to the process that is writing to the tailed files, then @code{tail}
|
||||
may terminate long before any @var{file}s stop growing or it may not
|
||||
terminate until long after the real writer has terminated.
|
||||
Note that @samp{--pid} cannot be supported on some systems; @code{tail}
|
||||
will print a warning if this is the case.
|
||||
|
||||
@itemx --max-consecutive-size-changes=@var{n}
|
||||
@opindex --max-consecutive-size-changes
|
||||
@@ -1560,7 +1562,7 @@ When tailing a file by name, if there have been this many consecutive
|
||||
iterations for which the size has remained the same, then
|
||||
@code{open}/@code{fstat} the file to determine if that file name is
|
||||
still associated with the same device/inode-number pair as before.
|
||||
When following a log file that is rotated this is approximately the
|
||||
When following a log file that is rotated, this is approximately the
|
||||
number of seconds between when tail prints the last pre-rotation lines
|
||||
and when it prints the lines that have accumulated in the new log file.
|
||||
See the output of @code{tail --help} for the default value.
|
||||
@@ -2127,10 +2129,12 @@ or global options are specified, @samp{-s} has no effect.
|
||||
GNU @code{sort} (as specified for all GNU utilities) has no limits on
|
||||
input line length or restrictions on bytes allowed within lines. In
|
||||
addition, if the final byte of an input file is not a newline, GNU
|
||||
@code{sort} silently supplies one. A line's trailing newline is part of
|
||||
the line for comparison purposes; for example, with no options in an
|
||||
@sc{ascii} locale, a line starting with a tab sorts before an empty line
|
||||
because tab precedes newline in the @sc{ascii} collating sequence.
|
||||
@code{sort} silently supplies one. A line's trailing newline is not
|
||||
part of the line for comparison purposes.@footnote{@sc{posix}.2-1992
|
||||
requires that the trailing newline be part of the comparison, and some
|
||||
@code{sort} implementations obey this requirement, but it is widely
|
||||
considered to be a bug in the standard and the next version of
|
||||
@sc{posix}.2 will likely remove this requirement.}
|
||||
|
||||
Upon any error, @code{sort} exits with a status of @samp{2}.
|
||||
|
||||
@@ -2347,17 +2351,6 @@ Sort in descending (reverse) numeric order.
|
||||
sort -nr
|
||||
@end example
|
||||
|
||||
@item
|
||||
Ignore trailing newlines when comparing lines,
|
||||
so that empty lines always sort first.
|
||||
|
||||
@example
|
||||
# "$newline" is a single newline character.
|
||||
newline='
|
||||
'
|
||||
sort -t "$newline" -k 1,1
|
||||
@end example
|
||||
|
||||
@item
|
||||
Sort alphabetically, omitting the first and second fields.
|
||||
This uses a single key composed of the characters beginning
|
||||
@@ -3209,7 +3202,7 @@ Paste the lines of one file at a time rather than one line from each
|
||||
file.
|
||||
|
||||
@item -d @var{delim-list}
|
||||
@itemx --delimiters @var{delim-list}
|
||||
@itemx --delimiters=@var{delim-list}
|
||||
@opindex -d
|
||||
@opindex --delimiters
|
||||
Consecutively use the characters in @var{delim-list} instead of
|
||||
@@ -3630,6 +3623,39 @@ cat "$@@" \
|
||||
| uniq -d
|
||||
@end example
|
||||
|
||||
@item
|
||||
Deleting a small set of characters is usually straightforward. For example,
|
||||
to remove all @samp{a}s, @samp{x}s, and @samp{M}s you would do this:
|
||||
|
||||
@example
|
||||
tr -d axM
|
||||
@end example
|
||||
|
||||
However, when @samp{-} is one of those characters, it can be tricky because
|
||||
@samp{-} has special meanings. Performing the same task as above but also
|
||||
removing all @samp{-} characters, we might try @code{tr -d -axM}, but
|
||||
that would fail because @code{tr} would try to interpret @samp{-a} as
|
||||
a command-line option. Alternatively, we could try putting the hyphen
|
||||
inside the string, @code{tr -d a-xM}, but that wouldn't work either because
|
||||
it would make @code{tr} interpret @code{a-x} as the range of characters
|
||||
@samp{a}@dots{}@samp{x} rather than the three.
|
||||
One way to solve the problem is to put the hyphen at the end of the list
|
||||
of characters:
|
||||
|
||||
@example
|
||||
tr -d axM-
|
||||
@end example
|
||||
|
||||
More generally, use the character class notation @code{[=c=]}
|
||||
with @samp{-} (or any other character) in place of the @samp{c}:
|
||||
|
||||
@example
|
||||
tr -d '[=-=]axM'
|
||||
@end example
|
||||
|
||||
Note how single quotes are used in the above example to protect the
|
||||
square brackets from interpretation by a shell.
|
||||
|
||||
@end itemize
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
error.h
|
||||
fnmatch.h
|
||||
getopt.h
|
||||
getopt.c
|
||||
getopt1.c
|
||||
md5.h
|
||||
obstack.h
|
||||
regex.h
|
||||
getpagesize.h
|
||||
|
||||
@@ -28,6 +28,8 @@ savedir.h strverscmp.h \
|
||||
version-etc.h xalloc.h xstrtol.h
|
||||
|
||||
BUILT_SOURCES = getdate.c lstat.c stat.c
|
||||
MAINTAINERCLEANFILES = $(BUILT_SOURCES)
|
||||
DISTCLEANFILES = lstat.c stat.c
|
||||
|
||||
EXTRA_DIST = xstat.in
|
||||
lstat.c: xstat.in
|
||||
|
||||
216
lib/Makefile.in
216
lib/Makefile.in
@@ -59,13 +59,17 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
AMTAR = @AMTAR@
|
||||
AMTARFLAGS = @AMTARFLAGS@
|
||||
AWK = @AWK@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
DF_PROG = @DF_PROG@
|
||||
GENCAT = @GENCAT@
|
||||
GETCONF = @GETCONF@
|
||||
@@ -83,7 +87,6 @@ LIBOBJS = @LIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MVDIR_PROG = @MVDIR_PROG@
|
||||
PACKAGE = @PACKAGE@
|
||||
PERL = @PERL@
|
||||
POFILES = @POFILES@
|
||||
@@ -94,6 +97,7 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
install_sh = @install_sh@
|
||||
l = @l@
|
||||
|
||||
|
||||
@@ -127,6 +131,8 @@ version-etc.h xalloc.h xstrtol.h
|
||||
|
||||
|
||||
BUILT_SOURCES = getdate.c lstat.c stat.c
|
||||
MAINTAINERCLEANFILES = $(BUILT_SOURCES)
|
||||
DISTCLEANFILES = lstat.c stat.c
|
||||
|
||||
EXTRA_DIST = xstat.in
|
||||
subdir = lib
|
||||
@@ -163,35 +169,43 @@ DIST_COMMON = $(noinst_HEADERS) Makefile.am Makefile.in TODO alloca.c \
|
||||
chown.c dup2.c error.c error.h euidaccess.c fileblocks.c fnmatch.c \
|
||||
fsusage.c ftruncate.c getdate.c getgroups.c getline.c group-member.c \
|
||||
lchown.c malloc.c memchr.c memcmp.c memcpy.c memmove.c memset.c mkdir.c \
|
||||
mktime.c mountlist.c obstack.c obstack.h realloc.c regex.c rename.c \
|
||||
rmdir.c rpmatch.c stpcpy.c strcasecmp.c strdup.c strftime.c \
|
||||
strncasecmp.c strndup.c strstr.c strtol.c strtoul.c strtoull.c \
|
||||
strtoumax.c strverscmp.c utime.c
|
||||
mktime.c mountlist.c obstack.c obstack.h realloc.c regex.c rmdir.c \
|
||||
rpmatch.c stpcpy.c strcasecmp.c strdup.c strftime.c strncasecmp.c \
|
||||
strndup.c strstr.c strtol.c strtoul.c strtoull.c strtoumax.c \
|
||||
strverscmp.c utime.c
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
GZIP_ENV = --best
|
||||
DEP_FILES = .deps/addext.P .deps/alloca.P .deps/argmatch.P \
|
||||
.deps/backupfile.P .deps/basename.P .deps/chown.P .deps/closeout.P \
|
||||
.deps/dirname.P .deps/dup2.P .deps/error.P .deps/euidaccess.P \
|
||||
.deps/exclude.P .deps/fileblocks.P .deps/filemode.P .deps/fnmatch.P \
|
||||
.deps/fsusage.P .deps/ftruncate.P .deps/full-write.P .deps/getdate.P \
|
||||
.deps/getgroups.P .deps/getline.P .deps/getopt.P .deps/getopt1.P \
|
||||
.deps/group-member.P .deps/hash.P .deps/human.P .deps/idcache.P \
|
||||
.deps/isdir.P .deps/lchown.P .deps/long-options.P .deps/lstat.P \
|
||||
.deps/makepath.P .deps/malloc.P .deps/memchr.P .deps/memcmp.P \
|
||||
.deps/memcpy.P .deps/memmove.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/same.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/strncasecmp.P .deps/strndup.P \
|
||||
.deps/strstr.P .deps/strtol.P .deps/strtoul.P .deps/strtoull.P \
|
||||
.deps/strtoumax.P .deps/strverscmp.P .deps/userspec.P .deps/utime.P \
|
||||
.deps/version-etc.P .deps/xgetcwd.P .deps/xmalloc.P .deps/xstrdup.P \
|
||||
.deps/xstrtol.P .deps/xstrtoul.P .deps/xstrtoumax.P .deps/yesno.P
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
DEP_FILES = @AMDEP@ $(DEPDIR)/addext$U.Po $(DEPDIR)/alloca.Po \
|
||||
$(DEPDIR)/argmatch$U.Po $(DEPDIR)/backupfile$U.Po \
|
||||
$(DEPDIR)/basename$U.Po $(DEPDIR)/chown.Po $(DEPDIR)/closeout$U.Po \
|
||||
$(DEPDIR)/dirname$U.Po $(DEPDIR)/dup2.Po $(DEPDIR)/error.Po \
|
||||
$(DEPDIR)/euidaccess.Po $(DEPDIR)/exclude$U.Po $(DEPDIR)/fileblocks.Po \
|
||||
$(DEPDIR)/filemode$U.Po $(DEPDIR)/fnmatch.Po $(DEPDIR)/fsusage.Po \
|
||||
$(DEPDIR)/ftruncate.Po $(DEPDIR)/full-write$U.Po $(DEPDIR)/getdate$U.Po \
|
||||
$(DEPDIR)/getgroups.Po $(DEPDIR)/getline.Po $(DEPDIR)/getopt$U.Po \
|
||||
$(DEPDIR)/getopt1$U.Po $(DEPDIR)/group-member.Po $(DEPDIR)/hash$U.Po \
|
||||
$(DEPDIR)/human$U.Po $(DEPDIR)/idcache$U.Po $(DEPDIR)/isdir$U.Po \
|
||||
$(DEPDIR)/lchown.Po $(DEPDIR)/long-options$U.Po $(DEPDIR)/lstat.Po \
|
||||
$(DEPDIR)/makepath$U.Po $(DEPDIR)/malloc.Po $(DEPDIR)/memchr.Po \
|
||||
$(DEPDIR)/memcmp.Po $(DEPDIR)/memcpy.Po $(DEPDIR)/memmove.Po \
|
||||
$(DEPDIR)/memset.Po $(DEPDIR)/mkdir.Po $(DEPDIR)/mktime.Po \
|
||||
$(DEPDIR)/modechange$U.Po $(DEPDIR)/mountlist.Po $(DEPDIR)/obstack.Po \
|
||||
$(DEPDIR)/path-concat$U.Po $(DEPDIR)/posixtm$U.Po \
|
||||
$(DEPDIR)/quotearg$U.Po $(DEPDIR)/realloc.Po $(DEPDIR)/regex.Po \
|
||||
$(DEPDIR)/rmdir.Po $(DEPDIR)/rpmatch.Po $(DEPDIR)/safe-read$U.Po \
|
||||
$(DEPDIR)/same$U.Po $(DEPDIR)/save-cwd$U.Po $(DEPDIR)/savedir$U.Po \
|
||||
$(DEPDIR)/stat.Po $(DEPDIR)/stpcpy.Po $(DEPDIR)/strcasecmp.Po \
|
||||
$(DEPDIR)/strdup.Po $(DEPDIR)/strftime.Po $(DEPDIR)/stripslash$U.Po \
|
||||
$(DEPDIR)/strncasecmp.Po $(DEPDIR)/strndup.Po $(DEPDIR)/strstr.Po \
|
||||
$(DEPDIR)/strtol.Po $(DEPDIR)/strtoul.Po $(DEPDIR)/strtoull.Po \
|
||||
$(DEPDIR)/strtoumax.Po $(DEPDIR)/strverscmp.Po $(DEPDIR)/userspec$U.Po \
|
||||
$(DEPDIR)/utime.Po $(DEPDIR)/version-etc$U.Po $(DEPDIR)/xgetcwd$U.Po \
|
||||
$(DEPDIR)/xmalloc$U.Po $(DEPDIR)/xstrdup$U.Po $(DEPDIR)/xstrtol$U.Po \
|
||||
$(DEPDIR)/xstrtoul$U.Po $(DEPDIR)/xstrtoumax$U.Po $(DEPDIR)/yesno$U.Po
|
||||
SOURCES = $(libfu_a_SOURCES)
|
||||
OBJECTS = $(am_libfu_a_OBJECTS)
|
||||
|
||||
@@ -244,8 +258,6 @@ libfu.a: $(libfu_a_OBJECTS) $(libfu_a_DEPENDENCIES)
|
||||
-rm -f libfu.a
|
||||
$(libfu_a_AR) libfu.a $(libfu_a_OBJECTS) $(libfu_a_LIBADD)
|
||||
$(RANLIB) libfu.a
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
addext_.c: addext.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/addext.c; then echo $(srcdir)/addext.c; else echo addext.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > addext_.c
|
||||
alloca_.c: alloca.c $(ANSI2KNR)
|
||||
@@ -342,8 +354,6 @@ realloc_.c: realloc.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/realloc.c; then echo $(srcdir)/realloc.c; else echo realloc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > realloc_.c
|
||||
regex_.c: regex.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/regex.c; then echo $(srcdir)/regex.c; else echo regex.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > regex_.c
|
||||
rename_.c: rename.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/rename.c; then echo $(srcdir)/rename.c; else echo rename.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > rename_.c
|
||||
rmdir_.c: rmdir.c $(ANSI2KNR)
|
||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/rmdir.c; then echo $(srcdir)/rmdir.c; else echo rmdir.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > rmdir_.c
|
||||
rpmatch_.c: rpmatch.c $(ANSI2KNR)
|
||||
@@ -412,7 +422,7 @@ group-member_.o hash_.o human_.o idcache_.o isdir_.o lchown_.o \
|
||||
long-options_.o lstat_.o makepath_.o malloc_.o memchr_.o memcmp_.o \
|
||||
memcpy_.o memmove_.o memset_.o mkdir_.o mktime_.o modechange_.o \
|
||||
mountlist_.o obstack_.o path-concat_.o posixtm_.o quotearg_.o \
|
||||
realloc_.o regex_.o rename_.o rmdir_.o rpmatch_.o safe-read_.o same_.o \
|
||||
realloc_.o regex_.o rmdir_.o rpmatch_.o safe-read_.o same_.o \
|
||||
save-cwd_.o savedir_.o stat_.o stpcpy_.o strcasecmp_.o strdup_.o \
|
||||
strftime_.o stripslash_.o strncasecmp_.o strndup_.o strstr_.o strtol_.o \
|
||||
strtoul_.o strtoull_.o strtoumax_.o strverscmp_.o userspec_.o utime_.o \
|
||||
@@ -427,23 +437,27 @@ xstrtoumax_.o yesno_.o : $(ANSI2KNR)
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|| etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
@@ -457,15 +471,10 @@ maintainer-clean-tags:
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnits lib/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
cp -pR $$d/$$file $(distdir); \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
@@ -474,37 +483,102 @@ distdir: $(DISTFILES)
|
||||
done
|
||||
|
||||
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
|
||||
-include $(DEP_FILES)
|
||||
@AMDEP@include $(DEPDIR)/addext$U.Po
|
||||
@AMDEP@include $(DEPDIR)/alloca.Po
|
||||
@AMDEP@include $(DEPDIR)/argmatch$U.Po
|
||||
@AMDEP@include $(DEPDIR)/backupfile$U.Po
|
||||
@AMDEP@include $(DEPDIR)/basename$U.Po
|
||||
@AMDEP@include $(DEPDIR)/chown.Po
|
||||
@AMDEP@include $(DEPDIR)/closeout$U.Po
|
||||
@AMDEP@include $(DEPDIR)/dirname$U.Po
|
||||
@AMDEP@include $(DEPDIR)/dup2.Po
|
||||
@AMDEP@include $(DEPDIR)/error.Po
|
||||
@AMDEP@include $(DEPDIR)/euidaccess.Po
|
||||
@AMDEP@include $(DEPDIR)/exclude$U.Po
|
||||
@AMDEP@include $(DEPDIR)/fileblocks.Po
|
||||
@AMDEP@include $(DEPDIR)/filemode$U.Po
|
||||
@AMDEP@include $(DEPDIR)/fnmatch.Po
|
||||
@AMDEP@include $(DEPDIR)/fsusage.Po
|
||||
@AMDEP@include $(DEPDIR)/ftruncate.Po
|
||||
@AMDEP@include $(DEPDIR)/full-write$U.Po
|
||||
@AMDEP@include $(DEPDIR)/getdate$U.Po
|
||||
@AMDEP@include $(DEPDIR)/getgroups.Po
|
||||
@AMDEP@include $(DEPDIR)/getline.Po
|
||||
@AMDEP@include $(DEPDIR)/getopt$U.Po
|
||||
@AMDEP@include $(DEPDIR)/getopt1$U.Po
|
||||
@AMDEP@include $(DEPDIR)/group-member.Po
|
||||
@AMDEP@include $(DEPDIR)/hash$U.Po
|
||||
@AMDEP@include $(DEPDIR)/human$U.Po
|
||||
@AMDEP@include $(DEPDIR)/idcache$U.Po
|
||||
@AMDEP@include $(DEPDIR)/isdir$U.Po
|
||||
@AMDEP@include $(DEPDIR)/lchown.Po
|
||||
@AMDEP@include $(DEPDIR)/long-options$U.Po
|
||||
@AMDEP@include $(DEPDIR)/lstat.Po
|
||||
@AMDEP@include $(DEPDIR)/makepath$U.Po
|
||||
@AMDEP@include $(DEPDIR)/malloc.Po
|
||||
@AMDEP@include $(DEPDIR)/memchr.Po
|
||||
@AMDEP@include $(DEPDIR)/memcmp.Po
|
||||
@AMDEP@include $(DEPDIR)/memcpy.Po
|
||||
@AMDEP@include $(DEPDIR)/memmove.Po
|
||||
@AMDEP@include $(DEPDIR)/memset.Po
|
||||
@AMDEP@include $(DEPDIR)/mkdir.Po
|
||||
@AMDEP@include $(DEPDIR)/mktime.Po
|
||||
@AMDEP@include $(DEPDIR)/modechange$U.Po
|
||||
@AMDEP@include $(DEPDIR)/mountlist.Po
|
||||
@AMDEP@include $(DEPDIR)/obstack.Po
|
||||
@AMDEP@include $(DEPDIR)/path-concat$U.Po
|
||||
@AMDEP@include $(DEPDIR)/posixtm$U.Po
|
||||
@AMDEP@include $(DEPDIR)/quotearg$U.Po
|
||||
@AMDEP@include $(DEPDIR)/realloc.Po
|
||||
@AMDEP@include $(DEPDIR)/regex.Po
|
||||
@AMDEP@include $(DEPDIR)/rmdir.Po
|
||||
@AMDEP@include $(DEPDIR)/rpmatch.Po
|
||||
@AMDEP@include $(DEPDIR)/safe-read$U.Po
|
||||
@AMDEP@include $(DEPDIR)/same$U.Po
|
||||
@AMDEP@include $(DEPDIR)/save-cwd$U.Po
|
||||
@AMDEP@include $(DEPDIR)/savedir$U.Po
|
||||
@AMDEP@include $(DEPDIR)/stat.Po
|
||||
@AMDEP@include $(DEPDIR)/stpcpy.Po
|
||||
@AMDEP@include $(DEPDIR)/strcasecmp.Po
|
||||
@AMDEP@include $(DEPDIR)/strdup.Po
|
||||
@AMDEP@include $(DEPDIR)/strftime.Po
|
||||
@AMDEP@include $(DEPDIR)/stripslash$U.Po
|
||||
@AMDEP@include $(DEPDIR)/strncasecmp.Po
|
||||
@AMDEP@include $(DEPDIR)/strndup.Po
|
||||
@AMDEP@include $(DEPDIR)/strstr.Po
|
||||
@AMDEP@include $(DEPDIR)/strtol.Po
|
||||
@AMDEP@include $(DEPDIR)/strtoul.Po
|
||||
@AMDEP@include $(DEPDIR)/strtoull.Po
|
||||
@AMDEP@include $(DEPDIR)/strtoumax.Po
|
||||
@AMDEP@include $(DEPDIR)/strverscmp.Po
|
||||
@AMDEP@include $(DEPDIR)/userspec$U.Po
|
||||
@AMDEP@include $(DEPDIR)/utime.Po
|
||||
@AMDEP@include $(DEPDIR)/version-etc$U.Po
|
||||
@AMDEP@include $(DEPDIR)/xgetcwd$U.Po
|
||||
@AMDEP@include $(DEPDIR)/xmalloc$U.Po
|
||||
@AMDEP@include $(DEPDIR)/xstrdup$U.Po
|
||||
@AMDEP@include $(DEPDIR)/xstrtol$U.Po
|
||||
@AMDEP@include $(DEPDIR)/xstrtoul$U.Po
|
||||
@AMDEP@include $(DEPDIR)/xstrtoumax$U.Po
|
||||
@AMDEP@include $(DEPDIR)/yesno$U.Po
|
||||
|
||||
mostlyclean-depend:
|
||||
|
||||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf .deps
|
||||
-rm -rf $(DEPDIR)
|
||||
|
||||
maintainer-clean-depend:
|
||||
|
||||
%.o: %.c
|
||||
@echo '$(COMPILE) -c -o $@ $<'; \
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*D)/$(*F).pp -c -o $@ $<
|
||||
@-cp .deps/$(*D)/$(*F).pp .deps/$(*D)/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*D)/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*D)/$(*F).P; \
|
||||
rm .deps/$(*D)/$(*F).pp
|
||||
@AMDEP@CCDEPMODE = @CCDEPMODE@
|
||||
|
||||
.c.o:
|
||||
@AMDEP@ source='$<' object='$@' @AMDEPBACKSLASH@
|
||||
@AMDEP@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
$(COMPILE) -c -o $@ $<
|
||||
|
||||
%.lo: %.c
|
||||
@echo '$(LTCOMPILE) -c -o $@ $<'; \
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*D)/$(*F).pp -c -o $@ $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*D)/$(*F).pp > .deps/$(*D)/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*D)/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*D)/$(*F).P; \
|
||||
rm -f .deps/$(*D)/$(*F).pp
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
@@ -538,9 +612,11 @@ clean-generic:
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "getdate.c$(BUILT_SOURCES)" || rm -f getdate.c $(BUILT_SOURCES)
|
||||
-rm -f Makefile.in
|
||||
-test -z "getdate.c$(BUILT_SOURCES)$(MAINTAINERCLEANFILES)" || rm -f getdate.c $(BUILT_SOURCES) $(MAINTAINERCLEANFILES)
|
||||
mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \
|
||||
mostlyclean-kr mostlyclean-tags mostlyclean-depend \
|
||||
mostlyclean-generic
|
||||
|
||||
@@ -23,10 +23,20 @@
|
||||
# define FILESYSTEM_PREFIX_LEN(Filename) 0
|
||||
#endif
|
||||
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef ISSLASH
|
||||
# define ISSLASH(C) ((C) == '/')
|
||||
#endif
|
||||
|
||||
char *base_name PARAMS ((char const *name));
|
||||
|
||||
/* In general, we can't use the builtin `basename' function if available,
|
||||
since it has different meanings in different environments.
|
||||
In some environments the builtin `basename' modifies its argument.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Error handler for noninteractive utilities
|
||||
Copyright (C) 1990,91,92,93,94,95,96,97,98 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990,91,92,93,94,95,96,97,98, 99 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU C Library. Its master source is NOT part of
|
||||
the C library, however. The master source lives in /gd/gnu/lib.
|
||||
@@ -230,7 +230,10 @@ error_at_line (status, errnum, file_name, line_number, 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 @@
|
||||
/* Convert file size to number of blocks on System V-like machines.
|
||||
Copyright (C) 1990, 1997, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990, 1997, 1998, 1999 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
|
||||
@@ -27,7 +27,7 @@
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#if !HAVE_ST_BLOCKS && !defined _POSIX_SOURCE && defined BSIZE
|
||||
#if !HAVE_STRUCT_STAT_ST_BLOCKS && !defined _POSIX_SOURCE && defined BSIZE
|
||||
|
||||
# if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
|
||||
1652
lib/getdate.y
1652
lib/getdate.y
File diff suppressed because it is too large
Load Diff
42
lib/getopt.c
42
lib/getopt.c
@@ -1,25 +1,23 @@
|
||||
/* Getopt for GNU.
|
||||
NOTE: getopt is now part of the C library, so if you don't know what
|
||||
"Keep this file name-space clean" means, talk to drepper@gnu.org
|
||||
before changing it!
|
||||
NOTE: The canonical source of this file is maintained with the GNU
|
||||
C Library. Bugs can be reported to bug-glibc@gnu.org.
|
||||
|
||||
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98
|
||||
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
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.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
|
||||
Ditto for AIX 3.2 and <stdlib.h>. */
|
||||
@@ -29,13 +27,13 @@
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if !defined __STDC__ || !__STDC__
|
||||
#else
|
||||
# if !defined __STDC__ || !__STDC__
|
||||
/* This is a separate conditional since some stdc systems
|
||||
reject `defined (const)'. */
|
||||
# ifndef const
|
||||
# define const
|
||||
# ifndef const
|
||||
# define const
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -109,7 +107,7 @@
|
||||
Also, when `ordering' is RETURN_IN_ORDER,
|
||||
each non-option ARGV-element is returned here. */
|
||||
|
||||
char *optarg = NULL;
|
||||
char *optarg;
|
||||
|
||||
/* Index in ARGV of the next element to be scanned.
|
||||
This is used for communication to and from the caller
|
||||
@@ -130,7 +128,7 @@ int optind = 1;
|
||||
causes problems with re-calling getopt as programs generally don't
|
||||
know that. */
|
||||
|
||||
int __getopt_initialized = 0;
|
||||
int __getopt_initialized;
|
||||
|
||||
/* The next char to be scanned in the option-element
|
||||
in which the last option character we returned was found.
|
||||
|
||||
26
lib/getopt.h
26
lib/getopt.h
@@ -1,21 +1,21 @@
|
||||
/* Declarations for getopt.
|
||||
Copyright (C) 1989,90,91,92,93,94,96,97,98 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@gnu.org.
|
||||
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.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
#ifndef _GETOPT_H
|
||||
|
||||
|
||||
@@ -1,29 +1,26 @@
|
||||
/* getopt_long and getopt_long_only entry points for GNU getopt.
|
||||
Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@gnu.org.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
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.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "getopt.h"
|
||||
|
||||
#else
|
||||
#if !defined __STDC__ || !__STDC__
|
||||
/* This is a separate conditional since some stdc systems
|
||||
reject `defined (const)'. */
|
||||
@@ -31,6 +28,9 @@
|
||||
#define const
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "getopt.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
13
lib/human.c
13
lib/human.c
@@ -276,13 +276,19 @@ human_readable_inexact (uintmax_t n, char *buf,
|
||||
static char const *const block_size_args[] = { "human-readable", "si", 0 };
|
||||
static int const block_size_types[] = { -1024, -1000 };
|
||||
|
||||
static int
|
||||
default_block_size (void)
|
||||
{
|
||||
return getenv ("POSIXLY_CORRECT") ? 512 : DEFAULT_BLOCK_SIZE;
|
||||
}
|
||||
|
||||
static strtol_error
|
||||
humblock (char const *spec, int *block_size)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (! spec && ! (spec = getenv ("BLOCK_SIZE")))
|
||||
*block_size = getenv ("POSIXLY_CORRECT") ? 512 : DEFAULT_BLOCK_SIZE;
|
||||
*block_size = default_block_size ();
|
||||
else if (0 <= (i = ARGMATCH (spec, block_size_args, block_size_types)))
|
||||
*block_size = block_size_types[i];
|
||||
else
|
||||
@@ -306,6 +312,11 @@ void
|
||||
human_block_size (char const *spec, int report_errors, int *block_size)
|
||||
{
|
||||
strtol_error e = humblock (spec, block_size);
|
||||
if (*block_size == 0)
|
||||
{
|
||||
*block_size = default_block_size ();
|
||||
e = LONGINT_INVALID;
|
||||
}
|
||||
if (e != LONGINT_OK && report_errors)
|
||||
STRTOL_FATAL_ERROR (spec, _("block size"), e);
|
||||
}
|
||||
|
||||
@@ -27,6 +27,13 @@ extern int errno;
|
||||
#endif
|
||||
#include "lchown.h"
|
||||
|
||||
#ifdef STAT_MACROS_BROKEN
|
||||
# undef S_ISLNK
|
||||
#endif
|
||||
#if !defined(S_ISLNK) && defined(S_IFLNK)
|
||||
# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
|
||||
#endif
|
||||
|
||||
/* Declare chown to avoid a warning. Don't include unistd.h,
|
||||
because it may have a conflicting prototype for lchown. */
|
||||
int chown ();
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
# define ENOSYS ENOTSUP
|
||||
# else
|
||||
/* Some systems don't have ENOTSUP either. */
|
||||
# define ENOSYS ENOMSG
|
||||
# define ENOSYS EINVAL
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -41,8 +41,7 @@ initbuffer (struct linebuffer *linebuffer)
|
||||
|
||||
/* Read an arbitrarily long line of text from STREAM into LINEBUFFER.
|
||||
Keep the newline; append a newline if it's the last line of a file
|
||||
that ends in a non-newline character. Do not null terminate,
|
||||
but leave room for an extra byte after the newline.
|
||||
that ends in a non-newline character. Do not null terminate.
|
||||
Return LINEBUFFER, except at end of file return 0. */
|
||||
|
||||
struct linebuffer *
|
||||
@@ -51,7 +50,7 @@ readline (struct linebuffer *linebuffer, FILE *stream)
|
||||
int c;
|
||||
char *buffer = linebuffer->buffer;
|
||||
char *p = linebuffer->buffer;
|
||||
char *end = buffer + linebuffer->size - 1; /* Sentinel. */
|
||||
char *end = buffer + linebuffer->size; /* Sentinel. */
|
||||
|
||||
if (feof (stream) || ferror (stream))
|
||||
return 0;
|
||||
@@ -73,7 +72,7 @@ readline (struct linebuffer *linebuffer, FILE *stream)
|
||||
buffer = (char *) xrealloc (buffer, linebuffer->size);
|
||||
p = p - linebuffer->buffer + buffer;
|
||||
linebuffer->buffer = buffer;
|
||||
end = buffer + linebuffer->size - 1;
|
||||
end = buffer + linebuffer->size;
|
||||
}
|
||||
*p++ = c;
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ make_path (const char *argpath,
|
||||
if (verbose_fmt_string != NULL)
|
||||
error (0, 0, verbose_fmt_string, dirpath);
|
||||
|
||||
if (owner != (uid_t) -1 && group != (gid_t) -1)
|
||||
if (owner != (uid_t) -1 || group != (gid_t) -1)
|
||||
{
|
||||
if (chown (basename_dir, owner, group)
|
||||
#ifdef AFS
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* md5.h - Declaration of functions and data types used for MD5 sum
|
||||
computing library functions.
|
||||
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc.
|
||||
NOTE: The canonical source of this file is maintained with the GNU C
|
||||
Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.
|
||||
|
||||
@@ -118,7 +118,7 @@ extern void md5_process_bytes __P ((const void *buffer, size_t len,
|
||||
endian byte order, so that a byte-wise output yields to the wanted
|
||||
ASCII representation of the message digest.
|
||||
|
||||
IMPORTANT: On some systems it is required that RESBUF is correctly
|
||||
IMPORTANT: On some systems it is required that RESBUF be correctly
|
||||
aligned for a 32 bits value. */
|
||||
extern void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf));
|
||||
|
||||
|
||||
@@ -21,60 +21,23 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifndef __GNUC__
|
||||
# ifdef HAVE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
# else
|
||||
# ifdef _AIX
|
||||
# pragma alloca
|
||||
# else
|
||||
# ifdef _WIN32
|
||||
# include <malloc.h>
|
||||
# include <io.h>
|
||||
# else
|
||||
# ifndef alloca
|
||||
char *alloca ();
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if HAVE_STRING_H
|
||||
# include <string.h>
|
||||
#endif
|
||||
|
||||
/* Compare S1 (with length S1LEN) and S2 (with length S2LEN) according
|
||||
to the LC_COLLATE locale. S1 and S2 do not overlap, but may be
|
||||
to the LC_COLLATE locale. S1 and S2 do not overlap, and are not
|
||||
adjacent. Temporarily modify the bytes after S1 and S2, but
|
||||
restore their original contents before returning. */
|
||||
int
|
||||
memcoll (char *s1, size_t s1len, char *s2, size_t s2len)
|
||||
{
|
||||
int diff;
|
||||
char n1;
|
||||
char n2;
|
||||
char n1 = s1[s1len];
|
||||
char n2 = s2[s2len];
|
||||
|
||||
/* We will temporarily set the bytes after S1 and S2 to zero, so if
|
||||
S1 and S2 are adjacent, compare to a temporary copy of the
|
||||
earlier, to avoid temporarily stomping on the later. */
|
||||
|
||||
if (s1 + s1len == s2)
|
||||
{
|
||||
char *s2copy = alloca (s2len + 1);
|
||||
memcpy (s2copy, s2, s2len);
|
||||
s2 = s2copy;
|
||||
}
|
||||
|
||||
if (s2 + s2len == s1)
|
||||
{
|
||||
char *s1copy = alloca (s1len + 1);
|
||||
memcpy (s1copy, s1, s1len);
|
||||
s1 = s1copy;
|
||||
}
|
||||
|
||||
n1 = s1[s1len]; s1[s1len++] = '\0';
|
||||
n2 = s2[s2len]; s2[s2len++] = '\0';
|
||||
s1[s1len++] = '\0';
|
||||
s2[s2len++] = '\0';
|
||||
|
||||
while (! (diff = strcoll (s1, s2)))
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* path-concat.c -- concatenate two arbitrary pathnames
|
||||
Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996, 1997, 1998, 1999 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
|
||||
@@ -33,21 +33,49 @@
|
||||
|
||||
char *malloc ();
|
||||
|
||||
/* Concatenate two pathname components, DIR and BASE, in newly-allocated
|
||||
storage and return the result. Return 0 if out of memory. Add a slash
|
||||
between DIR and BASE in the result if neither would contribute one.
|
||||
If each would contribute at least one, elide one from the end of DIR.
|
||||
Otherwise, simply concatenate DIR and BASE. In any case, if
|
||||
BASE_IN_RESULT is non-NULL, set *BASE_IN_RESULT to point to the copy of
|
||||
BASE in the returned concatenation. */
|
||||
#ifndef DIRECTORY_SEPARATOR
|
||||
# define DIRECTORY_SEPARATOR '/'
|
||||
#endif
|
||||
|
||||
#ifndef ISSLASH
|
||||
# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
|
||||
#endif
|
||||
|
||||
#include "xalloc.h"
|
||||
#include "path-concat.h"
|
||||
|
||||
/* Concatenate two pathname components, DIR and BASE, in
|
||||
newly-allocated storage and return the result. Return 0 if out of
|
||||
memory. Add a slash between DIR and BASE in the result if neither
|
||||
would contribute one. If each would contribute at least one, elide
|
||||
one from the end of DIR. Otherwise, simply concatenate DIR and
|
||||
BASE. In any case, if BASE_IN_RESULT is non-NULL, set
|
||||
*BASE_IN_RESULT to point to the copy of BASE in the returned
|
||||
concatenation.
|
||||
|
||||
DIR may be NULL, BASE must not be.
|
||||
|
||||
Return NULL if memory is exhausted. */
|
||||
|
||||
char *
|
||||
path_concat (const char *dir, const char *base, char **base_in_result)
|
||||
{
|
||||
char *p;
|
||||
char *p_concat;
|
||||
size_t base_len = strlen (base);
|
||||
size_t dir_len = strlen (dir);
|
||||
size_t base_len;
|
||||
size_t dir_len;
|
||||
|
||||
if (!dir)
|
||||
{
|
||||
p_concat = strdup (base);
|
||||
if (base_in_result)
|
||||
*base_in_result = p_concat;
|
||||
return p_concat;
|
||||
}
|
||||
|
||||
/* DIR is not empty. */
|
||||
base_len = strlen (base);
|
||||
dir_len = strlen (dir);
|
||||
|
||||
p_concat = malloc (dir_len + base_len + 2);
|
||||
if (!p_concat)
|
||||
@@ -55,10 +83,10 @@ path_concat (const char *dir, const char *base, char **base_in_result)
|
||||
|
||||
p = mempcpy (p_concat, dir, dir_len);
|
||||
|
||||
if (*(p - 1) == '/' && *base == '/')
|
||||
if (ISSLASH (*(p - 1)) && ISSLASH(*base))
|
||||
--p;
|
||||
else if (*(p - 1) != '/' && *base != '/')
|
||||
*p++ = '/';
|
||||
else if (!ISSLASH (*(p - 1)) && !ISSLASH(*base))
|
||||
*p++ = DIRECTORY_SEPARATOR;
|
||||
|
||||
if (base_in_result)
|
||||
*base_in_result = p;
|
||||
@@ -67,3 +95,14 @@ path_concat (const char *dir, const char *base, char **base_in_result)
|
||||
|
||||
return p_concat;
|
||||
}
|
||||
|
||||
/* Same, but die when memory is exhausted. */
|
||||
|
||||
char *
|
||||
xpath_concat (const char *dir, const char *base, char **base_in_result)
|
||||
{
|
||||
char *res = path_concat (dir, base, base_in_result);
|
||||
if (res)
|
||||
return res;
|
||||
xalloc_die ();
|
||||
}
|
||||
|
||||
113
lib/rename.c
113
lib/rename.c
@@ -1,113 +0,0 @@
|
||||
/* BSD compatible rename and directory rename function for System V.
|
||||
Copyright (C) 1988, 1990 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#if STAT_MACROS_BROKEN
|
||||
# undef S_ISDIR
|
||||
#endif
|
||||
|
||||
#if !defined(S_ISDIR) && defined(S_IFDIR)
|
||||
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
/* Rename file FROM to file TO.
|
||||
Return 0 if successful, -1 if not. */
|
||||
|
||||
int
|
||||
rename (char *from, char *to)
|
||||
{
|
||||
struct stat from_stats, to_stats;
|
||||
|
||||
if (stat (from, &from_stats))
|
||||
return -1;
|
||||
|
||||
/* Be careful not to unlink `from' if it happens to be equal to `to' or
|
||||
(on filesystems that silently truncate filenames after 14 characters)
|
||||
if `from' and `to' share the significant characters. */
|
||||
if (stat (to, &to_stats))
|
||||
{
|
||||
if (errno != ENOENT)
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((from_stats.st_dev == to_stats.st_dev)
|
||||
&& (from_stats.st_ino == to_stats.st_ino))
|
||||
/* `from' and `to' designate the same file on that filesystem. */
|
||||
return 0;
|
||||
|
||||
if (unlink (to) && errno != ENOENT)
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef MVDIR
|
||||
|
||||
/* If MVDIR is defined, it should be the full filename of a setuid root
|
||||
program able to link and unlink directories. If MVDIR is not defined,
|
||||
then the capability of renaming directories may be missing. */
|
||||
|
||||
if (S_ISDIR (from_stats.st_mode))
|
||||
{
|
||||
/* Need a setuid root process to link and unlink directories. */
|
||||
int status;
|
||||
pid_t pid = fork ();
|
||||
switch (pid)
|
||||
{
|
||||
case -1: /* Error. */
|
||||
return -1; /* errno already set */
|
||||
|
||||
case 0: /* Child. */
|
||||
execl (MVDIR, "mvdir", from, to, (char *) 0);
|
||||
_exit (1);
|
||||
|
||||
default: /* Parent. */
|
||||
while (wait (&status) != pid)
|
||||
/* Do nothing. */ ;
|
||||
|
||||
if (status)
|
||||
{
|
||||
/* MVDIR failed. */
|
||||
errno = EIO;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
#endif /* MVDIR */
|
||||
|
||||
{
|
||||
if (link (from, to))
|
||||
return -1;
|
||||
if (unlink (from) && errno != ENOENT)
|
||||
{
|
||||
unlink (to);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -100,7 +100,7 @@ extern char *tzname[];
|
||||
#endif
|
||||
|
||||
#ifndef __P
|
||||
# if defined (__GNUC__) || (defined (__STDC__) && __STDC__)
|
||||
# if defined __GNUC__ || (defined __STDC__ && __STDC__)
|
||||
# define __P(args) args
|
||||
# else
|
||||
# define __P(args) ()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1994 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1994, 1999 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -24,6 +24,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
*
|
||||
* Stephen R. van den Berg, berg@pool.informatik.rwth-aachen.de */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
@@ -71,7 +75,7 @@ strstr (const char *phaystack, const char *pneedle)
|
||||
a = *++haystack;
|
||||
if (a == '\0')
|
||||
goto ret0;
|
||||
shloop: }
|
||||
shloop:; }
|
||||
while (a != b);
|
||||
|
||||
jin: a = *++haystack;
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
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. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
@@ -28,19 +30,41 @@
|
||||
#else
|
||||
# define _(Text) Text
|
||||
#endif
|
||||
#define N_(Text) Text
|
||||
|
||||
/* Default copyright goes to the FSF. */
|
||||
|
||||
char* version_etc_copyright =
|
||||
N_("Copyright (C) 1999 Free Software Foundation, Inc.");
|
||||
|
||||
|
||||
/* Display the --version information the standard way.
|
||||
|
||||
If COMMAND_NAME is NULL, the PACKAGE is asumed to be the name of
|
||||
the program. The formats are therefore:
|
||||
|
||||
PACKAGE VERSION
|
||||
|
||||
or
|
||||
|
||||
COMMAND_NAME (PACKAGE) VERSION. */
|
||||
void
|
||||
version_etc (FILE *stream,
|
||||
const char *command_name, const char *package,
|
||||
const char *version, const char *authors)
|
||||
{
|
||||
fprintf (stream, "%s (%s) %s\n", command_name, package, version);
|
||||
if (command_name)
|
||||
fprintf (stream, "%s (%s) %s\n", command_name, package, version);
|
||||
else
|
||||
fprintf (stream, "%s %s\n", package, version);
|
||||
fprintf (stream, _("Written by %s.\n"), authors);
|
||||
putc ('\n', stream);
|
||||
|
||||
fputs (_(version_etc_copyright), stream);
|
||||
putc ('\n', stream);
|
||||
|
||||
fputs (_("\
|
||||
\n\
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.\n\
|
||||
This is free software; see the source for copying conditions. There is NO\n\
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
|
||||
"
|
||||
), stream);
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"),
|
||||
stream);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,22 @@
|
||||
/* Utility to help print --version output in a consistent format.
|
||||
Copyright (C) 1999 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. */
|
||||
|
||||
#ifndef VERSION_ETC_H
|
||||
# define VERSION_ETC_H 1
|
||||
|
||||
@@ -9,9 +28,11 @@
|
||||
# endif
|
||||
# endif
|
||||
|
||||
extern char *version_etc_copyright;
|
||||
|
||||
void
|
||||
version_etc PARAMS ((FILE *stream,
|
||||
const char *command_name, const char *package,
|
||||
const char *version, const char *authors));
|
||||
const char *command_name, const char *package,
|
||||
const char *version, const char *authors));
|
||||
|
||||
#endif /* VERSION_ETC_H */
|
||||
|
||||
45
lib/xalloc.h
45
lib/xalloc.h
@@ -26,6 +26,16 @@
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef __attribute__
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
|
||||
# define __attribute__(x)
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef ATTRIBUTE_NORETURN
|
||||
# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
|
||||
# endif
|
||||
|
||||
/* Exit value when the requested amount of memory is not available.
|
||||
It is initialized to EXIT_FAILURE, but the caller may set it to
|
||||
some other value. */
|
||||
@@ -33,20 +43,45 @@ extern int xalloc_exit_failure;
|
||||
|
||||
/* If this pointer is non-zero, run the specified function upon each
|
||||
allocation failure. It is initialized to zero. */
|
||||
extern void (*xalloc_fail_func) ();
|
||||
extern void (*xalloc_fail_func) PARAMS ((void));
|
||||
|
||||
/* If XALLOC_FAIL_FUNC is undefined or a function that returns, this
|
||||
message must be non-NULL. It is translated via gettext.
|
||||
The default value is "Memory exhausted". */
|
||||
extern char *const xalloc_msg_memory_exhausted;
|
||||
|
||||
/* This function is always triggered when memory is exhausted. It is
|
||||
in charge of honoring the three previous items. This is the
|
||||
function to call when one wants the program to die because of a
|
||||
memory allocation failure. */
|
||||
extern void xalloc_die PARAMS ((void)) ATTRIBUTE_NORETURN;
|
||||
|
||||
void *xmalloc PARAMS ((size_t n));
|
||||
void *xcalloc PARAMS ((size_t n, size_t s));
|
||||
void *xrealloc PARAMS ((void *p, size_t n));
|
||||
char *xstrdup PARAMS ((const char *str));
|
||||
|
||||
# define XMALLOC(Type, N_items) ((Type *) xmalloc (sizeof (Type) * (N_items)))
|
||||
# define XCALLOC(Type, N_items) ((Type *) xcalloc (sizeof (Type), (N_items)))
|
||||
# define XREALLOC(Ptr, Type, N_items) \
|
||||
((Type *) xrealloc ((void *) (Ptr), sizeof (Type) * (N_items)))
|
||||
|
||||
/* Declare and alloc memory for VAR of type TYPE. */
|
||||
# define NEW(Type, Var) Type *(Var) = XMALLOC (Type, 1)
|
||||
|
||||
/* Free VAR only if non NULL. */
|
||||
# define XFREE(Var) \
|
||||
do { \
|
||||
if (Var) \
|
||||
free (Var); \
|
||||
} while (0)
|
||||
|
||||
/* Return a pointer to a malloc'ed copy of the array SRC of NUM elements. */
|
||||
# define CCLONE(Src, Num) \
|
||||
(memcpy (xmalloc (sizeof (*Src) * (Num)), (Src), sizeof (*Src) * (Num)))
|
||||
|
||||
/* Return a malloc'ed copy of SRC. */
|
||||
# define CLONE(Src) CCLONE (Src, 1)
|
||||
|
||||
# define XMALLOC(Type, N_bytes) ((Type *) xmalloc (sizeof (Type) * (N_bytes)))
|
||||
# define XCALLOC(Type, N_bytes) ((Type *) xcalloc (sizeof (Type), (N_bytes)))
|
||||
# define XREALLOC(Ptr, Type, N_bytes) \
|
||||
((Type *) xrealloc ((void *) (Ptr), sizeof (Type) * (N_bytes)))
|
||||
|
||||
#endif /* !XALLOC_H_ */
|
||||
|
||||
@@ -59,18 +59,22 @@ you must run the autoconf test for a properly working realloc -- see realloc.m4
|
||||
int xalloc_exit_failure = EXIT_FAILURE;
|
||||
|
||||
/* If non NULL, call this function when memory is exhausted. */
|
||||
void (*xalloc_fail_func) () = 0;
|
||||
void (*xalloc_fail_func) PARAMS ((void)) = 0;
|
||||
|
||||
/* If XALLOC_FAIL_FUNC is NULL, or does return, display this message
|
||||
before exiting when memory is exhausted. Goes through gettext. */
|
||||
char *const xalloc_msg_memory_exhausted = N_("Memory exhausted");
|
||||
|
||||
static void
|
||||
xalloc_fail (void)
|
||||
void
|
||||
xalloc_die (void)
|
||||
{
|
||||
if (xalloc_fail_func)
|
||||
(*xalloc_fail_func) ();
|
||||
error (xalloc_exit_failure, 0, "%s", _(xalloc_msg_memory_exhausted));
|
||||
/* The `noreturn' cannot be given to error, since it may return if
|
||||
its first argument is 0. To help compilers understand the
|
||||
xalloc_die does terminate, call exit. */
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* Allocate N bytes of memory dynamically, with error checking. */
|
||||
@@ -82,7 +86,7 @@ xmalloc (size_t n)
|
||||
|
||||
p = malloc (n);
|
||||
if (p == 0)
|
||||
xalloc_fail ();
|
||||
xalloc_die ();
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -95,7 +99,7 @@ xrealloc (void *p, size_t n)
|
||||
{
|
||||
p = realloc (p, n);
|
||||
if (p == 0)
|
||||
xalloc_fail ();
|
||||
xalloc_die ();
|
||||
return p;
|
||||
}
|
||||
|
||||
@@ -108,6 +112,6 @@ xcalloc (size_t n, size_t s)
|
||||
|
||||
p = calloc (n, s);
|
||||
if (p == 0)
|
||||
xalloc_fail ();
|
||||
xalloc_die ();
|
||||
return p;
|
||||
}
|
||||
|
||||
78
m4/ChangeLog
78
m4/ChangeLog
@@ -1,3 +1,81 @@
|
||||
1999-11-18 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
|
||||
problem with the QNX 4.25 shell, which doesn't propagate exit
|
||||
status of failed commands inside shell assignments.
|
||||
|
||||
1999-11-17 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
|
||||
|
||||
1999-11-07 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
|
||||
|
||||
1999-11-06 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
|
||||
* jm-macros.m4 (jm_MACROS): Use it here.
|
||||
|
||||
1999-11-05 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from configure.in
|
||||
of textutils, fileutils, and sh-utils into this one (shared between
|
||||
those packages) file.
|
||||
Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
|
||||
AC_STRUCT_ST_BLKSIZE.
|
||||
|
||||
1999-11-03 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* ssize_t.m4: Remove file. No longer needed since the new version of
|
||||
AC_CHECK_TYPE checks includes unistd.h.
|
||||
* jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
|
||||
Suggestion from Akim Demaille.
|
||||
|
||||
1999-10-30 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* uintmax_t.m4: Require 2.14a. Remove backslash before backtick in
|
||||
m4-quoted string.
|
||||
* ls-mntd-fs.m4: Likewise.
|
||||
* jm-macros.m4: Likewise. Also, use AC_TYPE_SSIZE_T instead
|
||||
* jm-winsz1.m4: Likewise.
|
||||
|
||||
* const.m4: Remove file, since the fix made it into the experimental
|
||||
version of autoconf.
|
||||
* mktime.m4: Likewise.
|
||||
|
||||
* check-type.m4: Remove file, now that the latest version of
|
||||
AC_CHECK_TYPE takes a third arg to specify additional #includes.
|
||||
|
||||
* ssize_t.m4: New file, requires experimental version of autoconf.
|
||||
* jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
|
||||
AC_CHECK_TYPE.
|
||||
|
||||
1999-10-04 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* jm-macros.m4: Don't require autoconf-2.14.1.
|
||||
|
||||
1999-09-22 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
|
||||
2.95.1 bug with HP-UX 10.20.
|
||||
|
||||
1999-09-17 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
|
||||
Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
|
||||
due to missing strdup (against sh-utils-2.0).
|
||||
|
||||
1999-08-29 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* jm-macros.m4: Require jm_BISON.
|
||||
* bison.m4: New file.
|
||||
|
||||
1999-08-17 Paul Eggert <eggert@twinsun.com>
|
||||
|
||||
* m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
|
||||
in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
|
||||
|
||||
1999-08-05 Jim Meyering <meyering@ascend.com>
|
||||
|
||||
* getline.m4: Rename test file from conftestdata to conftest.data
|
||||
|
||||
@@ -4,10 +4,9 @@
|
||||
EXTRA_DIST = README Makefile.am.in \
|
||||
afs.m4 \
|
||||
assert.m4 \
|
||||
bison.m4 \
|
||||
check-decl.m4 \
|
||||
check-type.m4 \
|
||||
chown.m4 \
|
||||
const.m4 \
|
||||
d-ino.m4 \
|
||||
d-type.m4 \
|
||||
decl.m4 \
|
||||
@@ -30,11 +29,11 @@ jm-winsz2.m4 \
|
||||
largefile.m4 \
|
||||
lchown.m4 \
|
||||
lcmessage.m4 \
|
||||
link-follow.m4 \
|
||||
ls-mntd-fs.m4 \
|
||||
lstat.m4 \
|
||||
malloc.m4 \
|
||||
memcmp.m4 \
|
||||
mktime.m4 \
|
||||
perl.m4 \
|
||||
prereq.m4 \
|
||||
progtest.m4 \
|
||||
|
||||
@@ -59,16 +59,20 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMDEP = @AMDEP@
|
||||
AMTAR = @AMTAR@
|
||||
AMTARFLAGS = @AMTARFLAGS@
|
||||
AWK = @AWK@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CPP = @CPP@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
DF_PROG = @DF_PROG@
|
||||
GENCAT = @GENCAT@
|
||||
GETCONF = @GETCONF@
|
||||
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GNU_PACKAGE = @GNU_PACKAGE@
|
||||
@@ -79,39 +83,30 @@ INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLDEPS = @INTLDEPS@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
KMEM_GROUP = @KMEM_GROUP@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIB_CRYPT = @LIB_CRYPT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MAN = @MAN@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
NEED_SETGID = @NEED_SETGID@
|
||||
OPTIONAL_BIN_PROGS = @OPTIONAL_BIN_PROGS@
|
||||
OPTIONAL_BIN_ZCRIPTS = @OPTIONAL_BIN_ZCRIPTS@
|
||||
PACKAGE = @PACKAGE@
|
||||
PERL = @PERL@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
POW_LIBM = @POW_LIBM@
|
||||
RANLIB = @RANLIB@
|
||||
SEQ_LIBM = @SEQ_LIBM@
|
||||
SQRT_LIBM = @SQRT_LIBM@
|
||||
U = @U@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
YACC = @YACC@
|
||||
install_sh = @install_sh@
|
||||
l = @l@
|
||||
|
||||
|
||||
EXTRA_DIST = README Makefile.am.in \
|
||||
afs.m4 \
|
||||
assert.m4 \
|
||||
bison.m4 \
|
||||
check-decl.m4 \
|
||||
check-type.m4 \
|
||||
chown.m4 \
|
||||
const.m4 \
|
||||
d-ino.m4 \
|
||||
d-type.m4 \
|
||||
decl.m4 \
|
||||
@@ -134,11 +129,11 @@ jm-winsz2.m4 \
|
||||
largefile.m4 \
|
||||
lchown.m4 \
|
||||
lcmessage.m4 \
|
||||
link-follow.m4 \
|
||||
ls-mntd-fs.m4 \
|
||||
lstat.m4 \
|
||||
malloc.m4 \
|
||||
memcmp.m4 \
|
||||
mktime.m4 \
|
||||
perl.m4 \
|
||||
prereq.m4 \
|
||||
progtest.m4 \
|
||||
@@ -186,15 +181,10 @@ TAGS:
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnits m4/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
cp -pR $$d/$$file $(distdir); \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
@@ -237,6 +227,7 @@ distclean-generic:
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
-rm -f Makefile.in
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
8
m4/bison.m4
Normal file
8
m4/bison.m4
Normal file
@@ -0,0 +1,8 @@
|
||||
#serial 1
|
||||
|
||||
AC_DEFUN(jm_BISON,
|
||||
[
|
||||
# getdate.y works with bison only.
|
||||
: ${YACC='bison -y'}
|
||||
AC_SUBST(YACC)
|
||||
])
|
||||
@@ -1,30 +0,0 @@
|
||||
#serial 2
|
||||
|
||||
dnl Just like AC_CHECK_TYPE from autoconf-2.12, but also checks in unistd.h
|
||||
dnl on systems that have it. Fujitsu UXP/V needs this for ssize_t.
|
||||
dnl Now, also uses the three-argument form of AC_DEFINE.
|
||||
|
||||
undefine([AC_CHECK_TYPE])
|
||||
dnl AC_CHECK_TYPE(TYPE, DEFAULT)
|
||||
AC_DEFUN(AC_CHECK_TYPE,
|
||||
[AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||
AC_CHECK_HEADERS(unistd.h)
|
||||
AC_MSG_CHECKING(for $1)
|
||||
AC_CACHE_VAL(ac_cv_type_$1,
|
||||
[AC_EGREP_CPP(dnl
|
||||
changequote(<<,>>)dnl
|
||||
<<$1[^a-zA-Z_0-9]>>dnl
|
||||
changequote([,]), [#include <sys/types.h>
|
||||
#if STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
# include <stddef.h>
|
||||
#endif
|
||||
#if HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
|
||||
AC_MSG_RESULT($ac_cv_type_$1)
|
||||
if test $ac_cv_type_$1 = no; then
|
||||
AC_DEFINE($1, $2,
|
||||
[ Define to \`$2' if certain system header files doesn't define it.])
|
||||
fi
|
||||
])
|
||||
66
m4/const.m4
66
m4/const.m4
@@ -1,66 +0,0 @@
|
||||
#serial 1
|
||||
|
||||
dnl Just like AC_C_CONST from autoconf-2.12, but with an initializer
|
||||
dnl for `charset x' and with
|
||||
dnl AC_DEFINE(const, )
|
||||
dnl changed to
|
||||
dnl AC_DEFINE_UNQUOTED(const, [/* empty */])
|
||||
dnl to avoid this warning:
|
||||
dnl [...]/m4: Warning: Excess arguments to built-in `define' ignored
|
||||
|
||||
undefine([AC_C_CONST])
|
||||
AC_DEFUN(AC_C_CONST,
|
||||
[dnl This message is consistent in form with the other checking messages,
|
||||
dnl and with the result message.
|
||||
AC_CACHE_CHECK([for working const], ac_cv_c_const,
|
||||
[AC_TRY_COMPILE(,
|
||||
changequote(<<, >>)dnl
|
||||
<<
|
||||
/* Ultrix mips cc rejects this. */
|
||||
typedef int charset[2]; const charset x = {0, 0};
|
||||
/* SunOS 4.1.1 cc rejects this. */
|
||||
char const *const *ccp;
|
||||
char **p;
|
||||
/* NEC SVR4.0.2 mips cc rejects this. */
|
||||
struct point {int x, y;};
|
||||
static struct point const zero = {0,0};
|
||||
/* AIX XL C 1.02.0.0 rejects this.
|
||||
It does not let you subtract one const X* pointer from another in an arm
|
||||
of an if-expression whose if-part is not a constant expression */
|
||||
const char *g = "string";
|
||||
ccp = &g + (g ? g-g : 0);
|
||||
/* HPUX 7.0 cc rejects these. */
|
||||
++ccp;
|
||||
p = (char**) ccp;
|
||||
ccp = (char const *const *) p;
|
||||
{ /* SCO 3.2v4 cc rejects this. */
|
||||
char *t;
|
||||
char const *s = 0 ? (char *) 0 : (char const *) 0;
|
||||
|
||||
*t++ = 0;
|
||||
}
|
||||
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
|
||||
int x[] = {25, 17};
|
||||
const int *foo = &x[0];
|
||||
++foo;
|
||||
}
|
||||
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
|
||||
typedef const int *iptr;
|
||||
iptr p = 0;
|
||||
++p;
|
||||
}
|
||||
{ /* AIX XL C 1.02.0.0 rejects this saying
|
||||
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
|
||||
struct s { int j; const int *ap[3]; };
|
||||
struct s *b; b->j = 5;
|
||||
}
|
||||
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
|
||||
const int foo = 10;
|
||||
}
|
||||
>>,
|
||||
changequote([, ])dnl
|
||||
ac_cv_c_const=yes, ac_cv_c_const=no)])
|
||||
if test $ac_cv_c_const = no; then
|
||||
AC_DEFINE_UNQUOTED(const, [/* empty */])
|
||||
fi
|
||||
])
|
||||
@@ -37,14 +37,14 @@ fi
|
||||
AC_REPLACE_FUNCS(getloadavg)
|
||||
|
||||
if test $ac_cv_func_getloadavg = yes; then
|
||||
AC_DEFINE(HAVE_GETLOADAVG)
|
||||
AC_DEFINE(HAVE_GETLOADAVG, 1, [FIXME])
|
||||
ac_have_func=yes
|
||||
else
|
||||
AC_DEFINE(C_GETLOADAVG, 1, [Define if using getloadavg.c.])
|
||||
# Figure out what our getloadavg.c needs.
|
||||
ac_have_func=no
|
||||
AC_CHECK_HEADER(sys/dg_sys_info.h,
|
||||
[ac_have_func=yes; AC_DEFINE(DGUX)
|
||||
[ac_have_func=yes; AC_DEFINE(DGUX, 1, [FIXME])
|
||||
AC_CHECK_LIB(dgc, dg_sys_info)])
|
||||
|
||||
AC_CHECK_HEADER(locale.h)
|
||||
@@ -54,18 +54,18 @@ else
|
||||
# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
|
||||
# Irix 4.0.5F has the header but not the library.
|
||||
if test $ac_have_func = no && test $ac_cv_lib_elf_elf_begin = yes; then
|
||||
ac_have_func=yes; AC_DEFINE(SVR4)
|
||||
ac_have_func=yes; AC_DEFINE(SVR4, 1, [FIXME])
|
||||
fi
|
||||
|
||||
if test $ac_have_func = no; then
|
||||
AC_CHECK_HEADER(inq_stats/cpustats.h,
|
||||
[ac_have_func=yes; AC_DEFINE(UMAX)
|
||||
AC_DEFINE(UMAX4_3)])
|
||||
[ac_have_func=yes; AC_DEFINE(UMAX, 1, [FIXME])
|
||||
AC_DEFINE(UMAX4_3, 1, [FIXME])])
|
||||
fi
|
||||
|
||||
if test $ac_have_func = no; then
|
||||
AC_CHECK_HEADER(sys/cpustats.h,
|
||||
[ac_have_func=yes; AC_DEFINE(UMAX)])
|
||||
[ac_have_func=yes; AC_DEFINE(UMAX, 1, [FIXME])])
|
||||
fi
|
||||
|
||||
if test $ac_have_func = no; then
|
||||
@@ -73,13 +73,13 @@ else
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER(nlist.h,
|
||||
[AC_DEFINE(NLIST_STRUCT)
|
||||
[AC_DEFINE(NLIST_STRUCT, 1, [FIXME])
|
||||
AC_CACHE_CHECK([for n_un in struct nlist], ac_cv_struct_nlist_n_un,
|
||||
[AC_TRY_COMPILE([#include <nlist.h>],
|
||||
[struct nlist n; n.n_un.n_name = 0;],
|
||||
ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])
|
||||
if test $ac_cv_struct_nlist_n_un = yes; then
|
||||
AC_DEFINE(NLIST_NAME_UNION)
|
||||
AC_DEFINE(NLIST_NAME_UNION, 1, [FIXME])
|
||||
fi
|
||||
])dnl
|
||||
fi # Do not have getloadavg in system libraries.
|
||||
@@ -95,7 +95,7 @@ Yowza Am I SETGID yet
|
||||
#endif],
|
||||
ac_cv_func_getloadavg_setgid=yes, ac_cv_func_getloadavg_setgid=no)])
|
||||
if test $ac_cv_func_getloadavg_setgid = yes; then
|
||||
NEED_SETGID=true; AC_DEFINE(GETLOADAVG_PRIVILEGED)
|
||||
NEED_SETGID=true; AC_DEFINE(GETLOADAVG_PRIVILEGED, 1, [FIXME])
|
||||
else
|
||||
NEED_SETGID=false
|
||||
fi
|
||||
|
||||
@@ -160,7 +160,7 @@ AC_DEFUN(AM_WITH_NLS,
|
||||
# Clean out junk possibly left behind by a previous configuration.
|
||||
rm -f intl/libintl.h
|
||||
fi
|
||||
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
|
||||
AC_CONFIG_LINKS($nls_cv_header_intl:$nls_cv_header_libgt)
|
||||
AC_OUTPUT_COMMANDS(
|
||||
[case "$CONFIG_FILES" in *po/Makefile.in*)
|
||||
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
|
||||
@@ -305,7 +305,7 @@ strdup __argz_count __argz_stringify __argz_next])
|
||||
test -d po || mkdir po
|
||||
changequote(, )dnl
|
||||
case "$srcdir" in
|
||||
.)
|
||||
.)
|
||||
posrcprefix="../" ;;
|
||||
/* | [A-Za-z]:*)
|
||||
posrcprefix="$srcdir/" ;;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#serial 7
|
||||
#serial 10
|
||||
|
||||
dnl Misc type-related macros for fileutils, sh-utils, textutils.
|
||||
|
||||
AC_DEFUN(jm_MACROS,
|
||||
[
|
||||
AC_PREREQ(2.14.1) dnl Minimum Autoconf version required.
|
||||
AC_PREREQ(2.14a)
|
||||
|
||||
GNU_PACKAGE="GNU $PACKAGE"
|
||||
AC_DEFINE_UNQUOTED(GNU_PACKAGE, "$GNU_PACKAGE",
|
||||
[The concatenation of the strings \`GNU ', and PACKAGE.])
|
||||
[The concatenation of the strings `GNU ', and PACKAGE.])
|
||||
AC_SUBST(GNU_PACKAGE)
|
||||
|
||||
dnl This macro actually runs replacement code. See isc-posix.m4.
|
||||
@@ -16,6 +16,7 @@ AC_DEFUN(jm_MACROS,
|
||||
|
||||
jm_INCLUDED_REGEX([lib/regex.c])
|
||||
|
||||
AC_REQUIRE([jm_BISON])
|
||||
AC_REQUIRE([jm_ASSERT])
|
||||
AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
|
||||
AC_REQUIRE([jm_STRUCT_UTIMBUF])
|
||||
@@ -38,8 +39,14 @@ AC_DEFUN(jm_MACROS,
|
||||
AC_REQUIRE([jm_FUNC_FNMATCH])
|
||||
AC_REQUIRE([jm_AFS])
|
||||
AC_REQUIRE([jm_AC_PREREQ_XSTRTOUMAX])
|
||||
AC_REQUIRE([jm_AC_FUNC_LINK_FOLLOWS_SYMLINK])
|
||||
|
||||
AC_REPLACE_FUNCS(strcasecmp strncasecmp)
|
||||
AC_REPLACE_FUNCS(dup2)
|
||||
|
||||
dnl used by e.g. intl/*domain.c and lib/canon-host.c
|
||||
AC_REPLACE_FUNCS(strdup)
|
||||
|
||||
AC_REPLACE_FUNCS(memchr)
|
||||
AC_REPLACE_FUNCS(memmove)
|
||||
AC_CHECK_FUNCS(getpagesize)
|
||||
@@ -64,6 +71,24 @@ AC_DEFUN(jm_MACROS,
|
||||
|
||||
AC_DEFUN(jm_CHECK_ALL_TYPES,
|
||||
[
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_BIGENDIAN
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_C_LONG_DOUBLE
|
||||
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_MEMBERS((struct stat.st_blksize))
|
||||
AC_STRUCT_ST_BLOCKS
|
||||
|
||||
AC_STRUCT_TM
|
||||
AC_HEADER_TIME
|
||||
AC_STRUCT_TIMEZONE
|
||||
AC_HEADER_STAT
|
||||
AC_STRUCT_ST_MTIM_NSEC
|
||||
AC_STRUCT_ST_DM_MODE
|
||||
|
||||
AC_TYPE_GETGROUPS
|
||||
AC_TYPE_MODE_T
|
||||
AC_TYPE_OFF_T
|
||||
@@ -72,7 +97,11 @@ AC_DEFUN(jm_CHECK_ALL_TYPES,
|
||||
AC_TYPE_SIZE_T
|
||||
AC_TYPE_UID_T
|
||||
AC_CHECK_TYPE(ino_t, unsigned long)
|
||||
|
||||
dnl This relies on the fact that autoconf 2.14a's implementation of
|
||||
dnl AC_CHECK_TYPE checks includes unistd.h.
|
||||
AC_CHECK_TYPE(ssize_t, int)
|
||||
|
||||
AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])
|
||||
AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
|
||||
])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl From Jim Meyering.
|
||||
#serial 2
|
||||
#serial 3
|
||||
AC_DEFUN(jm_HEADER_TIOCGWINSZ_IN_TERMIOS_H,
|
||||
[AC_REQUIRE([AM_SYS_POSIX_TERMIOS])
|
||||
AC_CACHE_CHECK([whether use of TIOCGWINSZ requires termios.h],
|
||||
@@ -21,6 +21,6 @@ AC_DEFUN(jm_HEADER_TIOCGWINSZ_IN_TERMIOS_H,
|
||||
AC_DEFUN(jm_WINSIZE_IN_PTEM,
|
||||
[AC_CHECK_HEADER([sys/ptem.h],
|
||||
AC_DEFINE(WINSIZE_IN_PTEM, 1,
|
||||
[Define if your system defines \`struct winsize' in sys/ptem.h.]))
|
||||
[Define if your system defines `struct winsize' in sys/ptem.h.]))
|
||||
]
|
||||
)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 4
|
||||
#serial 7
|
||||
|
||||
dnl By default, many hosts won't let programs access large files;
|
||||
dnl one must use special compiler options to get large-file access to work.
|
||||
@@ -12,10 +12,21 @@ dnl AC_SYS_LARGEFILE_FLAGS(FLAGSNAME)
|
||||
AC_DEFUN(AC_SYS_LARGEFILE_FLAGS,
|
||||
[AC_CACHE_CHECK([for $1 value to request large file support],
|
||||
ac_cv_sys_largefile_$1,
|
||||
[ac_cv_sys_largefile_$1=`($GETCONF LFS_$1) 2>/dev/null` || {
|
||||
[if ($GETCONF LFS_$1) >conftest.1 2>conftest.2 && test ! -s conftest.2
|
||||
then
|
||||
ac_cv_sys_largefile_$1=`cat conftest.1`
|
||||
else
|
||||
ac_cv_sys_largefile_$1=no
|
||||
ifelse($1, CFLAGS,
|
||||
[case "$host_os" in
|
||||
# HP-UX 10.20 requires -D__STDC_EXT__ with gcc 2.95.1.
|
||||
changequote(, )dnl
|
||||
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
|
||||
changequote([, ])dnl
|
||||
if test "$GCC" = yes; then
|
||||
ac_cv_sys_largefile_CFLAGS=-D__STDC_EXT__
|
||||
fi
|
||||
;;
|
||||
# IRIX 6.2 and later require cc -n32.
|
||||
changequote(, )dnl
|
||||
irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
|
||||
@@ -23,12 +34,15 @@ changequote([, ])dnl
|
||||
if test "$GCC" != yes; then
|
||||
ac_cv_sys_largefile_CFLAGS=-n32
|
||||
fi
|
||||
esac
|
||||
if test "$ac_cv_sys_largefile_CFLAGS" != no; then
|
||||
ac_save_CC="$CC"
|
||||
CC="$CC $ac_cv_sys_largefile_CFLAGS"
|
||||
AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no)
|
||||
CC="$ac_save_CC"
|
||||
esac])
|
||||
}])])
|
||||
fi])
|
||||
fi
|
||||
rm -f conftest*])])
|
||||
|
||||
dnl Internal subroutine of AC_SYS_LARGEFILE.
|
||||
dnl AC_SYS_LARGEFILE_SPACE_APPEND(VAR, VAL)
|
||||
@@ -89,7 +103,7 @@ AC_DEFUN(AC_SYS_LARGEFILE,
|
||||
AC_SYS_LARGEFILE_SPACE_APPEND(LIBS, "$ac_cv_sys_largefile_LIBS")
|
||||
AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS,
|
||||
ac_cv_sys_file_offset_bits,
|
||||
[Number of bits in a file offset, on hosts where this is settable.]
|
||||
[Number of bits in a file offset, on hosts where this is settable.],
|
||||
[case "$host_os" in
|
||||
# HP-UX 10.20 and later
|
||||
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
|
||||
|
||||
64
m4/link-follow.m4
Normal file
64
m4/link-follow.m4
Normal file
@@ -0,0 +1,64 @@
|
||||
#serial 1
|
||||
dnl Run a program to determine whether whether link(2) follows symlinks.
|
||||
dnl Set LINK_FOLLOWS_SYMLINKS accordingly.
|
||||
|
||||
AC_DEFUN(jm_AC_FUNC_LINK_FOLLOWS_SYMLINK,
|
||||
[dnl
|
||||
AC_CACHE_CHECK([whether link(2) follows symlinks],
|
||||
jm_ac_cv_func_link_follows_symlink,
|
||||
[
|
||||
dnl poor-man's AC_REQUIRE: FIXME: repair this once autoconf-3 provides
|
||||
dnl the appropriate framework.
|
||||
test -z "$ac_cv_header_unistd_h" \
|
||||
&& AC_CHECK_HEADERS(unistd.h)
|
||||
|
||||
# Create a regular file.
|
||||
echo > conftest.file
|
||||
AC_TRY_RUN(
|
||||
[
|
||||
# include <sys/types.h>
|
||||
# include <sys/stat.h>
|
||||
# ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
# endif
|
||||
|
||||
# define SAME_INODE(Stat_buf_1, Stat_buf_2) \
|
||||
((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
|
||||
&& (Stat_buf_1).st_dev == (Stat_buf_2).st_dev)
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
const char *file = "conftest.file";
|
||||
const char *sym = "conftest.sym";
|
||||
const char *hard = "conftest.hard";
|
||||
struct stat sb_file, sb_hard;
|
||||
|
||||
/* Create a symlink to the regular file. */
|
||||
if (symlink (file, sym))
|
||||
abort ();
|
||||
|
||||
/* Create a hard link to that symlink. */
|
||||
if (link (sym, hard))
|
||||
abort ();
|
||||
|
||||
if (lstat (hard, &sb_hard))
|
||||
abort ();
|
||||
if (lstat (file, &sb_file))
|
||||
abort ();
|
||||
|
||||
/* If the dev/inode of hard and file are the same, then
|
||||
the link call followed the symlink. */
|
||||
return SAME_INODE (sb_hard, sb_file) ? 0 : 1;
|
||||
}
|
||||
],
|
||||
jm_ac_cv_func_link_follows_symlink=yes,
|
||||
jm_ac_cv_func_link_follows_symlink=no,
|
||||
jm_ac_cv_func_link_follows_symlink=yes dnl We're cross compiling.
|
||||
)
|
||||
])
|
||||
if test $jm_ac_cv_func_link_follows_symlink = yes; then
|
||||
AC_DEFINE(LINK_FOLLOWS_SYMLINKS, 1,
|
||||
[Define if `link(2)' dereferences symbolic links.])
|
||||
fi
|
||||
])
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 2
|
||||
#serial 3
|
||||
|
||||
dnl From Jim Meyering.
|
||||
dnl
|
||||
@@ -11,6 +11,8 @@ dnl FIXME: add AC_REQUIRE uses to pull in all definitions required
|
||||
dnl for all uses of $ac_cv_func_* and $ac_cv_header_* variables below.
|
||||
dnl
|
||||
|
||||
AC_PREREQ(2.14a)
|
||||
|
||||
AC_DEFUN(jm_LIST_MOUNTED_FILESYSTEMS,
|
||||
[
|
||||
# Determine how to get the list of mounted filesystems.
|
||||
@@ -130,7 +132,7 @@ if test -z "$list_mounted_fs"; then
|
||||
AC_DEFINE(MOUNTED_VMOUNT, 1,
|
||||
[Define if there is a function named mntctl that can be used to read
|
||||
the list of mounted filesystems, and there is a system header file
|
||||
that declares \`struct vmount.' (AIX)])
|
||||
that declares `struct vmount.' (AIX)])
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
170
m4/mktime.m4
170
m4/mktime.m4
@@ -1,170 +0,0 @@
|
||||
#serial 1000
|
||||
|
||||
dnl From Paul Eggert
|
||||
dnl Check for a working mktime.
|
||||
dnl This is a preview of what should appear in the next public autoconf release.
|
||||
|
||||
dnl Override any existing definition.
|
||||
undefine([AC_FUNC_MKTIME])
|
||||
|
||||
AC_DEFUN(AC_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], ac_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;
|
||||
now = mktime (&tm);
|
||||
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;
|
||||
|
||||
/* This test makes some buggy mktime implementations loop.
|
||||
Give up after 60 seconds; a mktime slower than that
|
||||
isn't worth using anyway. */
|
||||
alarm (60);
|
||||
|
||||
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 ();
|
||||
spring_forward_gap ();
|
||||
exit (0);
|
||||
}
|
||||
>>,
|
||||
changequote([, ])dnl
|
||||
ac_cv_func_working_mktime=yes, ac_cv_func_working_mktime=no,
|
||||
ac_cv_func_working_mktime=no)])
|
||||
if test $ac_cv_func_working_mktime = no; then
|
||||
LIBOBJS="$LIBOBJS mktime.${ac_objext}"
|
||||
fi
|
||||
])
|
||||
@@ -1,8 +1,8 @@
|
||||
#serial 3
|
||||
#serial 4
|
||||
|
||||
dnl From Paul Eggert.
|
||||
|
||||
AC_PREREQ(2.13)
|
||||
AC_PREREQ(2.14a)
|
||||
|
||||
# Define uintmax_t to `unsigned long' or `unsigned long long'
|
||||
# if <inttypes.h> does not exist.
|
||||
@@ -16,7 +16,7 @@ AC_DEFUN(jm_AC_TYPE_UINTMAX_T,
|
||||
&& ac_type='unsigned long long' \
|
||||
|| ac_type='unsigned long'
|
||||
AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
|
||||
[ Define to \`unsigned long' or \`unsigned long long'
|
||||
[ Define to `unsigned long' or `unsigned long long'
|
||||
if <inttypes.h> doesn't define.])
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
basename \- strip directory and suffix from filenames
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
cat \- concatenate files and print on the standard output
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
chgrp \- change group ownership
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
[NAME]
|
||||
chmod \- change file access permissions
|
||||
[DESCRIPTION]
|
||||
This manual page
|
||||
documents the GNU version of
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
[NAME]
|
||||
chown \- change file owner and group
|
||||
[DESCRIPTION]
|
||||
This manual page
|
||||
documents the GNU version of
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
chroot \- run command or interactive shell with special root directory
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
cksum \- checksum and count the bytes in a file
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
comm \- compare two sorted files line by line
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
18
man/cp.x
18
man/cp.x
@@ -1,18 +1,4 @@
|
||||
.\" 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.
|
||||
.\"
|
||||
[NAME]
|
||||
cp \- copy files and directories
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
csplit \- split a file into sections determined by context lines
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
cut \- remove sections from each line of files
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
date \- print or set the system date and time
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
2
man/dd.x
2
man/dd.x
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
dd \- convert and copy a file
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
18
man/df.x
18
man/df.x
@@ -1,19 +1,5 @@
|
||||
.\" 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.
|
||||
.\"
|
||||
[NAME]
|
||||
df \- report filesystem disk space usage
|
||||
[DESCRIPTION]
|
||||
This manual page
|
||||
documents the GNU version of
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
dir \- list directory contents
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
dircolors \- color setup for ls
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
dirname \- strip non-directory suffix from file name
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
2
man/du.x
2
man/du.x
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
du \- estimate file space usage
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
echo \- display a line of text
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
env \- run a program in a modified environment
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
expand \- convert tabs to spaces
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
expr \- evaluate expressions
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
false \- do nothing, unsuccessfully
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
fmt \- simple optimal text formatter
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
fold \- wrap each input line to fit in specified width
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
groups \- print the groups a user is in
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
head \- output the first part of files
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
498
man/help2man
498
man/help2man
@@ -18,6 +18,7 @@
|
||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# Written by Brendan O'Dea <bod@compusol.com.au>
|
||||
# Available from ftp://ftp.gnu.org/gnu/help2man/
|
||||
|
||||
use 5.004;
|
||||
use strict;
|
||||
@@ -26,7 +27,7 @@ use Text::Tabs qw(expand);
|
||||
use POSIX qw(strftime setlocale LC_TIME);
|
||||
|
||||
my $this_program = 'help2man';
|
||||
my $this_version = '1.012';
|
||||
my $this_version = '1.019';
|
||||
my $version_info = <<EOT;
|
||||
$this_program $this_version
|
||||
|
||||
@@ -49,21 +50,21 @@ Usage: $this_program [OPTION]... EXECUTABLE
|
||||
-o, --output=FILE send output to `FILE'
|
||||
-N, --no-info suppress pointer to Texinfo manual
|
||||
--help print this help, then exit
|
||||
--version print $this_program program version number, then exit
|
||||
--version print version number, then exit
|
||||
|
||||
EXECUTABLE should accept `--help' and `--version' options.
|
||||
EOT
|
||||
|
||||
my $section = 1;
|
||||
my ($include, $opt_name, $opt_include, $opt_output, $opt_no_info);
|
||||
my ($opt_name, @opt_include, $opt_output, $opt_no_info);
|
||||
|
||||
# Parse options.
|
||||
Getopt::Long::config('bundling');
|
||||
GetOptions (
|
||||
'n|name=s' => \$opt_name,
|
||||
's|section=s' => \$section,
|
||||
'i|include=s' => \$include,
|
||||
'I|opt-include=s' => \$opt_include,
|
||||
'i|include=s' => sub { push @opt_include, [ pop, 1 ] },
|
||||
'I|opt-include=s' => sub { push @opt_include, [ pop, 0 ] },
|
||||
'o|output=s' => \$opt_output,
|
||||
'N|no-info' => \$opt_no_info,
|
||||
help => sub { print $help_info; exit },
|
||||
@@ -73,71 +74,95 @@ GetOptions (
|
||||
die $help_info unless @ARGV == 1;
|
||||
|
||||
my %include = ();
|
||||
my @include = (); # to retain order
|
||||
my %append = ();
|
||||
my @include = (); # retain order given in include file
|
||||
|
||||
# Provide replacement `quote-regex' operator for pre-5.005.
|
||||
BEGIN { eval q(sub qr { '' =~ $_[0]; $_[0] }) if $] < 5.005 }
|
||||
|
||||
# Process include file (if given). Format is:
|
||||
#
|
||||
# [section name]
|
||||
# verbatim text
|
||||
# [section name]
|
||||
# verbatim text
|
||||
#
|
||||
# or
|
||||
#
|
||||
# /pattern/
|
||||
# verbatim text
|
||||
#
|
||||
|
||||
if ($include or $opt_include)
|
||||
for (@opt_include)
|
||||
{
|
||||
if (open INC, $include || $opt_include)
|
||||
{
|
||||
my $sect;
|
||||
my ($inc, $required) = @$_;
|
||||
|
||||
while (<INC>)
|
||||
next unless -f $inc or $required;
|
||||
die "$this_program: can't open `$inc' ($!)\n"
|
||||
unless open INC, $inc;
|
||||
|
||||
my $key;
|
||||
my $hash = \%include;
|
||||
|
||||
while (<INC>)
|
||||
{
|
||||
# [section]
|
||||
if (/^\[([^]]+)\]/)
|
||||
{
|
||||
if (/^\[([^]]+)\]/)
|
||||
$key = uc $1;
|
||||
$key =~ s/^\s+//;
|
||||
$key =~ s/\s+$//;
|
||||
$hash = \%include;
|
||||
push @include, $key unless $include{$key};
|
||||
next;
|
||||
}
|
||||
|
||||
# /pattern/
|
||||
if (m!^/(.*)/([ims]*)!)
|
||||
{
|
||||
my $pat = $2 ? "(?$2)$1" : $1;
|
||||
|
||||
# Check pattern.
|
||||
eval { $key = qr($pat) };
|
||||
if ($@)
|
||||
{
|
||||
$sect = uc $1;
|
||||
$sect =~ s/^\s+//;
|
||||
$sect =~ s/\s+$//;
|
||||
next;
|
||||
$@ =~ s/ at .*? line \d.*//;
|
||||
die "$inc:$.:$@";
|
||||
}
|
||||
|
||||
# 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} .= $_;
|
||||
$hash = \%append;
|
||||
next;
|
||||
}
|
||||
|
||||
close INC;
|
||||
# Silently ignore anything before the first
|
||||
# section--allows for comments and revision info.
|
||||
next unless $key;
|
||||
|
||||
die "$this_program: no valid information found in `$include'\n"
|
||||
unless %include;
|
||||
$hash->{$key} ||= '';
|
||||
$hash->{$key} .= $_;
|
||||
}
|
||||
|
||||
# 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;
|
||||
}
|
||||
close INC;
|
||||
|
||||
die "$this_program: no valid information found in `$inc'\n"
|
||||
unless $key;
|
||||
}
|
||||
|
||||
# Compress trailing blank lines.
|
||||
for my $hash (\(%include, %append))
|
||||
{
|
||||
for (keys %$hash) { $hash->{$_} =~ s/\n+$/\n/ }
|
||||
}
|
||||
|
||||
# Turn off localisation of executable's ouput.
|
||||
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
|
||||
|
||||
# Turn off localisation of date (for strftime)
|
||||
# Turn off localisation of date (for strftime).
|
||||
setlocale LC_TIME, 'C';
|
||||
|
||||
# Expand tabs, strip trailing spaces and break into paragraphs
|
||||
sub paragraphs { split /\n\n+/, join '', expand @_ }
|
||||
|
||||
# Grab help and version paragraphs from executable
|
||||
my @help = paragraphs `$ARGV[0] --help 2>/dev/null`
|
||||
or die "$this_program: can't get `--help' info from $ARGV[0]\n";
|
||||
|
||||
my @version = paragraphs `$ARGV[0] --version 2>/dev/null`
|
||||
or die "$this_program: can't get `--version' info from $ARGV[0]\n";
|
||||
# Grab help and version info from executable.
|
||||
my ($help_text, $version_text) = map {
|
||||
join '', map { s/ +$//; expand $_ } `$ARGV[0] --$_ 2>/dev/null`
|
||||
or die "$this_program: can't get `--$_' info from $ARGV[0]\n"
|
||||
} qw(help version);
|
||||
|
||||
my $date = strftime "%B %Y", localtime;
|
||||
(my $program = $ARGV[0]) =~ s!.*/!!;
|
||||
@@ -165,7 +190,7 @@ if ($opt_output)
|
||||
#
|
||||
# and seperated from any copyright/author details by a blank line.
|
||||
|
||||
$_ = shift @version;
|
||||
($_, $version_text) = split /\n+/, $version_text, 2;
|
||||
|
||||
if (/^(\S+) +\(((?:GNU|Free) +[^)]+)\) +(.*)/ or
|
||||
/^(\S+) +- *((?:GNU|Free) +\S+) +(.*)/)
|
||||
@@ -187,160 +212,241 @@ else
|
||||
|
||||
$program =~ s!.*/!!;
|
||||
|
||||
# no info for `info' itself
|
||||
# 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;
|
||||
# --name overrides --include contents.
|
||||
$include{NAME} = "$program \\- $opt_name\n" if $opt_name;
|
||||
|
||||
# Default (useless) NAME paragraph
|
||||
$include{NAME} ||= "$program \\- manual page for $program $version";
|
||||
# Default (useless) NAME paragraph.
|
||||
$include{NAME} ||= "$program \\- manual page for $program $version\n";
|
||||
|
||||
# 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 "$section" "$date" "$package $version" FSF
|
||||
.SH NAME
|
||||
$include{NAME}
|
||||
EOT
|
||||
# Extract usage clause(s) [if any] for SYNOPSIS.
|
||||
if ($help_text =~ s/^Usage:( +(\S+))(.*)((?:\n(?: {6}\1| *or: +\S).*)*)//m)
|
||||
{
|
||||
my @syn = $2 . $3;
|
||||
|
||||
my $break;
|
||||
my $accumulate = 1;
|
||||
my @description = ();
|
||||
if ($_ = $4)
|
||||
{
|
||||
s/^\n//;
|
||||
for (split /\n/) { s/^ *(or: +)?//; push @syn, $_ }
|
||||
}
|
||||
|
||||
my $synopsis = '';
|
||||
for (@syn)
|
||||
{
|
||||
$synopsis .= ".br\n" if $synopsis;
|
||||
s/(\S+) *//;
|
||||
$synopsis .= ".B $1\n";
|
||||
s/\s+$//;
|
||||
s/(([][]|\.\.+)+)/\\fR$1\\fI/g;
|
||||
s/^/\\fI/ unless s/^\\fR//;
|
||||
$_ .= '\fR';
|
||||
s/(\\fI)( *)/$2$1/g;
|
||||
s/\\fI\\fR//g;
|
||||
s/^\\fR//;
|
||||
s/\\fI$//;
|
||||
s/^\./\\&./;
|
||||
|
||||
$synopsis .= "$_\n";
|
||||
}
|
||||
|
||||
$include{SYNOPSIS} ||= $synopsis;
|
||||
}
|
||||
|
||||
# Process text, initial section is DESCRIPTION.
|
||||
my $sect = 'DESCRIPTION';
|
||||
$_ = "$help_text\n\n$version_text";
|
||||
|
||||
# Normalise paragraph breaks.
|
||||
s/^\n+//;
|
||||
s/\n*$/\n/;
|
||||
s/\n\n+/\n\n/g;
|
||||
|
||||
# Temporarily exchange leading dots and backslashes for tokens.
|
||||
s/^\./\x80/mg;
|
||||
s/\\/\x81/g;
|
||||
|
||||
# Start a new paragraph (if required) for these.
|
||||
s/([^\n])\n(Report +bugs|Email +bug +reports +to|Written +by)/$1\n\n$2/g;
|
||||
|
||||
sub convert_option;
|
||||
|
||||
# Output converted --help information.
|
||||
for (@help)
|
||||
while (length)
|
||||
{
|
||||
chomp;
|
||||
|
||||
if (s/^Usage: +\S+ +(.*)\n?//)
|
||||
# Convert some standard paragraph names.
|
||||
if (s/^(Options|Examples): *\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( *)\\fR/$1/g;
|
||||
|
||||
$synopsis .= ".br\n" unless $accumulate;
|
||||
$synopsis .= ".B $program\n";
|
||||
$synopsis .= "$syn\n";
|
||||
$accumulate = 0;
|
||||
} while s/^(?:Usage| *or): +\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};
|
||||
}
|
||||
|
||||
$break = 1;
|
||||
next unless $_;
|
||||
}
|
||||
|
||||
# Accumulate text if the synopsis has not been produced yet.
|
||||
if ($accumulate)
|
||||
{
|
||||
push @description, ".PP\n" if @description;
|
||||
push @description, "$_\n";
|
||||
$sect = uc $1;
|
||||
next;
|
||||
}
|
||||
|
||||
# Convert some standard paragraph names
|
||||
if (s/^(Options|Examples): *\n//)
|
||||
# Copyright section
|
||||
if (/^Copyright +[(\xa9]/)
|
||||
{
|
||||
print qq(.SH \U$1\n);
|
||||
$break = '';
|
||||
next unless length;
|
||||
$sect = 'COPYRIGHT';
|
||||
$include{$sect} ||= '';
|
||||
$include{$sect} .= ".PP\n" if $include{$sect};
|
||||
|
||||
my $copy;
|
||||
($copy, $_) = split /\n\n/, $_, 2;
|
||||
|
||||
for ($copy)
|
||||
{
|
||||
# Add back newline
|
||||
s/\n*$/\n/;
|
||||
|
||||
# Convert iso9959-1 copyright symbol or (c) to nroff
|
||||
# character.
|
||||
s/^Copyright +(?:\xa9|\([Cc]\))/Copyright \\(co/mg;
|
||||
|
||||
# Insert line breaks before additional copyright messages
|
||||
# and the disclaimer.
|
||||
s/(.)\n(Copyright |This +is +free +software)/$1\n.br\n$2/g;
|
||||
|
||||
# Join hyphenated lines.
|
||||
s/([A-Za-z])-\n */$1/g;
|
||||
}
|
||||
|
||||
$include{$sect} .= $copy;
|
||||
$_ ||= '';
|
||||
next;
|
||||
}
|
||||
|
||||
# Catch bug report text.
|
||||
if (/^Report bugs |^Email bug reports to /)
|
||||
if (/^(Report +bugs|Email +bug +reports +to) /)
|
||||
{
|
||||
print qq(.SH "REPORTING BUGS"\n$_\n);
|
||||
$break = '';
|
||||
$sect = 'REPORTING BUGS';
|
||||
}
|
||||
|
||||
# Author section.
|
||||
elsif (/^Written +by/)
|
||||
{
|
||||
$sect = 'AUTHOR';
|
||||
}
|
||||
|
||||
# Examples, indicated by an indented leading $, % or > are
|
||||
# rendered in a constant width font.
|
||||
if (/^( +)([\$\%>] )\S/)
|
||||
{
|
||||
my $indent = $1;
|
||||
my $prefix = $2;
|
||||
my $break = '.IP';
|
||||
$include{$sect} ||= '';
|
||||
while (s/^$indent\Q$prefix\E(\S.*)\n*//)
|
||||
{
|
||||
$include{$sect} .= "$break\n\\f(CW$prefix$1\\fR\n";
|
||||
$break = '.br';
|
||||
}
|
||||
|
||||
next;
|
||||
}
|
||||
|
||||
# Option subsections have second line indented.
|
||||
if (s/^(\S.*)\n / /)
|
||||
my $matched = '';
|
||||
$include{$sect} ||= '';
|
||||
|
||||
# Sub-sections have a trailing colon and the second line indented.
|
||||
if (s/^(\S.*:) *\n / /)
|
||||
{
|
||||
print qq(.SS "$1"\n);
|
||||
$break = '';
|
||||
$matched .= $& if %append;
|
||||
$include{$sect} .= qq(.SS "$1"\n);
|
||||
}
|
||||
|
||||
my $output = '';
|
||||
while (length)
|
||||
my $indent = 0;
|
||||
my $content = '';
|
||||
|
||||
# Option with description.
|
||||
if (s/^( {1,10}([+-]\S.*?))(?:( +)|\n( {20,}))(\S.*)\n//)
|
||||
{
|
||||
my $indent = 0;
|
||||
|
||||
# Tagged paragraph
|
||||
if (s/^( +(\S.*?) +)(\S.*)\n?//)
|
||||
$matched .= $& if %append;
|
||||
$indent = length ($4 || "$1$3");
|
||||
$content = ".TP\n\x82$2\n\x82$5\n";
|
||||
unless ($4)
|
||||
{
|
||||
$indent = length $1;
|
||||
$output .= ".TP\n$2\n$3\n";
|
||||
$break = 1;
|
||||
# Indent may be different on second line.
|
||||
$indent = length $& if /^ {20,}/;
|
||||
}
|
||||
|
||||
# Indented paragraph
|
||||
elsif (s/^( +)(\S.*)\n?//)
|
||||
{
|
||||
$indent = length $1;
|
||||
$output .= ".IP\n$2\n";
|
||||
$break = 1;
|
||||
}
|
||||
|
||||
# Left justified paragraph
|
||||
else
|
||||
{
|
||||
s/(.*)\n?//;
|
||||
$output .= ".PP\n" if $break;
|
||||
$output .= "$1\n";
|
||||
$break = 1;
|
||||
}
|
||||
|
||||
# Continuations
|
||||
$output .= "$1\n" while s/^ {$indent}(\S.*)\n?//;
|
||||
}
|
||||
|
||||
$_ = $output;
|
||||
# Option without description.
|
||||
elsif (s/^ {1,10}([+-]\S.*)\n//)
|
||||
{
|
||||
$matched .= $& if %append;
|
||||
$content = ".HP\n\x82$1\n";
|
||||
$indent = 80; # not continued
|
||||
}
|
||||
|
||||
# Convert options.
|
||||
s/(^| )(-[][\w=-]+)/$1 . convert_option $2/mge;
|
||||
print;
|
||||
}
|
||||
# Indented paragraph with tag.
|
||||
elsif (s/^( +(\S.*?) +)(\S.*)\n//)
|
||||
{
|
||||
$matched .= $& if %append;
|
||||
$indent = length $1;
|
||||
$content = ".TP\n\x82$2\n\x82$3\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)$/;
|
||||
# Indented paragraph.
|
||||
elsif (s/^( +)(\S.*)\n//)
|
||||
{
|
||||
$matched .= $& if %append;
|
||||
$indent = length $1;
|
||||
$content = ".IP\n\x82$2\n";
|
||||
}
|
||||
|
||||
# Left justified paragraph.
|
||||
else
|
||||
{
|
||||
s/(.*)\n//;
|
||||
$matched .= $& if %append;
|
||||
$content = ".PP\n" if $include{$sect};
|
||||
$content .= "$1\n";
|
||||
}
|
||||
|
||||
# Append continuations.
|
||||
while (s/^ {$indent}(\S.*)\n//)
|
||||
{
|
||||
$matched .= $& if %append;
|
||||
$content .= "\x82$1\n"
|
||||
}
|
||||
|
||||
# Move to next paragraph.
|
||||
s/^\n+//;
|
||||
|
||||
for ($content)
|
||||
{
|
||||
# Leading dot protection.
|
||||
s/\x82\./\x80/g;
|
||||
s/\x82//g;
|
||||
|
||||
# Convert options.
|
||||
s/(^| )(-[][\w=-]+)/$1 . convert_option $2/mge;
|
||||
}
|
||||
|
||||
# Check if matched paragraph contains /pat/.
|
||||
if (%append)
|
||||
{
|
||||
for my $pat (keys %append)
|
||||
{
|
||||
if ($matched =~ $pat)
|
||||
{
|
||||
$content .= ".PP\n" unless $append{$pat} =~ /^\./;
|
||||
$content .= $append{$pat};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$include{$sect} .= $content;
|
||||
}
|
||||
|
||||
# Refer to the real documentation.
|
||||
if ($include{'SEE ALSO'} or !$opt_no_info)
|
||||
unless ($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;
|
||||
$sect = 'SEE ALSO';
|
||||
$include{$sect} ||= '';
|
||||
$include{$sect} .= ".PP\n" if $include{$sect};
|
||||
$include{$sect} .= <<EOT;
|
||||
The full documentation for
|
||||
.B $program
|
||||
is maintained as a Texinfo manual. If the
|
||||
@@ -355,27 +461,33 @@ should give you access to the complete manual.
|
||||
EOT
|
||||
}
|
||||
|
||||
# Output converted --version information.
|
||||
for (@version)
|
||||
# Output header.
|
||||
print <<EOT;
|
||||
.\\" DO NOT MODIFY THIS FILE! It was generated by $this_program $this_version.
|
||||
.TH $PROGRAM "$section" "$date" "$package $version" FSF
|
||||
EOT
|
||||
|
||||
# Section ordering.
|
||||
my @pre = qw(NAME SYNOPSIS DESCRIPTION OPTIONS EXAMPLES);
|
||||
my @post = ('AUTHOR', 'REPORTING BUGS', 'COPYRIGHT', 'SEE ALSO');
|
||||
my $filter = join '|', @pre, @post;
|
||||
|
||||
# Output content.
|
||||
for (@pre, (grep ! /^($filter)$/o, @include), @post)
|
||||
{
|
||||
chomp;
|
||||
|
||||
# Join hyphenated lines.
|
||||
s/([A-Za-z])-\n */$1/g;
|
||||
|
||||
# Convert copyright symbol or (c) to nroff character.
|
||||
s/Copyright +(?:\xa9|\([Cc]\))/Copyright \\(co/g;
|
||||
|
||||
# Insert appropriate headings for copyright and author.
|
||||
if (/^Copyright \\/) { print ".SH COPYRIGHT\n" }
|
||||
elsif (/^Written +by/) { print ".SH AUTHOR\n" }
|
||||
else { print ".PP\n"; }
|
||||
|
||||
# Insert line breaks before additional copyright messages and the
|
||||
# disclaimer.
|
||||
s/(.)\n(Copyright |This is free software)/$1\n.br\n$2/g;
|
||||
|
||||
print "$_\n";
|
||||
if ($include{$_})
|
||||
{
|
||||
my $quote = /\W/ ? '"' : '';
|
||||
print ".SH $quote$_$quote\n";
|
||||
|
||||
for ($include{$_})
|
||||
{
|
||||
# Replace leading dot an backslash tokens.
|
||||
s/\x80/\\&./g;
|
||||
s/\x81/\\e/g;
|
||||
print;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exit;
|
||||
@@ -384,15 +496,15 @@ exit;
|
||||
# embolden. Option arguments get italicised.
|
||||
sub convert_option
|
||||
{
|
||||
my $option = '\fB' . shift;
|
||||
local $_ = '\fB' . shift;
|
||||
|
||||
$option =~ s/-/\\-/g;
|
||||
unless ($option =~ s/\[=(.*)\]$/\\fR[=\\fI$1\\fR]/)
|
||||
s/-/\\-/g;
|
||||
unless (s/\[=(.*)\]$/\\fR[=\\fI$1\\fR]/)
|
||||
{
|
||||
$option =~ s/=(.)/\\fR=\\fI$1/;
|
||||
$option =~ s/ (.)/ \\fI$1/;
|
||||
$option .= '\fR';
|
||||
s/=(.)/\\fR=\\fI$1/;
|
||||
s/ (.)/ \\fI$1/;
|
||||
$_ .= '\fR';
|
||||
}
|
||||
|
||||
$option;
|
||||
$_;
|
||||
}
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
hostid \- print the numeric identifier for the current host
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
hostname \- set or print the name of the current host system
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
2
man/id.x
2
man/id.x
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
id \- print real and effective UIDs and GIDs
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
join \- join lines of two files on a common field
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
2
man/ln.x
2
man/ln.x
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
ln \- make links between files
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
logname \- print user\'s login name
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
2
man/ls.x
2
man/ls.x
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
ls \- list directory contents
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
md5sum \- compute and check MD5 message digest
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
mkdir \- make directories
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
mkfifo \- make FIFOs (named pipes)
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
mknod \- make block or character special files
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
|
||||
2
man/mv.x
2
man/mv.x
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
mv \- move (rename) files
|
||||
[DESCRIPTION]
|
||||
." Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
nice \- run a program with modified scheduling priority
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
2
man/nl.x
2
man/nl.x
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
nl \- number lines of files
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
nohup \- run a command immune to hangups, with output to a non-tty
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
2
man/od.x
2
man/od.x
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
od \- dump files in octal and other formats
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
paste \- merge lines of files
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
pathchk \- check whether file names are valid or portable
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
pinky \- lightweight finger
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
2
man/pr.x
2
man/pr.x
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
pr \- convert text files for printing
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
printenv \- print all or part of environment
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
printf \- format and print data
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
ptx \- produce a permuted index of file contents
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
[NAME]
|
||||
pwd \- print name of current/working directory
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
|
||||
2
man/rm.x
2
man/rm.x
@@ -1,3 +1,5 @@
|
||||
[NAME]
|
||||
rm \- remove files or directories
|
||||
[DESCRIPTION]
|
||||
This manual page
|
||||
documents the GNU version of
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user