Sharutils includes uuencode, uudecode and shar...

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6851 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Phipps 2004-03-02 02:51:51 +00:00
parent 60ec59613c
commit 218f7a3586
157 changed files with 40858 additions and 0 deletions

View File

@ -0,0 +1,203 @@
Notes on the GNU Translation Project
************************************
GNU is going international! The GNU Translation Project is a way to
get maintainers, translators and users all together, so GNU will
gradually become able to speak many native languages. A few packages
already provide native language translation for their messages.
If you found this `ABOUT-NLS' file inside a GNU distribution, you
may assume that the distributed package does use GNU `gettext'
internally, itself available at your nearest GNU archive site. But you
do not need to install GNU `gettext' prior to configuring, installing
or using this package with messages translated.
Installers will find here some useful hints. These notes also
explain how users should proceed for getting the programs to use the
available translations. They tell how people wanting to contribute and
work at translations should contact the appropriate team.
When reporting bugs in the `intl/' directory or bugs which may be
related to internationalization, you should tell about the version of
`gettext' which is used. The information can be found in the
`intl/VERSION' file, in internationalized packages.
One advise in advance
=====================
If you want to exploit the full power of the GNU `gettext' package
you should configure it using
--with-gnu-gettext.
No existing implementation at this point provides so many useful
features (such as locale alias or message inheritance). It is also not
possible to provide this additional functionality on top of a catgets
implementation.
Future versions of GNU `gettext' will very likely provide even more
functionality. So it might be a good idea to change to GNU `gettext'
as soon as possible.
INSTALL Matters
===============
Some GNU packages are "localizable" when properly installed; the
programs they contain can be made to speak your own native language.
Most such packages use GNU `gettext'. Other packages have their own
ways to internationalization, predating GNU `gettext'.
By default, this package will be installed to allow translation of
messages. It will automatically detect whether the system provides
usable `catgets' or `gettext' functions. If neither is available, the
GNU `gettext' own library will be used. However, installers may use
special options at configuration time for changing this behaviour. The
commands:
./configure --with-gnu-gettext
./configure --disable-nls
will respectively bypass system `catgets' or `gettext' to use GNU
`gettext', or else, totally disable translation of messages.
When you already have GNU `gettext' installed on your system and run
configure without an option for your new package, configure will
probably detect the previously built and installed `libintl.a' file and
will decide to use this. This might be not what is desirable. You
should use the more recent version of the GNU `gettext' library. I.e.
if the file `intl/VERSION' shows that the library which comes with this
package is more recent, you should use
./configure --with-gnu-gettext
to prevent auto-detection.
Internationalized packages have usually many `po/LL.po' files, where
LL gives an ISO 639 two-letter code identifying the language. Unless
translations are disabled, all those available are installed together
with the package. However, the environment variable `LINGUAS' may be
set, prior to configuration, to limit the installed set. `LINGUAS'
should then contain a space separated list of two-letter codes, stating
which languages are allowed.
Using This Package
==================
As a user, if your language has been installed for this package, you
only have to set the `LANG' environment variable to the appropriate
ISO 639 `LL' two-letter code prior to using the programs in the
package. For example, let's suppose that you speak German. At the
shell prompt, merely execute `setenv LANG de' (in `csh') or
`export LANG; LANG=de' (in `sh'). This can be done from your `.login'
or `.profile' file, once and for all. Packages which are not
internationalized will merely ignore the setting of this variable.
Translating Teams
=================
The GNU `gettext' tool set contains *everything* maintainers need
for internationalizing their packages for messages. It also contains
quite useful tools for helping translators at localizing messages to
their native language, once a package has already been
internationalized.
To achieve the GNU Translation Project, we need many interested
people who like their own language and write it well, and who are also
able to synergize with other translators speaking the same language.
Each translating team has its own mailing list, courtesy of Linux
International. You may reach your translating team at the address
`LL@li.org', replacing LL by the two-letter ISO 639 code for your
language. Language codes are *not* the same as country codes given in
ISO 3166. The following translating teams exist, as of November 1995:
Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en',
Esperanto `eo', Finnish `fi', French `fr', Irish `ga', German
`de', Greek `el', Italian `it', Japanese `ja', Indonesian `in',
Norwegian `no', Persian `fa', Polish `pl', Portuguese `pt',
Russian `ru', Spanish `es', Swedish `sv', Telugu `te' and Turkish
`tr'.
For example, you may reach the Chinese translating team by writing to
`zh@li.org'.
If you'd like to volunteer to *work* at translating messages, you
should become a member of the translating team for your own language.
The subscribing address is *not* the same as the list itself, it has
`-request' appended. For example, Swedish people can send a message to
`sv-request@li.org', having this message body:
subscribe
Keep in mind that team members should be interested in *working* at
translations, or at solving translational difficulties, rather than
merely lurking around. If your team does not exist yet and you want to
start one, please write to `gnu-translation@prep.ai.mit.edu'; you will
then reach the GNU coordinator for all translator teams.
The English team is special. It works at improving and uniformizing
the terminology used in GNU. Proven linguistic skill are praised more
than programming skill, here. For the time being, please avoid
subscribing to the English team unless explicitely invited to do so.
Available Packages
==================
Languages are not equally supported in all GNU packages. The
following matrix shows the current state of GNU internationalization,
as of November 1995. Listed are: internationalized packages, and
languages for which work is in progress, or about to start.
See note cs de en fr it ja nl no pt sv
\ .-------------------------------.
chess (1) | X / X |
clisp | X X X |
diffutils (2) | / . |
fileutils | . / |
flex (3) | / . |
m4 | - / - - . - |
gettext | X / X X X |
ptx | - / - - |
recode | - / - - - |
sh-utils | . / . |
sharutils | X / X X X X X |
tar | X / X - X X |
textutils | . / . |
wdiff | - - / - - |
`-------------------------------'
cs de en fr it ja nl no pt sv
The interpretation legend and notes are:
`/'
There is no PO file, this package merely defaults to this language.
`.'
The effort of localizing this package has been undertaken by
someone, or by a translating team, and work is, or should be in
progress.
`-'
A PO file for this package and this language is completed and is
currently available in a pretest release, or is all ready for
inclusion in the next release of this package.
`X'
The localization of this package to this particular language is
fully completed, and now distributed through an official release.
(1)
This package is translated to specific languages by methods
predating GNU `gettext'. Translations are all kept on disk files,
and sources contain numbers where one normally expects strings.
(2)
This package is planned to switch to GNU `gettext'. For the time
being, it uses temporary means for internationalization.
(3)
This package has its translatable strings marked, but does not use
GNU `gettext'. A convenience patch may be available separately.
If November 1995 seems to be old, you may fetch a more recent copy
of this `ABOUT-NLS' file on most GNU archive sites.

View File

@ -0,0 +1,16 @@
Authors of GNU shar utilities.
The following contributions warranted legal paper exchanges with the
Free Software Foundation. Also see files ChangeLog and THANKS.
UUDECODE, UUENCODE, XXDECODE, XXENCODE David J. Camp
Disclaims programs.
UUDECODE, UUENCODE, XXDECODE, XXENCODE Washington University
Disclaims programs by David J. Camp.
SHARUTILS Ulrich Drepper Germany 1968 8/3/95
Assigns past and future changes to Sharutils.
SHARUTILS Jan Djarv Swedish 1963 9/8/95
Assigns the manual "Shar man pages"

View File

@ -0,0 +1,290 @@
# Summary of pending email for GNU sharutils 4.1.4.
# Last updated: Friday, February 24, 1995.
#
# You may use this BACKLOG file for checking if I still have an
# unprocessed report of yours, or just to have a feeling of how
# this package is evolving (or not :-). Please be kind enough to
# check here before reporting again a problem that is not solved
# in this release.
#
# When I will process a report from you, you may reasonably count
# on the fact that I will give you some feedback at that time.
# By merely re-sending a report I already have, you are just putting
# more burden on my shoulders, and surely not making things go
# any faster.
#
# I could of course withhold a release until all reported problems
# are solved. This would not always be practical, nor fair for
# the community, when some of all reported bugs are solved indeed.
# So I have to cut the pear in halves, draw a line somewhere, and
# still make releases once in a while.
#
# About the principle of the BACKLOG file itself, my opinion is that
# users deserve to know where maintenance stands for what they use.
# Ignorance is sometimes more comfortable, but does not change facts.
# If commercial companies were indeed publishing their own internal
# bug lists, I think you would feel more secure with GNU software!
rmail/announce
1. 31 Aug 93 <ian@cygnus.com> uuencode/uudecode
2. 07 Jun 94 <pinard> shar/unshar
3. 08 Jul 94 <pinard> GNU shar?
4. 02 Sep 94 <pinard@IRO.UMontreal.CA> Release: GNU shar 4.0
5. 30 Oct 94 <pinard@IRO.UMontreal.CA> Prerelease: GNU sharutils 4.0.1
6. 06 Nov 94 <pinard@iro.umontreal.ca> Release: GNU sharutils 4.1
7. 29 Nov 94 <pinard@IRO.UMontreal.CA> Prerelease: GNU sharutils 4.1.1
8. 30 Nov 94 <pinard> Disappearance of uuencode 1.0
9. 01 Dec 94 <pinard@IRO.UMontreal.CA> Prerelease: GNU sharutils 4.1.3
10. 24 Feb 95 <pinard> Prerelease: GNU sharutils 4.1.4
rmail/brik
1. 07 Nov 94 <meyering@comco.com> Re: is this tar file ok?
2. 07 Nov 94 <pinard> GNUicizing brik?
3. 09 Nov 94 <dhesi@rahul.net> Re: GNUicizing brik?
4. 10 Nov 94 <pinard> 1) GNU tar, 2) GNU brik? :-)
5. 10 Nov 94 <dhesi@rahul.net> Re: 1) GNU tar, 2) GNU brik? :-)
6. 12 Nov 94 <rms@gnu.ai.mit.edu> brik
7. 12 Nov 94 <pinard> brik in GNU shar utilities
8. 12 Nov 94 <meyering@comco.com> Re: brik in GNU shar utilities
9. 12 Nov 94 <meyering@comco.com> Re: brik in GNU shar utilities
10. 13 Nov 94 <rms@gnu.ai.mit.edu> brik
11. 14 Nov 94 <dhesi@rahul.net> Re: brik
12. 29 Nov 94 <pinard> Re: brik
13. 29 Nov 94 <pinard> Re: brik
14. 30 Nov 94 <dhesi@rahul.net> Re: brik
15. 04 Dec 94 <rms@csrl.aoyama.ac.jp> Re: brik
16. 04 Dec 94 <dhesi@rahul.net> Re: brik
17. 04 Dec 94 <rms@csrl.aoyama.ac.jp> Re: brik
18. 05 Jan 95 <pinard> Re: brik
19. 05 Jan 95 <rms@gnu.ai.mit.edu> Re: brik
20. 05 Jan 95 <dhesi@rahul.net> Re: brik
21. 06 Jan 95 <pinard> Re: brik
22. 27 Jan 95 <pinard> Legaleese for brik?
23. 27 Jan 95 <dhesi@rahul.net> Re: Legaleese for brik?
24. 12 Feb 95 <pinard> brik, and uucode
rmail/documentation
1. 11 Nov 94 <maechler@stat.math.ethz.ch> Release: GNU sharutils 4.1
2. 11 Nov 94 <pinard@IRO.UMontreal.CA> Re: Release: GNU sharutils 4.1
3. 11 Nov 94 <maechler@stat.math.ethz.ch> Re: Release: GNU sharutils 4.1
4. 11 Nov 94 <maechler@stat.math.ethz.ch> Release: GNU sharutils 4.1
5. 11 Nov 94 <pinard@IRO.UMontreal.CA> Re: Release: GNU sharutils 4.1
6. 11 Nov 94 <maechler@stat.math.ethz.ch> Re: Release: GNU sharutils 4.1
7. 16 Nov 94 <pinard> Re: sharutils
8. 30 Nov 94 <pinard> Re: Suggestion for Sharutils (feature)
9. 30 Nov 94 <drepper@ipd.info.uni-karlsruhe.de> Re: Prerelease: GNU sharutils
10. 30 Nov 94 <pinard@IRO.UMontreal.CA> Re: Suggestion for Sharutils (feature)
11. 11 Feb 95 <pinard> sh, shar, unshar - explications
rmail/remote-cvs
1. 13 Feb 95 <paquette@atomas.crim.ca> [jimb@totoro.bio.indiana.edu: remote CV
2. 13 Feb 95 <paquette@atomas.crim.ca> [zoo@armadillo.com: Re: remote CVS?]
3. 13 Feb 95 <paquette@atomas.crim.ca> [kingdon@cygnus.com: Re: remote CVS?]
4. 13 Feb 95 <paquette@atomas.crim.ca> [zoo@armadillo.com: Re: remote CVS?]
5. 13 Feb 95 <paquette@atomas.crim.ca> [kingdon@cygnus.com: Re: remote CVS?]
6. 13 Feb 95 <paquette@atomas.crim.ca> [stig@inse.com: Re: remote CVS?]
7. 13 Feb 95 <paquette@atomas.crim.ca> [karl@owl.hq.ileaf.com: even more remot
8. 13 Feb 95 <paquette@atomas.crim.ca> [Ollivier.Robert@hsc.fr.net: Re: even m
9. 13 Feb 95 <paquette@atomas.crim.ca> [jc@irbs.com: Re: even more remote CVS?
rmail/remsync
1. 18 Oct 94 <pinard@gnu.ai.mit.edu> (none)
2. 18 Oct 94 <pinard@gnu.ai.mit.edu> remsync chez gnu.ai
3. 18 Oct 94 <pinard> remsync
4. 19 Oct 94 <pinard@gnu.ai.mit.edu> remsync pour wdiff recu sur gnux
5. 23 Oct 94 <pinard> Ignores ignored?
6. 28 Oct 94 <pinard@gnu.ai.mit.edu> (none)
7. 28 Oct 94 <pinard@gnu.ai.mit.edu> (none)
8. 28 Oct 94 <pinard> (none)
9. 02 Nov 94 <pinard@kicah.uucp> (none)
10. 03 Nov 94 <latendre@IRO.UMontreal.CA> remsync
11. 03 Nov 94 <pinard@IRO.UMontreal.CA> Full path would be better
12. 24 Oct 94 <pinard@IRO.UMontreal.CA> remsync - modifier...
13. 25 Oct 94 <parallel@IRO.UMontreal.CA> Hebdomadaire...
14. 26 Oct 94 <pinard@IRO.UMontreal.CA> (none)
15. 26 Oct 94 <latendre@IRO.UMontreal.CA> shar: .remsync.tar.gz
16. 26 Oct 94 <pinard@IRO.UMontreal.CA> shar: .remsync.tar.gz
17. 26 Oct 94 <latendre@IRO.UMontreal.CA> shar: .remsync.tar.gz
18. 26 Oct 94 <latendre@IRO.UMontreal.CA> (none)
19. 26 Oct 94 <pinard@IRO.UMontreal.CA> remsync: 1) Prudence 2) Mario
20. 26 Oct 94 <pinard@IRO.UMontreal.CA> (none)
21. 27 Oct 94 <pinard@IRO.UMontreal.CA> shar: remsync.in
22. 27 Oct 94 <pinard@IRO.UMontreal.CA> shar: .remsync.tar.gz
23. 03 Nov 94 <gerinlaj@IRO.UMontreal.CA> presentation a RISQ 95
24. 04 Nov 94 <pinard@IRO.UMontreal.CA> Re: presentation a RISQ 95
25. 08 Nov 94 <pinard> remsync - idées
26. 13 Oct 94 <pinard> (none)
27. 18 Oct 94 <pinard> Bug Perl
28. 22 Oct 94 <Mailer-Daemon> Returned mail: User unknown
29. 04 Nov 94 <pinard@IRO.UMontreal.CA> Re: presentation a RISQ 95
30. 03 Nov 94 <gerinlaj> presentation a RISQ 95
31. 03 Nov 94 <pinard@IRO.UMontreal.CA> Full path would be better
32. 21 Nov 94 <fournier@crim.ca> RISQ95: programme preliminaire et pre-inscript
33. 21 Nov 94 <yves@cc.mcgill.ca> RISQ95: programme preliminaire et pre-inscrip
34. 07 Dec 94 <Diane.Fournier@CRIM.CA> RISQ95 - Vos coordonnees
35. 07 Dec 94 <Diane.Fournier@crim.ca> RISQ95: Conferenciers - Speakers
36. 07 Dec 94 <Diane.Fournier@crim.ca> RISQ95: Conferenciers - Speakers
37. 09 Dec 94 <pinard@IRO.UMontreal.CA> Re: RISQ95 - Vos coordonnees
38. 09 Dec 94 <pinard@IRO.UMontreal.CA> Re: RISQ95: Conferenciers - Speakers
39. 09 Dec 94 <pinard@IRO.UMontreal.CA> Re: RISQ95: Conferenciers - Speakers
40. 12 Dec 94 <Diane.Fournier@crim.ca> RAPPEL: Conferenciers - Speakers RISQ95
41. 12 Dec 94 <Diane.Fournier@crim.ca> RAPPEL: Conferenciers - Speakers RISQ95
42. 13 Dec 94 <efortin@clouso.crim.ca> (none)
43. 13 Dec 94 <mkeenan@actbanksys.ie> RCVS Duplicate copies ?
44. 13 Dec 94 <mike@fionn.lbl.gov> Re: RCVS Duplicate copies ?
45. 20 Dec 94 <pinard@gnu.ai.mit.edu> (none)
46. 22 Dec 94 <taarna!pinard@IRO.UMontreal.CA> (none)
47. 23 Dec 94 <taarna!pinard@IRO.UMontreal.CA> remsync - Diagnose locally missi
48. 31 Dec 94 <pinard> Bug remsync
49. 31 Dec 94 <stig@inse.com> Will CVS 1.4 learn to track moving files?
50. 12 Jan 95 <Diane.Fournier@crim.ca> RISQ95: programme final
51. 12 Jan 95 <Diane.Fournier@crim.ca> RISQ95: programme final
52. 24 Jan 95 <pinard@IRO.UMontreal.CA> remsync !?
53. 24 Jan 95 <pinard> remsync vs PAGER
54. 26 Jan 95 <pinard@IRO.UMontreal.CA> (none)
55. 27 Jan 95 <pinard@gnu.ai.mit.edu> (none)
56. 29 Jan 95 <claude@unimtl.uniforum.qc.ca> (none)
57. 29 Jan 95 <pinard> Récent envoi àUniforum
58. 29 Jan 95 <pinard> Envoi Uniforum (bis)
59. 29 Jan 95 <pinard> Message Uniforum (ter)
60. 06 Feb 95 <fmayhar@locus.com> Remsync.
61. 06 Feb 95 <pinard> Re: Remsync.
62. 06 Feb 95 <pinard> remsync to be included in GNU shar utilities
63. 06 Feb 95 <pinard> remsync to be included in GNU shar utilities
rmail/shar-archive-headers
1. 15 Oct 94 <dickey@clark.net> shar 4.0 vs cshar
2. 15 Oct 94 <pinard> Re: shar 4.0 vs cshar
3. 19 Oct 94 <Joerg.Heitkoetter@Germany.EU.net> GNU Shar 4.1 extensions?
4. 19 Oct 94 <pinard> Re: GNU Shar 4.1 extensions?
5. 23 Oct 94 <Joerg.Heitkoetter@Germany.EU.net> Re: GNU Shar 4.1 extensions?
6. 23 Oct 94 <Joerg.Heitkoetter@Germany.EU.net> shar-4.0-4.1.patch
7. 07 Nov 94 <pinard> Re: small enhancement to sharutils-4.1
8. 16 Jan 95 <leisner@sdsp.mc.xerox.com> saving the headers in unshar
9. 26 Jan 95 <leisner@sdsp.mc.xerox.com> Re: saving the headers in unshar
rmail/shar-backups
1. 26 Jan 95 <leisner@sdsp.mc.xerox.com> Re: saving the headers in unshar
2. 27 Jan 95 <pinard> backups [was: Re: saving the headers in unshar]
rmail/shar-documentation
1. Tue Sep 6 <lvirden@cas.org> Re: Solution for [Re: shar 4.0 make shar.dvi p
2. Tue Sep 6 <lvirden@cas.org> Re: Solution for [Re: shar 4.0 make shar.dvi p
3. 09 Sep 94 <gaumondp@ere.umontreal.ca> Comments about shar-4.0
4. 11 Sep 94 <davidsen@tmr.com> Re: shar 4.0 [was: Re: disk buffering in Linux
5. 12 Sep 94 <pinard> Say a word about GNU touch
6. 16 Sep 94 <djm@va.pubnix.com> comments on shar 4.0 doc
7. 10 Sep 94 <Mailer-Daemon@ileaf.com> Returned mail: Host unknown
8. 03 Sep 94 <pinard> GNU shar 4.0
rmail/shar-old-bug
1. 27 Sep 90 <pinard> shar 3.49 details
2. 27 Sep 90 <pinard> Other problems requiring -F with shar [was: macros.ed]
rmail/shar-touch
1. 17 Nov 94 <wbe@psr.com> Suggested change to shar
2. 17 Nov 94 <pinard@IRO.UMontreal.CA> Re: Suggested change to shar
rmail/shar-user-id
1. 23 Dec 94 <taarna!pinard@IRO.UMontreal.CA> shar: RMAIL0
rmail/shar-walkdown-bug
1. 12 Sep 94 <schwab@issan.informatik.uni-dortmund.de> Shar 4.0: bug in walkdo
2. 13 Sep 94 <interran@uluru.stanford.edu> Re: Shar 4.0: bug in walkdown
3. 12 Feb 95 <luik@pharao.stgt.sub.org> sharutils-4.1: problem sharing `.'
rmail/shar-without-fork
1. 07 Sep 94 <schwab@issan.informatik.uni-dortmund.de> Shar 4.0: avoid fork()
rmail/unshar-new-o-option
1. 09 Sep 94 <gaumondp@ere.umontreal.ca> Suggestion for unshar 4.0
rmail/unshar-slowness
1. 31 Oct 94 <pinard> Re: sharutils-4.0.1
2. 10 Nov 94 <pinard> Optimizing unshar
3. 11 Nov 94 <djm@va.pubnix.com> Re: Optimizing unshar
4. 11 Nov 94 <pinard@IRO.UMontreal.CA> Re: Optimizing unshar
5. 11 Nov 94 <djm@va.pubnix.com> Re: Optimizing unshar
6. 11 Nov 94 <djm@va.pubnix.com> Re: Optimizing unshar
7. 11 Nov 94 <pinard@IRO.UMontreal.CA> Re: Optimizing unshar
8. 11 Nov 94 <djm@va.pubnix.com> Re: Optimizing unshar
rmail/unshar-standalone
1. 03 Sep 94 <agulbra@nvg.unit.no> shar/unshar
2. 06 Sep 94 <agulbra@pvv.unit.no> Re: shar/unshar
rmail/uu-bigger-specs
1. 05 Sep 93 <mathew@mantis.co.UK> Re: uuencode/uudecode
2. 07 Sep 93 <mathew@mantis.co.uk> Re: GNU uudecode: why no GNU btoa?
3. 03 Mar 94 <iwj@cam-orl.co.UK> uuencode 1.0: Ultrix, use of spaces, no table
4. 02 Jul 94 <bcochavy@ilux39.iil.intel.com> Some slight patchs for uuencode-1
5. 16 Nov 94 <rommel@ars.muc.de> sharutils
6. 17 Nov 94 <rommel@ars.muc.de> Re: sharutils
7. 30 Nov 94 <drepper@ipd.info.uni-karlsruhe.de> Re: Prerelease: GNU sharutils
8. 21 Nov 94 <dik@cd.dsto.gov.au> uudecode enhancement
9. 11 Feb 95 <pinard> uucode pas requis pour Gilles
10. 03 Oct 94 <iwj@cam-orl.co.uk> Re: uuencode 1.0: Ultrix, use of spaces, no t
11. 03 Oct 94 <pinard> Re: uuencode 1.0: Ultrix, use of spaces, no table, not r
12. 02 Sep 93 <david@twg.com> Re: uuencode/uudecode
13. 16 Feb 95 <joey@finlandia.Infodrom.North.DE> Hint: uudecode/uuencode
rmail/uu-documentation
1. 02 Sep 93 <ian@cygnus.com> DOS uuencode and uudecode
2. 13 Oct 93 <unknown> Re: uuencode
3. 17 Jul 89 <peter%essex.ac.uk%NSFNET-RELAY.AC.UK@IRO.UMontreal.CA> uudecode
4. 02 Dec 90 <jik@athena.mit.edu> Re: uudecode alias security hole?
5. 17 Jun 91 <jik@cats.ucsc.edu> Re: is uudecode dangerous?
6. 19 Jun 91 <wcs@cbnewsh.att.com> Re: is uudecode dangerous? ; chown?
7. 01 Mar 90 <root@cca.ucsf.edu> Re: which archiver/compresser/encoder/decoder
8. 03 Nov 94 <pinard@IRO.UMontreal.CA> Re: Documentation diffs, & a comment.
rmail/uu-new-w-option
1. 29 Oct 94 <tembel!shields> New `uudecode -w' option for easy multipart deco
2. 29 Oct 94 <pinard> Re: New `uudecode -w' option for easy multipart decoding
3. 29 Oct 94 <tembel!shields> Re: New `uudecode -w' option for easy multipart
4. 29 Oct 94 <tembel!shields@uunet.uu.net> New `uudecode -w' option for easy m
admin/abe/RMAIL
1. 17 Jan 91 <pinard> abe and directories; dabe and Turbo-C
2. 27 Jan 91 <mcgill-vision!looking.on.ca!brad> Re: abe part numbering
3. 11 Feb 91 <pinard> Possible bug with b= option
4. 11 Feb 91 <mcgill-vision!looking.on.ca!brad> Re: Possible bug with b= optio
5. 15 Jul 92 <pinard> Minor problem in dabe.c
6. 23 Sep 94 <pinard> Re: Possible bug with b= option
7. 24 Sep 94 <brad@alto.clarinet.com> Re: Possible bug with b= option
8. 24 Sep 94 <brad@alto.clarinet.com> Re: Possible bug with b= option
9. 24 Sep 94 <brad@alto.clarinet.com> Re: Possible bug with b= option
10. 24 Sep 94 <pinard> Re: Possible bug with b= option
11. 24 Sep 94 <pinard> Re: Possible bug with b= option
12. 26 Sep 94 <brad@alto.clarinet.com> Re: Possible bug with b= option
admin/apple/RMAIL
1. 30 Jun 87 <kevin@kosman.UUCP> Comb
admin/btoa/RMAIL
1. 20 Sep 94 <kb@cs.umb.edu> shar, uuencode, atob
2. 20 Sep 94 <pinard> Re: shar, uuencode, atob
3. 29 Jul 94 <ericb@lsid.hp.com> Re: GNU shar, -M and you
4. 28 Jul 94 <pinard> Re: GNU shar, -M and you
5. 09 Oct 92 <jef@netcom.com> version of atob with factor of 2 speedup
6. 26 Sep 93 <pinard> GNU encode 1.0 - still
7. 30 Dec 89 <d84sp@efd.lth.se> Re: BTOA 5.2
8. 30 Dec 89 <pinard> BTOA 5.2
9. 31 Dec 89 <pinard> diffs for btoa 5.2 under MSDOS
10. 18 Jul 90 <pinard> shar blues
11. 20 Sep 94 <pinard@iro.umontreal.ca> Re: shar, uuencode, atob
12. 24 Sep 94 <kb@cs.umb.edu> Re: shar, uuencode, atob
admin/mailbin/RMAIL
1. 05 Dec 94 <pinard> Re: mailbin.200 - part 1 of 6
2. 05 Dec 94 <david@wubios.wustl.edu> mailbin.200 - part 1 of 6
admin/uu-c/RMAIL
1. 26 Oct 91 <w8sdz@rigel.acs.oakland.edu> UUDOALL.ZIP - More flexible uudecod
admin/xx-c/RMAIL
1. 21 Feb 90 <frisk@rhi.hi.is> XXENCODE/XXDECODE
2. 06 Nov 90 <readdm@CCWF.CC.UTEXAS.EDU> UUXFER20.ZIP - Comprehensive UU/XX en
3. 29 Nov 94 <pinard> {uu,xx}{en,de}code
4. 29 Nov 94 <MAILER-DAEMON@IRO.UMontreal.CA> Returned mail: Service unavailab

View File

@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
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 of the License, 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., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

View File

@ -0,0 +1,970 @@
Mon Dec 4 00:44:40 1995 Ulrich Drepper <drepper@myware>
* configure.in (VERSION): Bump to 4.2.
Sat Dec 2 03:17:01 1995 Ulrich Drepper <drepper@myware>
* configure.in: Add handling of README-alpha file. If current
version is a test release we ship this file. Inspired by Jim
Meyering's configure.in.
* Makefile.in (DISTFILES): Add @DIST_ALPHA@.
Sun Nov 26 00:39:10 1995 Ulrich Drepper <drepper@myware>
* configure.in: Fix fatal bug: have to add AC_C_BIGENDIAN test.
Else the MD5 sum on big endian machines is wrong!
* configure.in: We don't need to test for shar. We are installing it.
Sat Nov 25 16:16:22 1995 Ulrich Drepper <drepper@myware>
* README: Some corrections around ABOUT-NLS by Franc,ois Pinard.
Fri Nov 24 19:59:53 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (DISTFILES): Change README.NLS to ABOUT-NLS.
Tue Nov 21 16:30:51 1995 Ulrich Drepper <drepper@myware>
* aclocal.m4 (ud_GNU_GETTEXT): Always create intl/.
* Makefile.in:
Make recursion loop aware of Make's -k option. Kudos to Jim Meyering.
* Makefile.in: Make default goal `all' and depend on `all-recursice'.
Tue Nov 14 12:55:50 1995 Ulrich Drepper <drepper@myware>
* configure.in (VERSION): Bump to 4.1.12.
(ALL_LINGUAS): Add ja_JP.EUC.
Tue Nov 7 13:46:39 1995 Ulrich Drepper <drepper@myware>
* aclocal.m4 (ud_WITH_NLS):
Set LIBS to correct value and filter out -intl if necessary.
Mon Nov 6 16:47:58 1995 Ulrich Drepper <drepper@myware>
* aclocal.m4 (ud_PATH_LISP):
Remove macro. We don't need it in sharutils.
Sun Nov 5 21:45:55 1995 Ulrich Drepper <drepper@myware>
* aclocal.m4:
Franc,ois reported that po2tbl.sed is not always generated.
Sun Nov 5 18:20:33 1995 Ulrich Drepper <drepper@myware>
* configure.in (VERSION): Bump to 4.1.11.
* Makefile.in (DISTFILES): Don't distributs NLS, but README.NLS.
Sun Nov 5 13:33:00 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (dist): Suppress error message when ln failed.
* configure.in (VERSION): Bump to 4.1.10.
Sat Nov 4 23:37:53 1995 Ulrich Drepper <drepper@myware>
* aclocal.m4:
Fix typo: "Do not you" -> "Do not use". Reported by Tom Tromey.
Sun Oct 29 12:02:42 1995 Ulrich Drepper <drepper@myware>
* configure.in: Replace AC_INSTALL_PROG with fp_INSTALL_PROG.
* aclocal.m4 (fp_PROG_INSTALL): New macro by Franc,ois Pinard.
Sat Oct 28 23:32:04 1995 Ulrich Drepper <drepper@myware>
* aclocal.m4:
Test for dcgettext function when gettext is found in C library. This
works around the missing function in Solaris 2.3.
Fri Oct 27 02:29:59 1995 Ulrich Drepper <drepper@myware>
* aclocal.m4:
Use single quotes where possible. Reported by Christian von Roques.
Tue Sep 26 00:52:59 1995 Ulrich Drepper <drepper@myware>
* aclocal.m4 (md_PATH_PROG): Quote argument to echo.
Mon Sep 25 22:15:36 1995 Ulrich Drepper <drepper@myware>
* aclocal.m4 (md_PATH_PROG):
Use this new macro instead of AC_PATH_PROG for msgfmt and
xgettext program. This warns about uses of OpenWin versions (Wrgg).
Sun Sep 24 10:49:40 1995 Ulrich Drepper <drepper@myware>
* aclocal.m4: Protect second use of ac_cv_func_stpcpy, too.
* aclocal.m4:
Move definition of INTLSUB to right place. We don't need to compile
this directory for systems which have the gettext functions.
* configure.in (AC_REPLACE_FUNCS):
Add stpcpy. Reported by Nelson Beebe and Jim Meyering.
Sat Sep 23 22:49:35 1995 Ulrich Drepper <drepper@myware>
* configure.in (VERSION): Bump to 4.1.9.
* aclocal.m4 (stpcpy):
Fix bug where test gets empty argument when stpcpy is not available.
Reported by Nelson Beebe.
* configure.in (VERSION): Bump to 4.1.8.
Fri Sep 22 23:47:00 1995 Ulrich Drepper <drepper@myware>
* acconfig.h (HAVE_STPCPY): Add symbol for work around.
* configure.in (AC_C_INLINE): Add this test.
Thu Sep 21 19:12:32 1995 Ulrich Drepper <drepper@myware>
* aclocal.m4: Add aclocal.m4 from gettext-0.9.4.
* configure.in (AC_OUTPUT): Add po/po2tbl.sed.
Wed Sep 20 23:51:55 1995 Ulrich Drepper <drepper@myware>
* configure.in (uucode):
In case of cached value set MAN1PAGES and MAN5PAGES. Was only
done for uncached case before.
* Makefile.in (install-man): New rule for install man pages.
* configure.in (VERSION): Bump to 4.1.7.
Thu Sep 7 00:19:52 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (dist):
Use o option for tar to generated more general tar files.
* Makefile.in (dist): Don't use long --gzip option for tar.
Sat Aug 19 23:36:03 1995 Ulrich Drepper <drepper@myware>
* aclocal.m4: Update to aclocal.m4 from gettext-0.9.3 from 950818.
Tue Aug 15 16:47:46 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (dist): Remove `copying instead' message.
Tue Aug 15 12:23:16 1995 Ulrich Drepper <drepper@myware>
* configure.in:
Make sure that .gmo catalogs are always installed if NLS is selected.
* aclocal.m4: Update NLS macros from gettext-0.9.2.
Thu Aug 10 22:36:39 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (SUBDIRS): Add contrib.
Thu Aug 3 00:03:01 1995 Ulrich Drepper <drepper@myware>
* configure.in, aclocal.m4, acconfig.h: Complete rewrite after
changing to non-flat directory structure and usage of GNU gettext.
Wed Aug 2 23:59:57 1995 Ulrich Drepper <drepper@myware>
* Makefile.in: Complete rewrite for non-flat directory structure
and usage of GNU gettext.
Tue Jun 13 08:23:35 1995 =?ISO-8859-1?Q?Fran=E7ois_Pinard?= (pinard@icule)
* shar.c: Replace all references to _sharEXT.tmp by _sh$$.EXT, so
many unshar may execute in parallel in the same directory.
Reported by Jim Meyering.
Wed May 17 14:07:08 1995 =?ISO-8859-1?Q?Fran=E7ois_Pinard?= (pinard@icule)
* pt.po: New file, for Portuguese.
* configure.in (LINGUAS): Adjusted.
Reported by Antonio Esteves.
Wed May 3 20:49:53 1995 =?ISO-8859-1?Q?Fran=E7ois_Pinard?= (pinard@icule)
* mailshar.in: Add `-s SIZE' option. Use test instead of [.
Tue May 2 23:15:01 1995 =?ISO-8859-1?Q?Fran=E7ois_Pinard?= (pinard@icule)
* uuencode.c (encode): Use comma operator when assignment in test.
* uudecode.c (DEC), uuencode.c (ENC): Capitalize macro arguments.
* system.h (memcpy), shar.c (ISASCII): Avoid superfluous
parentheses in macro definitions.
Tue Apr 25 18:55:26 1995 François Pinard (pinard@icule)
* shar.c (shar): Capitalize SKIPPING messages. These are nearly
errors, and so, they should call for the eye of the user.
Sun Mar 26 08:48:27 1995 François Pinard (pinard@icule)
* remsync.in: Use Emacs file variables to announce Perl mode
instead of using the first line. This confuses some shells.
Reported by Andrey A. Chernov.
* configure.in: Define and substitute MAN1PAGES and MAN5PAGES,
according to --disable-uucode.
* Makefile.in: Adjusted accordingly.
Reported by Andrey A. Chernov.
* configure.in: Define SCRIPTS separately from PROGRAMS. Use
fp_PROG_INSTALL instead of AC_PROG_INSTALL.
* Makefile.in: Adjusted accordingly.
Reported by Andrey A. Chernov.
Fri Mar 24 07:57:57 1995 François Pinard (pinard@icule)
* shar.c (shar): Silence the `Saving...' messages under --quiet.
Reported by Karl Berry.
Sun Mar 19 10:32:45 1995 François Pinard (pinard@icule)
* configure.in: Remove GLOCALE, add LINGUAS, use fp_WITH_CATALOGS.
* Makefile.in: Modify accordingly.
* acconfig.h: Add description for WITH_CATALOGS.
* system.h: Use WITH_CATALOGS to define _() differently.
Fri Feb 24 20:09:20 1995 Francois Pinard (pinard@icule)
* Makefile.in (clean): Remove mail-files, mailshar and remsync.
Reported by Eric Backus.
* contrib/Makefile.in: Replace /doc par /contrib everywhere. The
technique used for making this file shows!
Reported by Eric Backus, Joshua R. Poulson and Kaveh R. Ghazi.
* configure.in: Put gdiff test in parentheses, because Bourne
shell otherwise complains about an inexisting program.
Reported by Kaveh R. Ghazi.
Tue Feb 21 23:57:25 1995 Francois Pinard (pinard@icule)
* Prerelease 4.1.4.
* configure.in, Makefile.in: Replace `date' by `echo timestamp'.
Reported by Greg McGary and Jim Meyering.
Sun Feb 19 12:06:20 1995 Francois Pinard (pinard@icule)
* Makefile.in: Support an ID file. Do not distribute TAGS.
Reported by Greg McGary.
Sun Feb 12 07:21:05 1995 Francois Pinard (pinard@icule)
Start distributing contrib:
* contrib/*: New files, not detailed nor maintained here.
* configure.in: Set make. Output contrib/Makefile.
* Makefile.in (distclean, dist, dist-shar): Execute in contrib/.
Start distributing remsync:
* configure.in: Merge remsync's configure.in.
* Makefile.in: Merge remsync's Makefile.in
* mail-files.in, mailshar.in, remsync.in, remsync.texi: New files.
Sun Feb 5 07:37:19 1995 Francois Pinard (pinard@icule)
* Makefile.in (maintainer-clean): New name for realclean.
Sat Dec 17 14:57:41 1994 Francois Pinard (pinard@icule)
* configure.in: Check for isascii.
* shar.c: Properly define ISASCII after including <ctype.h>.
(shar): Use ISASCII before checks if not mandatory prefix mode.
Reported by Bruno Haible and Jim Meyering.
Tue Dec 13 10:17:57 1994 Francois Pinard (pinard@icule)
* system.h: Remove STDC_HEADERS test before including <string.h>,
as HAVE_STRING_H should be able to decide this alone.
Sat Dec 3 20:04:39 1994 Francois Pinard (pinard@icule)
* libintl.c: Unprotoize it once and for all.
* Makefile.in: Do not unprotoize libintl.c. With old compilers,
the special rule ensuring LOCALEDIR is defined was bypassed.
Reported by Kaveh R. Ghazi.
* Makefile.in (realclean): Delete stamp-cod.
Reported by Eric Backus.
Thu Dec 1 13:36:57 1994 Francois Pinard (pinard@icule)
* nl.tt: New file, for Dutch.
Reported by Andries E. Brouwer.
Wed Nov 30 11:01:29 1994 Francois Pinard (pinard@icule)
* Prerelease 4.1.3.
* Makefile.in: Install catalog files as `.msg', not `.cat'.
* configure.in, Makefile.in, acconfig.h, shar.c, unshar.c,
uudecode.c, uuencode.c: Rename PRODUCT to PACKAGE.
Reported by Noah Friedman.
* configure.in, Makefile.in: Rename GNULOCALE to GLOCALE.
Reported by Richard Stallman.
* configure.in: Use AC_CHECK_PROG to check for extract-msgs.
Reported by Kaveh R. Ghazi.
* Makefile.in: Replace libintl.o by libintl$O.
Reported by Kaveh R. Ghazi.
* system.h: Define setlocale(,) to empty if not HAVE_LOCALE_H.
* shar.c, unshar.c, uudecode.c, uuencode.c: Avoid HAVE_LOCALE_H.
Reported by Jim Meyering and Paul Eggert.
* shar.c (main): Give "+..." to getopt for repairing the -p option.
`-p -B sv.tt -T shar.c' was turned into `-p -B -T sv.tt shar.c' by
getopt_long, which makes both files be treated as text.
Reported by Jan Djarv.
* sv.tt: New file, for Swedish.
Reported by Jan Djarv.
* de.tt: New file, for German.
Reported by Ulrich Drepper.
Tue Nov 29 19:13:44 1994 Francois Pinard (pinard@icule)
* shar.c: Change archive_type_position from long to off_t.
* unshar.c (find_archive): Idem for start argument, and position.
* (unarchive_shar_file): Idem for current_position.
Reported by David J. MacKenzie.
* Makefile.in (locale.c): Add a missing semicolon.
Reported by Bill Aten, Eric Backus and Jan Djarv.
Mon Nov 28 19:04:56 1994 Francois Pinard (pinard@icule)
* Prerelease 4.1.1.
* configure.in: Check if GNU locale available, then substitute
GNULOCALE by yes or no, accordingly.
* Makefile.in: Merely touch locale.c, fr.cat or $(PRODUCT).cod, when
GNU locale is not available.
* shar.c (shar): Double file_type by file_type_remote, localizing
only the first, and use appropriately.
Sun Nov 27 14:36:57 1994 Francois Pinard (pinard@icule)
* Makefile.in: Implement CATALOGS and locale.c.
* libintl.h: New.
* libintl.c: New, inspired by GNU locale gettext.c.
* fr.tt: New translation file for French.
* Makefile.in: Normalize using temporaries for redirected-to files.
Sat Nov 26 20:41:23 1994 Francois Pinard (pinard@icule)
* configure.in: Check for <locale.h>.
* system.h, shar.c, uudecode.c, uuencode.c: Rename _ to __P.
* system.h: Include <locale.h> if we have it. Always include
<libintl.h>, then declare _ as gettext.
* shar.c, unshar.c, uudecode.c, uuencode.c: Call setlocale if we
have <locale.h>. Use _ macro over all localizable strings.
Tue Nov 15 23:13:18 1994 Francois Pinard (pinard@icule)
* shar.c: Do not include <sys/stat.h>, since it is already
included indirectly via "system.h".
Reported by Harlan Stenn and Kaveh R. Ghazi.
Thu Nov 10 02:05:43 1994 Francois Pinard (pinard@icule)
* shar.c (shar): Use putc instead of fputc.
* unshar.c (unarchive_shar_file): Use getc and putc, instead of
fgetc and fputc.
Wed Nov 9 12:50:00 1994 Francois Pinard (pinard@icule)
* Makefile.in (install-man): Do not transform the source name of
uuencode.5 while installing, only the destination name.
Reported by David MacKenzie.
Tue Nov 8 11:44:00 1994 Francois Pinard (pinard@icule)
* shar.c (main): Output the `Created N files' in quiet mode only.
When not quiet, we already get one message per archive generated.
Mon Nov 7 15:09:11 1994 Francois Pinard (pinard@icule)
* Makefile.in (stamp-vti): Use new -r option to date.
* shar.c: Allow more flexibility in -o by allowing a sprintf
format. When no `%' characters in format, do as before.
(open_output, close_output): New routines. Also check result
returned by fopen and fclose.
Reported by Paul A. Vixie.
Sat Nov 5 15:57:17 1994 Francois Pinard (pinard@icule)
* Version 4.1.
* Makefile.in (realclean): Also remove stamp-vti.
Reported by Eric Backus.
* uudecode.c: Declare getpwnam.
Reported by Christopher Sawtell.
* configure.in: Check is stat macros are dependable.
* system.h: Include <sys/stat.h> and define permission bits.
Conditionnaly define S_ISDIR and S_ISREG.
* shar.c: Use S_ISDIR and S_ISREG.
* uudecode.c, uuencode.c: Delete code now in "system.h".
Reported by Andy Seaborne.
Wed Nov 2 00:24:41 1994 Francois Pinard (pinard@icule)
* shar.c: Delete verbose_mode and -v, which was a poor choice for
meaning *no*-verbose. Instead, introduce quiet_mode and
quiet_unshar_mode, driven by new options -q and -Q.
Reported by Christopher Sawtell.
* uuencode.c: Normalize usage (), use EXIT_* symbols and error ().
* uudecode.c: Idem. Also rename rval to exit_status.
Some systems (DEC Alpha OSF 2.0) declares basename with a
non-const argument in <string.h>, so conflicting with "system.h".
* configure.in: Check for basename, replace it when not found.
* configure.in: Check for const only after having found possible
ANSIfying compiler flags, this is of no use to check it before.
* Makefile.in: Adjusted.
* system.h: Use a degenerated prototype when basename found.
Reported by Kaveh R. Ghazi and Nelson Beebe.
Tue Nov 1 23:11:26 1994 Francois Pinard (pinard@icule)
* uudecode.c, uuencode.c: Remove inclusion of <stdio.h> and
<sys/types.h>, already included from "system.h".
Reported by Christopher Sawtell.
* configure.in: Check if closedir return void. CLOSEDIR_VOID was
already tested in shar.c, but the symbol not configured.
Reported by Karl Vogel, Kaveh Ghazi and Michael Rendell.
Mon Oct 31 20:59:16 1994 Francois Pinard (pinard@icule)
* Makefile.in (BACKLOG): Goal deleted. It was depending on files
which are not part of the distribution.
* uudecode.c, uuencode.c: Declare program_name const char *, not
static char *.
Reported by Andy Seaborne, Eric Backus, Joseph E. Sacco, Karl
Vogel and Kaveh R. Ghazi.
Sun Oct 30 08:30:35 1994 Francois Pinard (pinard@icule)
* configure.in: Check for fchmod.
* uudecode.c: Use chmod if fchmod does not exist.
Reported by Andrew Walduck, Andrew B. Smith, Bill Campbell,
Christopher Sawtell, Donald Page, Elliott Pacetti and Robert J.C.
Kyanko.
* configure.in: Check for memcpy and strchr.
* system.h: Rearrange how mem* and str* are used.
Reported by Kaveh R. Ghazi.
* configure.in: When cross-compiling, do not check if characters
are unsigned, and let __CHAR_UNSIGNED__ undefined. This is safe.
Reported by David MacKenzie.
* system.h: Use #if rather than #ifdef to check __STDC__.
* Makefile.in: Clean up, following the one in GNU m4. I will not
detail all the changes here.
* configure.in: Likewise. Also added --disable-uucode.
* acconfig.h: Document PRODUCT and VERSION.
* version.c: Deleted.
* shar.h: Delete previous VERSION definition.
* shar.c, unshar.c, uudecode.c, uuencode.c: Use PRODUCT and VERSION.
* Makefile.in: Adjusted.
* system.h: Renamed from shar.h. All includers adjusted.
* alloca.c: New, from elsewhere.
* configure.in: Configure alloca.
* Makefile.in: Adjusted.
* Makefile.in (BACKLOG): New. Distribute file BACKLOG.
* Makefile.in (TAGS): Distribute it. Clean it in realclean.
Reported by Karl Berry.
Sat Oct 15 21:57:42 1994 Francois Pinard (pinard@icule)
* remsync/configure.in: Find Perl path and substitute in remsync.
* remsync/remsync.in: New name for remsync.pl. Use @PERL@ in it.
* remsync/Makefile.in: Adjusted.
Reported by Jim Meyering.
Sun Oct 9 08:43:28 1994 Francois Pinard (pinard@icule)
* shar.h: Get rid of CONFIG_BROKETS.
Wed Oct 5 01:52:22 1994 Francois Pinard (pinard@icule)
* Corrected various bugs and improve a few functionnalities in
remsync/. No need for a detailed ChangeLog here, before the
package is released for true. I will only reported other's
changes for now.
Sat Sep 24 09:49:22 1994 Francois Pinard (pinard@icule)
* encode.c: New name for uushar.c.
* Makefile.in: Adjusted.
Fri Sep 23 08:20:10 1994 Francois Pinard (pinard@icule)
* uudecode.c: Include <sys/types.h> before <sys/stat.h>.
Reported by Andrew Walduck, Christopher Sawtell, Gregory Neil
Shapiro, Horst von Brand, Ian Jackson, Karl Berry, Kaveh R. Ghazi,
Ken Olstad, Meade Roberts, Nelson H. F. Beebe and Richard Segal.
* Makefile.in: Handle uudecode and uuencode installation.
(man1dir, man1ext): Renamed from mandir and manext.
(libshutl.a): Renamed from libshar.a.
(check): New, from GNU uuencode-1.0's Makefile.in.
* testdata, uudecode.c, uudecode.1, uuencode.c, uuencode.1,
uuencode.5, version.c : New, from GNU uuencode-1.0.
Rename the package from shar to sharutils:
* shar.h (VERSION): Define to "GNU sharutils M.N", instead of only
numbers, to account for the change in the name of the package.
* shar.c (generate_full_header, main): Adapt.
* unshar.c (main): Adapt.
* sharutils.texi: Renamed from shar.texinfo.
* Makefile.in: Adjust file names for documents.
* shar.c (main): Initialize program_name from argv[0] without
basename'ing it.
* unshar.c (main): Idem.
Reported by Karl Berry.
Tue Sep 13 12:52:40 1994 Francois Pinard (pinard@icule)
* shar.c (generate_configure): Echo a message suggesting the
installation of GNU touch when no valid touch is found.
Thu Sep 8 21:33:43 1994 Francois Pinard (pinard@icule)
* configure.in: Use AC_FUNC_STRFTIME.
Tue Sep 6 12:08:49 1994 Francois Pinard (pinard@icule)
* Makefile.in (TAGS): Remove -t from etags call.
Fri Sep 2 14:19:09 1994 Francois Pinard (pinard@icule)
* whoami.c: Include <limits.h> prior to <sys/utsname.c>.
* configure.in: Check for <limits.h>.
Reported by Michael Rendell.
Thu Sep 1 19:28:36 1994 Francois Pinard (pinard@icule)
* Version 4.0.
* shar.c: Replace optional_prefix_mode with mandatory_prefix_mode,
with inverted meaning.
(main): Delay setting the mode to after parameter decoding.
Initialize to -T instead of -M in vanilla mode, if not otherwise
set. Diagnose any override.
Reported by Eric Backus.
* Makefile.in (LIBOBJS): Cut the line differently, so \ will be
followed by something even if @LIBOBJS@ sustitutes to nothing.
Reported by Andy Seaborne and Dave Anglin.
Wed Aug 31 12:14:04 1994 Francois Pinard (pinard@icule)
* Makefile.in (distclean): Delete config.log.
Sun Aug 28 14:38:07 1994 Francois Pinard (pinard@icule)
* shar.c (main): Cast byte_is_binary to (char *) for memset's.
Reported by Joseph E. Sacco.
Fri Aug 26 16:23:58 1994 Francois Pinard (pinard@icule)
* unshar.c (matched_by): Initialize pattern_cursor and
result_cursor to NULL, for fails to be properly handled.
Reported by Joseph E. Sacco.
* shar.c (shar): Give some value to input and remaining_size.
Reported by Joseph E. Sacco.
Thu Aug 25 14:52:28 1994 Francois Pinard (pinard@icule)
* shar.c (main): In vanilla mode (-V), defaults to text mode (-T)
instead of mixed mode (-M).
Reported by Eric Backus.
* shar.c (generate_configure): New name for generate_touch_test.
When -X, configure a way for doing echo without newline, copying
the trick from Autoconf 2.0's AC_PROG_ECHO_N. Do something simple
when in vanilla mode.
(shar): Do not use newlines with questions. Rename shar_reply to
shar_skip, with meaning reversed, other little cleanups.
* shar.c (generate_configure): Configure if /dev/tty exists,
copying the trick from older GNU tar configure.in. Do not use
/dev/tty when in vanilla mode.
(shar): Possibly use /dev/tty to read the user reply. This
should help using unshar to read shars generated with -X.
Reported by Eric Backus.
* configure.in: Replace mktime if missing.
* mktime.c: New, from elsewhere.
* Makefile.in: Distribute it.
Reported by Karl Vogel and Kaveh R. Ghazi.
Wed Aug 24 08:54:03 1994 Francois Pinard (pinard@icule)
* configure.in: Implement --with-dmalloc.
* acconfig.h: Document WITH_DMALLOC.
* shar.h: Add code for when WITH_DMALLOC.
* shar.c (walktree): To know how to initialize restore_name, check
local_name_copy, not restore_name!
Reported by Andy Seaborne.
Tue Aug 23 20:13:38 1994 Francois Pinard (pinard@icule)
* shar.c (mode_string): Declare argument unsigned, instead of
unsigned short. This eliminates warnings on some systems.
(shar): Cast masked st_mode to unsigned int, for matching format.
* unshar.c (main): Cast getpid to int, for matching format.
* configure.in: Use `-g -O' instead of `-g' as CFLAGS default
value, when GNU C is being used. Delay testing for presets.
* Makefile.in (dist, shar): Correct for when a different build
directory.
* configure.in: Replace strftime if missing, and study struct tm.
* strftime.c: New, from elsewhere.
* Makefile.in: Distribute it.
* shar.c (generate_full_header): Use it, instead of printing UTC.
Reported by Ulrich Drepper.
* shar.c (walktree): Merge both versions, using NO_WALKTREE to
choose which heart to execute. Remove length limitation on names.
Copy the received name, remove trailing slashes from the copy
before further processing, free the copy at end. Trailing
backslashes were showing duplicated in the generated shar. Use
basename instead of explicit code.
(walkdown): Revised. Remove length parameter on call. Remove
length limitations on names. Do not restore the string terminator
for error messages, since the original string is not altered anymore.
* xstrdup.c: New, from elsewhere.
* Makefile.in: Compile it, distribute it.
* shar.h: Declare xstrdup. Also declare xrealloc.
* shar.c, unshar.c: Remove register specifiers.
* shar.c: Refresh for Autoconf 2.0 renamings about dirent.
Reported by Karl Vogel and Kaveh R. Ghazi.
Mon Aug 15 12:46:19 1994 Francois Pinard (pinard@icule)
Get rid of warnings in unshar.c about undeclared system functions.
* shar.h: Include <unistd.h> if we have it.
* shar.c: Don't.
Reported by Joseph E. Sacco.
* shar.c (shar): Define file_type earlier, for error messages.
Reported by Andy Seaborne and Joseph E. Sacco.
Sat Aug 13 09:19:01 1994 Francois Pinard (pinard@icule)
* configure.in: Check for <sys/wait.h>.
* shar.h: Include <sys/wait.h> if we have it.
* shar.c (mode_string): Renamed from mode_map. Remove unused
code, `t' editing, and second argument.
(generate_one_header_line): Do not pass a second NULL argument to
mode_string. Do not mask out bits which are untested anyway.
Fri Aug 12 09:57:07 1994 Francois Pinard (pinard@icule)
* shar.c (shar): Use `uudecode FILE < FILE' instead of just
`uudecode < FILE', for those uudecode unwilling to merely read
their standard input. This will work only when -P is used.
Reported by Laurent Bourbeau.
Thu Aug 11 01:16:36 1994 Francois Pinard (pinard@icule)
* shar.c (shar): Add newlines to incomplete lines inside the
reading loop, instead of after it; because fgets should not alter
the buffer when it returns NULL. Also remove useless similar
lines in code for switching files.
Reported by Eric Backus.
Wed Aug 10 14:12:42 1994 Francois Pinard (pinard@icule)
* shar.c (shar): Completely avoid sed, compress, gzip and uuencode
for empty files. Just touch or empty files instead, while ensuring
restoration of access modes and time stamps, as usual.
Reported by Eric Backus.
* shar.c (usage): Say that -M, not -T, is the default.
Reported by Eric Backus.
* Makefile.in (prefix, exec_prefix): Get value from configure.
Reported by Eric Backus and Gordon Joly.
* configure.in: Use a memset replacement as required.
* memset.c: New, from elsewhere.
* Makefile.in: Use it, distribute it.
Reported by Karl Vogel and Kaveh R. Ghazi.
Tue Aug 9 13:44:28 1994 Francois Pinard (pinard@icule)
* configure.in: Updated for Autoconf 2.0.
* Makefile.in (distclean): Remove config.cache.
Sat Jul 30 11:52:43 1994 Francois Pinard (pinard@icule)
* shar.c (generate_full_header): Use time_t instead of long.
Reported by David J. MacKenzie and Michael Rendell.
Fri Jul 29 08:53:32 1994 Francois Pinard (pinard@icule)
* shar.c (usage): Improve the wording, here and there.
Reported by Karl Berry.
Thu Jul 28 17:26:00 1994 Francois Pinard (pinard@icule)
* shar.c (shar): Capitalize `Saving...' messages, also use lower
case for file types.
* unshar.c (unarchive_shar_file): Use `sh -s - -c' if pass_c_flag.
Bash as sh diagnosed a missing argument to -c with `sh -s -c'.
* shar.c (shar): For mixed mode determination, look for special
characters in the input file, instead of calling `file' on the
input file and studying its output.
(main): Initialize the byte_is_binary table.
* configure.in: Find out if characters are signed or not.
Reported by Andrey A. Chernov and Jan Djarv.
* shar.c (shar): Do not try completing an incomplete line with a
newline, if that incomplete line contains no character. This case
occurs for an empty file, in particular.
Reported by Eric Backus and Jan Djarv.
* shar.c (set_file_mode): New routine. Use it at places where the
various file_mode variables were set.
(main): Allow for intermixing -M when -p. Make -M the default.
Reported by Eric Backus and Karl Berry.
Thu Jul 21 21:04:12 1994 Francois Pinard (pinard@icule)
* Makefile.in (realclean): Do not remove stamp-h.in.
Reported by Karl Berry.
Tue Jul 19 09:58:03 1994 Francois Pinard (pinard@icule)
* Avoid declaring getpwuid with POSIX, as per GNU find 3.8.
Reported by Kaveh R. Ghazi.
Mon Jul 18 21:06:41 1994 Francois Pinard (pinard@icule)
* Makefile.in: Use $(binprefix).
Reported by Gordon Joly.
Sat Jul 16 09:28:47 1994 Francois Pinard (pinard@icule)
* shar.c: Change `shar' by `GNU shar' wherever the program
identifies itself.
* unshar.c: Change `unshar' by `GNU unshar' wherever the program
identifies itself.
* shar.texinfo: New documentation.
* Makefile.in: Prepare and install GNU documentation. This solves
a problem about exit status for an if with no else in install.
(install): Do not install man pages anymore, they are obsolete.
(install-man): New goal, for those who do want obsolete things.
Reported by Karl Berry.
Fri Jul 15 11:19:10 1994 Francois Pinard (pinard@icule)
* Version 3.52.3.
* shar.c: Add -z and -Z options, change --compressed-files to
--compress and --gzipped-files to --gzip, also --uuencoded-files
to --uuencode for uniformity. Have -C tell it will be deprecated.
Reported by Noah Friedman.
* shar.c: Rename --normal-files to --text-files, --maybe-uuencoded
to --mixed-uuencode.
* shar.c (main): Dynamically initialize output to stdout, instead
of statically. GNU libc does not allow stdout as a constant.
Reported by Joseph E. Sacco.
* shar.c (shar): Protect lines already starting with the sed
prefix, so `X' will be preserved at beginning of lines.
Reported by Eric Backus.
Thu Jul 14 10:14:44 1994 Francois Pinard (pinard@icule)
* Version 3.52.2.
* shar.c, unshar.c: Install long options, --help and --version.
* shar.c (walktree, walkdown): Use walker_t instead of explicit
functionnal argument, for easing ansi2knr's life.
Reported by Andy Seaborne, Karl Vogel and Thomas E. Dickey.
Wed Jul 13 15:23:55 1994 Francois Pinard (pinard@icule)
* basename.c: New, from elsewhere.
* shar.h: Declare basename. Remove strrchr definition.
* Makefile.in: Adjusted.
* shar.c: Use basename instead of strrchr.
* shar.c (shar): Correct a few things in the generated scripts...
Indent them the way configure scripts are. Protect restored file
name with quotes when used with chown. Limit shar work file names
to 12 characters beginning with `_shar' and ending with `.tmp'.
Have work shell variables begin with `shar_'. For reading the
part number, use cat inside backticks instead of a parenthesized
subshell. Avoid using the `true' program or script, use the `:'
shell construct instead. Avoid using `test X -a Y', use `test X
&& test Y' instead.
Tue Jul 12 00:07:14 1994 Francois Pinard (pinard@icule)
The following starts a general cleanup, which will slowly continue
as things evolve, without further entries in this ChangeLog.
* all: Make better use of const, static. Remove unused variables,
rename all others. Uniformize exit codes, error messages, etc.
* shar.h: Renamed from system.h. Move in some common declarations
from other modules, add missing declarations.
* Makefile.in: Adjusted.
* Makefile.in (dist-shar): New goal. Since shar parts have to be
unshared in sequence, we can rely on the order in which files are
shar'ed to induce a good topological order in the timestamps at
the receiving site. DISTFILES ordering is important from now on.
Reported by Thomas E. Dickey.
* shar.c (setTOUCH): Ensure that touch does use the date, the
previous test was grepping standard error, it was doomed to fail.
Reported by Bill Aten and Thomas E. Dickey.
* shar.c: Use the touch feature by default in generated shars, the
timestamps should be transmitted as far as possible. Warn at
unshar time if a shar file needs touch, and if touch is found to
be unusable. Try to avoid clashes when there are many unshar's
running in parallel. This code is not completely solid, yet the
probability of a clash is far weaker than before.
* Makefile.in (distclean): Remove stamp-h.
(realclean): Remove stamp-h.in.
Reported by Thomas E. Dickey.
Mon Jul 11 22:34:53 1994 Francois Pinard (pinard@icule)
* shar.c (shar): Consider a tilde at the beginning of a line as
special. This avoids trouble when using an old version of mail to
send a shar file.
Reported by Karl Vogel.
* system.h: Remove declaration of malloc and realloc, they are
unused.
Declare voidstar depending on __STDC__.
Check PROTOTYPES instead of __STDC__ for defining _().
* shar.c: Declare xmalloc. Use it instead of malloc.
Remove some useless code to report memory allocation errors.
* Makefile.in (clean): Remove ansi2knr executable.
Reported by Karl Vogel.
* Makefile.in (install): Do not try installing shar.info, it does
not exist yet.
Reported by Bill Aten, Karl Vogel and Thomas E. Dickey.
* configure.in: Have CFLAGS and LDFLAGS substituted from the
environment.
Reported by Karl Vogel.
* configure.in: Use special defines fo AIX and Minix.
Fri Jul 8 00:17:45 1994 Francois Pinard (pinard@icule)
* ansi2knr.1: New file, from elsewhere.
* Makefile.in (DISTFILES): Distribute it.
* shar.c, unshar.c, uushar.c, who@where.c: Merge in successive
diffs from 3.49 towards 3.52, privately sent around 1990-10.
Reported by Richard H. Gumpertz.
* remsync/mail-files: Wait only 4 seconds between mailings,
instead of 8.
Tue Jun 7 00:05:11 1994 Francois Pinard (pinard@icule)
* remsync/find-mailer: Use -f instead of -x. Not only -x is not
portable enough, but if a ~/Mail directory exists, it is wrongly
selected.
Reported by Bernd Nordhausen.
Sun Jun 5 16:02:15 1994 Francois Pinard (pinard@icule)
* Version 3.52.1.
* shar.c, unshar.c, uushar.c, who@where.c: From shar 3.49
distribution. Remove various logs and group them into file
ChangeLog.shar. Indent sources to GNU standards. Modify as
needed for auto-configuration. Replace perror() by error().
Replace both getwd() and getcwd() by xgetcwd().
* unshar.c: Remove getopt functions, for GNU getopt is used
instead.
* shar.c: Add -G and -gN for gzip compression.
* Initial packaging for remsync, but not distributed yet.
mailshar now uses gzip instead of compress, by default.
This branch pops out of shar, version 3.49, as published on alt.sources
on 1990-09-24. For previous history, see ChangeLog.OLD.
Mon Aug 23 15:32:00 1993 Ian Lance Taylor (ian@airs.com)
* Version 1.0 (for uuencode/uudecode).
Previous history for remsync.
* May 1994: Single Perl script, named remsync, replacing the
previous corresponding shell scripts mailsync and resync. A clean
rewrap was needed because, after adding many added features, the
scripts became intricate and hard to maintain. I also added other
functionalities, among which the possibility of interactive use.
* 1992: Shell scripts for synchronization of directory trees:
mailsync, resync. They were depending on many GNU tools.
* 1992: Shell scripts for automatic selection of a mailer, later
condensed into find-mailer.
* 1991: Shell scripts for file mailing: mail-file, mailshar, and
many others too specialized for being included here.

View File

@ -0,0 +1,228 @@
Makefile
========
# makefile for shar
#
# $Header: /tmp/bonefish/open-beos/current/src/apps/bin/sharutils-4.2.1/ChangeLog.OLD,v 1.1 2004/03/02 02:51:51 michaelphipps Exp $
#
#+:EDITS:
#:09-17-1990-12:25-rhg@cps.com-added -DMAXNAMLEN=MAX_NAME to CFLAGS for RT AIX
#:09-17-1990-11:28-rhg@cps.com-replaced NO_DIRENT with USE_DIR and USE_NDIR
#:09-12-1990-21:58-rhg@cps.com-moved strip from before to after cp to ${BINDIR}
#:09-09-1990-20:12-rhg@cps.com-added CLOSEDIR_VOID
#:09-09-1990-11:31-bill@netagw.com-add SHELL variable/-ldir for XENIX/UNIX 386
#:08-07-1990-21:25-rhg@cps.com-compress man pages if MANEXT ends with .Z
#:08-05-1990-23:50-rhg@cps.com-add post and compressed.
#:08-05-1990-12:19-rhg@cps.com-add LIBS and -ldirent
#:08-04-1990-18:51-rhg@cps.com-add CC, LD; move strip; reorder chgrp/chown.
#:05-14-1990-17:33-wht@n4hgf-add -F 5000 for XENIX 286
#:05-14-1990-17:32-bill@netagw.com-expanded Makefile
#:03-28-1990-14:54-wht@n4hgf-for 3.10, add who@where.c
shar.c
======
char RCS_ID[] = "$Header: /tmp/bonefish/open-beos/current/src/apps/bin/sharutils-4.2.1/ChangeLog.OLD,v 1.1 2004/03/02 02:51:51 michaelphipps Exp $";
/*+:EDITS: */
/*:09-27-1990-23:40-rhg@cps.com-added check for '.' to the OptPREFIX check */
/*:09-27-1990-17:10-rhg@cps.com-added USE_GETCWD and getcwd */
/*:09-27-1990-17:10-rhg@cps.com-added Delim_len to fix PREFIX (yes, again) */
/*:09-17-1990-11:28-rhg@cps.com-replaced NO_DIRENT with USE_DIR and USE_NDIR */
/*:09-12-1990-21:55-rhg@cps.com-added check for isgraph undefined (old BSD) */
/*:09-12-1990-14:24-rhg@cps.com-added missing return(0) to walkdown */
/*:09-12-1990-14:13-rhg@cps.com-deleted some redundant, unused, code */
/*:09-12-1990-00:28-rhg@cps.com-added more directions to the shar header */
/*:09-09-1990-20:12-rhg@cps.com-added CLOSEDIR_VOID */
/*:09-09-1990-18:42-rhg@cps.com-added check for "From" under OptPREFIX */
/*:09-09-1990-11:55-rhg@cps.com-modified code under NOT STR(N)CMP_IS_FAST */
/*:09-08-1990-21:20-rhg@cps.com-added NO_DIRENT for SunOS 3 sys/dir.h */
/*:09-08-1990-21:04-rhg@cps.com-fixed bug in PREFIX check: strcmp(line,Delim) */
/*:08-06-1990-00:40-rhg@cps.com-revised Cut message to be more explanatory */
/*:08-05-1990-14:04-rhg@cps.com-merged Rname into walktree */
/*:08-05-1990-12:11-rhg@cps.com-added walktree & support for sharing dirs */
/*:08-05-1990-09:05-rhg@cps.com-change -Bn, -t, and -b to -bn, -T, and -B */
/*:08-04-1990-15:31-rhg@cps.com-added -Bn to set compress -bn (default 12) */
/*:08-04-1990-15:31-rhg@cps.com-changed shar3_???_.tmp to _shar_???_.tmp */
/*:08-04-1990-15:22-rhg@cps.com-added check for "exit 0" under OptPREFIX */
/*:08-04-1990-14:32-rhg@cps.com-added -m to generate TOUCH (default off) */
/*:08-04-1990-14:18-rhg@cps.com-reversed the meaning of -x and deleted -O */
/*:06-14-1990-14:48-rhg@cps.com-made Split and eXists compatible.
/*:06-14-1990-14:18-rhg@cps.com-made -x the default and added -O
/*:06-14-1990-12:44-rhg@cps.com-always terminate the && and report failures
/*:06-14-1990-12:28-rhg@cps.com-clear mkdir_already between -l files
/*:06-14-1990-12:14-rhg@cps.com-change PREFIX from a #define to an int variable.
/*:04-19-1990-22:49-rhg@cps.com-get rid of "set" so "sh sharfil -c" will work */
/*:04-19-1990-21:52-rhg@cps.com-add -F to clear OptPREFIX */
/*:04-18-1990-08:49-rhg@cps.com-add OptPREFIX (for now, always on) */
/*:07-09-1990-19:24-wht@n4hgf-back to fgrep amc -- fits more -m touches */
/*:07-01-1990-18:37-wht@n4hgf-wait() needed after fork() */
/*:05-19-1990-02:47-wht@n4hgf-change fgrep amc to mmdd */
/*:05-16-1990-01:53-wht@n4hgf-Archive-name had extra period sometimes */
/*:05-10-1990-20:39-wht@n4hgf-altos does not not like at-sign in filenames */
/*:05-10-1990-13:38-wht@n4hgf-add -V Vanilla mode */
/*:05-07-1990-00:06-wht@n4hgf-test all mallocs for Purity Of Essence */
/*:05-07-1990-00:06-wht@n4hgf-add -S switch */
/*:05-05-1990-01:37-relay.EU.net!rivm!a3-dont assume vax is running BSD */
/*:04-18-1990-02:01-wht@n4hgf-3.20 rhg@cps.com did all the NICE work */
/*:04-17-1990-14:30-rhg@cps.com-pretty up if-then-else-fi in shar file */
/*:04-17-1990-12:13-rhg@cps.com-add Split and renamed old -l to -L */
/*:04-17-1990-12:13-rhg@cps.com-add -c option to shar file execution */
/*:04-17-1990-11:20-rhg@cps.com-simplify TOUCH logic in shar file */
/*:04-17-1990-10:27-rhg@cps.com-create setTOUCH to avoid duplicate code */
/*:04-17-1990-04:43-rhg@cps.com-add missing && to commands in shar file(s) */
/*:04-17-1990-02:03-rhg@cps.com-add Compress */
/*:04-16-1990-17:08-rhg@cps.com-add AvoidPipes as well as code to use pipes */
/*:04-03-1990-20:09-wht@n4hgf-3.11 */
/*:04-01-1990-13:20-pat@rwing-correct case on M option in getopt() call */
/*:04-01-1990-13:50-pat@rwing-change defaults on -v, -w to be on */
/*:03-29-1990-18:23-wht@n4hgf-add automatic sequent support */
/*:03-28-1990-15:56-wht@n4hgf-add mode and length net.bandwidth chrome */
/*:03-28-1990-14:23-wht@n4hgf-correct some runtime diagnostics */
/*:11-14-1989-02:21-wht-SHAR_EOF was botched if last file char not newline */
/*:11-02-1989-14:11-wht-add touch -am */
/*
Shar puts readable text files together in a package
from which they are easy to extract.
earlier attribution wht@n4hgf has: decvax!microsof!uw-beave!jim
(James Gosling at CMU)
*/
/*
* I have made several mods to this program:
*
* 1) the -----Cut Here-----... now preceds the script.
* 2) the cat has been changed to a sed which removes a prefix
* character from the beginning of each line of the extracted
* file, this prefix character is added to each line of the archived
* files and is not the same as the first character of the
* file delimeter.
* 3) added several options:
* -c - add the -----Cut Here-----... line.
* -d'del' - change the file delimeter to del.
* -s - cause the resulting script to print the wc of
* the orignal file and the wc of the extracted
* file.
*
* Michael A. Thompson
* Dalhousie University
* Halifax, N.S., Canada.
*/
/*
* I, too, have been hacking this code. This is the version on sixhub
* bill davidsen (davidsen@sixhub.uucp)
*
* - added support for binary files
* - automatic creation of limited size multiple file archives,
* each of which may be unpacked separately, and with sequence
* checking.
* - support for mixed text and binary files
* - preserve file permissions
* - restore to filename rather than pathname
*
*/
/*
* One good hack deserves another ... this version generates shell
* code which attempts to create missing directories
* handle deviants sun, vax, pyr (pyramid), SCO XENIX/UNIX automatically
* for sequent, add -DBSD42
* force Verbose on
* if unsharing system's touch Sys V compatible (allows touch -m),
* restore file dates
* -n switch puts an alpha "name" in header
* -a (if also -n) puts "Submitted-by:" & "Archive-name: <name>/part##
* use getopt
* as well as some other chrome-plated junque
* ...!gatech!emory!tridom!wht (wht%n4hgf@gatech.edu) Warren Tucker
*
* 3.11 - Fri Apr 6 14:21:51 EDT 1990
* With due deference to davidsen@sixhub, more changes..... copies
* of this, like 3.10, were mailed to him:
* From wht Fri Apr 6 15:14:30 1990 remote from n4hgf
* Received: by n4hgf.UUCP (smail2.5-UNIX/386 5.3.2)
* id AA01781; 6 Apr 90 15:14:30 EDT (Fri)
* Date: Fri, 6 Apr 90 15:14:30 EDT
* X-Mailer: Mail User's Shell (6.5 4/17/89)
* From: wht@n4hgf (Warren Tucker)
* To: davidsen@sixhub
* Subject: shar 3.11
* X-Bang-Reply-to: gatech!n4hgf!wht -or- emory!tridom!n4hgf!wht
* Reply-to: wht%n4hgf@gatech.edu
* Message-Id: <9004061514.AA01781@n4hgf.UUCP>
*
* 1. changes suggested by pat@rwing (Pat Myrto) and silvert@cs.dal.ca
* (Bill Silvert)
* 2. fixes to who_am_i code in who@where.c
*
* 3.20 - Wed Apr 18 01:58:32 EDT 1990
* changes were made per edit notes by
From: gatech!mailrus!uunet!cpsolv.CPS.COM!rhg (Richard H. Gumpertz)
* ...!gatech!n4hgf!wht (wht%n4hgf@gatech.edu) Warren Tucker
*
*/
unshar.c
========
char RCS_ID[] = "$Header: /tmp/bonefish/open-beos/current/src/apps/bin/sharutils-4.2.1/ChangeLog.OLD,v 1.1 2004/03/02 02:51:51 michaelphipps Exp $";
/* HISTORY
* 27-Sep-90 Richard H. Gumpertz (rhg@cps.com)
* add check for EXTERNAL_GETOPT to suppress the built-in getopt. (The
* builtin getopt is nice because it makes unshar more easily portable.)
* 12-Sep-90 Richard H. Gumpertz (rhg@cps.com)
* use fprintf instead of printf when printing error return from getwd.
* deleted unused initialization of more_to_read in process.
* changed ch from char to int in process so the EOF check would work.
* 4-Aug-90 Richard H. Gumpertz (rhg@cps.com)
* renamed -c and -C to -e and -E and added -c flag (passed through to sh)
* 24-Apr-90 Richard H. Gumpertz (rhg@cps.com)
* rewrote ENC() to use a more efficient formula
* 19-Apr-90 Colas Nahaboo (colas@mirsa.inria.fr)
* added -c and -C flags to read from concatenated archives
* 1-Feb-85 Guido van Rossum (guido@mcvax) at CWI, Amsterdam
* Added missing 'quit' routine;
* added -d flag to change to directory first;
* added filter mode (read stdin when no arguments);
* added 'getopt' to get flags (makes it self-contained).
* 29-Jan-85 Michael Mauldin (mlm) at Carnegie-Mellon University
* Created.
****************************************************************/
/*+:EDITS: */
/*:08-04-1990-15:54-rhg@cps.com-changes listed above (-c/-C => -e/-E, new -c) */
/*:05-05-1990-01:37-relay.EU.net!rivm!a3-dont assume vax is running BSD */
/*:04-19-1990-15:20-wht@n4hgf-fix so -d doesnt make argv files unreachable */
/*:04-19-1990-15:06-wht@n4hgf-colas@mirsa patches had expanded tabs */
/*:04-10-1990-22:02-wht@n4hgf-stdin failed sometimes-can not seek on pipe */
And for stlmatch:
* HISTORY
* 18-May-82 Michael Mauldin (mlm) at Carnegie-Mellon University
* Ripped out of CMU lib for Rog-O-Matic portability
* 20-Nov-79 Steven Shafer (sas) at Carnegie-Mellon University
* Rewritten for VAX from Ken Greer's routine.
*
* Originally from klg (Ken Greer) on IUS/SUS UNIX
uushar.c
========
/* $Header: /tmp/bonefish/open-beos/current/src/apps/bin/sharutils-4.2.1/ChangeLog.OLD,v 1.1 2004/03/02 02:51:51 michaelphipps Exp $ */
who@where.c
===========
/* $Header: /tmp/bonefish/open-beos/current/src/apps/bin/sharutils-4.2.1/ChangeLog.OLD,v 1.1 2004/03/02 02:51:51 michaelphipps Exp $ */
...!gatech!kd4nc!n4hgf!wht (wht%n4hgf@gatech.edu)
/*+:EDITS: */
/*:09-12-1990-01:04-rhg@cps.com-added declarations of strcpy and strcat */
/*:09-09-1990-19:49-rhg@cps.com-added explicit return statement to who_where */
/*:04-03-1990-19:55-wht@n4hgf-get rid of complicated who_am_i */
/*:04-01-1990-13:30-pat@rwing-use utsname.nodename instead of sysname */
/*:04-02-1990-12:12-wht@n4hgf-sigh... some pwd.h dont declare functions */
/*:03-29-1990-18:23-wht@n4hgf-add automatic sequent support */
/*:03-28-1990-15:24-wht@n4hgf-creation */

View File

@ -0,0 +1,167 @@
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source directory by typing `make clean'. To also remove the files
that `configure' created (so you can compile the package for a
different kind of computer), type `make distclean'.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Using a Different Build Directory
=================================
You can compile the package in a different directory from the one
containing the source code. Doing so allows you to compile it on more
than one kind of computer at the same time. To do this, you must use a
version of `make' that supports the `VPATH' variable, such as GNU
`make'. `cd' to the directory where you want the object files and
executables to go and run the `configure' script. `configure'
automatically checks for the source code in the directory that
`configure' is in and in `..'.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Save the results of the tests in FILE instead of `config.cache'.
Set FILE to `/dev/null' to disable caching, for debugging
`configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made.
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.

View File

@ -0,0 +1,4 @@
SubDir OBOS_TOP src apps bin sharutils-4.2.1 ;
SubInclude OBOS_TOP src apps bin sharutils-4.2.1 lib ;
SubInclude OBOS_TOP src apps bin sharutils-4.2.1 src ;

View File

@ -0,0 +1,119 @@
# Generated automatically from Makefile.in by configure.
# Main makefile for GNU Shar utility package.
# Copyright (C) 1995 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.
PACKAGE = sharutils
VERSION = 4.2.1
SHELL = /bin/sh
srcdir = .
DISTFILES = COPYING AUTHORS BACKLOG ChangeLog ChangeLog.OLD INSTALL \
Makefile.in ABOUT-NLS NEWS README README.OLD THANKS TODO \
acconfig.h aclocal.m4 config.h.in configure configure.in install-sh \
mkinstalldirs stamp-h.in README-alpha
SUBDIRS = doc lib po intl src checks contrib
all: all-recursive
all-recursive install install-exec install-data uninstall TAGS ID \
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive check: config.h Makefile
for subdir in $(SUBDIRS); do \
target=`echo $@|sed 's/-recursive//'`; \
echo making $$target in $$subdir; \
(cd $$subdir && $(MAKE) $$target) \
|| case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
install-man: config.h Makefile
echo making $@ in doc
cd doc && $(MAKE) $@
distdir = $(PACKAGE)-$(VERSION)
dist: Makefile
rm -fr $(distdir)
mkdir $(distdir)
for file in $(DISTFILES); do \
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir); \
done
for subdir in $(SUBDIRS); do \
mkdir $(distdir)/$$subdir || exit 1; \
(cd $$subdir && $(MAKE) $@) || exit 1; \
done
tar zchovf $(distdir).tar.gz $(distdir)
rm -fr $(distdir)
tags: TAGS
id: ID
mostlyclean: mostlyclean-recursive mostlyclean-local
clean: clean-recursive clean-local
distclean: distclean-recursive distclean-local
rm -f config.status
maintainer-clean: maintainer-clean-recursive maintainer-clean-local
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f config.status
mostlyclean-local:
clean-local: mostlyclean-local
distclean-local: clean-local
rm -f Makefile config.cache config.h config.log stamp-h tupdate.perl
maintainer-clean-local: distclean-local
check:
dvi info:
cd doc && $(MAKE) $@
# For understanding the following see the autoconf manual.
configure: configure.in aclocal.m4
cd $(srcdir) && autoconf
# autoheader might not change config.h.in
config.h.in: stamp-h.in
stamp-h.in: configure.in acconfig.h
cd $(srcdir) && autoheader
rm -f $(srcdir)/stamp-h.in && echo timestamp > $(srcdir)/stamp-h.in
#config.status might not change config.h
# Don't rerun config.status if we just configured.
config.h: stamp-h
stamp-h: config.h.in config.status
test ! -f stamp-h || ./config.status
rm -f stamp-h && echo timestamp > stamp-h
Makefile: Makefile.in config.status
./config.status
config.status: configure config.h.in
./config.status --recheck
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,119 @@
# Main makefile for GNU Shar utility package.
# Copyright (C) 1995 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.
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SHELL = /bin/sh
@SET_MAKE@
srcdir = @srcdir@
VPATH = @srcdir@
DISTFILES = COPYING AUTHORS BACKLOG ChangeLog ChangeLog.OLD INSTALL \
Makefile.in ABOUT-NLS NEWS README README.OLD THANKS TODO \
acconfig.h aclocal.m4 config.h.in configure configure.in install-sh \
mkinstalldirs stamp-h.in @DIST_ALPHA@
SUBDIRS = doc lib @POSUB@ @INTLSUB@ src checks contrib
all: all-recursive
all-recursive install install-exec install-data uninstall TAGS ID \
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive check: config.h Makefile
for subdir in $(SUBDIRS); do \
target=`echo $@|sed 's/-recursive//'`; \
echo making $$target in $$subdir; \
(cd $$subdir && $(MAKE) $$target) \
|| case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
install-man: config.h Makefile
echo making $@ in doc
cd doc && $(MAKE) $@
distdir = $(PACKAGE)-$(VERSION)
dist: Makefile
rm -fr $(distdir)
mkdir $(distdir)
for file in $(DISTFILES); do \
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir); \
done
for subdir in $(SUBDIRS); do \
mkdir $(distdir)/$$subdir || exit 1; \
(cd $$subdir && $(MAKE) $@) || exit 1; \
done
tar zchovf $(distdir).tar.gz $(distdir)
rm -fr $(distdir)
tags: TAGS
id: ID
mostlyclean: mostlyclean-recursive mostlyclean-local
clean: clean-recursive clean-local
distclean: distclean-recursive distclean-local
rm -f config.status
maintainer-clean: maintainer-clean-recursive maintainer-clean-local
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f config.status
mostlyclean-local:
clean-local: mostlyclean-local
distclean-local: clean-local
rm -f Makefile config.cache config.h config.log stamp-h tupdate.perl
maintainer-clean-local: distclean-local
check:
dvi info:
cd doc && $(MAKE) $@
# For understanding the following see the autoconf manual.
configure: configure.in aclocal.m4
cd $(srcdir) && autoconf
# autoheader might not change config.h.in
config.h.in: stamp-h.in
stamp-h.in: configure.in acconfig.h
cd $(srcdir) && autoheader
rm -f $(srcdir)/stamp-h.in && echo timestamp > $(srcdir)/stamp-h.in
#config.status might not change config.h
# Don't rerun config.status if we just configured.
config.h: stamp-h
stamp-h: config.h.in config.status
test ! -f stamp-h || ./config.status
rm -f stamp-h && echo timestamp > stamp-h
Makefile: Makefile.in config.status
./config.status
config.status: configure config.h.in
./config.status --recheck
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,76 @@
GNU sharutils NEWS - User visible changes.
Copyright (C) 1994, 1995 Free Software Foundation, Inc.
Version 4.2 - November 1995, by François Pinard & Ulrich Drepper
* New `mailshar' is a wrapper around `shar' and electronic mail.
* New `remsync' is a Perl script which uses `mailshar' to help
synchronizing remote directories, for sites connected only by email.
* Programs (but not scripts) may now speak Dutch, French, German
and Swedish.
* Option -o offers better control over where to insert the part numbering
in the file name.
* There are the beginnings of a contrib directory.
* Produced shell archive are now internationalized, too
* uuencode/uudecode are now compliant to the latest POSIX.2d draft
(more options, new encoding).
* Updated man pages for shar/unshar by Jan Djarv
* Speed up unshar a little bit.
* Protect against transmission error by using MD5 sum. The old wc sum
is more or less useless, but still the fallback solution.
Version 4.1 - November 1994, by François Pinard
* GNU shar 4.0 and GNU uuencode 1.0 distributions have been merged
into this GNU sharutils package, which replaces both. So this release
introduces `uuencode' and `uudecode', over `shar' and `unshar'.
* Option --no-verbose (-v) is being replaced by two different options:
first is --quiet or --silent (-q), second is --quiet-unshar (-Q).
Version 4.0 - September 1994, by François Pinard
* The distribution includes a Texinfo manual and Info documentation.
Jan Djarv updated the man pages.
* Mixed mode (-M) mode works reliably and is the default, intermixing
types within file lists (-p) allows `-M'.
* When piping is forbidden (-P), the shar scripts are usable by
uudecode's requiring an argument as well as by those unable to
process one.
* Interactive scripts (-X) better protect themselves against
`unshar' programs and procedures. The query format is nicer.
Version 3.52.3 - July 1994, by François Pinard
* --gzip (-z) replaces --gzipped-files (-G). --compress (-Z)
replaces --compressed-files (-C). -C is kept for a while, but
gives a warning about being deprecated.
Version 3.52.2 - July 1994, by François Pinard
* Long options, among which --help and --version.
* Tildas are protected at the beginning of a line.
* Setting timestamps is attempted by default, using an improved
check of the local `touch' program at unshar time.
* Generated shar scripts are cleaner on various details.
Version 3.52.1 - June 1994, by François Pinard
* New options -G and -g<N> to use gzip while making shar files.
See file `ChangeLog.OLD' for prior history about shar and unshar.

View File

@ -0,0 +1,48 @@
This is the set of GNU shar utilities.
`shar' makes so-called shell archives out of many files, preparing
them for transmission by electronic mail services. `unshar' helps
unpacking shell archives after reception. The core of both programs
is initially derived from public domain. Some modules and other
code sections are freely borrowed from other GNU distributions,
bringing `shar' under the terms of the GNU General Public License.
`uuencode' prepares a file for transmission over an electronic channel
which ignores or otherwise mangles the eight bit (high order bit) of
bytes. `uudecode' does the converse transformation. They are derived
from the BSD NET/2 distribution, but enchanced with the features
described in recent POSIX standards. If you have more powerful
`uuencode' and `uudecode' already available, you may want to use
`./configure --disable-uucode' to prevent their installation.
`remsync' allows for remote synchronization of directory trees,
using electronic mail. This part of sharutils is still alpha.
You should have already installed Perl, gzip, GNU diff, GNU tar
and GNU shar prior to installing remsync package. Only Perl is
really mandatory, write to me if you feel like helping to remove
the other dependencies.
Beside the Perl script `remsync' and its shell scripts the whole
package now is internationalized. This includes the generated shell
scripts. As described in the `ABOUT-NLS' file you have various
options for handling this internationalization but this package is
special in one point: it always needs the GNU message catalog files to
be installed. Therefore it might be a good idea to always use the GNU
gettext functions and not the functions provided by your system. This
is of course not needed if your system uses GNU gettext in its system
library.
See file `ABOUT-NLS' for how to customize this program to your language.
See file `BACKLOG' for a summary of pending mail and articles.
See file `COPYING' for copying conditions.
See file `INSTALL' for compilation and installation instructions.
See file `NEWS' for a list of major changes in the current release.
See file `THANKS' for a list of contributors.
Jan Djarv takes care of the man pages, otherwise unsupported, and
their installation is kept separate from `make install'. You use
`make install-man' for them. Better think GNU and switch to Info.
Your feedback will help us to make a better and more portable
product. Mail suggestions and bug reports (including documentation
errors) for this program to `bug-gnu-utils@prep.ai.mit.edu'.

View File

@ -0,0 +1,273 @@
This file last revised Sat Aug 4 17:15:01 CDT 1990
Here is shar 3.52, an updated version of shar 3.49, derived from 'shar2'.
This offering is the work of many people. Thanks to wht@n4hgf.Mt-Park.GA.US
(Warren Tucker), rhg@CPS.COM (Richard H. Gumpertz), colas@avahi.inria.fr
(Colas Nahaboo), bill@netagw.com (Bill Aten), marks@rex.cs.tulane.edu, and
maaaany others.
This version's shar:
1) generates shell code which attempts to create missing directories
2) generates shell code which will force overwriting of files when passed
the '-c' option.
3) allows entire directories to be archived
4) handle deviants sun, vax, pyramid, sequent, and SCO XENIX/UNIX
automatically; for system V systems I did not catch, add -DSYS5
to CFLAGS; for other BSD-like systems, add -DBSD42
5) if unsharing system's touch is Sys V compatible (allows touch -m),
the unshar process restores file dates (-m switch)
6) An archive name may be specified for inclusion in the header
of the shar files (-n switch)
7) allows automatic generation of "Submitted-by: who@where" &
"Archive-name: <name>/part##" headers
8) uses getopt; no good system library should be without a copy
but it is readily available (like look in unshar.c)
9) includes other chrome-plated bells, whistles, and junque
This version's unshar:
1) can change directory before unsharing
2) can unshar from standard in, from a COLLECTION of shars,
from a file containing multiple concatenated shars,
or a mixture of shar files and concatenated-shar files.
3) can pass the '-c' option on to the script being extracted.
4) does not have a Social Security number.
------------------------ shar usage -----------------------------------
shar 3.52
usage: shar [ options ] file ...
shar -S [ options ]
-V produce "vanilla" shars demanding little of the unshar environment
-v verbose messages OFF while executing
-m restore file modification dates & times with "touch" commands
-w don't check with 'wc -c' after unpack
-a generate Submitted-by: & Archive-name: headers
-nXXX use XXX as the name of the archive (documentation)
-s override automatically determined submitter name
-x overwrite existing files without checking if they already exist
-X interactively overwrite existing files (NOT FOR NET SHARS)
-B treat all files as binary, use uuencode
-T treat all files as text (default)
-C compress and uuencode all files
-bXX pass -bXX (default 12) to compress when compressing (implies -C)
-p allow positional parameter options. The options "-B" and "-B"
and "-C" may be embedded, and files to the right of the
option will be processed in the specified mode
-M mixed mode. Determine if the files are text or
binary and archive correctly.
-P use temp files instead of pipes in the shar file
-F force the prefix character on every line (even if not required)
-c start the shar with a cut line
-f restore by filename only, rather than path
-dXXX use XXX to delimit the files in the shar
-oXXX (or -o XXX) output to file XXX.01 thru XXX.nn
-lXX limit output file size to XXk bytes (but don't split files)
-LXX limit output file size to XXk bytes (may split files)
-S read files to wrap from stdin, ignoring argument line
The -S option reads filenames one per line from stdin; input
format must be similar to 'find' output, except that if -p
is specified, -B, -T or -C may be used (on lines by themselves)
e.g., find . -type f -print | sort | shar -C -l50 -o /tmp/big
The 'o' option is required if the 'l' or 'L' option is used
The 'n' option is required if the 'a' option is used
-a generates sharname/part## headers. If the -a argument contains
a '/', then /part is not appended
The automatic submitter name is trivial: essentially `whoami`@`uname`
------------------------ unshar usage -----------------------------------
Unshar has no usage built in. It has default actions when invoked
with no arguments (read from stdin).
Usage: unshar [ -d directory ] [ -c ] [ -e | -E exit_line ] [ files ... ]
The -c flag is passed through to the shell as a parameter to the script
It can unshar shar files concatenated in one file, with the
the "-e" command, which separates files by recognizing the
"exit 0" string at the beginning of a line
(The -E string option allows you to specify this string, thus
-e is equivalent to -E "exit 0")
The -d flag tells unshar to change directory before unsharing
--------------------- history -----------------------------------------
Changes since 3.11: kudos to rhg@CPS.COM (Richard H. Gumpertz)
1. The -l switch still specifies a maximum size for the generated
shar files, but now it prevents files from spanning shar parts.
Shars generated using this method may be unpacked in any order.
2. The old -l switch functionality is precisely emulated by using the
the -L switch. That is, archived files may be split across parts.
Shars generated using this method must still be unpacked in order.
3. The -C switch causes files to be compressed, then uuencoded.
Unpacking reverses the process.
4. The -P causes the shar to use temp files instead of pipes in
the unshar process.
5. The -f causes files to be resotred by name only (i.e., strip
directory portion of input filenames before placing the name
into the shar.
Changes since 3.20: kudos to colas@avahi.inria.fr (Colas Nahaboo)
1. The Archived-name: header no longer uses "/part" if there is
a "/" in the -n name. Thus
-n xyzzy procduces:
xyzzy/part01
xyzzy/part02
-n xyzzy/patch procduces:
xyzzy/patch01
xyzzy/patch02
-n xyzzy/patch01. procduces:
xyzzy/patch01.01
xyzzy/patch01.02
2. The Archive-name part number other than part01 had no leading zero
in the number.
3. The "Submitted-by:" header was missing the hyphen (minus for olde
UNIX hackres).
4. The unshar program may now unshar a whole mailbox or concatenation
of shar files.
-C "string" looks for "string" at the beginning of the line to
break the file into individual shar files
-c is equivalent to -C "exit 0"
This of course will only work if there is something in the shar
file recognizable to terminate the shar. Some shars dont have
"exit 0" at the end. However, a clue: most/many .signatures have
"--" on a line right before them.
5. Unshar -d (change directory) no longer makes argv files unreachable.
I had never used the feature until the other day. I guess the
author has used in only for unsharing from stdin.
Changes since 3.21: thanks to Adri Verhoef, <a3@rivm.UUCP>
1. Some vaxen do not run BSD. I guess I knew this, but -er-
here is Adri's note:
> Hi Warren,
>
> I encountered a problem trying to get 'shar3.21' to compile on System V
> on a vax. Yes, can you believe it? We run System V Release 3.0 on VAXen!
> The shar3.21 code assumes that you are BSD if you're on a vax. This is not
> always true! What I did to get the code compiled on System V, was:
> (+) edit the Makefile and add -DSYS5 to CFLAGS.
> (+) edit all the C-source files to circumcise compiler warnings
> ("SYS5 redefined").
>
He made a suggestion about having a localize.sh edit a distribution
Makefile, but for now, I'll just suggest you add -DSYS5 to CFLAGS
manually.
2. jhd@irfu.se (Jan Dj{rv, sorry about the screwed up character
translation, Jan) wrote man pages. Thanks!
Changes since 3.22: thanks to Dennis Boylan <dennis@nanovx>
1. The new -S option allows the list of files to be packed
to be read from the standard input rather than from the
command line.
2. A few purist checks were made to ensure fork() or malloc()
doesn't fail and excite the "if 20 hours of your time is
free then why isn't 200?" crowd (who probably will never see
this revision anyway :-))
Changes since 3.23:
1. The -V mode was added.
2. Altos doesn't like the '@' in filenames. The filename format
was changed. Thanks to rhg@cps.com.
Changes since 3.24:
1. Man pages were revised by gam@netcom (Gordon Moffet). Thanks.
2. When -L was specified, the "Starting ..." message was not
produced on standard error (with or without -v).
3. When using -X, the 'not for net' warning was printed on standard
output rather thsn standard error.
4. marks@rex.cs.tulane.edu reccommends adding -F 5000 to the load
line of unshar when using on XENIX 286 to avoid stack overflow
core dumps. I added this information to an excellkent remake
of the Makefile by bill@netagw.com.
Changes since 3.25:
1. Fixed one minor bug with -a/-n. The period supplied when a
slash appears in the -n name was omitted. This is a hatefully
small bug to fix and reissue a whole release, but
a) several new names are on the sharlist now and they have
only 3.24 to work with,
b) this will surely sync us all up, and
c) I think it will put shar to bed for a while ("no known bugs
at this ti ... bus error core dumped").
Changes since 3.27:
1. The unshar-time test for a touch -m facility now greps for
'mmdd', not '[-amc]', making it more universally successful.
2. NOTE: there is still a problem with -n arguments using
a 'x/y' construct, but I don't know how to properly generalize
it so you'll have to edit shars made with some uses of -a
with -n x/y.
3. This is surely my last work on this. It does everything
I needed and more. Thanks for all the help and suggestions.
It seems as though we didn't precipitate 'death of the shar'
after all :-) :-) :-).
Changes since 3.32:
1. Several bug fixes.
2. Inverted the meaning of '-x'; the new default is to NOT overwrite.
3. Added '-c' checking when unpacking so the recipient can force overwrites.
4. Made '-L' work even with files not being overwritten.
5. Added '-m' and changed the default behavior to not generate TOUCH commands.
6. Added '-F'; the default is to suppress the extra 'X' at the beginning of
each line unless it is needed (i.e., the first character of the line is
already 'X' or is a non-graphic).
7. Renamed '-b' and '-t' to '-B' and '-T', respectively.
8. Added '-bn' for use with compression (calls compress with -bn).
9. Renamed the temporary files used in unpacking from shar3_???_.tmp to
_shar_???_.tmp.
10. Directories may now be passed to shar; a recursive directory walk is
performed. This feature may be disabled by compiling with -DNO_WALKTREE.
Changes since 3.43:
1. Several more minor bug fixes.
2. Added support for BSD-style <sys/dir.h> and -ldir.
3. Added more usage directions to the shar header.
Changes since 3.49:
1. Added more support for Unix variations.
2. A few more very minor bug fixes.

View File

@ -0,0 +1,72 @@
The shar and unshar programs is the collective work of many authors.
Many people contributed to shar by reporting problems, suggesting
various improvements or submitting actual code. Here is a list of
these people. Help me keeping it complete and exempt of errors.
Andrew B. Smith abs@maunsell.co.uk
Andrew Walduck amewaldu@undergrad.math.uwaterloo.ca
Andrey A. Chernov ache@astral.msk.su
Andries E. Brouwer aeb@win.tue.nl
Andy Seaborne afs@hplb.hpl.hp.com
Antonio Esteves esteves@di.uminho.pt
Bernd Nordhausen bernd@passage.com
Bill Aten bill@netagw.com
Bill Campbell bill@celestial.com
Bill Silvert silvert@cs.dal.ca
Bruno Haible haible@ma2s2.mathematik.uni-karlsruhe.de
Christian von Roques roques@pond.sub.org
Christopher Sawtell chris@gerty.equinox.gen.nz
Colas Nahaboo colas@mirsa.inria.fr
David J. MacKenzie djm@uunet.uu.net
Dennis Boylan nanovx!dennis
Donald Page donaldp@sco.com
Elliott Pacetti epacet@unf6.cis.unf.edu
Elvia Lopez Hurtado elvial@ctsmex.attmail.com
Eric Backus ericb@lsid.hp.com
François Pinard pinard@iro.umontreal.ca
Gordon Joly G.Joly@cs.ucl.ac.uk
Gordon Moffet netcom!gam
Greg McGary gkm@magilla.cichlid.com
Gregory Neil Shapiro gshapiro@wpi.edu
Harlan Stenn harlan@mumps.pfcs.com
Horst von Brand vonbrand@inf.utfsm.cl
Ian Jackson iwj@cam-orl.co.uk
Jan Djarv Jan.Djarv@sa.erisoft.se
James Gosling James.Gosling@eng.sun.com
Jim Meyering meyering@acm.org
Joseph E. Sacco jsacco@ssl.com
Joshua R. Poulson jrp@plaza.ds.adp.com
Karl Berry kb@cs.umb.edu
Karl Vogel vogelke@c-17igp.wpafb.af.mil
Kaveh R. Ghazi ghazi@noc.rutgers.edu
Ken Olstad olstad@msc.edu
Laurent Bourbeau bpi!bourbeau
Meade Roberts meade@plaza.ds.adp.com
Michael A. Thompson mike@iotek.ns.ca
Michael Mauldin mlm@cs.cmu.edu
Michael Rendell michael@cs.mun.ca
Nelson H. F. Beebe beebe@math.utah.edu
Noah Friedman friedman@gnu.ai.mit.edu
Pat Myrto rwing!pat
Paul A. Vixie paul@vix.com
Paul Eggert eggert@twinsun.com
Richard H. Gumpertz rhg@cps.com
Richard Segal segal@cs.washington.edu
Richard Stallman rms@prep.ai.mit.edu
Robert J.C. Kyanko rob@rjck.oau.org
Roderick Schertler roderick@gate.net
Thomas E. Dickey dickey@clark.net
Ulrich Drepper drepper@gnu.ai.mit.edu
Warren Tucker wht@n4hgf.atl.ga.us
William Davidsen davidsen@tmr.com
Thanks to all members of the translation teams for the different
languages. Mentioned here are the persons who sent the catalogs:
Dutch: Andries E. Brouwer aeb@win.tue.nl
French: François Pinard pinard@iro.umontreal.ca
German: Ulrich Drepper drepper@gnu.ai.mit.edu
Japanese: Sakai Kiyotaka ksakai@netwk.ntt-at.co.jp
Portugese: Antonio Esteves esteves@di.uminho.pt
Svedish: Jan Djarv Jan.Djarv@sa.erisoft.se

View File

@ -0,0 +1,82 @@
* TODO file for GNU sharutils
Tell <drepper@gnu.ai.mit.edu> if you feel like volunteering for any
of these ideas, listed more or less in decreasing order of priority.
Some TODO items are implicit from received email. See file BACKLOG.
(One more word. This list already existed when I took over the task
of maintaining sharutils. I have not investigated the list enough
to say this will also be correct for me. But Franc,ois and I often
agree so it is likely.)
.# Next release
The next release will have these changes:
. + better integrate uucode with the others, code-wise
.@ ChangeLog
.* Short term
. + Utiliser guillemets français dans fr.tt
. + convert uucode documentation into sharutils.texi
. + remove many fixed limits, everywhere
. + delete useless code, among which some matching features
. + simplify further `:' vs `true' usage, the latter might be avoided
. + remsync matters
. - documentation
The documentation is still rudimentary, but might help you to
understand what is going on. Many examples in some quick start
node might help. In any case, criticize it at will, and let me
use your comments as an incentive for further improvement. Any help
from native English speakers is appreciated.
Carefully ensure that you have a backup of your synchronized trees
before your tries of remsync. It does work for me, but who knows if
it will not be dangerous in your particular setup.
White lines, and lines beginning with \`#\', are comments. Command
keywords may be abbreviated to their first letter. Space between
successive keywords may be omitted. Variable arguments may often be
replaced by numeric index from lists. SITE may also be local or 0.
SITE_SET is a list of SITE, default is all. A ! prefix complements it.
The following commands are meant for automatic internal use:
. - handle receving files over symbolic links or directories
. - maintain a project title
. - no remote could also be local
. - diagnose /net/mnt_tmp/... directories
. - if deleting a scan, already registered files declared unexisting
. - have a paranoid option, in which diffs are always done
. - study if and how the symbolic links might be transported
.* Medium term
. + integrate remsync script and documentation
. + have -C as synonymous for -d in shar
1994-08-22, Karl Berry <kb@cs.umb.edu>
. + speedup unshar, far too slow while matching sed input
. + construct some `make check' for shar/unshar
. + do something sensible with file permissions
. + study if the symbolic links might be transported
. + when local/remote directories are relative, this should be to ~user
. + do not send absolute files
. + add some `-h UNSHAR.HDR' option
1994-08-19, Marty Leisner <leisner@sdsp.mc.xerox.com>
. + decode options from a SHAR environment variable
1994-08-30, Ulrich Drepper <drepper@ira.uka.de>
. + remsync matters
. - have a command to rename a remote while keeping all its values
. - do something sensible with file permissions
. - qualify each scan with destination sites
. - emacslisp/menage.el to omit, have it reconstructed automatically instead
. - have an equivalence system for email addresses
. - avoid computing checksums for ignored files
. - have a master directory for .remsync's, have them located elsewhere
. - have a recursive mode finding all .remsync's in tree
. - provide encryption hooks, so people can use e.g. PGP or rot13 :-)
.* Long term
. + automatically retrieve in correct sequence from a bunched file
1994-08-24, Karl Berry <kb@cs.umb.edu>
. + when -T, just reject binary files
1994-08-29, Andrew A. Chernov <ache@astral.msk.su>
1994-09-11, Eric Backus <ericb@lsid.hp.com> -- disagrees

View File

@ -0,0 +1,36 @@
/* Special definitions for sharutils, processed by autoheader.
Copyright (C) 1994 Free Software Foundation, Inc.
François Pinard <pinard@iro.umontreal.ca>, 1994.
Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
*/
/* Define if the current hostname may be found in /etc/systemid. */
#undef HAVE_ETC_SYSTEMID
/* Define to the name of the distribution. */
#undef PACKAGE
/* Define to 1 if ANSI function prototypes are usable. */
#undef PROTOTYPES
/* Define to the version of the distribution. */
#undef VERSION
/* Define to 1 for better use of the debugging malloc library. See
site ftp.antaire.com in antaire/src, file dmalloc/dmalloc.tar.gz. */
#undef WITH_DMALLOC
/* Define if your locale.h file contains LC_MESSAGES. */
#undef HAVE_LC_MESSAGES
/* Define to 1 if NLS is requested. */
#undef ENABLE_NLS
/* Define as 1 if you have catgets and don't want to use GNU gettext. */
#undef HAVE_CATGETS
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
#undef HAVE_GETTEXT
/* Define as 1 if you have the stpcpy function. */
#undef HAVE_STPCPY

317
src/apps/bin/sharutils-4.2.1/aclocal.m4 vendored Normal file
View File

@ -0,0 +1,317 @@
# Local additions to Autoconf macros.
# Copyright (C) 1992, 1994 Free Software Foundation, Inc.
# Francois Pinard <pinard@iro.umontreal.ca>, 1992.
# NLS configuration macros added.
# Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
# @defmac AC_PROG_CC_STDC
# @maindex PROG_CC_STDC
# @ovindex CC
# If the C compiler in not in ANSI C mode by default, try to add an option
# to output variable @code{CC} to make it so. This macro tries various
# options that select ANSI C on some system or another. It considers the
# compiler to be in ANSI C mode if it defines @code{__STDC__} to 1 and
# handles function prototypes correctly.
#
# If you use this macro, you should check after calling it whether the C
# compiler has been set to accept ANSI C; if not, the shell variable
# @code{ac_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
# code in ANSI C, you can make an un-ANSIfied copy of it by using the
# program @code{ansi2knr}, which comes with Ghostscript.
# @end defmac
define(fp_PROG_CC_STDC,
[AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
AC_CACHE_VAL(ac_cv_prog_cc_stdc,
[ac_cv_prog_cc_stdc=no
ac_save_CFLAGS="$CFLAGS"
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX -qlanglvl=ansi
# Ultrix and OSF/1 -std1
# HP-UX -Aa -D_HPUX_SOURCE
# SVR4 -Xc
for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" -Xc
do
CFLAGS="$ac_save_CFLAGS $ac_arg"
AC_TRY_COMPILE(
[#if !defined(__STDC__) || __STDC__ != 1
choke me
#endif
], [int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};],
[ac_cv_prog_cc_stdc="$ac_arg"; break])
done
CFLAGS="$ac_save_CFLAGS"
])
AC_MSG_RESULT($ac_cv_prog_cc_stdc)
case "x$ac_cv_prog_cc_stdc" in
x|xno) ;;
*) CC="$CC $ac_cv_prog_cc_stdc" ;;
esac
])
# Check for function prototypes.
AC_DEFUN(fp_C_PROTOTYPES,
[AC_REQUIRE([fp_PROG_CC_STDC])
AC_MSG_CHECKING([for function prototypes])
if test "$ac_cv_prog_cc_stdc" != no; then
AC_MSG_RESULT(yes)
AC_DEFINE(PROTOTYPES)
U= ANSI2KNR=
else
AC_MSG_RESULT(no)
U=_ ANSI2KNR=ansi2knr
fi
AC_SUBST(U)dnl
AC_SUBST(ANSI2KNR)dnl
])
# Check if --with-dmalloc was given.
AC_DEFUN(fp_WITH_DMALLOC,
[AC_MSG_CHECKING(if malloc debugging is wanted)
AC_ARG_WITH(dmalloc,
[ --with-dmalloc use dmalloc, as in dmalloc.tar.gz from
@/ftp.antaire.com:antaire/src/dmalloc.],
[if test "$withval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(WITH_DMALLOC)
LIBS="$LIBS -ldmalloc"
LDFLAGS="$LDFLAGS -g"
else
AC_MSG_RESULT(no)
fi], [AC_MSG_RESULT(no)])])
dnl --------------------------------------------------------- ##
dnl Use AC_PROG_INSTALL, supplementing it with INSTALL_SCRIPT ##
dnl substitution. ##
dnl --------------------------------------------------------- ##
AC_DEFUN(fp_PROG_INSTALL,
[AC_PROG_INSTALL
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL} -m 755'
AC_SUBST(INSTALL_SCRIPT)dnl
])
AC_DEFUN(md_PATH_PROG,
[AC_PATH_PROG($1,$2,$3)dnl
if echo $$1 | grep openwin > /dev/null; then
echo "WARNING: Do not use OpenWin's $2. (Better remove it.) >&AC_FD_MSG"
ac_cv_path_$1=$2
$1=$2
fi
])
dnl Check NLS options
AC_DEFUN(ud_LC_MESSAGES,
[if test $ac_cv_header_locale_h = yes; then
AC_MSG_CHECKING([for LC_MESSAGES])
AC_CACHE_VAL(ud_cv_val_LC_MESSAGES,
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
ud_cv_val_LC_MESSAGES=yes, ud_cv_val_LC_MESSAGES=no)])
AC_MSG_RESULT($ud_cv_val_LC_MESSAGES)
if test $ud_cv_val_LC_MESSAGES = yes; then
AC_DEFINE(HAVE_LC_MESSAGES)
fi
fi])
AC_DEFUN(ud_WITH_NLS,
[AC_MSG_CHECKING([whether NLS is requested])
dnl Default is enabled NLS
AC_ARG_ENABLE(nls,
[ --disable-nls do not use Native Language Support],
nls_cv_use_nls=$enableval, nls_cv_use_nls=yes)
AC_MSG_RESULT($nls_cv_use_nls)
dnl If we use NLS figure out what method
if test "$nls_cv_use_nls" = "yes"; then
AC_DEFINE(ENABLE_NLS)
AC_MSG_CHECKING([for explicitly using GNU gettext])
AC_ARG_WITH(gnu-gettext,
[ --with-gnu-gettext use the GNU gettext library],
nls_cv_force_use_gnu_gettext=$withval,
nls_cv_force_use_gnu_gettext=no)
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
if test "$nls_cv_force_use_gnu_gettext" = "yes"; then
nls_cv_use_gnu_gettext=yes
else
dnl User does not insist on using GNU NLS library. Figure out what
dnl to use. If gettext or catgets are available (in this order) we
dnl use this. Else we have to fall back to GNU NLS library.
AC_CHECK_LIB(intl, main)
AC_CHECK_LIB(i, main)
CATOBJEXT=NONE
AC_CHECK_FUNC(gettext,
[AC_DEFINE(HAVE_GETTEXT)
AC_PATH_PROG(MSGFMT, msgfmt, no)dnl
if test "$MSGFMT" != "no"; then
AC_CHECK_FUNCS(dcgettext)
md_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)dnl
md_PATH_PROG(XGETTEXT, xgettext, xgettext)dnl
CATOBJEXT=.mo
INSTOBJEXT=.mo
DATADIRNAME=lib
fi])
if test "$CATOBJEXT" = "NONE"; then
dnl No gettext in C library. Try catgets next.
AC_CHECK_FUNC(catgets,
[AC_DEFINE(HAVE_CATGETS)
INTLOBJS="\$(CATOBJS)"
AC_PATH_PROG(GENCAT, gencat, no)dnl
if test "$GENCAT" != "no"; then
AC_PATH_PROGS(GMSGFMT, [gmsgfmt msgfmt], msgfmt)dnl
md_PATH_PROG(XGETTEXT, xgettext, xgettext)dnl
CATOBJEXT=.cat
INSTOBJEXT=.cat
DATADIRNAME=lib
INTLDEPS="../intl/libintl.a"
INTLLIBS=$INTLDEPS
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
nls_cv_header_intl=intl/libintl.h
nls_cv_header_libgt=intl/libgettext.h
# We need to process the intl/ and po/ directory.
INTLSUB=intl
fi])
fi
if test "$CATOBJEXT" = "NONE"; then
dnl Neither gettext nor catgets in included in the C library.
dnl Fall back on GNU gettext library.
nls_cv_use_gnu_gettext=yes
fi
fi
if test "$nls_cv_use_gnu_gettext" = "yes"; then
dnl Mark actions used to generate GNU NLS library.
INTLOBJS="\$(GETTOBJS)"
md_PATH_PROG(MSGFMT, msgfmt, msgfmt)dnl
md_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)dnl
md_PATH_PROG(XGETTEXT, xgettext, xgettext)dnl
AC_SUBST(MSGFMT)
CATOBJEXT=.gmo
INSTOBJEXT=.mo
DATADIRNAME=share
INTLDEPS="../intl/libintl.a"
INTLLIBS=$INTLDEPS
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
nls_cv_header_intl=intl/libintl.h
nls_cv_header_libgt=intl/libgettext.h
# We need to process the intl/ directory.
INTLSUB=intl
fi
# We need to process the po/ directory.
POSUB=po
else
DATADIRNAME=share
nls_cv_header_intl=intl/libintl.h
nls_cv_header_libgt=intl/libgettext.h
fi
dnl These rules are solely for the distribution goal. While doing this
dnl we only have to keep exactly one list of the available catalogs
dnl in configure.in.
for lang in $ALL_LINGUAS; do
GMOFILES="$GMOFILES $lang.gmo"
POFILES="$POFILES $lang.po"
done
dnl Make all variables we use known to autoconf.
AC_SUBST(CATALOGS)
AC_SUBST(CATOBJEXT)
AC_SUBST(DATADIRNAME)
AC_SUBST(GMOFILES)
AC_SUBST(INSTOBJEXT)
AC_SUBST(INTLDEPS)
AC_SUBST(INTLLIBS)
AC_SUBST(INTLOBJS)
AC_SUBST(INTLSUB)
AC_SUBST(POFILES)
AC_SUBST(POSUB)
])
AC_DEFUN(ud_GNU_GETTEXT,
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_REQUIRE([AC_HEADER_STDC])dnl
AC_REQUIRE([AC_C_CONST])dnl
AC_REQUIRE([AC_C_INLINE])dnl
AC_REQUIRE([AC_TYPE_OFF_T])dnl
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
AC_REQUIRE([AC_FUNC_MMAP])dnl
AC_CHECK_HEADERS([limits.h locale.h nl_types.h malloc.h string.h unistd.h values.h])
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp])
if test "${ac_cv_func_stpcpy+set}" != "set"; then
AC_CHECK_FUNCS(stpcpy)
fi
if test "${ac_cv_func_stpcpy}" = "yes"; then
AC_DEFINE(HAVE_STPCPY)
fi
ud_LC_MESSAGES
ud_WITH_NLS
if test "x$CATOBJEXT" != "x"; then
if test "x$ALL_LINGUAS" = "x"; then
LINGUAS=
else
AC_MSG_CHECKING(for catalogs to be installed)
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
esac
done
LINGUAS=$NEW_LINGUAS
AC_MSG_RESULT($LINGUAS)
fi
dnl Construct list of names of catalog files to be constructed.
if test -n "$LINGUAS"; then
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
fi
fi
dnl Determine which catalog format we have (if any is needed)
dnl For now we know about two different formats:
dnl Linux and the normal X/Open format
test -d intl || mkdir intl
if test "$CATOBJEXT" = ".cat"; then
AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
dnl Transform the SED scripts while copying because some dumb SEDs
dnl cannot handle comments.
sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
fi
dnl po2tbl.sed is always needed.
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
$srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
dnl Generate list of files to be processed by xgettext which will
dnl be included in po/Makefile.
test -d po || mkdir po
if test "x$srcdir" != "x."; then
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
posrcprefix="$srcdir/"
else
posrcprefix="../$srcdir/"
fi
else
posrcprefix="../"
fi
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
< $srcdir/po/POTFILES.in > po/POTFILES
])

View File

@ -0,0 +1,19 @@
Sun Nov 5 13:33:52 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (dist): Suppress error message when ln failed.
Tue Aug 15 18:16:22 1995 Ulrich Drepper <drepper@myware>
* testdata:
Correct data for NUL padded output format. Previous algorithm did not
care for the content of the last bytes which are not filled be the
input data but are necessary for the last 3-byte group.
Tue Aug 15 16:49:42 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (dist): Remove `copying instead' message.
Thu Aug 3 00:16:48 1995 Ulrich Drepper <drepper@myware>
* Makefile.in: Initial revision.

View File

@ -0,0 +1,72 @@
# Generated automatically from Makefile.in by configure.
# Makefile for check subdirectory in GNU gettext package.
# Copyright (C) 1995 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.
PACKAGE = sharutils
VERSION = 4.2.1
SHELL = /bin/sh
srcdir = .
top_srcdir = ..
subdir = checks
TESTSRCS = testdata
DISTFILES = ChangeLog Makefile.in $(TESTSRCS)
all:
check:
rm -f test.bin test.tmp
../src/uudecode $(srcdir)/testdata
../src/uuencode test.bin test.bin > test.tmp
cmp $(srcdir)/testdata test.tmp || exit 1
rm -f test.bin test.tmp
@echo ==========================
@echo All checks are successful.
@echo ==========================
install uninstall tags TAGS id ID:
mostlyclean:
rm -f core core.* *.tmp test.bin
clean: mostlyclean
distclean: clean
rm -f Makefile
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist: Makefile $(DISTFILES)
for file in $(DISTFILES); do \
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir); \
done
Makefile: Makefile.in ../config.status
cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,72 @@
# Makefile for check subdirectory in GNU gettext package.
# Copyright (C) 1995 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.
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SHELL = /bin/sh
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
subdir = checks
TESTSRCS = testdata
DISTFILES = ChangeLog Makefile.in $(TESTSRCS)
all:
check:
rm -f test.bin test.tmp
../src/uudecode $(srcdir)/testdata
../src/uuencode test.bin test.bin > test.tmp
cmp $(srcdir)/testdata test.tmp || exit 1
rm -f test.bin test.tmp
@echo ==========================
@echo All checks are successful.
@echo ==========================
install uninstall tags TAGS id ID:
mostlyclean:
rm -f core core.* *.tmp test.bin
clean: mostlyclean
distclean: clean
rm -f Makefile
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist: Makefile $(DISTFILES)
for file in $(DISTFILES); do \
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir); \
done
Makefile: Makefile.in ../config.status
cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,9 @@
begin 664 test.bin
M``$"`P0%!@<("0H+#`T.#Q`1$A,4%187&!D:&QP='A\@(2(C)"4F)R@I*BLL
M+2XO,#$R,S0U-C<X.3H[/#T^/T!!0D-$149'2$E*2TQ-3D]045)35%565UA9
M6EM<75Y?8&%B8V1E9F=H:6IK;&UN;W!Q<G-T=79W>'EZ>WQ]?G^`@8*#A(6&
MAXB)BHN,C8Z/D)&2DY25EI>8F9J;G)V>GZ"AHJ.DI::GJ*FJJZRMKJ^PL;*S
MM+6VM[BYNKN\O;Z_P,'"P\3%QL?(R<K+S,W.S]#1TM/4U=;7V-G:V]S=WM_@
?X>+CY.7FY^CIZNOL[>[O\/'R\_3U]O?X^?K[_/W^_P``
`
end

View File

@ -0,0 +1,87 @@
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs. It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already. You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
ac_cv_c_bigendian=${ac_cv_c_bigendian='no'}
ac_cv_c_char_unsigned=${ac_cv_c_char_unsigned='no'}
ac_cv_c_const=${ac_cv_c_const='yes'}
ac_cv_c_cross=${ac_cv_c_cross='no'}
ac_cv_c_inline=${ac_cv_c_inline='inline'}
ac_cv_func_alloca=${ac_cv_func_alloca='yes'}
ac_cv_func_basename=${ac_cv_func_basename='no'}
ac_cv_func_catgets=${ac_cv_func_catgets='no'}
ac_cv_func_closedir_void=${ac_cv_func_closedir_void='no'}
ac_cv_func_fchmod=${ac_cv_func_fchmod='no'}
ac_cv_func_getcwd=${ac_cv_func_getcwd='yes'}
ac_cv_func_getpagesize=${ac_cv_func_getpagesize='no'}
ac_cv_func_gettext=${ac_cv_func_gettext='no'}
ac_cv_func_isascii=${ac_cv_func_isascii='yes'}
ac_cv_func_memcpy=${ac_cv_func_memcpy='yes'}
ac_cv_func_memset=${ac_cv_func_memset='yes'}
ac_cv_func_mktime=${ac_cv_func_mktime='yes'}
ac_cv_func_mmap=${ac_cv_func_mmap='no'}
ac_cv_func_munmap=${ac_cv_func_munmap='no'}
ac_cv_func_putenv=${ac_cv_func_putenv='yes'}
ac_cv_func_setenv=${ac_cv_func_setenv='no'}
ac_cv_func_setlocale=${ac_cv_func_setlocale='yes'}
ac_cv_func_stpcpy=${ac_cv_func_stpcpy='yes'}
ac_cv_func_strcasecmp=${ac_cv_func_strcasecmp='yes'}
ac_cv_func_strchr=${ac_cv_func_strchr='yes'}
ac_cv_func_strerror=${ac_cv_func_strerror='yes'}
ac_cv_func_strftime=${ac_cv_func_strftime='yes'}
ac_cv_func_uname=${ac_cv_func_uname='yes'}
ac_cv_func_valloc=${ac_cv_func_valloc='yes'}
ac_cv_func_vprintf=${ac_cv_func_vprintf='yes'}
ac_cv_header_alloca_h=${ac_cv_header_alloca_h='yes'}
ac_cv_header_dirent_dirent_h=${ac_cv_header_dirent_dirent_h='yes'}
ac_cv_header_limits_h=${ac_cv_header_limits_h='yes'}
ac_cv_header_locale_h=${ac_cv_header_locale_h='yes'}
ac_cv_header_malloc_h=${ac_cv_header_malloc_h='yes'}
ac_cv_header_memory_h=${ac_cv_header_memory_h='yes'}
ac_cv_header_minix_config_h=${ac_cv_header_minix_config_h='no'}
ac_cv_header_nl_types_h=${ac_cv_header_nl_types_h='no'}
ac_cv_header_stat_broken=${ac_cv_header_stat_broken='no'}
ac_cv_header_stdc=${ac_cv_header_stdc='yes'}
ac_cv_header_string_h=${ac_cv_header_string_h='yes'}
ac_cv_header_sys_wait_h=${ac_cv_header_sys_wait_h='yes'}
ac_cv_header_unistd_h=${ac_cv_header_unistd_h='yes'}
ac_cv_header_values_h=${ac_cv_header_values_h='no'}
ac_cv_lib_dir=${ac_cv_lib_dir='no'}
ac_cv_lib_i=${ac_cv_lib_i='no'}
ac_cv_lib_intl=${ac_cv_lib_intl='no'}
ac_cv_path_DIFF=${ac_cv_path_DIFF='/bin/diff'}
ac_cv_path_GMSGFMT=${ac_cv_path_GMSGFMT='msgfmt'}
ac_cv_path_MAILER=${ac_cv_path_MAILER='/bin/mail'}
ac_cv_path_MSGFMT=${ac_cv_path_MSGFMT='msgfmt'}
ac_cv_path_PERL=${ac_cv_path_PERL='/boot/home/config/bin/perl'}
ac_cv_path_SH=${ac_cv_path_SH='/bin/sh'}
ac_cv_path_TAR=${ac_cv_path_TAR='/bin/tar'}
ac_cv_path_XGETTEXT=${ac_cv_path_XGETTEXT='xgettext'}
ac_cv_path_install=${ac_cv_path_install=''/bin/install -c''}
ac_cv_prog_CC=${ac_cv_prog_CC='gcc'}
ac_cv_prog_CPP=${ac_cv_prog_CPP=''gcc -E''}
ac_cv_prog_RANLIB=${ac_cv_prog_RANLIB='ranlib'}
ac_cv_prog_cc_stdc=${ac_cv_prog_cc_stdc=''}
ac_cv_prog_gcc=${ac_cv_prog_gcc='yes'}
ac_cv_prog_gcc_g=${ac_cv_prog_gcc_g='yes'}
ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set='yes'}
ac_cv_struct_tm=${ac_cv_struct_tm='time.h'}
ac_cv_struct_tm_zone=${ac_cv_struct_tm_zone='yes'}
ac_cv_type_off_t=${ac_cv_type_off_t='yes'}
ac_cv_type_size_t=${ac_cv_type_size_t='yes'}
nls_cv_force_use_gnu_gettext=${nls_cv_force_use_gnu_gettext='no'}
nls_cv_header_intl=${nls_cv_header_intl='intl/libintl.h'}
nls_cv_header_libgt=${nls_cv_header_libgt='intl/libgettext.h'}
nls_cv_use_gnu_gettext=${nls_cv_use_gnu_gettext='yes'}
nls_cv_use_nls=${nls_cv_use_nls='yes'}
ud_cv_val_LC_MESSAGES=${ud_cv_val_LC_MESSAGES='yes'}

View File

@ -0,0 +1,220 @@
/* config.h. Generated automatically by configure. */
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* Define if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
#ifndef _ALL_SOURCE
/* #undef _ALL_SOURCE */
#endif
/* Define if using alloca.c. */
/* #undef C_ALLOCA */
/* Define if type char is unsigned and you are not using gcc. */
#ifndef __CHAR_UNSIGNED__
/* #undef __CHAR_UNSIGNED__ */
#endif
/* Define if the closedir function returns void instead of int. */
/* #undef CLOSEDIR_VOID */
/* Define to empty if the keyword does not work. */
/* #undef const */
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
/* #undef CRAY_STACKSEG_END */
/* Define if you have alloca, as a function or macro. */
#define HAVE_ALLOCA 1
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
#define HAVE_ALLOCA_H 1
/* Define if you don't have vprintf but do have _doprnt. */
/* #undef HAVE_DOPRNT */
/* Define if you have a working `mmap' system call. */
/* #undef HAVE_MMAP */
/* Define if you have the strftime function. */
#define HAVE_STRFTIME 1
/* Define if your struct tm has tm_zone. */
#define HAVE_TM_ZONE 1
/* Define if you don't have tm_zone but do have the external array
tzname. */
/* #undef HAVE_TZNAME */
/* Define if you have the vprintf function. */
#define HAVE_VPRINTF 1
/* Define as __inline if that's what the C compiler calls it. */
/* #undef inline */
/* Define if on MINIX. */
/* #undef _MINIX */
/* Define to `long' if <sys/types.h> doesn't define. */
/* #undef off_t */
/* Define if the system does not provide POSIX.1 features except
with this defined. */
/* #undef _POSIX_1_SOURCE */
/* Define if you need to in order for stat and other things to work. */
/* #undef _POSIX_SOURCE */
/* Define to `unsigned' if <sys/types.h> doesn't define. */
/* #undef size_t */
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown
*/
/* #undef STACK_DIRECTION */
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
/* #undef STAT_MACROS_BROKEN */
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if your <sys/time.h> declares struct tm. */
/* #undef TM_IN_SYS_TIME */
/* Define if your processor stores words with the most significant
byte first (like Motorola and SPARC, unlike Intel and VAX). */
/* #undef WORDS_BIGENDIAN */
/* Define if the current hostname may be found in /etc/systemid. */
/* #undef HAVE_ETC_SYSTEMID */
/* Define to the name of the distribution. */
#define PACKAGE "sharutils"
/* Define to 1 if ANSI function prototypes are usable. */
#define PROTOTYPES 1
/* Define to the version of the distribution. */
#define VERSION "4.2.1"
/* Define to 1 for better use of the debugging malloc library. See
site ftp.antaire.com in antaire/src, file dmalloc/dmalloc.tar.gz. */
/* #undef WITH_DMALLOC */
/* Define if your locale.h file contains LC_MESSAGES. */
#define HAVE_LC_MESSAGES 1
/* Define to 1 if NLS is requested. */
//#define ENABLE_NLS 1
/* Define as 1 if you have catgets and don't want to use GNU gettext. */
/* #undef HAVE_CATGETS */
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
/* #undef HAVE_GETTEXT */
/* Define as 1 if you have the stpcpy function. */
#define HAVE_STPCPY 1
/* Define if you have the basename function. */
/* #undef HAVE_BASENAME */
/* Define if you have the dcgettext function. */
/* #undef HAVE_DCGETTEXT */
/* Define if you have the fchmod function. */
/* #undef HAVE_FCHMOD */
/* Define if you have the getcwd function. */
#define HAVE_GETCWD 1
/* Define if you have the getpagesize function. */
/* #undef HAVE_GETPAGESIZE */
/* Define if you have the isascii function. */
#define HAVE_ISASCII 1
/* Define if you have the memcpy function. */
#define HAVE_MEMCPY 1
/* Define if you have the munmap function. */
/* #undef HAVE_MUNMAP */
/* Define if you have the putenv function. */
#define HAVE_PUTENV 1
/* Define if you have the setenv function. */
/* #undef HAVE_SETENV */
/* Define if you have the setlocale function. */
#define HAVE_SETLOCALE 1
/* Define if you have the stpcpy function. */
#define HAVE_STPCPY 1
/* Define if you have the strcasecmp function. */
#define HAVE_STRCASECMP 1
/* Define if you have the strchr function. */
#define HAVE_STRCHR 1
/* Define if you have the strerror function. */
#define HAVE_STRERROR 1
/* Define if you have the uname function. */
#define HAVE_UNAME 1
/* Define if you have the valloc function. */
#define HAVE_VALLOC 1
/* Define if you have the <dirent.h> header file. */
#define HAVE_DIRENT_H 1
/* Define if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1
/* Define if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define if you have the <ndir.h> header file. */
/* #undef HAVE_NDIR_H */
/* Define if you have the <nl_types.h> header file. */
/* #undef HAVE_NL_TYPES_H */
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define if you have the <sys/dir.h> header file. */
/* #undef HAVE_SYS_DIR_H */
/* Define if you have the <sys/ndir.h> header file. */
/* #undef HAVE_SYS_NDIR_H */
/* Define if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define if you have the <values.h> header file. */
/* #undef HAVE_VALUES_H */
/* Define if you have the i library (-li). */
/* #undef HAVE_LIBI */
/* Define if you have the intl library (-lintl). */
/* #undef HAVE_LIBINTL */

View File

@ -0,0 +1,219 @@
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* Define if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
#ifndef _ALL_SOURCE
#undef _ALL_SOURCE
#endif
/* Define if using alloca.c. */
#undef C_ALLOCA
/* Define if type char is unsigned and you are not using gcc. */
#ifndef __CHAR_UNSIGNED__
#undef __CHAR_UNSIGNED__
#endif
/* Define if the closedir function returns void instead of int. */
#undef CLOSEDIR_VOID
/* Define to empty if the keyword does not work. */
#undef const
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
#undef CRAY_STACKSEG_END
/* Define if you have alloca, as a function or macro. */
#undef HAVE_ALLOCA
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
#undef HAVE_ALLOCA_H
/* Define if you don't have vprintf but do have _doprnt. */
#undef HAVE_DOPRNT
/* Define if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define if you have the strftime function. */
#undef HAVE_STRFTIME
/* Define if your struct tm has tm_zone. */
#undef HAVE_TM_ZONE
/* Define if you don't have tm_zone but do have the external array
tzname. */
#undef HAVE_TZNAME
/* Define if you have the vprintf function. */
#undef HAVE_VPRINTF
/* Define as __inline if that's what the C compiler calls it. */
#undef inline
/* Define if on MINIX. */
#undef _MINIX
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t
/* Define if the system does not provide POSIX.1 features except
with this defined. */
#undef _POSIX_1_SOURCE
/* Define if you need to in order for stat and other things to work. */
#undef _POSIX_SOURCE
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown
*/
#undef STACK_DIRECTION
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
#undef STAT_MACROS_BROKEN
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define if your <sys/time.h> declares struct tm. */
#undef TM_IN_SYS_TIME
/* Define if your processor stores words with the most significant
byte first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* Define if the current hostname may be found in /etc/systemid. */
#undef HAVE_ETC_SYSTEMID
/* Define to the name of the distribution. */
#undef PACKAGE
/* Define to 1 if ANSI function prototypes are usable. */
#undef PROTOTYPES
/* Define to the version of the distribution. */
#undef VERSION
/* Define to 1 for better use of the debugging malloc library. See
site ftp.antaire.com in antaire/src, file dmalloc/dmalloc.tar.gz. */
#undef WITH_DMALLOC
/* Define if your locale.h file contains LC_MESSAGES. */
#undef HAVE_LC_MESSAGES
/* Define to 1 if NLS is requested. */
#undef ENABLE_NLS
/* Define as 1 if you have catgets and don't want to use GNU gettext. */
#undef HAVE_CATGETS
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
#undef HAVE_GETTEXT
/* Define as 1 if you have the stpcpy function. */
#undef HAVE_STPCPY
/* Define if you have the basename function. */
#undef HAVE_BASENAME
/* Define if you have the dcgettext function. */
#undef HAVE_DCGETTEXT
/* Define if you have the fchmod function. */
#undef HAVE_FCHMOD
/* Define if you have the getcwd function. */
#undef HAVE_GETCWD
/* Define if you have the getpagesize function. */
#undef HAVE_GETPAGESIZE
/* Define if you have the isascii function. */
#undef HAVE_ISASCII
/* Define if you have the memcpy function. */
#undef HAVE_MEMCPY
/* Define if you have the munmap function. */
#undef HAVE_MUNMAP
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
/* Define if you have the setenv function. */
#undef HAVE_SETENV
/* Define if you have the setlocale function. */
#undef HAVE_SETLOCALE
/* Define if you have the stpcpy function. */
#undef HAVE_STPCPY
/* Define if you have the strcasecmp function. */
#undef HAVE_STRCASECMP
/* Define if you have the strchr function. */
#undef HAVE_STRCHR
/* Define if you have the strerror function. */
#undef HAVE_STRERROR
/* Define if you have the uname function. */
#undef HAVE_UNAME
/* Define if you have the valloc function. */
#undef HAVE_VALLOC
/* Define if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
/* Define if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
/* Define if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define if you have the <ndir.h> header file. */
#undef HAVE_NDIR_H
/* Define if you have the <nl_types.h> header file. */
#undef HAVE_NL_TYPES_H
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define if you have the <sys/dir.h> header file. */
#undef HAVE_SYS_DIR_H
/* Define if you have the <sys/ndir.h> header file. */
#undef HAVE_SYS_NDIR_H
/* Define if you have the <sys/wait.h> header file. */
#undef HAVE_SYS_WAIT_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define if you have the <values.h> header file. */
#undef HAVE_VALUES_H
/* Define if you have the i library (-li). */
#undef HAVE_LIBI
/* Define if you have the intl library (-lintl). */
#undef HAVE_LIBINTL

View File

@ -0,0 +1,100 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
gcc -E
gcc -E
gcc -E
/boot/home/Development/current/src/apps/bin/sharutils-4.2.1/configure:1115: minix/config.h: No such file or directory
gcc -o conftest -g -O conftest.c
gcc -E
gcc -c -g -O conftest.c
gcc -c -g -O conftest.c
gcc -c -g -O conftest.c
gcc -c -g -O conftest.c
/boot/home/Development/current/src/apps/bin/sharutils-4.2.1/configure: In function `t':
/boot/home/Development/current/src/apps/bin/sharutils-4.2.1/configure:1425: `bogus' undeclared (first use in this function)
/boot/home/Development/current/src/apps/bin/sharutils-4.2.1/configure:1425: (Each undeclared identifier is reported only once
/boot/home/Development/current/src/apps/bin/sharutils-4.2.1/configure:1425: for each function it appears in.)
/boot/home/Development/current/src/apps/bin/sharutils-4.2.1/configure:1425: parse error before `endian'
gcc -o conftest -g -O conftest.c
gcc -E
gcc -E
gcc -E
gcc -E
gcc -E
gcc -E
gcc -c -g -O conftest.c
gcc -o conftest -g -O conftest.c -ldir
/boot/develop/tools/gnupro/bin/ld: cannot open -ldir: No such file or directory
collect2: ld returned 1 exit status
gcc -E
gcc -E
gcc -E
gcc -E
gcc -o conftest -g -O conftest.c
gcc -c -g -O conftest.c
gcc -c -g -O conftest.c
gcc -E
gcc -o conftest -g -O conftest.c
/tmp/ccyhLt2n.o: In function `t':
/boot/home/Development/current/src/apps/bin/sharutils-4.2.1/configure:1951: undefined reference to `basename'
collect2: ld returned 1 exit status
gcc -o conftest -g -O conftest.c
/tmp/ccxZzBNi.o: In function `t':
/boot/home/Development/current/src/apps/bin/sharutils-4.2.1/configure:1951: undefined reference to `fchmod'
collect2: ld returned 1 exit status
gcc -o conftest -g -O conftest.c
gcc -o conftest -g -O conftest.c
gcc -o conftest -g -O conftest.c
/boot/home/Development/current/src/apps/bin/sharutils-4.2.1/configure:1940: warning: conflicting types for built-in function `memcpy'
gcc -o conftest -g -O conftest.c
gcc -o conftest -g -O conftest.c
gcc -o conftest -g -O conftest.c
gcc -o conftest -g -O conftest.c
gcc -o conftest -g -O conftest.c
gcc -o conftest -g -O conftest.c
gcc -o conftest -g -O conftest.c -lintl
/boot/develop/tools/gnupro/bin/ld: cannot open -lintl: No such file or directory
collect2: ld returned 1 exit status
gcc -o conftest -g -O conftest.c
gcc -o conftest -g -O conftest.c
gcc -o conftest -g -O conftest.c
/boot/home/Development/current/src/apps/bin/sharutils-4.2.1/configure:2419: warning: conflicting types for built-in function `memset'
gcc -o conftest -g -O conftest.c
gcc -o conftest -g -O conftest.c
gcc -E
gcc -o conftest -g -O conftest.c
gcc -o conftest -g -O conftest.c
/tmp/ccV9j0pv.o: In function `t':
/boot/home/Development/current/src/apps/bin/sharutils-4.2.1/configure:2547: undefined reference to `getpagesize'
collect2: ld returned 1 exit status
gcc -o conftest -g -O conftest.c
/boot/home/Development/current/src/apps/bin/sharutils-4.2.1/configure:2588: sys/mman.h: No such file or directory
gcc -E
/boot/home/Development/current/src/apps/bin/sharutils-4.2.1/configure:2680: nl_types.h: No such file or directory
gcc -E
gcc -E
/boot/home/Development/current/src/apps/bin/sharutils-4.2.1/configure:2680: values.h: No such file or directory
gcc -o conftest -g -O conftest.c
/tmp/ccMQX6EV.o: In function `t':
/boot/home/Development/current/src/apps/bin/sharutils-4.2.1/configure:2730: undefined reference to `munmap'
collect2: ld returned 1 exit status
gcc -o conftest -g -O conftest.c
gcc -o conftest -g -O conftest.c
/tmp/ccT2ZPTm.o: In function `t':
/boot/home/Development/current/src/apps/bin/sharutils-4.2.1/configure:2730: undefined reference to `setenv'
collect2: ld returned 1 exit status
gcc -o conftest -g -O conftest.c
gcc -o conftest -g -O conftest.c
gcc -o conftest -g -O conftest.c
gcc -o conftest -g -O conftest.c -li
/boot/develop/tools/gnupro/bin/ld: cannot open -li: No such file or directory
collect2: ld returned 1 exit status
gcc -o conftest -g -O conftest.c
/tmp/ccdLAXjF.o: In function `t':
/boot/home/Development/current/src/apps/bin/sharutils-4.2.1/configure:2984: undefined reference to `gettext'
collect2: ld returned 1 exit status
gcc -o conftest -g -O conftest.c
/tmp/ccavKo9h.o: In function `t':
/boot/home/Development/current/src/apps/bin/sharutils-4.2.1/configure:3189: undefined reference to `catgets'
collect2: ld returned 1 exit status

View File

@ -0,0 +1,411 @@
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host :
#
# ./configure
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
ac_cs_usage="Usage: ./config.status [--recheck] [--version] [--help]"
for ac_option
do
case "$ac_option" in
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
echo "running ${CONFIG_SHELL-/bin/sh} ./configure --no-create --no-recursion"
exec ${CONFIG_SHELL-/bin/sh} ./configure --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
echo "./config.status generated by autoconf version 2.7"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "$ac_cs_usage"; exit 0 ;;
*) echo "$ac_cs_usage"; exit 1 ;;
esac
done
ac_given_srcdir=.
ac_given_INSTALL="/bin/install -c"
trap 'rm -fr Makefile src/mail-files src/mailshar src/remsync contrib/Makefile lib/Makefile intl/Makefile intl/po2tbl.sed src/Makefile po/Makefile.in doc/Makefile checks/Makefile config.h conftest*; exit 1' 1 2 15
# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\&%]/\\&/g;
s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
/^[ ]*VPATH[ ]*=[^:]*$/d
s%@CFLAGS@%-g -O%g
s%@CPPFLAGS@%%g
s%@CXXFLAGS@%%g
s%@DEFS@%-DHAVE_CONFIG_H%g
s%@LDFLAGS@%%g
s%@LIBS@%%g
s%@exec_prefix@%${prefix}%g
s%@prefix@%/usr/local%g
s%@program_transform_name@%s,x,x,%g
s%@bindir@%${exec_prefix}/bin%g
s%@sbindir@%${exec_prefix}/sbin%g
s%@libexecdir@%${exec_prefix}/libexec%g
s%@datadir@%${prefix}/share%g
s%@sysconfdir@%${prefix}/etc%g
s%@sharedstatedir@%${prefix}/com%g
s%@localstatedir@%${prefix}/var%g
s%@libdir@%${exec_prefix}/lib%g
s%@includedir@%${prefix}/include%g
s%@oldincludedir@%/usr/include%g
s%@infodir@%${prefix}/info%g
s%@mandir@%${prefix}/man%g
s%@PACKAGE@%sharutils%g
s%@VERSION@%4.2.1%g
s%@PROGRAMS@%shar unshar uudecode uuencode%g
s%@SCRIPTS@%mail-files mailshar remsync%g
s%@MAN1PAGES@%shar unshar uuencode uudecode%g
s%@MAN5PAGES@% uuencode%g
s%@DIST_ALPHA@%README-alpha%g
s%@CC@%gcc%g
s%@INSTALL_PROGRAM@%${INSTALL}%g
s%@INSTALL_DATA@%${INSTALL} -m 644%g
s%@INSTALL_SCRIPT@%${INSTALL} -m 755%g
s%@SET_MAKE@%%g
s%@RANLIB@%ranlib%g
s%@DIFF@%/bin/diff%g
s%@MAILER@%/bin/mail%g
s%@PERL@%/boot/home/config/bin/perl%g
s%@SH@%/bin/sh%g
s%@TAR@%/bin/tar%g
s%@CPP@%gcc -E%g
s%@U@%%g
s%@ANSI2KNR@%%g
s%@ALLOCA@%%g
s%@LIBOBJS@% basename.o%g
s%@MSGFMT@%msgfmt%g
s%@GMSGFMT@%msgfmt%g
s%@XGETTEXT@%xgettext%g
s%@GENCAT@%%g
s%@CATALOGS@% de.gmo fr.gmo ja_JP.EUC.gmo nl.gmo pt.gmo sv.gmo%g
s%@CATOBJEXT@%.gmo%g
s%@DATADIRNAME@%share%g
s%@GMOFILES@% de.gmo fr.gmo ja_JP.EUC.gmo nl.gmo pt.gmo sv.gmo%g
s%@INSTOBJEXT@%.mo%g
s%@INTLDEPS@%../intl/libintl.a%g
s%@INTLLIBS@%../intl/libintl.a%g
s%@INTLOBJS@%$(GETTOBJS)%g
s%@INTLSUB@%intl%g
s%@POFILES@% de.po fr.po ja_JP.EUC.po nl.po pt.po sv.po%g
s%@POSUB@%po%g
CEOF
CONFIG_FILES=${CONFIG_FILES-"Makefile src/mail-files src/mailshar src/remsync contrib/Makefile lib/Makefile intl/Makefile intl/po2tbl.sed src/Makefile po/Makefile.in doc/Makefile checks/Makefile"}
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
# Support "outfile[:infile]", defaulting infile="outfile.in".
case "$ac_file" in
*:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
*) ac_file_in="${ac_file}.in" ;;
esac
# Adjust relative srcdir, etc. for subdirectories.
# Remove last slash and all that follows it. Not all systems have dirname.
ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
# The file is in a subdirectory.
test ! -d "$ac_dir" && mkdir "$ac_dir"
ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
# A "../" for each directory in $ac_dir_suffix.
ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
else
ac_dir_suffix= ac_dots=
fi
case "$ac_given_srcdir" in
.) srcdir=.
if test -z "$ac_dots"; then top_srcdir=.
else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
/*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
*) # Relative path.
srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
top_srcdir="$ac_dots$ac_given_srcdir" ;;
esac
case "$ac_given_INSTALL" in
[/$]*) INSTALL="$ac_given_INSTALL" ;;
*) INSTALL="$ac_dots$ac_given_INSTALL" ;;
esac
echo creating "$ac_file"
rm -f "$ac_file"
configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
case "$ac_file" in
*Makefile*) ac_comsub="1i\\
# $configure_input" ;;
*) ac_comsub= ;;
esac
sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
s%@INSTALL@%$INSTALL%g
" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
fi; done
rm -f conftest.subs
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
ac_dC='\3'
ac_dD='%g'
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ac_uB='\([ ]\)%\1#\2define\3'
ac_uC=' '
ac_uD='\4%g'
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ac_eB='$%\1#\2define\3'
ac_eC=' '
ac_eD='%g'
CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
# Support "outfile[:infile]", defaulting infile="outfile.in".
case "$ac_file" in
*:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
*) ac_file_in="${ac_file}.in" ;;
esac
echo creating $ac_file
rm -f conftest.frag conftest.in conftest.out
cp $ac_given_srcdir/$ac_file_in conftest.in
cat > conftest.frag <<CEOF
${ac_dA}PACKAGE${ac_dB}PACKAGE${ac_dC}"sharutils"${ac_dD}
${ac_uA}PACKAGE${ac_uB}PACKAGE${ac_uC}"sharutils"${ac_uD}
${ac_eA}PACKAGE${ac_eB}PACKAGE${ac_eC}"sharutils"${ac_eD}
${ac_dA}VERSION${ac_dB}VERSION${ac_dC}"4.2.1"${ac_dD}
${ac_uA}VERSION${ac_uB}VERSION${ac_uC}"4.2.1"${ac_uD}
${ac_eA}VERSION${ac_eB}VERSION${ac_eC}"4.2.1"${ac_eD}
${ac_dA}PROTOTYPES${ac_dB}PROTOTYPES${ac_dC}1${ac_dD}
${ac_uA}PROTOTYPES${ac_uB}PROTOTYPES${ac_uC}1${ac_uD}
${ac_eA}PROTOTYPES${ac_eB}PROTOTYPES${ac_eC}1${ac_eD}
${ac_dA}HAVE_LIMITS_H${ac_dB}HAVE_LIMITS_H${ac_dC}1${ac_dD}
${ac_uA}HAVE_LIMITS_H${ac_uB}HAVE_LIMITS_H${ac_uC}1${ac_uD}
${ac_eA}HAVE_LIMITS_H${ac_eB}HAVE_LIMITS_H${ac_eC}1${ac_eD}
CEOF
sed -f conftest.frag conftest.in > conftest.out
rm -f conftest.in
mv conftest.out conftest.in
cat > conftest.frag <<CEOF
${ac_dA}HAVE_LOCALE_H${ac_dB}HAVE_LOCALE_H${ac_dC}1${ac_dD}
${ac_uA}HAVE_LOCALE_H${ac_uB}HAVE_LOCALE_H${ac_uC}1${ac_uD}
${ac_eA}HAVE_LOCALE_H${ac_eB}HAVE_LOCALE_H${ac_eC}1${ac_eD}
${ac_dA}HAVE_MEMORY_H${ac_dB}HAVE_MEMORY_H${ac_dC}1${ac_dD}
${ac_uA}HAVE_MEMORY_H${ac_uB}HAVE_MEMORY_H${ac_uC}1${ac_uD}
${ac_eA}HAVE_MEMORY_H${ac_eB}HAVE_MEMORY_H${ac_eC}1${ac_eD}
${ac_dA}HAVE_STRING_H${ac_dB}HAVE_STRING_H${ac_dC}1${ac_dD}
${ac_uA}HAVE_STRING_H${ac_uB}HAVE_STRING_H${ac_uC}1${ac_uD}
${ac_eA}HAVE_STRING_H${ac_eB}HAVE_STRING_H${ac_eC}1${ac_eD}
${ac_dA}HAVE_SYS_WAIT_H${ac_dB}HAVE_SYS_WAIT_H${ac_dC}1${ac_dD}
${ac_uA}HAVE_SYS_WAIT_H${ac_uB}HAVE_SYS_WAIT_H${ac_uC}1${ac_uD}
${ac_eA}HAVE_SYS_WAIT_H${ac_eB}HAVE_SYS_WAIT_H${ac_eC}1${ac_eD}
CEOF
sed -f conftest.frag conftest.in > conftest.out
rm -f conftest.in
mv conftest.out conftest.in
cat > conftest.frag <<CEOF
${ac_dA}HAVE_UNISTD_H${ac_dB}HAVE_UNISTD_H${ac_dC}1${ac_dD}
${ac_uA}HAVE_UNISTD_H${ac_uB}HAVE_UNISTD_H${ac_uC}1${ac_uD}
${ac_eA}HAVE_UNISTD_H${ac_eB}HAVE_UNISTD_H${ac_eC}1${ac_eD}
${ac_dA}HAVE_DIRENT_H${ac_dB}HAVE_DIRENT_H${ac_dC}1${ac_dD}
${ac_uA}HAVE_DIRENT_H${ac_uB}HAVE_DIRENT_H${ac_uC}1${ac_uD}
${ac_eA}HAVE_DIRENT_H${ac_eB}HAVE_DIRENT_H${ac_eC}1${ac_eD}
${ac_dA}STDC_HEADERS${ac_dB}STDC_HEADERS${ac_dC}1${ac_dD}
${ac_uA}STDC_HEADERS${ac_uB}STDC_HEADERS${ac_uC}1${ac_uD}
${ac_eA}STDC_HEADERS${ac_eB}STDC_HEADERS${ac_eC}1${ac_eD}
${ac_dA}HAVE_TM_ZONE${ac_dB}HAVE_TM_ZONE${ac_dC}1${ac_dD}
${ac_uA}HAVE_TM_ZONE${ac_uB}HAVE_TM_ZONE${ac_uC}1${ac_uD}
${ac_eA}HAVE_TM_ZONE${ac_eB}HAVE_TM_ZONE${ac_eC}1${ac_eD}
CEOF
sed -f conftest.frag conftest.in > conftest.out
rm -f conftest.in
mv conftest.out conftest.in
cat > conftest.frag <<CEOF
${ac_dA}HAVE_GETCWD${ac_dB}HAVE_GETCWD${ac_dC}1${ac_dD}
${ac_uA}HAVE_GETCWD${ac_uB}HAVE_GETCWD${ac_uC}1${ac_uD}
${ac_eA}HAVE_GETCWD${ac_eB}HAVE_GETCWD${ac_eC}1${ac_eD}
${ac_dA}HAVE_ISASCII${ac_dB}HAVE_ISASCII${ac_dC}1${ac_dD}
${ac_uA}HAVE_ISASCII${ac_uB}HAVE_ISASCII${ac_uC}1${ac_uD}
${ac_eA}HAVE_ISASCII${ac_eB}HAVE_ISASCII${ac_eC}1${ac_eD}
${ac_dA}HAVE_MEMCPY${ac_dB}HAVE_MEMCPY${ac_dC}1${ac_dD}
${ac_uA}HAVE_MEMCPY${ac_uB}HAVE_MEMCPY${ac_uC}1${ac_uD}
${ac_eA}HAVE_MEMCPY${ac_eB}HAVE_MEMCPY${ac_eC}1${ac_eD}
${ac_dA}HAVE_STRCHR${ac_dB}HAVE_STRCHR${ac_dC}1${ac_dD}
${ac_uA}HAVE_STRCHR${ac_uB}HAVE_STRCHR${ac_uC}1${ac_uD}
${ac_eA}HAVE_STRCHR${ac_eB}HAVE_STRCHR${ac_eC}1${ac_eD}
CEOF
sed -f conftest.frag conftest.in > conftest.out
rm -f conftest.in
mv conftest.out conftest.in
cat > conftest.frag <<CEOF
${ac_dA}HAVE_STRERROR${ac_dB}HAVE_STRERROR${ac_dC}1${ac_dD}
${ac_uA}HAVE_STRERROR${ac_uB}HAVE_STRERROR${ac_uC}1${ac_uD}
${ac_eA}HAVE_STRERROR${ac_eB}HAVE_STRERROR${ac_eC}1${ac_eD}
${ac_dA}HAVE_UNAME${ac_dB}HAVE_UNAME${ac_dC}1${ac_dD}
${ac_uA}HAVE_UNAME${ac_uB}HAVE_UNAME${ac_uC}1${ac_uD}
${ac_eA}HAVE_UNAME${ac_eB}HAVE_UNAME${ac_eC}1${ac_eD}
${ac_dA}HAVE_ALLOCA_H${ac_dB}HAVE_ALLOCA_H${ac_dC}1${ac_dD}
${ac_uA}HAVE_ALLOCA_H${ac_uB}HAVE_ALLOCA_H${ac_uC}1${ac_uD}
${ac_eA}HAVE_ALLOCA_H${ac_eB}HAVE_ALLOCA_H${ac_eC}1${ac_eD}
${ac_dA}HAVE_ALLOCA${ac_dB}HAVE_ALLOCA${ac_dC}1${ac_dD}
${ac_uA}HAVE_ALLOCA${ac_uB}HAVE_ALLOCA${ac_uC}1${ac_uD}
${ac_eA}HAVE_ALLOCA${ac_eB}HAVE_ALLOCA${ac_eC}1${ac_eD}
CEOF
sed -f conftest.frag conftest.in > conftest.out
rm -f conftest.in
mv conftest.out conftest.in
cat > conftest.frag <<CEOF
${ac_dA}HAVE_STRFTIME${ac_dB}HAVE_STRFTIME${ac_dC}1${ac_dD}
${ac_uA}HAVE_STRFTIME${ac_uB}HAVE_STRFTIME${ac_uC}1${ac_uD}
${ac_eA}HAVE_STRFTIME${ac_eB}HAVE_STRFTIME${ac_eC}1${ac_eD}
${ac_dA}HAVE_VPRINTF${ac_dB}HAVE_VPRINTF${ac_dC}1${ac_dD}
${ac_uA}HAVE_VPRINTF${ac_uB}HAVE_VPRINTF${ac_uC}1${ac_uD}
${ac_eA}HAVE_VPRINTF${ac_eB}HAVE_VPRINTF${ac_eC}1${ac_eD}
${ac_dA}HAVE_VALLOC${ac_dB}HAVE_VALLOC${ac_dC}1${ac_dD}
${ac_uA}HAVE_VALLOC${ac_uB}HAVE_VALLOC${ac_uC}1${ac_uD}
${ac_eA}HAVE_VALLOC${ac_eB}HAVE_VALLOC${ac_eC}1${ac_eD}
${ac_dA}HAVE_LIMITS_H${ac_dB}HAVE_LIMITS_H${ac_dC}1${ac_dD}
${ac_uA}HAVE_LIMITS_H${ac_uB}HAVE_LIMITS_H${ac_uC}1${ac_uD}
${ac_eA}HAVE_LIMITS_H${ac_eB}HAVE_LIMITS_H${ac_eC}1${ac_eD}
CEOF
sed -f conftest.frag conftest.in > conftest.out
rm -f conftest.in
mv conftest.out conftest.in
cat > conftest.frag <<CEOF
${ac_dA}HAVE_LOCALE_H${ac_dB}HAVE_LOCALE_H${ac_dC}1${ac_dD}
${ac_uA}HAVE_LOCALE_H${ac_uB}HAVE_LOCALE_H${ac_uC}1${ac_uD}
${ac_eA}HAVE_LOCALE_H${ac_eB}HAVE_LOCALE_H${ac_eC}1${ac_eD}
${ac_dA}HAVE_MALLOC_H${ac_dB}HAVE_MALLOC_H${ac_dC}1${ac_dD}
${ac_uA}HAVE_MALLOC_H${ac_uB}HAVE_MALLOC_H${ac_uC}1${ac_uD}
${ac_eA}HAVE_MALLOC_H${ac_eB}HAVE_MALLOC_H${ac_eC}1${ac_eD}
${ac_dA}HAVE_STRING_H${ac_dB}HAVE_STRING_H${ac_dC}1${ac_dD}
${ac_uA}HAVE_STRING_H${ac_uB}HAVE_STRING_H${ac_uC}1${ac_uD}
${ac_eA}HAVE_STRING_H${ac_eB}HAVE_STRING_H${ac_eC}1${ac_eD}
${ac_dA}HAVE_UNISTD_H${ac_dB}HAVE_UNISTD_H${ac_dC}1${ac_dD}
${ac_uA}HAVE_UNISTD_H${ac_uB}HAVE_UNISTD_H${ac_uC}1${ac_uD}
${ac_eA}HAVE_UNISTD_H${ac_eB}HAVE_UNISTD_H${ac_eC}1${ac_eD}
CEOF
sed -f conftest.frag conftest.in > conftest.out
rm -f conftest.in
mv conftest.out conftest.in
cat > conftest.frag <<CEOF
${ac_dA}HAVE_GETCWD${ac_dB}HAVE_GETCWD${ac_dC}1${ac_dD}
${ac_uA}HAVE_GETCWD${ac_uB}HAVE_GETCWD${ac_uC}1${ac_uD}
${ac_eA}HAVE_GETCWD${ac_eB}HAVE_GETCWD${ac_eC}1${ac_eD}
${ac_dA}HAVE_PUTENV${ac_dB}HAVE_PUTENV${ac_dC}1${ac_dD}
${ac_uA}HAVE_PUTENV${ac_uB}HAVE_PUTENV${ac_uC}1${ac_uD}
${ac_eA}HAVE_PUTENV${ac_eB}HAVE_PUTENV${ac_eC}1${ac_eD}
${ac_dA}HAVE_SETLOCALE${ac_dB}HAVE_SETLOCALE${ac_dC}1${ac_dD}
${ac_uA}HAVE_SETLOCALE${ac_uB}HAVE_SETLOCALE${ac_uC}1${ac_uD}
${ac_eA}HAVE_SETLOCALE${ac_eB}HAVE_SETLOCALE${ac_eC}1${ac_eD}
${ac_dA}HAVE_STRCHR${ac_dB}HAVE_STRCHR${ac_dC}1${ac_dD}
${ac_uA}HAVE_STRCHR${ac_uB}HAVE_STRCHR${ac_uC}1${ac_uD}
${ac_eA}HAVE_STRCHR${ac_eB}HAVE_STRCHR${ac_eC}1${ac_eD}
CEOF
sed -f conftest.frag conftest.in > conftest.out
rm -f conftest.in
mv conftest.out conftest.in
cat > conftest.frag <<CEOF
${ac_dA}HAVE_STRCASECMP${ac_dB}HAVE_STRCASECMP${ac_dC}1${ac_dD}
${ac_uA}HAVE_STRCASECMP${ac_uB}HAVE_STRCASECMP${ac_uC}1${ac_uD}
${ac_eA}HAVE_STRCASECMP${ac_eB}HAVE_STRCASECMP${ac_eC}1${ac_eD}
${ac_dA}HAVE_STPCPY${ac_dB}HAVE_STPCPY${ac_dC}1${ac_dD}
${ac_uA}HAVE_STPCPY${ac_uB}HAVE_STPCPY${ac_uC}1${ac_uD}
${ac_eA}HAVE_STPCPY${ac_eB}HAVE_STPCPY${ac_eC}1${ac_eD}
${ac_dA}HAVE_LC_MESSAGES${ac_dB}HAVE_LC_MESSAGES${ac_dC}1${ac_dD}
${ac_uA}HAVE_LC_MESSAGES${ac_uB}HAVE_LC_MESSAGES${ac_uC}1${ac_uD}
${ac_eA}HAVE_LC_MESSAGES${ac_eB}HAVE_LC_MESSAGES${ac_eC}1${ac_eD}
${ac_dA}ENABLE_NLS${ac_dB}ENABLE_NLS${ac_dC}1${ac_dD}
${ac_uA}ENABLE_NLS${ac_uB}ENABLE_NLS${ac_uC}1${ac_uD}
${ac_eA}ENABLE_NLS${ac_eB}ENABLE_NLS${ac_eC}1${ac_eD}
CEOF
sed -f conftest.frag conftest.in > conftest.out
rm -f conftest.in
mv conftest.out conftest.in
cat > conftest.frag <<CEOF
s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
CEOF
sed -f conftest.frag conftest.in > conftest.out
rm -f conftest.in
mv conftest.out conftest.in
rm -f conftest.frag conftest.h
echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
cat conftest.in >> conftest.h
rm -f conftest.in
if cmp -s $ac_file conftest.h 2>/dev/null; then
echo "$ac_file is unchanged"
rm -f conftest.h
else
rm -f $ac_file
mv conftest.h $ac_file
fi
fi; done
ac_sources="intl/libgettext.h"
ac_dests="intl/libintl.h"
srcdir=$ac_given_srcdir
while test -n "$ac_sources"; do
set $ac_dests; ac_dest=$1; shift; ac_dests=$*
set $ac_sources; ac_source=$1; shift; ac_sources=$*
echo "linking $srcdir/$ac_source to $ac_dest"
if test ! -r $srcdir/$ac_source; then
{ echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
fi
rm -f $ac_dest
# Make relative symlinks.
# Remove last slash and all that follows it. Not all systems have dirname.
ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
# The dest file is in a subdirectory.
test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
# A "../" for each directory in $ac_dest_dir_suffix.
ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
else
ac_dest_dir_suffix= ac_dots=
fi
case "$srcdir" in
[/$]*) ac_rel_source="$srcdir/$ac_source" ;;
*) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
esac
# Make a symlink if possible; otherwise try a hard link.
if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
ln $srcdir/$ac_source $ac_dest; then :
else
{ echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
fi
done
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile; \
test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
exit 0

3955
src/apps/bin/sharutils-4.2.1/configure vendored Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,138 @@
# Configure template for GNU shar utilities.
# Copyright (C) 1994 Free Software Foundation, Inc.
# Process this file with autoconf to produce a configure script.
# FIXME: AC_HAVE_HEADERS(sys/time.h)
# FIXME: AC_HAVE_FUNCS(gethostname getwd)
AC_INIT(src/shar.c)
AC_CONFIG_HEADER(config.h)
AC_ARG_PROGRAM
PACKAGE=sharutils
VERSION=4.2.1
ALL_LINGUAS="de fr ja_JP.EUC nl pt sv"
PROGRAMS="shar unshar"
SCRIPTS="mail-files mailshar"
MAN1PAGES="shar unshar"
MAN5PAGES=
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_SUBST(PROGRAMS)
AC_SUBST(SCRIPTS)
AC_SUBST(MAN1PAGES)
AC_SUBST(MAN5PAGES)
changequote(,)dnl
case $VERSION in
[0-9]*.[0-9]*.[0-9]*) DIST_ALPHA="README-alpha";;
*) DIST_ALPHA=;;
esac
changequote([, ])dnl
AC_SUBST(DIST_ALPHA)
AC_PROG_CC
fp_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_RANLIB
dnl FIXME: Check that it is GNU diff indeed.
# Carefully avoid gdiff for X as found on SGI systems.
if (DISPLAY= gdiff /dev/null /dev/null) 2> /dev/null; then
AC_PATH_PROGS(DIFF, gnudiff diffgnu gdiff diff, no)
else
AC_PATH_PROGS(DIFF, gnudiff diffgnu diff, no)
fi
dnl FIXME: Check that mailer accepts -s.
PATH_save="$PATH"; PATH="$PATH:/usr/sbin:/usr/ucb:/usr/bin:/bin"
AC_PATH_PROGS(MAILER, Mail mailx elm mush mail, no)
PATH="$PATH_save"
dnl FIXME: Check that perl was found.
AC_PATH_PROG(PERL, perl, no)
AC_PATH_PROGS(SH, bash sh, no)
dnl FIXME: Check that it is GNU tar indeed.
AC_PATH_PROGS(TAR, gnutar targnu gtar tar, tar)
test $ac_cv_path_PERL = no || SCRIPTS="$SCRIPTS remsync"
AC_AIX
AC_ISC_POSIX
AC_MINIX
AC_C_CROSS
if test $cross_compiling = no; then
AC_C_CHAR_UNSIGNED
fi
fp_C_PROTOTYPES
AC_C_CONST
AC_C_INLINE
AC_C_BIGENDIAN
AC_CHECK_HEADERS(limits.h locale.h memory.h string.h sys/wait.h unistd.h)
AC_HEADER_DIRENT
AC_HEADER_STAT
AC_HEADER_STDC
AC_STRUCT_TIMEZONE
AC_TYPE_SIZE_T
AC_CHECK_FUNCS(basename fchmod getcwd isascii memcpy strchr strerror uname)
AC_FUNC_ALLOCA
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_STRFTIME
AC_FUNC_VPRINTF
AC_REPLACE_FUNCS(memset mktime stpcpy strftime)
test "$ac_cv_func_basename" = yes || LIBOBJS="$LIBOBJS basename.o"
AC_MSG_CHECKING(for /etc/systemid)
if test -f /etc/systemid; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_ETC_SYSTEMID)
else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING(if uuencode and uudecode are wanted)
AC_ARG_ENABLE(uucode,
[ --disable-uucode disable installation of uuencode and uudecode],
[if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
PROGRAMS="$PROGRAMS uudecode uuencode"
# uuencode.1 should install first, for uudecode.1 will be a link to it.
MAN1PAGES="$MAN1PAGES uuencode uudecode"
MAN5PAGES="$MAN5PAGES uuencode"
else
AC_MSG_RESULT(no)
fi], [
AC_MSG_RESULT(yes)
PROGRAMS="$PROGRAMS uudecode uuencode"
# uuencode.1 should install first, for uudecode.1 will be a link to it.
MAN1PAGES="$MAN1PAGES uuencode uudecode"
MAN5PAGES="$MAN5PAGES uuencode"
])
ud_GNU_GETTEXT
fp_WITH_DMALLOC
# sharutils is somewhat special about internationalization in that it
# always requires the GNU .mo files installed.
if test "x$CATOBJEXT" = "x.mo" || test "x$CATOBJEXT" = "x.cat"; then
new_CATALOGS=""
for cat in $CATALOGS; do
lang=`echo $cat | sed "s/\(.*\)\..*/\1/"`
new_CATALOGS="$new_CATALOGS $cat $lang.gmo"
done
CATALOGS="$new_CATALOGS"
fi
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
AC_OUTPUT([Makefile src/mail-files src/mailshar src/remsync contrib/Makefile \
lib/Makefile intl/Makefile intl/po2tbl.sed src/Makefile \
po/Makefile.in doc/Makefile checks/Makefile],
[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile; \
test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])

View File

@ -0,0 +1,64 @@
# Generated automatically from Makefile.in by configure.
# Makefile for GNU shar utilities, contribution directory.
# Copyright (C) 1995 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.
PACKAGE = sharutils
VERSION = 4.2.1
SHELL = /bin/sh
srcdir = .
subdir = contrib
.SUFFIXES:
DISTFILES = Makefile.in shar.sh shar2.sh bas-README uudecode.bas \
pas-README pas-R.Marks pas-diffs uudecode.pas uuencode.pas \
uudecode.pl uuencode.pl
all:
check:
install:
uninstall:
mostlyclean:
clean: mostlyclean
distclean: clean
rm -f Makefile
maintainer-clean: distclean
@echo "This command is intended only for maintainers to use;"
@echo "rebuilding the deleted files may require special tools."
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist: $(DISTFILES)
@for file in $(DISTFILES); do \
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir); \
done
Makefile: ../config.status Makefile.in
cd .. && CONFIG_FILES=contrib/$@ CONFIG_HEADERS= ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,64 @@
# Makefile for GNU shar utilities, contribution directory.
# Copyright (C) 1995 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.
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SHELL = /bin/sh
srcdir = @srcdir@
VPATH = @srcdir@
subdir = contrib
.SUFFIXES:
DISTFILES = Makefile.in shar.sh shar2.sh bas-README uudecode.bas \
pas-README pas-R.Marks pas-diffs uudecode.pas uuencode.pas \
uudecode.pl uuencode.pl
all:
check:
install:
uninstall:
mostlyclean:
clean: mostlyclean
distclean: clean
rm -f Makefile
maintainer-clean: distclean
@echo "This command is intended only for maintainers to use;"
@echo "rebuilding the deleted files may require special tools."
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist: $(DISTFILES)
@for file in $(DISTFILES); do \
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir); \
done
Makefile: ../config.status Makefile.in
cd .. && CONFIG_FILES=contrib/$@ CONFIG_HEADERS= ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,25 @@
Relay-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site hoptoad.uucp
From: rde@ukc.ac.uk (R.D.Eager)
Newsgroups: net.sources
Subject: Revised UUDECODE in MS-BASIC
Date: 14 Mar 86 11:53:53 GMT
Date-Received: 15 Mar 86 13:45:45 GMT
Reply-To: rde@ukc.ac.uk (R.D.Eager)
A while ago I posted a UUDECODE program, written in Microsoft Basic,
to net.sources. Judging from the number of replies I had, people
are finding this useful if they don't have access to the public
domain UUDECODE, or to a C compiler.
I found one or two problems recently; the main one was that it would
not create an output file of more than 64K due to an undocumented
feature of MS-BASIC. Here is a corrected version; as always, I
suggest you compile it if you want the run time to be finite.
Bob Eager
rde@ukc.UUCP
rde@ukc
...!mcvax!ukc!rde
Phone: +44 227 66822 ext 7589

View File

@ -0,0 +1,25 @@
From: rmarks@KSP.Unisys.COM (Richard Marks)
Newsgroups: comp.binaries.ibm.pc.archives
Subject: UUENCODE/DECODE 4.20
Date: 14 Aug 91 14:26:44 GMT
I have just send in my latest UUENCODE/DECODE package to c.b.i.p
for posting. This is level 4.20.
This package has been out for four years. It is fast and it automatically
handles multi-section decoding - with automatic CRC testing. Just
save submissions as foo1.uue, foo2.uue, etc.; download to the PC; and
enter UUDECODE FOO.
Also this package handles lots of variations in checksums and character
permutations. This includes XXencode/decode.
The 4.20 version replaces the 4.13 version. It is a minor update with
some improved error messages, beeping to alert for errors, and detection
of some additional character permutations. Also the prior default for the
encode was to put a checksum on each line; now with the use of full file
CRC's, the default has been changed to turn this off.
Regards,
Richard Marks
rmarks@MDC.unisys.COM

View File

@ -0,0 +1,45 @@
Here are versions of uuencode and uudecode that will work on an IBM
PC. There is a version for Turbo Pascal and one for Microsoft C.
Porting them into other machines, languages or dialects should not
pose a large problem.
Sorry about the lack of documentation, but the programs are easy to
use, so you should not have a problem. I don't know why a UNIX
site would not have these in the first place, but at least your
manual should tell you how to use them. If you are not using UNIX
at all, you have my sympathy.
The Pascal programs' author is unknown. The C programs were
provided by Don Kneller.
Tom Reingold
Rockefeller University
New York City
UUCP: {seismo | harvard | ihnp4}!cmcl2!rna!rocky2!reintom
BITNET: REINTOM@ROCKVAX
ARPANET: reintom@rockefeller.arpa
======================================================================
Relay-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site hoptoad.uucp
From: darmon@polaris.UUCP (Pierre Darmon)
Newsgroups: net.sources
Subject: Modified Turbo Pascal uudecode/encode. More user-friendly.
Date: 30 Oct 86 01:12:40 GMT
Date-Received:
Reply-To: darmon@polaris.UUCP (Pierre Darmon)
Organization: IBM Research, Yorktown Heights, N.Y.
The following are the Turbo Pascal source files for uudecode and uuencode,
modified from the net posting to display the remaining bytes to be processed,
instead of filling up the screen with periods. It also displays the percentage
left. See my previous posting to net.micro,net.micro.pc and net.sources for
details.
Enjoy!
--
Pierre Darmon, IBM Thomas J. Watson Research Center.
.....seismo!philabs!polaris!darmon.
darmon.yktvmz.ibm@csnet-relay

View File

@ -0,0 +1,144 @@
diff -u 870527-ibm-pc/README 861030-darmon/README
--- 870527-ibm-pc/README Wed May 27 00:12:39 1987
+++ 861030-darmon/README Sat Feb 11 20:45:04 1995
@@ -1,20 +1,23 @@
-Here are versions of uuencode and uudecode that will work on an IBM
-PC. There is a version for Turbo Pascal and one for Microsoft C.
-Porting them into other machines, languages or dialects should not
-pose a large problem.
+Relay-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site hoptoad.uucp
+From: darmon@polaris.UUCP (Pierre Darmon)
+Newsgroups: net.sources
+Subject: Modified Turbo Pascal uudecode/encode. More user-friendly.
+Date: 30 Oct 86 01:12:40 GMT
+Date-Received:
+Reply-To: darmon@polaris.UUCP (Pierre Darmon)
+Organization: IBM Research, Yorktown Heights, N.Y.
-Sorry about the lack of documentation, but the programs are easy to
-use, so you should not have a problem. I don't know why a UNIX
-site would not have these in the first place, but at least your
-manual should tell you how to use them. If you are not using UNIX
-at all, you have my sympathy.
+The following are the Turbo Pascal source files for uudecode and uuencode,
+modified from the net posting to display the remaining bytes to be processed,
+instead of filling up the screen with periods. It also displays the percentage
+left. See my previous posting to net.micro,net.micro.pc and net.sources for
+details.
-The Pascal programs' author is unknown. The C programs were
-provided by Don Kneller.
+Enjoy!
-Tom Reingold
-Rockefeller University
-New York City
-UUCP: {seismo | harvard | ihnp4}!cmcl2!rna!rocky2!reintom
-BITNET: REINTOM@ROCKVAX
-ARPANET: reintom@rockefeller.arpa
+
+--
+
+Pierre Darmon, IBM Thomas J. Watson Research Center.
+.....seismo!philabs!polaris!darmon.
+darmon.yktvmz.ibm@csnet-relay
Only in 861030-darmon: diffs
diff -u 870527-ibm-pc/uudecode.pas 861030-darmon/uudecode.pas
--- 870527-ibm-pc/uudecode.pas Wed May 27 00:12:39 1987
+++ 861030-darmon/uudecode.pas Sat Feb 11 20:44:32 1995
@@ -6,9 +6,11 @@
TYPE string80 = string[80];
VAR infile: text;
+ fi : file of byte;
outfile: file of byte;
lineNum: integer;
line: string80;
+ size,remaining :real;
procedure Abort(message: string80);
@@ -23,8 +25,11 @@
begin {NextLine}
LineNum := succ(LineNum);
- write('.');
- readln(infile, s)
+ {write('.');}
+ readln(infile, s);
+ remaining:=remaining-length(s)-2; {-2 is for CR/LF}
+ write('bytes remaining: ',remaining:7:0,' (',
+ remaining/size*100.0:3:0,'%)',chr(13));
end; {NextLine}
procedure Init;
@@ -43,7 +48,11 @@
reset(infile);
{$i+}
if IOresult > 0 then abort (concat('Can''t open ', infilename));
- writeln ('Decoding ', infilename)
+ writeln ('Decoding ', infilename);
+ assign(fi,infilename); reset(fi);
+ size:=FileSize(fi); close(fi);
+ if size < 0 then size:=size+65536.0;
+ remaining:=size;
end; {GetInFile}
procedure GetOutFile;
@@ -158,7 +167,7 @@
then abort('Illegal character in line.');
{ write(line[lineindex]:2);}
if line[lineindex] = '`' then nextch := ' '
- else nextch := line[lineIndex]
+ else nextch := line[lineIndex]
end; {nextch}
procedure DecodeByte;
diff -u 870527-ibm-pc/uuencode.pas 861030-darmon/uuencode.pas
--- 870527-ibm-pc/uuencode.pas Wed May 27 00:12:40 1987
+++ 861030-darmon/uuencode.pas Sat Feb 11 20:44:51 1995
@@ -18,6 +18,7 @@
line: array [0..59] of char;
hunk: array [0..2] of byte;
chars: array [0..3] of byte;
+ size,remaining :real;
{ procedure debug;
@@ -70,6 +71,9 @@
reset (infile);
{$i+}
if IOResult > 0 then abort (concat ('Can''t open file ', infilename));
+ size:=FileSize(infile);
+ if size < 0 then size:=size+65536.0;
+ remaining:=size;
write('Uuencoding file ', infilename);
i := pos('.', infilename);
@@ -131,7 +135,9 @@
end; {writeout}
begin {FlushLine}
- write ('.');
+ {write ('.');}
+ write('bytes remaining: ',remaining:7:0,' (',
+ remaining/size*100.0:3:0,'%)',chr(13));
writeout(chr(bytesInLine + offset));
for i := 0 to pred(lineLength) do
writeout(line[i]);
@@ -167,6 +173,7 @@
begin {encode1};
if numbytes = bytesperhunk then flushhunk;
read (infile, hunk[numbytes]);
+ remaining:=remaining-1;
numbytes := succ(numbytes)
end; {encode1}
@@ -190,5 +197,6 @@
begin {uuencode}
init;
while not eof (infile) do encode1;
- terminate
+ terminate;
+ writeln;
end. {uuencode}

View File

@ -0,0 +1,176 @@
#!/bin/sh
# UNISRC_ID: @(#)shar.sh 27.1 84/12/17
: Make a shell archive package
# Usage: $0 [-b] [-c] [-t] [-v] files... > package
# See the manual entry for details.
# Initialize:
diagnostic='eval echo >&2' # diagnostics to stderr by default.
trap '$diagnostic "$0: quitting early"; exit 1' 1 2 3 15
base_option=FALSE # use pathnames, not basenames.
check_option=FALSE # don't generate integrity check.
USAGE='Usage: $0 \[-b] \[-c] \[-t] \[-v] files... \> package'
# Extract and digest options, if any:
#
# Un-comment the "-)" line below to treat single dashes as a no-op.
# Commented means single dashes elicit a usage diagnostic.
while [ -n "$1" ] # while there are more arguments,
do # digest them; stop when you find a non-option.
case "$1" in
-b) base_option=TRUE; shift;;
-c) check_option=TRUE; shift;;
-v) verbose=TRUE; shift;;
-t) verbose=TRUE; diagnostic='eval echo >/dev/tty'; shift;;
### -) shift;; # if uncommented, eat single dashes.
-*) $diagnostic $USAGE; exit 1;; # die at illegal options.
*) break;; # non-option found.
esac
done
# Check remaining arguments, which should be just a list of files:
if [ $# = 0 ]
then # no arguments left!
$diagnostic $USAGE
exit 1
fi
# Check the cupboard to see if the ingredients are all there:
contents='' # no files so far.
contdirs='' # no directories so far.
for arg # for all files specified,
do # establish the archive name.
if [ -f "$arg" ]
then # file exists and is not a directory.
case $base_option in
TRUE) unpack_name=`basename "$arg"` ;;
FALSE) unpack_name="$arg" ;;
esac
contents="$contents $unpack_name"
elif [ -d "$arg" ]
then # file exists and is a directory.
case $base_option in
TRUE) $diagnostic '$0: cannot archive directory "$arg" with -b option.'
exit 1 ;;
FALSE) contdirs="$contdirs $arg/ " ;;
esac
else # not a plain file and not a directory.
$diagnostic '$0: cannot archive "$arg"'
exit 1
fi
done
# Emit the prologue:
# (The leading newline is for those who type csh instead of sh.)
cat <<!!!
# This is a shell archive. Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
#
# Wrapped by `who am i | sed 's/[ ].*//'` on `date`
!!!
# Emit the list of ingredients:
# Simple version (breaks if you shar lots of files at once):
# echo "# Contents: $contdirs$contents"
#
# Complex and cosmetic version to pack contents list onto lines that fit on
# one terminal line ("expr string : .*" prints the length of the string):
MAX=80
line='# Contents: '
for item in $contdirs $contents
do
if [ `expr "$line" : '.*' + 1 + "$item" : '.*'` -lt $MAX ]
then # length of old line + new item is short enough,
line="$line $item" # so just append it.
else # new element makes line too long,
echo "$line" # so put it on a new line.
line="# $item" # start a new line.
MAX=74 # compensate for tab width.
fi
done
echo "$line"
echo " "
# Emit the files and their separators:
for arg
do
# Decide which name to archive under.
case $base_option in
TRUE) unpack_name=`basename "$arg"`
test $verbose && $diagnostic "a - $unpack_name [from $arg]" ;;
FALSE) unpack_name="$arg"
test $verbose && $diagnostic "a - $arg" ;;
esac
# Emit either a mkdir or a cat/sed to extract the file.
if [ -d "$arg" ]
then
echo "echo mkdir - $arg"
echo "mkdir $arg"
else
echo "echo x - $unpack_name"
separator="@//E*O*F $unpack_name//"
echo "sed 's/^@//' > \"$unpack_name\" <<'$separator'"
sed -e 's/^[.~@]/@&/' -e 's/^From/@&/' "$arg"
echo $separator
fi
# Emit chmod to set permissions on the extracted file;
# this keels over if the filename contains "?".
ls -ld $arg | sed \
-e 's/^.\(...\)\(...\)\(...\).*/u=\1,g=\2,o=\3/' \
-e 's/-//g' \
-e 's?.*?chmod & '"$unpack_name?"
echo " "
done
# If the -c option was given, emit the checking epilogue:
# (The sed script converts files to basenames so it works regardless of -b.)
if [ $check_option = TRUE ]
then
echo 'echo Inspecting for damage in transit...'
echo 'temp=/tmp/shar$$; dtemp=/tmp/.shar$$'
echo 'trap "rm -f $temp $dtemp; exit" 0 1 2 3 15'
echo 'cat > $temp <<\!!!'
case $base_option in
TRUE) wc $@ | sed 's=[^ ]*/==' ;;
FALSE) wc $contents | sed 's=[^ ]*/==' ;;
esac
echo '!!!'
echo "wc $contents | sed 's=[^ ]*/==' | "'diff -b $temp - >$dtemp'
echo 'if [ -s $dtemp ]'
echo 'then echo "Ouch [diff of wc output]:" ; cat $dtemp'
echo 'else echo "No problems found."'
echo 'fi'
fi
# Finish up:
echo 'exit 0' # sharchives unpack even if junk follows.
exit 0

View File

@ -0,0 +1,74 @@
#!/bin/sh -
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by the University of
# California, Berkeley and its contributors.
# 4. Neither the name of the University nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# @(#)shar.sh 5.2 (Berkeley) 5/23/90
#
if [ $# -eq 0 ]; then
echo 'usage: shar file ...'
exit 1
fi
cat << EOF
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
EOF
for i
do
echo "# $i"
done
echo "#"
for i
do
if [ -d $i ]; then
echo "echo c - $i"
echo "mkdir $i > /dev/null 2>&1"
else
echo "echo x - $i"
echo "sed 's/^X//' >$i << 'END-of-$i'"
sed 's/^/X/' $i
echo "END-of-$i"
fi
done
echo exit
echo ""
exit 0

View File

@ -0,0 +1,78 @@
1000 KEY OFF
1001 DEFINT A-Z
1010 REM Trap error opening input file
1020 ON ERROR GOTO 1600
1030 CLS
1040 LOCATE 5,11
1050 PRINT STRING$(40," ")
1060 LOCATE 5,11
1070 INPUT "Enter name of input file: ", INFILE$
1080 OPEN INFILE$ FOR INPUT AS #1
1090 LOCATE 8,10
1100 PRINT STRING$(40," ")
1110 REM Trap error opening output file
1120 ON ERROR GOTO 1640
1130 LOCATE 8,10
1140 INPUT "Enter name of output file: ", OUTFILE$
1150 OPEN "R", #2,OUTFILE$, 1
1160 FIELD #2, 1 AS N$
1170 REM Trap error at end of file
1180 ON ERROR GOTO 1680
1190 REM Search for header line
1200 LINE INPUT #1,A$
1210 IF LEFT$(A$,5) <>"begin" THEN 1200
1220 LOCATE 11,10
1230 PRINT "Header = ";A$
1240 SP = ASC(" ")
1250 DIM BUF(100)
1260 RECNO# = 1
1270 REM Main loop
1280 LINE INPUT #1, A$
1290 P = 0
1300 COUNT = ASC(LEFT$(A$,1)) - SP
1310 IF COUNT = 64 THEN COUNT = 0
1320 IF COUNT = 0 THEN 1560
1330 ADJ = COUNT MOD 4
1340 FOR I = 2 TO LEN(A$) STEP 4
1350 X1 = ASC(MID$(A$,I,I)) - SP
1360 IF X1 = 64 THEN X1 = 0
1370 X2 = ASC(MID$(A$,I+1,I+1)) - SP
1380 IF X2 = 64 THEN X2 = 0
1390 X3 = ASC(MID$(A$,I+2,I+2)) - SP
1400 IF X3 = 64 THEN X3 = 0
1410 X4 = ASC(MID$(A$,I+3,I+3)) - SP
1420 IF X4 = 64 THEN X4 = 0
1430 P = P + 1
1440 BUF(P) = (X2\16) + (X1*4)
1450 P = P + 1
1460 BUF(P) = (X3\4) + ((X2 MOD 16) * 16)
1470 P = P + 1
1480 BUF(P) = X4 + ((X3 MOD 4) * 64)
1490 NEXT I
1500 FOR I = 1 TO P
1510 LSET N$ = CHR$(BUF(I))
1520 PUT #2, RECNO#
1530 RECNO# = RECNO# + 1
1540 NEXT I
1550 GOTO 1280
1560 END
1570 REM
1580 REM Error trapping routines
1590 REM
1600 LOCATE 22,20
1610 PRINT "Can't open input file"
1620 GOSUB 1740
1630 RESUME 1020
1640 LOCATE 22,20
1650 PRINT "Can't open output file"
1660 GOSUB 1740
1670 RESUME 1090
1680 LOCATE 22,20
1690 PRINT "Header line not found"
1700 GOSUB 1740
1710 LOCATE 24,1
1720 END
1740 FOR I = 1 TO 5000: NEXT I
1750 LOCATE 22,20
1760 PRINT STRING$(30," ")
1770 RETURN

View File

@ -0,0 +1,224 @@
program uudecode;
CONST defaultSuffix = '.uue';
offset = 32;
TYPE string80 = string[80];
VAR infile: text;
fi : file of byte;
outfile: file of byte;
lineNum: integer;
line: string80;
size,remaining :real;
procedure Abort(message: string80);
begin {abort}
writeln;
if lineNum > 0 then write('Line ', lineNum, ': ');
writeln(message);
halt
end; {Abort}
procedure NextLine(var s: string80);
begin {NextLine}
LineNum := succ(LineNum);
{write('.');}
readln(infile, s);
remaining:=remaining-length(s)-2; {-2 is for CR/LF}
write('bytes remaining: ',remaining:7:0,' (',
remaining/size*100.0:3:0,'%)',chr(13));
end; {NextLine}
procedure Init;
procedure GetInFile;
VAR infilename: string80;
begin {GetInFile}
if ParamCount = 0 then abort ('Usage: uudecode <filename>');
infilename := ParamStr(1);
if pos('.', infilename) = 0
then infilename := concat(infilename, defaultSuffix);
assign(infile, infilename);
{$i-}
reset(infile);
{$i+}
if IOresult > 0 then abort (concat('Can''t open ', infilename));
writeln ('Decoding ', infilename);
assign(fi,infilename); reset(fi);
size:=FileSize(fi); close(fi);
if size < 0 then size:=size+65536.0;
remaining:=size;
end; {GetInFile}
procedure GetOutFile;
var header, mode, outfilename: string80;
ch: char;
procedure ParseHeader;
VAR index: integer;
Procedure NextWord(var word:string80; var index: integer);
begin {nextword}
word := '';
while header[index] = ' ' do
begin
index := succ(index);
if index > length(header) then abort ('Incomplete header')
end;
while header[index] <> ' ' do
begin
word := concat(word, header[index]);
index := succ(index)
end
end; {NextWord}
begin {ParseHeader}
header := concat(header, ' ');
index := 7;
NextWord(mode, index);
NextWord(outfilename, index)
end; {ParseHeader}
begin {GetOutFile}
if eof(infile) then abort('Nothing to decode.');
NextLine (header);
while not ((copy(header, 1, 6) = 'begin ') or eof(infile)) do
NextLine(header);
writeln;
if eof(infile) then abort('Nothing to decode.');
ParseHeader;
assign(outfile, outfilename);
writeln ('Destination is ', outfilename);
{$i-}
reset(outfile);
{$i+}
if IOresult = 0 then
begin
write ('Overwrite current ', outfilename, '? [Y/N] ');
repeat
read (kbd, ch);
ch := UpCase(ch)
until ch in ['Y', 'N'];
writeln(ch);
if ch = 'N' then abort ('Overwrite cancelled.')
end;
rewrite (outfile);
end; {GetOutFile}
begin {init}
lineNum := 0;
GetInFile;
GetOutFile;
end; { init}
Function CheckLine: boolean;
begin {CheckLine}
if line = '' then abort ('Blank line in file');
CheckLine := not (line[1] in [' ', '`'])
end; {CheckLine}
procedure DecodeLine;
VAR lineIndex, byteNum, count, i: integer;
chars: array [0..3] of byte;
hunk: array [0..2] of byte;
{ procedure debug;
var i: integer;
procedure writebin(x: byte);
var i: integer;
begin
for i := 1 to 8 do
begin
write ((x and $80) shr 7);
x := x shl 1
end;
write (' ')
end;
begin
writeln;
for i := 0 to 3 do writebin(chars[i]);
writeln;
for i := 0 to 2 do writebin(hunk[i]);
writeln
end; }
function nextch: char;
begin {nextch}
lineIndex := succ(lineIndex);
if lineIndex > length(line) then abort('Line too short.');
if not (line[lineindex] in [' '..'`'])
then abort('Illegal character in line.');
{ write(line[lineindex]:2);}
if line[lineindex] = '`' then nextch := ' '
else nextch := line[lineIndex]
end; {nextch}
procedure DecodeByte;
procedure GetNextHunk;
VAR i: integer;
begin {GetNextHunk}
for i := 0 to 3 do chars[i] := ord(nextch) - offset;
hunk[0] := (chars[0] shl 2) + (chars[1] shr 4);
hunk[1] := (chars[1] shl 4) + (chars[2] shr 2);
hunk[2] := (chars[2] shl 6) + chars[3];
byteNum := 0 {;
debug }
end; {GetNextHunk}
begin {DecodeByte}
if byteNum = 3 then GetNextHunk;
write (outfile, hunk[byteNum]);
{writeln(bytenum, ' ', hunk[byteNum]);}
byteNum := succ(byteNum)
end; {DecodeByte}
begin {DecodeLine}
lineIndex := 0;
byteNum := 3;
count := (ord(nextch) - offset);
for i := 1 to count do DecodeByte
end; {DecodeLine}
procedure terminate;
var trailer: string80;
begin {terminate}
if eof(infile) then abort ('Abnormal end.');
NextLine (trailer);
if length (trailer) < 3 then abort ('Abnormal end.');
if copy (trailer, 1, 3) <> 'end' then abort ('Abnormal end.');
close (infile);
close (outfile)
end;
begin {uudecode}
init;
NextLine(line);
while CheckLine do
begin
DecodeLine;
NextLine(line)
end;
terminate
end.

View File

@ -0,0 +1,24 @@
# uuencode in Perl.
# Copyright (C) 1995 Free Software Foundation, Inc.
# François Pinard <pinard@iro.umontreal.ca>, 1995.
# `perl uudecode.pl FILES' will decode all uuencoded files found in
# all input FILES, stripping headers and other non uuencoded data.
while (<>)
{
if (/^begin [0-7][0-7][0-7] ([^\n ]+)$/)
{
open (OUTPUT, ">$1") || die "Cannot create $1\n";
binmode OUTPUT;
while (<>)
{
last if /^end$/;
$block = unpack ("u", $_);
print OUTPUT $block;
}
close OUTPUT;
}
}
exit 0;

View File

@ -0,0 +1,202 @@
Program uuencode;
CONST header = 'begin';
trailer = 'end';
defaultMode = '644';
defaultExtension = '.uue';
offset = 32;
charsPerLine = 60;
bytesPerHunk = 3;
sixBitMask = $3F;
TYPE string80 = string[80];
VAR infile: file of byte;
outfile: text;
infilename, outfilename, mode: string80;
lineLength, numbytes, bytesInLine: integer;
line: array [0..59] of char;
hunk: array [0..2] of byte;
chars: array [0..3] of byte;
size,remaining :real;
{ procedure debug;
var i: integer;
procedure writebin(x: byte);
var i: integer;
begin
for i := 1 to 8 do
begin
write ((x and $80) shr 7);
x := x shl 1
end;
write (' ')
end;
begin
for i := 0 to 2 do writebin(hunk[i]);
writeln;
for i := 0 to 3 do writebin(chars[i]);
writeln;
for i := 0 to 3 do writebin(chars[i] and sixBitMask);
writeln
end; }
procedure Abort (message: string80);
begin {abort}
writeln(message);
close(infile);
close(outfile);
halt
end; {abort}
procedure Init;
procedure GetFiles;
VAR i: integer;
temp: string80;
ch: char;
begin {GetFiles}
if ParamCount < 1 then abort ('No input file specified.');
infilename := ParamStr(1);
{$I-}
assign (infile, infilename);
reset (infile);
{$i+}
if IOResult > 0 then abort (concat ('Can''t open file ', infilename));
size:=FileSize(infile);
if size < 0 then size:=size+65536.0;
remaining:=size;
write('Uuencoding file ', infilename);
i := pos('.', infilename);
if i = 0
then outfilename := infilename
else outfilename := copy (infilename, 1, pred(i));
mode := defaultMode;
if ParamCount > 1 then
for i := 2 to ParamCount do
begin
temp := Paramstr(i);
if temp[1] in ['0'..'9']
then mode := temp
else outfilename := temp
end;
if pos ('.', outfilename) = 0
then outfilename := concat(outfilename, defaultExtension);
assign (outfile, outfilename);
writeln (' to file ', outfilename, '.');
{$i-}
reset(outfile);
{$i+}
if IOresult = 0 then
begin
Write ('Overwrite current ', outfilename, '? [Y/N] ');
repeat
read (kbd, ch);
ch := Upcase(ch)
until ch in ['Y', 'N'];
writeln (ch);
if ch = 'N' then abort(concat (outfilename, ' not overwritten.'))
end;
close(outfile);
{$i-}
rewrite(outfile);
{$i+}
if ioresult > 0 then abort(concat('Can''t open ', outfilename));
end; {getfiles}
begin {Init}
GetFiles;
bytesInLine := 0;
lineLength := 0;
numbytes := 0;
writeln (outfile, header, ' ', mode, ' ', infilename);
end; {init}
procedure FlushLine;
VAR i: integer;
procedure writeout(ch: char);
begin {writeout}
if ch = ' ' then write(outfile, '`')
else write(outfile, ch)
end; {writeout}
begin {FlushLine}
{write ('.');}
write('bytes remaining: ',remaining:7:0,' (',
remaining/size*100.0:3:0,'%)',chr(13));
writeout(chr(bytesInLine + offset));
for i := 0 to pred(lineLength) do
writeout(line[i]);
writeln (outfile);
lineLength := 0;
bytesInLine := 0
end; {FlushLine}
procedure FlushHunk;
VAR i: integer;
begin {FlushHunk}
if lineLength = charsPerLine then FlushLine;
chars[0] := hunk[0] shr 2;
chars[1] := (hunk[0] shl 4) + (hunk[1] shr 4);
chars[2] := (hunk[1] shl 2) + (hunk[2] shr 6);
chars[3] := hunk[2] and sixBitMask;
{debug;}
for i := 0 to 3 do
begin
line[lineLength] := chr((chars[i] and sixBitMask) + offset);
{write(line[linelength]:2);}
lineLength := succ(lineLength)
end;
{writeln;}
bytesInLine := bytesInLine + numbytes;
numbytes := 0
end; {FlushHunk}
procedure encode1;
begin {encode1};
if numbytes = bytesperhunk then flushhunk;
read (infile, hunk[numbytes]);
remaining:=remaining-1;
numbytes := succ(numbytes)
end; {encode1}
procedure terminate;
begin {terminate}
if numbytes > 0 then flushhunk;
if lineLength > 0
then
begin
flushLine;
flushLine;
end
else flushline;
writeln (outfile, trailer);
close (outfile);
close (infile);
end; {terminate}
begin {uuencode}
init;
while not eof (infile) do encode1;
terminate;
writeln;
end. {uuencode}

View File

@ -0,0 +1,10 @@
# uuencode in Perl - non tested.
# Copyright (C) 1995 Free Software Foundation, Inc.
# François Pinard <pinard@iro.umontreal.ca>, 1995.
print "begin 644 $ARGV[0]\n";
print pack ("u", $bloc) while read (STDIN, $bloc, 45);
print "`\n";
print "end\n";
exit 0;

View File

@ -0,0 +1,65 @@
Mon Dec 4 16:51:38 1995 Ulrich Drepper <drepper@myware>
* unshar.1, shar.1: Update for 4.2 by Jan Djarv.
Thu Nov 30 23:16:17 1995 Ulrich Drepper <drepper@myware>
* remsync.texi: According to D.E.Knuth and Karl Berry `nonzero' is
preferable to `non-zero'.
Sat Nov 25 02:45:11 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (version.texi): Also depend on ../configure.in.
* unshar.1, sharutils.texi:
Correct double `in`. Reported by Nelson Beebe.
* remsync.texi: Correct double `the`. Reported by Nelson Beebe.
Sun Nov 5 13:33:39 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (dist): Suppress error message when ln failed.
Sat Oct 28 01:50:37 1995 Ulrich Drepper <drepper@myware>
* sharutils.texi: Document -f option of unshar.
Tue Sep 26 14:25:20 1995 Ulrich Drepper <drepper@myware>
* uuencode.1: Typo.
* uuencode.1: Document P1003.2b/D11 changes.
Sun Sep 24 16:28:34 1995 Ulrich Drepper <drepper@myware>
* sharutils.texi: Add some comments about transmission checks.
Wed Sep 20 23:51:03 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (transform):
New variable. Gets its value from configure.
(man1dir, man1ext, man5dir, man5ext): New variables for man page
installation.
(install-man): Correct some bugs.
* Makefile.in (MAN1PAGES, MAN5PAGES): Let configure set the values.
(install-man, uninstall-man): The for $(MAN5PAGES) to be empty; some
shells don't like empty for argument lists.
* unshar.1, shar.1: Changes for 4.1.6 by Jan Djarv.
Tue Aug 15 16:58:58 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (dist): Remove `copying instead' message.
Thu Aug 10 22:34:12 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (DISTFILES):
Was two times sharutils.info and remsync.info. Change one of
them to sharutils.texi and remsync.texi.
Reported by Franc,ois Pinard.
Thu Aug 3 00:27:20 1995 Ulrich Drepper <drepper@myware>
* Makefile.in: Initial revision.

View File

@ -0,0 +1,156 @@
# Generated automatically from Makefile.in by configure.
# Makefile for GNU Shar utility package documentation.
# Copyright (C) 1995 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.
PACKAGE = sharutils
VERSION = 4.2.1
SHELL = /bin/sh
srcdir = .
top_srcdir = ..
transform = s,x,x,
INSTALL = /bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
TOUCH = echo timestamp >
DISTFILES = ChangeLog Makefile.in mdate-sh sharutils.texi remsync.texi \
shar.1 unshar.1 uuencode.1 uuencode.5 \
texinfo.tex version.texi sharutils.info remsync.info stamp-vti
MAN1PAGES = shar unshar uuencode uudecode
MAN5PAGES = uuencode
prefix = /usr/local
infodir = $(prefix)/info
mandir = $(prefix)/man
man1dir = $(mandir)/man1
man1ext = .1
man5dir = $(mandir)/man5
man5ext = .5
subdir = doc
.SUFFIXES:
default: all
all info check: sharutils.info remsync.info
sharutils.info: sharutils.texi version.texi
cd $(srcdir) && $(MAKEINFO) sharutils.texi
remsync.info: remsync.texi version.texi
cd $(srcdir) && $(MAKEINFO) remsync.texi
dvi: sharutils.dvi remsync.dvi
sharutils.dvi: sharutils.texi texinfo.tex version.texi
$(TEXI2DVI) $(srcdir)/sharutils.texi
remsync.dvi: remsync.texi texinfo.tex
$(TEXI2DVI) $(srcdir)/remsync.texi
version.texi: stamp-vti
stamp-vti: sharutils.texi $(top_srcdir)/configure.in
echo "@set EDITION $(VERSION)" > version.tmp
echo "@set UPDATED `cd $(srcdir) \
&& $(SHELL) mdate-sh sharutils.texi`" >> version.tmp
echo "@set VERSION $(VERSION)" >> version.tmp
if cmp -s version.tmp version.texi; then \
rm -f version.tmp; \
else \
mv -f version.tmp version.texi; \
fi
$(TOUCH) $(srcdir)/stamp-vti
install install-exec install-data: all
install: install-exec install-data
install-exec:
install-data:
$(top_srcdir)/mkinstalldirs $(infodir)
cd $(srcdir) && \
for file in sharutils.info* remsync.info*; do \
$(INSTALL_DATA) $$file $(infodir)/$$file; \
done
uninstall:
rm -f $(infodir)/sharutils.info* $(infodir)/remsync.info*
# man page installation is kept separate from install. Better think
# GNU and switch to Info. The following is for irreductible fellows.
install-man:
$(top_srcdir)/mkinstalldirs $(man1dir)
test -z "$(MAN5PAGES)" || $(top_srcdir)/mkinstalldirs $(man5dir)
for name in $(MAN1PAGES); do \
if test $$name = uudecode; then \
rm -f $(man1dir)/`echo uudecode | sed '$(transform)'`$(man1ext); \
man1base=`echo $(man1dir) | sed 's@.*/\(.*\)@&1@'`; \
echo ".so $$man1base/uuencode$(man1ext)" \
> $(man1dir)/`echo uudecode | sed '$(transform)'`$(man1ext); \
else \
$(INSTALL_DATA) $(srcdir)/$$name.1 \
$(man1dir)/`echo $$name | sed '$(transform)'`$(man1ext); \
fi; \
done
test -z "$(MAN5PAGES)" || \
for name in $(MAN5PAGES); do \
$(INSTALL_DATA) $(srcdir)/$$name.5 \
$(man5dir)/`echo $$name | sed '$(transform)'`$(man5ext); \
done
uninstall-man:
for name in $(MAN1PAGES); do \
rm -f $(man1dir)/`echo $$name | sed '$(transform)'`$(man1ext); \
done
test -z "$(MAN5PAGES)" || \
for name in $(MAN5PAGES); do \
rm -f $(man5dir)/`echo $$name | sed '$(transform)'`$(man5ext); \
done
TAGS ID:
mostlyclean:
rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.log *.pg *.toc *.tp *.vr
rm -f *.tmp
clean: mostlyclean
distclean: clean
rm -f Makefile
maintainer-clean: distclean
@echo "This command is intended only for maintainers to use;"
@echo "rebuilding the deleted files may require special tools."
rm -f stamp-vti version.texi sharutils.info* remsync.info*
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist: Makefile $(DISTFILES)
for file in $(DISTFILES); do \
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir); \
done
Makefile: Makefile.in ../config.status
cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,156 @@
# Makefile for GNU Shar utility package documentation.
# Copyright (C) 1995 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.
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
transform = @program_transform_name@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
TOUCH = echo timestamp >
DISTFILES = ChangeLog Makefile.in mdate-sh sharutils.texi remsync.texi \
shar.1 unshar.1 uuencode.1 uuencode.5 \
texinfo.tex version.texi sharutils.info remsync.info stamp-vti
MAN1PAGES = @MAN1PAGES@
MAN5PAGES = @MAN5PAGES@
prefix = @prefix@
infodir = $(prefix)/info
mandir = $(prefix)/man
man1dir = $(mandir)/man1
man1ext = .1
man5dir = $(mandir)/man5
man5ext = .5
subdir = doc
.SUFFIXES:
default: all
all info check: sharutils.info remsync.info
sharutils.info: sharutils.texi version.texi
cd $(srcdir) && $(MAKEINFO) sharutils.texi
remsync.info: remsync.texi version.texi
cd $(srcdir) && $(MAKEINFO) remsync.texi
dvi: sharutils.dvi remsync.dvi
sharutils.dvi: sharutils.texi texinfo.tex version.texi
$(TEXI2DVI) $(srcdir)/sharutils.texi
remsync.dvi: remsync.texi texinfo.tex
$(TEXI2DVI) $(srcdir)/remsync.texi
version.texi: stamp-vti
stamp-vti: sharutils.texi $(top_srcdir)/configure.in
echo "@set EDITION $(VERSION)" > version.tmp
echo "@set UPDATED `cd $(srcdir) \
&& $(SHELL) mdate-sh sharutils.texi`" >> version.tmp
echo "@set VERSION $(VERSION)" >> version.tmp
if cmp -s version.tmp version.texi; then \
rm -f version.tmp; \
else \
mv -f version.tmp version.texi; \
fi
$(TOUCH) $(srcdir)/stamp-vti
install install-exec install-data: all
install: install-exec install-data
install-exec:
install-data:
$(top_srcdir)/mkinstalldirs $(infodir)
cd $(srcdir) && \
for file in sharutils.info* remsync.info*; do \
$(INSTALL_DATA) $$file $(infodir)/$$file; \
done
uninstall:
rm -f $(infodir)/sharutils.info* $(infodir)/remsync.info*
# man page installation is kept separate from install. Better think
# GNU and switch to Info. The following is for irreductible fellows.
install-man:
$(top_srcdir)/mkinstalldirs $(man1dir)
test -z "$(MAN5PAGES)" || $(top_srcdir)/mkinstalldirs $(man5dir)
for name in $(MAN1PAGES); do \
if test $$name = uudecode; then \
rm -f $(man1dir)/`echo uudecode | sed '$(transform)'`$(man1ext); \
man1base=`echo $(man1dir) | sed 's@.*/\(.*\)@&1@'`; \
echo ".so $$man1base/uuencode$(man1ext)" \
> $(man1dir)/`echo uudecode | sed '$(transform)'`$(man1ext); \
else \
$(INSTALL_DATA) $(srcdir)/$$name.1 \
$(man1dir)/`echo $$name | sed '$(transform)'`$(man1ext); \
fi; \
done
test -z "$(MAN5PAGES)" || \
for name in $(MAN5PAGES); do \
$(INSTALL_DATA) $(srcdir)/$$name.5 \
$(man5dir)/`echo $$name | sed '$(transform)'`$(man5ext); \
done
uninstall-man:
for name in $(MAN1PAGES); do \
rm -f $(man1dir)/`echo $$name | sed '$(transform)'`$(man1ext); \
done
test -z "$(MAN5PAGES)" || \
for name in $(MAN5PAGES); do \
rm -f $(man5dir)/`echo $$name | sed '$(transform)'`$(man5ext); \
done
TAGS ID:
mostlyclean:
rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.log *.pg *.toc *.tp *.vr
rm -f *.tmp
clean: mostlyclean
distclean: clean
rm -f Makefile
maintainer-clean: distclean
@echo "This command is intended only for maintainers to use;"
@echo "rebuilding the deleted files may require special tools."
rm -f stamp-vti version.texi sharutils.info* remsync.info*
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist: Makefile $(DISTFILES)
for file in $(DISTFILES); do \
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir); \
done
Makefile: Makefile.in ../config.status
cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,92 @@
#!/bin/sh
# mdate-sh - get modification time of a file and pretty-print it
# Copyright (C) 1995 Software Foundation, Inc.
# Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
#
# 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.
# Prevent date giving response in another language.
LANG=C
export LANG
LC_ALL=C
export LC_ALL
LC_TIME=C
export LC_TIME
# Get the extended ls output of the file.
if ls -L /dev/null 1>/dev/null 2>&1; then
set - `ls -L -l $1`
else
set - `ls -l $1`
fi
# The month is at least the fourth argument.
# (3 shifts here, the next inside the loop)
shift
shift
shift
# Find the month. Next argument is day, followed by the year or time.
month=
until test $month
do
shift
case $1 in
Jan) month=January; nummonth=1;;
Feb) month=February; nummonth=2;;
Mar) month=March; nummonth=3;;
Apr) month=April; nummonth=4;;
May) month=May; nummonth=5;;
Jun) month=June; nummonth=6;;
Jul) month=July; nummonth=7;;
Aug) month=August; nummonth=8;;
Sep) month=September; nummonth=9;;
Oct) month=October; nummonth=10;;
Nov) month=November; nummonth=11;;
Dec) month=December; nummonth=12;;
esac
done
day=$2
# Here we have to deal with the problem that the ls output gives either
# the time of day or the year.
case $3 in
*:*) set `date`; year=$7
case $2 in
Jan) nummonthtod=1;;
Feb) nummonthtod=2;;
Mar) nummonthtod=3;;
Apr) nummonthtod=4;;
May) nummonthtod=5;;
Jun) nummonthtod=6;;
Jul) nummonthtod=7;;
Aug) nummonthtod=8;;
Sep) nummonthtod=9;;
Oct) nummonthtod=10;;
Nov) nummonthtod=11;;
Dec) nummonthtod=12;;
esac
# For the first six month of the year the time notation can also
# be used for file modified in the last year.
if (expr $nummonth \> $nummonthtod) > /dev/null;
then
year=`expr year - 1`
fi
;;
*) year=$3;;
esac
# The result.
echo $day $month $year

View File

@ -0,0 +1,709 @@
This is Info file remsync.info, produced by Makeinfo-1.63 from the
input file remsync.texi.
This file documents the `remsync' command and friends, which have
the purpose of synchronizing remote directory trees using email.
Copyright (C) 1994 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.

File: remsync.info, Node: Top, Next: Overview, Prev: (dir), Up: (dir)
`remsync'
*********
`remsync' allows for remote synchronization of directory trees,
using electronic mail.
The current `remsync' release is 1.3. This is an alpha state
product, and this documentation is still sketchy.
* Menu:
* Overview:: Overview of `remsync' and friends
* Remsync:: Specifications of program `remsync'
* Services:: Specifications of other service programs
* Formats:: Related file formats
* Miscellaneous::
-- The Detailed Node Listing --
Overview of `remsync' and friends
* Internals:: How `remsync' works
* Quick start:: Quick start at using `remsync'
Quick start at using `remsync'
* Invoking remsync:: The `remsync' command and arguments
Specifications of program `remsync'
* Invoking remsync:: The `remsync' command and arguments
* Conveniences:: Automatic mechanisms in the `remsync' program
* Commands:: Commands for `remsync'
The `remsync' command and arguments
* Conveniences:: Automatic mechanisms in the `remsync' program
* Commands:: Commands for `remsync'
Specifications of other service programs
* Invoking mailshar:: The `mailshar' command and arguments
* Invoking mail-files:: The `mail-files' command and arguments
* Invoking find-mailer:: The `find-mailer' command and arguments
Related file formats
* Xremsync:: Format of the `.remsync' file
* Package:: Format of transiting packages
Various considerations
* News:: Using News distribution instead?
* Previous:: Documentation for obsolete scripts
Documentation for obsolete scripts
* mailsync:: mailsync
* resync:: resync

File: remsync.info, Node: Overview, Next: Remsync, Prev: Top, Up: Top
Overview of `remsync' and friends
*********************************
The `remsync' program allows for transmitting, over email, selected
parts of directories for trying to maintain up-to-date files over many
sites. It sends out and processes incoming specially packaged files
using `shar', `tar', `gzip' and electronic mail programs.
There is no *master* site, each site has an equal opportunity to
modify files, and modified files are propagated. Among many other
commands, the `broadcast' command sends an update package from the
current site to all others, the `process' command is used to apply
update packages locally after reception from remote sites.
The unit of transmission is whole files. For now, whenever a module
is modified, it is silently synchronized only if it has been modified at
only one place. The merging has to be done at the site where the
discrepancy is observed, from where it is propagated again.
* Menu:
* Internals:: How `remsync' works
* Quick start:: Quick start at using `remsync'

File: remsync.info, Node: Internals, Next: Quick start, Prev: Overview, Up: Overview
How `remsync' works
===================
How does `remsync' keep track of what is in sync, and what isn't?
*Note Xremsync::, for a the documentation on the `.remsync' file
format. I understand that a mere description of the format does not
replace an explanation, but in the meantime, you might guess from the
format how the program works.
All files are summarized by a checksum, computed by the `sum'
program. There are a few variants of `sum' computing checksums in
incompatible ways, under the control of options. `remsync' attempts to
retrieve on each site a compatible way to do it, and complains if it
cannot.
`remsync' does not compare dates or sizes. Experience shown that the
best version of a file is not necessarily the one with the latest
timestamp. The best version for a site is the current version on this
site, as decided by its maintainer there, and this is this version that
will be propagated.
Each site has an idea of the checksum of a file for all other sites.
These checksums are not necessarily identical, for sites do not
necessarily propagate to all others, and the propagation network maybe
incomplete or asymmetrical in various ways.
Propagation is never done unattended. The user on a site has to call
`remsync broadcast' to issue synchronization packages for other sites.
If this is never done, the local modifications will never leave the
site. The user also has to call `remsync process' to apply received
synchronization packages. Applying a package does not automatically
broadcast it further (maybe this could change?).
If a site A propagates some files to sites B and D, but not C, site
B is informed that site D also received these files, and site D is
informed that site B also received these files, so they will not
propagate again the same files to one another. However, both site B
and D are susceptible to propagate further the same files to site C.
It may happen that a site refuses to update a file, or modifies a
file after having been received, or merges versions, or whatever. So,
sites may have a wrong opinion of the file contents on other sites.
These differences level down after a few exchanges, and it is very
unlikely that a file would not be propagated when it should have.
This scheme works only when the various people handling the various
files have confidence in one each other. If site B modifies a file
after having received it from site A, the file will eventually be
propagated back to site A. If the original file stayed undisturbed on
site A, that is, if `remsync' proves that site B correctly knew the
checksum of the original file, then the file will be replaced on site A
without any user confirmation. So, the user on site A has to trust the
changes made by the user on site B.
If the original file on site A had been modified after having been
sent in a synchronization package, than it is the responsibility of the
user on site A to correctly merge the local modifications with the
modifications observed in the file as received from site B. This
responsibility is real, since the merged file will later be propagated
to the other sites in an authoritative way.

File: remsync.info, Node: Quick start, Prev: Internals, Up: Overview
Quick start at using `remsync'
==============================

File: remsync.info, Node: Remsync, Next: Services, Prev: Overview, Up: Top
Specifications of program `remsync'
***********************************
* Menu:
* Invoking remsync:: The `remsync' command and arguments
* Conveniences:: Automatic mechanisms in the `remsync' program
* Commands:: Commands for `remsync'

File: remsync.info, Node: Invoking remsync, Next: Conveniences, Prev: Remsync, Up: Remsync
The `remsync' command and arguments
===================================
At the shell prompt, calling the command `remsync' without any
parameters initiates an interactive dialog, in which the user types
commands and receives feedback from the program.
The command `remsync', given at the shell prompt, may have
arguments, in which case these arguments taken together form one
`remsync' interactive command. However, `--help' and `--version'
options are interpreted especially, with their usual effect in GNU.
Once this command has been executed, no more commands are taken from
the user and `remsync' terminates execution. This allows for using
`remsync' in some kind of batch mode. It is unwise to redirect
`remsync' standard input, because user interactions might often be
needed in ways difficult to predict in advance.
The two most common usages of `remsync' are the commands:
remsync b
remsync p
The first example executes the `broadcast' command, which sends
synchronization packages to all connected remote sites for the current
local directory tree.
The second example executes the `process' command, which studies and
complies with a synchronisation package saved in the current directory
(not necessarily into the synchronized directory tree), under the usual
file name `remsync.tar.gz'.
* Menu:
* Conveniences:: Automatic mechanisms in the `remsync' program
* Commands:: Commands for `remsync'

File: remsync.info, Node: Conveniences, Next: Commands, Prev: Invoking remsync, Up: Remsync
Automatic mechanisms in the `remsync' program
=============================================
The following points apply to many of the `remsync' commands. We
describe them here once and for all.
* The file `.remsync' describes the various properties for the
current synchronization. It is kept right in the top directory of
a synchronized directory tree. Some commands may be executed
without any need for this file. The program waits as far as
possible before reading it.
* If the `.remsync' file is not found when required, and only then,
the user is interactively asked to fill a questionnaire about it.
* If the `.remsync' file has been logically modified after having
been read, or if it just has been created, the program will save
it back on disk. But it will do so only before reading another
`.remsync' file, or just before exit. A preexisting `.remsync'
will be renamed to `.remsync.bak' before it is rewritten, when
this is done, any previous `.remsync.bak' file is discarded.
* Many commands refer to previously entered information by repeating
this information. For example, one can refer to a particular
`scan' statement by entering the wildcard to be scanned by this
statement. An alternative method of specifying a statement
consists in using the decimal number which appears between square
brackets in the result of a `list' command.
* Whenever a site list must be given, it is a space separated list of
remote sites. If the list is preceeded by a bang (!), the list is
complemented, that is, the sites that will be operated upon are all
those *not* appearing in the list. As a special case, if the site
list is completely empty, then all sites are selected.

File: remsync.info, Node: Commands, Prev: Conveniences, Up: Remsync
Commands for `remsync'
======================
Program commands to `remsync' may be given interactively by the user
sitten at a terminal. They can come from the arguments of the
`remsync' call at the shell level. Internally, the `process' command
might obey many sub-commands found in a received synchronization
package.
Program commands are given one per line. Lines beginning with a
sharp (#) and white lines are ignored, they are meant to increase
clarity or to introduce user comments. With only a few exceptions,
commands are introduced by a keyword and often contains other keywords.
In all cases, the keywords specific to `remsync' may be abbreviated to
their first letter. When there are many keywords in succession, the
space separating them may be omitted. So the following commands are
all equivalent:
list remote
l remote
list r
l r
listremote
lr
while the following are not legal:
l rem
lisremote
Below, for clarity, keywords are written in full and separated by
spaces. Commands often accept parameters, which are then separated by
spaces. All available commands are given in the table. The first few
commands do not pre-require the file `.remsync'. The last three
commands are almost never used interactively, but rather automatically
triggered while `process''ing received synchronization packages.
`?'
Display a quick help summary of available commands.
`!' [ SHELL-COMMAND ]
If SHELL-COMMAND has been given, execute it right now as a shell
command. When not given, rather start an interactive shell.
Exiting from the shell will return to this program. The started
shell is taken from the `SHELL' environment variable if set, else
`sh' is used.
`quit'
Leave the program normally and return to the shell.
`abort'
Leave the program with a nonzero exit status and return to the
shell. No attempt is made to save a logically modified `.remsync'
file.
`visit' DIRECTORY
Select another synchronized directory tree for any subsequent
operation. DIRECTORY is the top directory of the synchronized
directory tree.
`process' [ FILE ]
`list' [ TYPE ]
List all known statements about some information TYPE. Allowable
keywords for TYPE are `local', `remote', `scan', `ignore' and
`files'. The keyword `files' asks for all empty statements (see
later). If TYPE is omitted, then list all known statements for
all types, except those given by `files'.
[ `create' ] TYPE VALUE
Create a new statement introducing a VALUE for a given TYPE.
Allowable keywords for TYPE are `remote', `scan' and `ignore'.
The `create' keyword may be omitted.
For `create' `ignore', when the pattern is preceeded by a bang
(!), the condition is reversed. That is, only those files which
do match the pattern will be kept for synchronization.
`delete' TYPE VALUE
Delete an existing statement supporting some VALUE for a given
TYPE. Allowable keywords for TYPE are `remote', `scan' and
`ignore'.
`email' REMOTE VALUE
Modify the electronic mail address associated with some REMOTE
site, giving it a new VALUE. The special `local' keyword for
REMOTE may be used to modify the local electronic mail address.
`home' REMOTE VALUE
Modify the top directory of the synchronized directory tree
associated with some REMOTE site, giving it a new VALUE. The
special `local' keyword for REMOTE may be used to modify the local
top directory.
`broadcast' SITE_LIST
Send by electronic mail an update package to all sites from
SITE_LIST, containing for each site all and only those files which
are known to be different between the remote site and here.
`version' VERSION
This command is not meant for interactive use. It establishes the
`remsync' version needed to process the incoming commands.
`from' SITE_LIST
This command is not really meant for interactive use. The first
site from the SITE_LIST is the remote site which originated the
synchronization package. All the others are all the sites,
including here, which were meant to be synchronized by the
`broadcast' command that was issued at the originating remote site.
`sum' FILE CHECKSUM
This command is not really meant for interactive use. It declares
the CHECKSUM value of a particular FILE at the originating remote
site. Also, if at least one `sum' command is received, then it is
guaranteed that the originating remote site sent one `sum' command
for each and every file to be synchronized, so any found local
file which was not subject of any `sum' command does not exist
remotely.
`if' FILE CHECKSUM PACKAGED
This command is not really meant for interactive use. It directs
the `remsync' program to check if a local FILE has a given
CHECKSUM. If the checksum agrees, then the local file will be
replaced by the PACKAGED file, as found in the received
synchronization invoice.

File: remsync.info, Node: Services, Next: Formats, Prev: Remsync, Up: Top
Specifications of other service programs
****************************************
* Menu:
* Invoking mailshar:: The `mailshar' command and arguments
* Invoking mail-files:: The `mail-files' command and arguments
* Invoking find-mailer:: The `find-mailer' command and arguments

File: remsync.info, Node: Invoking mailshar, Next: Invoking mail-files, Prev: Services, Up: Services
The `mailshar' command and arguments
====================================

File: remsync.info, Node: Invoking mail-files, Next: Invoking find-mailer, Prev: Invoking mailshar, Up: Services
The `mail-files' command and arguments
======================================

File: remsync.info, Node: Invoking find-mailer, Prev: Invoking mail-files, Up: Services
The `find-mailer' command and arguments
=======================================

File: remsync.info, Node: Formats, Next: Miscellaneous, Prev: Services, Up: Top
Related file formats
********************
* Menu:
* Xremsync:: Format of the `.remsync' file
* Package:: Format of transiting packages

File: remsync.info, Node: Xremsync, Next: Package, Prev: Formats, Up: Formats
Format of the `.remsync' file
=============================
The `.remsync' file saves all the information a site needs for
properly synchronizing a directory tree with remote sites. Even if it
is meant to be editable using any ASCII editor, it has a very precise
format and one should be very careful while modifying it. The
`.remsync' file is better handled through the `remsync' program and
commands.
The `.remsync' file is made up of statements, one per line. Each
line begins with a statement keyword followed by a single TAB, then by
one or more parameters. The keyword may be omitted, in this case, the
keyword is said to be *empty*, and the line begins immediately with the
TAB. After the TAB, if there are two parameters or more, they should
all be separated with a single space. There should not be any space
between the last parameter and the end of line (unless there are
explicit empty parameters).
The following table gives the possible keywords. Their order of
presentation in the table is also the order of appearance in the
`.remsync' file.
`remsync'
This statement identifies the `.remsync' format. The only
parameter states the file format version.
`local'
This statement should appear exactly once, and has exactly two
parameters. The first parameter gives the electronic mail address
the other sites should use for sending synchronization packages
here. The second parameter gives the name of the local directory
tree to synchronize, in absolute notation.
`remote'
This statement may appear zero, one or more times. Each occurrence
connects the synchronized directory tree to another tree on a
remote site. The first parameter gives one electronic mail
address where to send remote synchronization packages. The second
parameter gives the name of the corresponding directory tree for
this remote electronic mail address, in absolute notation.
`scan'
This statement may appear zero, one or more times. When it does
not appear at all, the whole local directory tree will always be
scanned, searching for files to synchronize. When the statement
appears at least once, the whole local directory tree will not be
scanned, but only those files or directories appearing in one of
these statements. Each `scan' statement has exactly one
parameter, giving one file or directory to be studied. These are
usually given relative to top directory of the local
synchronization directory tree. Shell wildcards are acceptable.
`ignore'
This statement may appear zero, one or more times. Each
occurrence has one parameter giving a regular expression,
according to Perl syntax for regular expressions. These REGEXPs
are applied against each file resulting from the scan. If any of
the `ignore' expression matches one of resulting file, the file is
discarded and is not subject to remote synchronization.
After all the statements beginning by the previous keywords, the
`.remsync' file usually contains many statements having the empty
keyword. The empty keyword statement may appear zero, one or more
times. Each occurrence list one file being remotely synchronized. The
first parameter gives an explicit file name, usually given relative to
the top directory of the local synchronized directory tree. Shell
wildcards are *not* acceptable.
Besides the file name parameter, there are supplementary parameters
to each empty keyword statement, each corresponding to one remote
statement in the `.remsync' file. The second parameter corresponds to
the first remote, the third parameter corresponds to the second remote,
etc. If there are more remote statements than supplementary parameters,
missing parameters are considered to be empty.
Each supplementary parameter usually gives the last known checksum
value for this particular file, as computed on its corresponding
*remote* site. The parameter contains a dash `-' while the remote
checksum is unknown. The checksum value for the *local* copy of the
file is never kept anywhere in the `.remsync' file. The special value
`666' indicates a checksum from hell, used when the remote file is
known to exist, but for which contradictory information has been
received from various sources.

File: remsync.info, Node: Package, Prev: Xremsync, Up: Formats
Format of transiting packages
=============================

File: remsync.info, Node: Miscellaneous, Prev: Formats, Up: Top
Various considerations
**********************
* Menu:
* News:: Using News distribution instead?
* Previous:: Documentation for obsolete scripts

File: remsync.info, Node: News, Next: Previous, Prev: Miscellaneous, Up: Miscellaneous
Using News distribution instead?
================================
One correspondent thinks that perhaps the news distribution mechanism
could be pressed into service for this job. I could have started from
C-news, say, instead of from scratch, and have progressively bent
C-news to behave like I wanted.
My feeling is that the route was shorter as I did it, from scratch,
that it would have been from C-news. Of course, I could have removed
the heavy administrative details of C-news: the history and `expire',
the daemons, the `cron' entries, etc., then added the interactive
features and specialized behaviors, but all this clean up would
certainly have took energies. Right now, non counting the subsidiary
scripts and shar/unshar sources, the heart of the result is a single
(1200 lines) script written in Perl, which I find fairly more smaller
and maintainable than a patched C-news distribution would have been.

File: remsync.info, Node: Previous, Prev: News, Up: Miscellaneous
Documentation for obsolete scripts
==================================
This is merely a place holder for previous documentation, waiting
that I clean it up. You have no interest in reading further down.
* Menu:
* mailsync:: mailsync
* resync:: resync

File: remsync.info, Node: mailsync, Next: resync, Prev: Previous, Up: Previous
mailsync
--------
Usage: mailsync [ OPTION ] ... [ EMAIL_ADDRESS ] [ DIRECTORY ]
or: mailsync [ OPTION ] ... SYNC_DIRECTORY
Option -i simply sends a `ihave' package, with no bulk files.
Option -n inhibits any destructive operation and mailing.
In the first form of the call, find a synchronisation directory in
DIRECTORY aimed towards some EMAIL_ADDRESS, then proceed with this
synchronisation directory. EMAIL_ADDRESS may be the name of a file
containing a distribution list. If EMAIL_ADDRESS is not specified, all
the synchronisation directories at the top level in DIRECTORY are
processed in turn. If DIRECTORY is not specified, the current
directory is used.
In the second form of the call, proceed only with the given
synchronisation directory SYNC_DIRECTORY.
For proceeding with a synchronisation directory, whatever the form of
the call was, this script reads the `ident' files it contains to set
the local user and directory and the remote user and directory. Then,
selected files under the local directory which are modified in regard
to the corresponding files in the remote directory are turned into a
synchronisation package which is mailed to the remote user.
The list of selected files or directories to synchronize from the
local directory are given in the `list' file in the synchronisation
directory. If this `list' file is missing, all files under the local
directory are synchronized.
What I usually do is to `cd' at the top of the directory tree to be
synchronized, then to type `mailsync' without parameters. This will
automatically prepare as many synchronisation packages as there are
mirror systems, then email multipart shars to each of them. Note that
the synchronisation package is not identical for each mirror system,
because they do not usually have the same state of synchronisation.
`mailsync' will refuse to work if anything needs to be hand cleaned
from a previous execution of `mailsync' or `resync'. Check for some
remaining `_syncbulk' or `_synctemp' directory, or for a `_syncrm'
script.
TODO:
- interrogate the user if `ident' file missing.
- automatically construct the local user address.
- create the synchronisation directory on the fly.
- avoid duplicating work as far as possible for multiple sends.
- have a quicker mode, depending on stamps, not on checksums.
- never send core, executables, backups, `.nsf*', `*/_synctemp/*', etc.

File: remsync.info, Node: resync, Prev: mailsync, Up: Previous
resync
------
Usage: resync [ OPTION ]... TAR_FILE
or: resync [ OPTION ]... UNTARED_DIRECTORY
Given a tar file produced by mailsync at some remote end and already
reconstructed on this end using unshar, or a directory containing the
already untared invoice, apply the synchronization package locally.
Option -n inhibits destroying or creating files, but does everything
else. It will in particular create a synchronization directory if
necessary, produce the `_syncbulk' directory and the `_syncrm' script.
The synchronization directory for the package is automatically
retrieved or, if not found, created and initialized. `resync' keeps
telling you what it is doing.
There are a few cases when a resync should not complete without
manual intervention. The common case is that several sites update the
very same files differently since they were last resync'ed, and then
mailsync to each other. The prerequisite checksum will then fail, and
the files are then kept into the `_syncbulk' tree, which has a shape
similar to the directory tree in which the files where supposed to go.
For GNU Emacs users, a very handy package, called emerge, written by
Dale Worley <drw@kutta.mit.edu>, helps reconciling two files
interactiveley. The `_syncbulk' tree should be explicitely deleted
after the hand synchronisation.
Another case of human intervention is when files are deleted at the
mailsync'ing site. By choice, all deletions on the receiving side are
accumulated in a `_syncrm' script, which is not executed automatically.
Explicitely executed, `_syncrm' will remove any file in the receiving
tree which does not exist anymore on the sender system. I often edit
`_syncrm' before executing it, to remove the unwanted deletions (beware
the double negation :-). The script removes itself.
All the temporary files, while resynchronizing, are held in
`_synctemp', which is deleted afterwards; if something goes wrong, this
directory should also be cleaned out by hand. `resync' will refuse to
work if anything remains to be hand cleaned.
TODO:
- interrogates the user if missing receiving directory in `ident'.
- allow `remote.sum' to be empty or non-existent.

Tag Table:
Node: Top942
Node: Overview2742
Node: Internals3868
Node: Quick start7142
Node: Remsync7280
Node: Invoking remsync7622
Node: Conveniences9180
Node: Commands11084
Node: Services16240
Node: Invoking mailshar16605
Node: Invoking mail-files16788
Node: Invoking find-mailer16987
Node: Formats17162
Node: Xremsync17410
Node: Package21832
Node: Miscellaneous21962
Node: News22205
Node: Previous23229
Node: mailsync23583
Node: resync26135

End Tag Table

View File

@ -0,0 +1,722 @@
\input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename remsync.info
@settitle @code{remsync} reference manual
@finalout
@setchapternewpage odd
@c %**end of header
@ifinfo
This file documents the @code{remsync} command and friends, which have
the purpose of synchronizing remote directory trees using email.
Copyright (C) 1994 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.
@ignore
Permission is granted to process this file through TeX and print the
results, provided the printed document carries copying permission
notice identical to this one except for the removal of this paragraph
(this paragraph not being relevant to the printed manual).
@end ignore
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.
@end ifinfo
@titlepage
@title remsync, version 1.3
@subtitle A remote synchronization utility
@subtitle Edition 1.3, June 1994
@author by @value{Francois} Pinard
@page
@vskip 0pt plus 1filll
Copyright @copyright{} 1994 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.
@end titlepage
@ifinfo
@node Top, Overview, (dir), (dir)
@top @code{remsync}
@code{remsync} allows for remote synchronization of directory trees,
using electronic mail.
The current @code{remsync} release is 1.3. This is an alpha state
product, and this documentation is still sketchy.
@menu
* Overview:: Overview of @code{remsync} and friends
* Remsync:: Specifications of program @code{remsync}
* Services:: Specifications of other service programs
* Formats:: Related file formats
* Miscellaneous::
--- The Detailed Node Listing ---
Overview of @code{remsync} and friends
* Internals:: How @code{remsync} works
* Quick start:: Quick start at using @code{remsync}
Quick start at using @code{remsync}
* Invoking remsync:: The @code{remsync} command and arguments
Specifications of program @code{remsync}
* Invoking remsync:: The @code{remsync} command and arguments
* Conveniences:: Automatic mechanisms in the @code{remsync} program
* Commands:: Commands for @code{remsync}
The @code{remsync} command and arguments
* Conveniences:: Automatic mechanisms in the @code{remsync} program
* Commands:: Commands for @code{remsync}
Specifications of other service programs
* Invoking mailshar:: The @code{mailshar} command and arguments
* Invoking mail-files:: The @code{mail-files} command and arguments
* Invoking find-mailer:: The @code{find-mailer} command and arguments
Related file formats
* Xremsync:: Format of the @file{.remsync} file
* Package:: Format of transiting packages
Various considerations
* News:: Using News distribution instead?
* Previous:: Documentation for obsolete scripts
Documentation for obsolete scripts
* mailsync:: mailsync
* resync:: resync
@end menu
@end ifinfo
@node Overview, Remsync, Top, Top
@chapter Overview of @code{remsync} and friends
The @code{remsync} program allows for transmitting, over email, selected
parts of directories for trying to maintain up-to-date files over many
sites. It sends out and processes incoming specially packaged files
using @code{shar}, @code{tar}, @code{gzip} and electronic mail programs.
There is no @emph{master} site, each site has an equal opportunity to
modify files, and modified files are propagated. Among many other
commands, the @code{broadcast} command sends an update package from the
current site to all others, the @code{process} command is used to apply
update packages locally after reception from remote sites.
The unit of transmission is whole files. For now, whenever a module is
modified, it is silently synchronized only if it has been modified at
only one place. The merging has to be done at the site where the
discrepancy is observed, from where it is propagated again.
@menu
* Internals:: How @code{remsync} works
* Quick start:: Quick start at using @code{remsync}
@end menu
@node Internals, Quick start, Overview, Overview
@section How @code{remsync} works
How does @code{remsync} keep track of what is in sync, and what isn't?
@xref{Xremsync}, for a the documentation on the @file{.remsync} file
format. I understand that a mere description of the format does not
replace an explanation, but in the meantime, you might guess from the
format how the program works.
All files are summarized by a checksum, computed by the @code{sum} program.
There are a few variants of @code{sum} computing checksums in incompatible
ways, under the control of options. @code{remsync} attempts to retrieve on
each site a compatible way to do it, and complains if it cannot.
@code{remsync} does not compare dates or sizes. Experience shown that the
best version of a file is not necessarily the one with the latest
timestamp. The best version for a site is the current version on this
site, as decided by its maintainer there, and this is this version
that will be propagated.
Each site has an idea of the checksum of a file for all other sites.
These checksums are not necessarily identical, for sites do not
necessarily propagate to all others, and the propagation network maybe
incomplete or asymmetrical in various ways.
Propagation is never done unattended. The user on a site has to call
@code{remsync broadcast} to issue synchronization packages for other sites.
If this is never done, the local modifications will never leave the
site. The user also has to call @code{remsync process} to apply received
synchronization packages. Applying a package does not automatically
broadcast it further (maybe this could change?).
If a site @var{A} propagates some files to sites @var{B} and @var{D},
but not @var{C}, site @var{B} is informed that site @var{D} also
received these files, and site @var{D} is informed that site @var{B}
also received these files, so they will not propagate again the same
files to one another. However, both site @var{B} and @var{D} are
susceptible to propagate further the same files to site @var{C}.
It may happen that a site refuses to update a file, or modifies a file
after having been received, or merges versions, or whatever. So,
sites may have a wrong opinion of the file contents on other sites.
These differences level down after a few exchanges, and it is very
unlikely that a file would not be propagated when it should have.
This scheme works only when the various people handling the various
files have confidence in one each other. If site @var{B} modifies a
file after having received it from site @var{A}, the file will
eventually be propagated back to site @var{A}. If the original file
stayed undisturbed on site @var{A}, that is, if @code{remsync} proves
that site @var{B} correctly knew the checksum of the original file, then
the file will be replaced on site @var{A} without any user confirmation.
So, the user on site A has to trust the changes made by the user on site
@var{B}.
If the original file on site @var{A} had been modified after having been
sent in a synchronization package, than it is the responsibility of the
user on site @var{A} to correctly merge the local modifications with the
modifications observed in the file as received from site @var{B}. This
responsibility is real, since the merged file will later be propagated
to the other sites in an authoritative way.
@node Quick start, , Internals, Overview
@section Quick start at using @code{remsync}
@node Remsync, Services, Overview, Top
@chapter Specifications of program @code{remsync}
@menu
* Invoking remsync:: The @code{remsync} command and arguments
* Conveniences:: Automatic mechanisms in the @code{remsync} program
* Commands:: Commands for @code{remsync}
@end menu
@node Invoking remsync, Conveniences, Remsync, Remsync
@section The @code{remsync} command and arguments
At the shell prompt, calling the command @code{remsync} without any
parameters initiates an interactive dialog, in which the user types
commands and receives feedback from the program.
The command @code{remsync}, given at the shell prompt, may have
arguments, in which case these arguments taken together form one
@code{remsync} interactive command. However, @samp{--help} and
@samp{--version} options are interpreted especially, with their usual
effect in GNU. Once this command has been executed, no more commands
are taken from the user and @code{remsync} terminates execution.
This allows for using @code{remsync} in some kind of batch mode.
It is unwise to redirect @code{remsync} standard input, because
user interactions might often be needed in ways difficult to predict
in advance.
The two most common usages of @code{remsync} are the commands:
@example
remsync b
remsync p
@end example
The first example executes the @code{broadcast} command, which sends
synchronization packages to all connected remote sites for the current
local directory tree.
The second example executes the @code{process} command, which studies
and complies with a synchronisation package saved in the current
directory (not necessarily into the synchronized directory tree), under
the usual file name @file{remsync.tar.gz}.
@menu
* Conveniences:: Automatic mechanisms in the @code{remsync} program
* Commands:: Commands for @code{remsync}
@end menu
@node Conveniences, Commands, Invoking remsync, Remsync
@section Automatic mechanisms in the @code{remsync} program
The following points apply to many of the @code{remsync} commands.
We describe them here once and for all.
@itemize @bullet
@item
The file @file{.remsync} describes the various properties for the
current synchronization. It is kept right in the top directory of a
synchronized directory tree. Some commands may be executed without any
need for this file. The program waits as far as possible before reading
it.
@item
If the @file{.remsync} file is not found when required, and only then,
the user is interactively asked to fill a questionnaire about it.
@item
If the @file{.remsync} file has been logically modified after having
been read, or if it just has been created, the program will save it back
on disk. But it will do so only before reading another @file{.remsync}
file, or just before exit. A preexisting @file{.remsync} will be
renamed to @file{.remsync.bak} before it is rewritten, when this is
done, any previous @file{.remsync.bak} file is discarded.
@item
Many commands refer to previously entered information by repeating this
information. For example, one can refer to a particular @code{scan}
statement by entering the wildcard to be scanned by this statement.
An alternative method of specifying a statement consists in using the
decimal number which appears between square brackets in the result
of a @code{list} command.
@item
Whenever a site list must be given, it is a space separated list of
remote sites. If the list is preceeded by a bang (@key{!}), the list is
complemented, that is, the sites that will be operated upon are all
those @emph{not} appearing in the list. As a special case, if the site
list is completely empty, then all sites are selected.
@end itemize
@node Commands, , Conveniences, Remsync
@section Commands for @code{remsync}
Program commands to @code{remsync} may be given interactively by the
user sitten at a terminal. They can come from the arguments of the
@code{remsync} call at the shell level. Internally, the @code{process}
command might obey many sub-commands found in a received synchronization
package.
Program commands are given one per line. Lines beginning with a sharp
(@key{#}) and white lines are ignored, they are meant to increase
clarity or to introduce user comments. With only a few exceptions,
commands are introduced by a keyword and often contains other keywords.
In all cases, the keywords specific to @code{remsync} may be abbreviated
to their first letter. When there are many keywords in succession, the
space separating them may be omitted. So the following commands are
all equivalent:
@example
list remote
l remote
list r
l r
listremote
lr
@end example
@noindent
while the following are not legal:
@example
l rem
lisremote
@end example
Below, for clarity, keywords are written in full and separated by
spaces. Commands often accept parameters, which are then separated by
spaces. All available commands are given in the table. The first few
commands do not pre-require the file @file{.remsync}. The last three
commands are almost never used interactively, but rather automatically
triggered while @code{process}'ing received synchronization packages.
@table @asis
@item @code{?}
Display a quick help summary of available commands.
@item @code{!} [ @var{shell-command} ]
If @var{shell-command} has been given, execute it right now as a shell
command. When not given, rather start an interactive shell. Exiting
from the shell will return to this program. The started shell is taken
from the @code{SHELL} environment variable if set, else @code{sh} is
used.
@item @code{quit}
Leave the program normally and return to the shell.
@item @code{abort}
Leave the program with a nonzero exit status and return to the shell.
No attempt is made to save a logically modified @file{.remsync} file.
@item @code{visit} @var{directory}
Select another synchronized directory tree for any subsequent operation.
@var{directory} is the top directory of the synchronized directory tree.
@item @code{process} [ @var{file} ]
@item @code{list} [ @var{type} ]
List all known statements about some information @var{type}. Allowable
keywords for @var{type} are @code{local}, @code{remote}, @code{scan},
@code{ignore} and @code{files}. The keyword @code{files} asks for all
empty statements (see later). If @var{type} is omitted, then list all
known statements for all types, except those given by @code{files}.
@item [ @code{create} ] @var{type} @var{value}
Create a new statement introducing a @var{value} for a given @var{type}.
Allowable keywords for @var{type} are @code{remote}, @code{scan} and
@code{ignore}. The @code{create} keyword may be omitted.
For @code{create} @code{ignore}, when the pattern is preceeded by a bang
(@key{!}), the condition is reversed. That is, only those files which
do match the pattern will be kept for synchronization.
@item @code{delete} @var{type} @var{value}
Delete an existing statement supporting some @var{value} for a given
@var{type}. Allowable keywords for @var{type} are @code{remote},
@code{scan} and @code{ignore}.
@item @code{email} @var{remote} @var{value}
Modify the electronic mail address associated with some @var{remote}
site, giving it a new @var{value}. The special @code{local} keyword for
@var{remote} may be used to modify the local electronic mail address.
@item @code{home} @var{remote} @var{value}
Modify the top directory of the synchronized directory tree associated
with some @var{remote} site, giving it a new @var{value}. The special
@code{local} keyword for @var{remote} may be used to modify the local
top directory.
@item @code{broadcast} @var{site_list}
Send by electronic mail an update package to all sites from
@var{site_list}, containing for each site all and only those files which
are known to be different between the remote site and here.
@item @code{version} @var{version}
This command is not meant for interactive use. It establishes the
@code{remsync} version needed to process the incoming commands.
@item @code{from} @var{site_list}
This command is not really meant for interactive use. The first site
from the @var{site_list} is the remote site which originated the
synchronization package. All the others are all the sites, including
here, which were meant to be synchronized by the @code{broadcast}
command that was issued at the originating remote site.
@item @code{sum} @var{file} @var{checksum}
This command is not really meant for interactive use. It declares the
@var{checksum} value of a particular @var{file} at the originating
remote site. Also, if at least one @code{sum} command is received, then
it is guaranteed that the originating remote site sent one @code{sum}
command for each and every file to be synchronized, so any found local
file which was not subject of any @code{sum} command does not exist
remotely.
@item @code{if} @var{file} @var{checksum} @var{packaged}
This command is not really meant for interactive use. It directs the
@code{remsync} program to check if a local @var{file} has a given
@var{checksum}. If the checksum agrees, then the local file will be
replaced by the @var{packaged} file, as found in the received
synchronization invoice.
@end table
@node Services, Formats, Remsync, Top
@chapter Specifications of other service programs
@menu
* Invoking mailshar:: The @code{mailshar} command and arguments
* Invoking mail-files:: The @code{mail-files} command and arguments
* Invoking find-mailer:: The @code{find-mailer} command and arguments
@end menu
@node Invoking mailshar, Invoking mail-files, Services, Services
@section The @code{mailshar} command and arguments
@node Invoking mail-files, Invoking find-mailer, Invoking mailshar, Services
@section The @code{mail-files} command and arguments
@node Invoking find-mailer, , Invoking mail-files, Services
@section The @code{find-mailer} command and arguments
@node Formats, Miscellaneous, Services, Top
@chapter Related file formats
@menu
* Xremsync:: Format of the @file{.remsync} file
* Package:: Format of transiting packages
@end menu
@node Xremsync, Package, Formats, Formats
@section Format of the @file{.remsync} file
The @file{.remsync} file saves all the information a site needs for
properly synchronizing a directory tree with remote sites. Even if it
is meant to be editable using any ASCII editor, it has a very precise
format and one should be very careful while modifying it. The
@file{.remsync} file is better handled through the @code{remsync}
program and commands.
The @file{.remsync} file is made up of statements, one per line. Each
line begins with a statement keyword followed by a single @key{TAB},
then by one or more parameters. The keyword may be omitted, in this
case, the keyword is said to be @emph{empty}, and the line begins
immediately with the @key{TAB}. After the @key{TAB}, if there are two
parameters or more, they should all be separated with a single space.
There should not be any space between the last parameter and the end of
line (unless there are explicit empty parameters).
The following table gives the possible keywords. Their order of
presentation in the table is also the order of appearance in the
@file{.remsync} file.
@table @code
@item remsync
This statement identifies the @file{.remsync} format. The only
parameter states the file format version.
@item local
This statement should appear exactly once, and has exactly two
parameters. The first parameter gives the electronic mail address the
other sites should use for sending synchronization packages here. The
second parameter gives the name of the local directory tree to
synchronize, in absolute notation.
@item remote
This statement may appear zero, one or more times. Each occurrence
connects the synchronized directory tree to another tree on a remote
site. The first parameter gives one electronic mail address where to
send remote synchronization packages. The second parameter gives the
name of the corresponding directory tree for this remote electronic mail
address, in absolute notation.
@item scan
This statement may appear zero, one or more times. When it does not
appear at all, the whole local directory tree will always be scanned,
searching for files to synchronize. When the statement appears at least
once, the whole local directory tree will not be scanned, but only those
files or directories appearing in one of these statements. Each
@code{scan} statement has exactly one parameter, giving one file or
directory to be studied. These are usually given relative to top
directory of the local synchronization directory tree. Shell wildcards
are acceptable.
@item ignore
This statement may appear zero, one or more times. Each occurrence has
one parameter giving a regular expression, according to Perl syntax for
regular expressions. These @var{regexp}s are applied against each file
resulting from the scan. If any of the @code{ignore} expression matches
one of resulting file, the file is discarded and is not subject to
remote synchronization.
@end table
After all the statements beginning by the previous keywords, the
@file{.remsync} file usually contains many statements having the empty
keyword. The empty keyword statement may appear zero, one or more
times. Each occurrence list one file being remotely synchronized. The
first parameter gives an explicit file name, usually given relative to
the top directory of the local synchronized directory tree. Shell
wildcards are @emph{not} acceptable.
Besides the file name parameter, there are supplementary parameters to
each empty keyword statement, each corresponding to one remote statement
in the @file{.remsync} file. The second parameter corresponds to the
first remote, the third parameter corresponds to the second remote, etc.
If there are more remote statements than supplementary parameters,
missing parameters are considered to be empty.
Each supplementary parameter usually gives the last known checksum
value for this particular file, as computed on its corresponding
@emph{remote} site. The parameter contains a dash @kbd{-} while the
remote checksum is unknown. The checksum value for the @emph{local}
copy of the file is never kept anywhere in the @file{.remsync} file.
The special value @samp{666} indicates a checksum from hell, used
when the remote file is known to exist, but for which contradictory
information has been received from various sources.
@node Package, , Xremsync, Formats
@section Format of transiting packages
@node Miscellaneous, , Formats, Top
@chapter Various considerations
@menu
* News:: Using News distribution instead?
* Previous:: Documentation for obsolete scripts
@end menu
@node News, Previous, Miscellaneous, Miscellaneous
@section Using News distribution instead?
One correspondent thinks that perhaps the news distribution mechanism
could be pressed into service for this job. I could have started
from C-news, say, instead of from scratch, and have progressively
bent C-news to behave like I wanted.
My feeling is that the route was shorter as I did it, from scratch,
that it would have been from C-news. Of course, I could have
removed the heavy administrative details of C-news: the history and
@code{expire}, the daemons, the @code{cron} entries, etc., then added
the interactive features and specialized behaviors, but all this clean
up would certainly have took energies. Right now, non counting the
subsidiary scripts and shar/unshar sources, the heart of the result
is a single (1200 lines) script written in Perl, which I find fairly
more smaller and maintainable than a patched C-news distribution
would have been.
@node Previous, , News, Miscellaneous
@section Documentation for obsolete scripts
This is merely a place holder for previous documentation, waiting that I
clean it up. You have no interest in reading further down.
@menu
* mailsync:: mailsync
* resync:: resync
@end menu
@node mailsync, resync, Previous, Previous
@subsection mailsync
@example
Usage: mailsync [ OPTION ] ... [ EMAIL_ADDRESS ] [ DIRECTORY ]
or: mailsync [ OPTION ] ... SYNC_DIRECTORY
@end example
Option -i simply sends a @code{ihave} package, with no bulk files.
Option -n inhibits any destructive operation and mailing.
In the first form of the call, find a synchronisation directory in
DIRECTORY aimed towards some EMAIL_ADDRESS, then proceed with this
synchronisation directory. EMAIL_ADDRESS may be the name of a file
containing a distribution list. If EMAIL_ADDRESS is not specified,
all the synchronisation directories at the top level in DIRECTORY are
processed in turn. If DIRECTORY is not specified, the current
directory is used.
In the second form of the call, proceed only with the given
synchronisation directory SYNC_DIRECTORY.
For proceeding with a synchronisation directory, whatever the form of
the call was, this script reads the @code{ident} files it contains to set
the local user and directory and the remote user and directory. Then,
selected files under the local directory which are modified in regard
to the corresponding files in the remote directory are turned into a
synchronisation package which is mailed to the remote user.
The list of selected files or directories to synchronize from the
local directory are given in the @code{list} file in the synchronisation
directory. If this @code{list} file is missing, all files under the
local directory are synchronized.
What I usually do is to @code{cd} at the top of the directory tree to be
synchronized, then to type @code{mailsync} without parameters. This will
automatically prepare as many synchronisation packages as there are
mirror systems, then email multipart shars to each of them. Note that
the synchronisation package is not identical for each mirror system,
because they do not usually have the same state of synchronisation.
@code{mailsync} will refuse to work if anything needs to be hand cleaned
from a previous execution of @code{mailsync} or @code{resync}. Check
for some remaining @file{_syncbulk} or @file{_synctemp} directory, or
for a @file{_syncrm} script.
@example
TODO:
- interrogate the user if @file{ident} file missing.
- automatically construct the local user address.
- create the synchronisation directory on the fly.
- avoid duplicating work as far as possible for multiple sends.
- have a quicker mode, depending on stamps, not on checksums.
- never send core, executables, backups, @file{.nsf*}, @file{*/_synctemp/*}, etc.
@end example
@node resync, , mailsync, Previous
@subsection resync
@example
Usage: resync [ OPTION ]... TAR_FILE
or: resync [ OPTION ]... UNTARED_DIRECTORY
@end example
Given a tar file produced by mailsync at some remote end and already
reconstructed on this end using unshar, or a directory containing the
already untared invoice, apply the synchronization package locally.
Option -n inhibits destroying or creating files, but does everything
else. It will in particular create a synchronization directory if
necessary, produce the @file{_syncbulk} directory and the @file{_syncrm}
script.
The synchronization directory for the package is automatically
retrieved or, if not found, created and initialized. @code{resync} keeps
telling you what it is doing.
There are a few cases when a resync should not complete without manual
intervention. The common case is that several sites update the very
same files differently since they were last resync'ed, and then
mailsync to each other. The prerequisite checksum will then fail, and
the files are then kept into the @file{_syncbulk} tree, which has a shape
similar to the directory tree in which the files where supposed to go.
For GNU Emacs users, a very handy package, called emerge, written by
Dale Worley <drw@@kutta.mit.edu>, helps reconciling two files
interactiveley. The @file{_syncbulk} tree should be explicitely deleted
after the hand synchronisation.
Another case of human intervention is when files are deleted at the
mailsync'ing site. By choice, all deletions on the receiving side are
accumulated in a @file{_syncrm} script, which is not executed automatically.
Explicitely executed, @file{_syncrm} will remove any file in the receiving
tree which does not exist anymore on the sender system. I often edit
@file{_syncrm} before executing it, to remove the unwanted deletions (beware
the double negation :-). The script removes itself.
All the temporary files, while resynchronizing, are held in @file{_synctemp},
which is deleted afterwards; if something goes wrong, this directory
should also be cleaned out by hand. @code{resync} will refuse to work if
anything remains to be hand cleaned.
@display
TODO:
- interrogates the user if missing receiving directory in @file{ident}.
- allow @file{remote.sum} to be empty or non-existent.
@end display
@contents
@bye
@c Local Variables:
@c texinfo-column-for-description: 24
@c End:

View File

@ -0,0 +1,243 @@
.TH SHAR 1 "September 10, 1995"
.SH NAME
shar \- create shell archives
.SH SYNOPSIS
.nf
shar [ options ] file ...
shar \-S [ options ]
.fi
.SH DESCRIPTION
Shar
creates "shell archives" (or shar files) which are in text format
and can be mailed. These files may be unpacked later by executing them
with /bin/sh. The resulting archive is sent to standard out unless the
\f2\-o\f1 option is given. A wide range of features provide extensive
flexibility in manufacturing shars and in specifying shar "smartness".
Archives may be "vanilla" or comprehensive.
.SH OPTIONS
.PP
Options have a one letter version starting with \- or a long version starting
with \-\-. The exception is \f2\-\-help\f1, \f2\-\-version\f1,
\f2\-\-no-i18n\f1 and \f2\-\-print-text-domain-dir\f1 which does not
have short versions.
Mandatory arguments to long options are mandatory for short options too.
Options can be given in any order. Some options depend on each other:
.nf
The \f2\-o\f1 option is required if the \f2\-l\f1 or \f2\-L\f1 option is used.
The \f2\-n\f1 option is required if the \f2\-a\f1 option is used.
See \f2\-V\f1 below.
.fi
.SS "Giving feedback:"
.IP "\f2\-\-help\f1"
Print a help summary on standard output, then immediately exits.
.IP "\f2\-\-version\f1"
Print the version number of the program on standard output,
then immediately exits.
.IP "\f2\-q\f1 \f2\-\-quiet\f1 \f2\-\-silent\f1"
Do not output verbose messages locally when producing the archive.
.SS "Selecting files:"
.IP "\f2\-p\f1 \f2\-\-intermix-type\f1"
Allow positional parameter options. The options \f2\-B\f1, \f2\-T\f1,
\f2-z\f1 and \f2\-Z\f1 may be embedded, and files to the right of the
option will be processed in the specified mode.
.IP "\f2\-S\f1 \f2\-\-stdin-file-list\f1"
Read list of files to be packed from the standard input rather
than from the command line. Input must be in a form similar to
that generated by the find command, one filename per line. This
switch is especially useful when the command line will not hold
the list of files to be packed. For example:
.nf
find . \-type f \-print | sort | shar \-S \-Z \-L50 \-o /tmp/big
.fi
If \f2\-p\f1 is specified on the command line, then the options
\f2\-B\f1, \f2\-T\f1, \f2\-z\f1 and \f2\-Z\f1 may be
included in the standard input (on a line separate from filenames).
The maximum number of lines of standard input, file names and
options, may not exceed 1024.
.SS "Splitting output:"
.IP "\f2\-o\f1 XXX \f2\-\-output-prefix=\f1XXX"
Save the archive to files XXX.01 thru XXX.nn instead of sending it to
standard out.
Must be used when the \f2\-l\f1 or the \f2\-L\f1 switches are used.
.IP "\f2\-l\f1 XX \f2\-\-whole-size-limit=\f1XX"
Limit the output file size to XXk bytes but don't split input files.
.IP "\f2\-L\f1 XX \f2\-\-split-size-limit=\f1XX"
Limit output file size to XXk bytes and split files if necessary. The archive
parts created with this option must be unpacked in correct order.
.SS "Controlling the shar headers:"
.IP "\f2\-n\f1 name \f2\-\-archive-name=\f1name"
Name of archive to be included in the header of the shar files.
See the \f2\-a\f1 switch.
.IP "\f2\-s\f1 who@where \f2\-\-submitter=\f1who@where"
Override automatically determined submitter name.
.IP "\f2\-a\f1 \f2\-\-net-headers\f1"
Allows automatic generation of headers:
.nf
Submitted-by: who@where
Archive-name: <name>/part##
.fi
The <name> must be given with the \f2\-n\f1 switch.
If name includes a '/' "/part" isn't used. Thus:
.RS 10m
.nf
.ta 30n
\-n xyzzy produces:
xyzzy/part01
xyzzy/part02
\-n xyzzy/patch produces:
xyzzy/patch01
xyzzy/patch02
\-n xyzzy/patch01. produces:
xyzzy/patch01.01
xyzzy/patch01.02
.RE
.fi
.IP ""
The who@where can be
explicitly stated with the \f2\-s\f1 switch if the default isn't appropriate.
Who@where is essentially built as `whoami`@`uname`.
.IP "\f2\-c\f1 \f2\-\-cut-mark\f1"
Start the shar with a cut line. A line saying 'Cut here' is placed at the
start of each output file.
.SS "Selecting how files are stocked:"
.IP "\f2\-M\f1 \f2\-\-mixed-uuencode\f1"
Mixed mode. Determine if the files are text or binary and archive
correctly (default). Files found to be binary are uudecoded prior to packing
(USE OF UUENCODE IS NOT APPRECIATED BY MANY ON THE NET).
.IP "\f2\-T\f1 \f2\-\-text-files\f1"
Treat all files as text.
.IP "\f2\-B\f1 \f2\-\-uuencode\f1"
Treat all files as binary, use uuencode prior to packing. This increases the
size of the archive. The recipient must have uudecode in order to unpack.
(USE OF UUENCODE IS NOT APPRECIATED BY MANY ON THE NET).
.IP "\f2\-z\f1 \f2\-\-gzip\f1"
Gzip and uuencode all files prior to packing. The recipient must have
uudecode and gzip in order to unpack
(USE OF UUENCODE AND GZIP IS NOT APPRECIATED BY MANY ON THE NET).
.IP "\f2\-g\f1 LEVEL \f2\-\-level-for-gzip=\f1LEVEL"
When doing compression, use '\-LEVEL' as a parameter to gzip. Default is 9.
The \f2\-g\f1 option turns on the \f2\-z\f1 option by default.
.IP "\f2\-Z\f1 \f2\-\-compress\f1"
Compress and uuencode all files prior to packing. The recipient must have
uudecode and compress in order to unpack
(USE OF UUENCODE AND COMPRESS IS NOT APPRECIATED BY MANY ON THE NET).
Option \f2\-C\f1 is synonymous to \f2\-Z\f1, but is being deprecated.
.IP "\f2\-b\f1 BITS \f2\-\-bits-per-code=\f1BITS"
When doing compression, use '\-bBITS' as a parameter to compress.
The \f2\-B\f1 option turns on the \f2\-Z\f1 option by default. Default value
is 12.
.SS "Protecting against transmission errors:"
.IP "\f2\-w\f1 \f2\-\-no-character-count\f1"
Do NOT check each file with 'wc \-c' after unpack. The default is to check.
.IP "\f2\-D\f1 \f2\-\-no-md5-digest\f1"
Do NOT use 'md5sum' digest to verify the unpacked files. The default is to
check.
.IP "\f2\-F\f1 \f2\-\-force-prefix\f1"
Forces the prefix character (normally 'X' unless the parameter to the \f2\-d\f1
option starts with 'X') to be prepended to every line even if
not required. This option may slightly increase the size of the archive,
especially if \f2\-B\f1 or \f2\-Z\f1 is used.
.IP "\f2\-d\f1 XXX \f2\-\-here-delimiter=\f1XXX"
Use XXX to delimit the files in the shar instead of SHAR_EOF.
This is for those who want to personalize their shar files.
.SS "Producing different kinds of shars:"
.IP "\f2\-V\f1 \f2\-\-vanilla-operation\f1"
Produce "vanilla" shars which rely only upon the existence of sed and
echo in the unsharing environment. In addition, "if test" must also
be supported unless the \f2\-x\f1 option is used. The \f2\-V\f1 silently
disables options offensive to the "network cop" (or "brown shirt"),
but does warn you if it is specified with \f2\-B\f1, \f2-z\f1,
\f2\-Z\f1, \f2\-p\f1 or \f2\-M\f1 (any of which does or might
require uudecode, gzip or compress in the unsharing environment).
.IP "\f2\-P\f1 \f2\-\-no-piping\f1"
Use temporary files instead of pipes in the shar file.
.IP "\f2\-x\f1 \f2\-\-no-check-existing\f1"
Overwrite existing files without checking.
If neither \f2\-x\f1 nor \f2\-X\f1 is specified, the unpack will
check for and not overwrite existing files when unpacking the archive.
If \f2\-c\f1 is passed as a parameter to the script when unpacking:
.RS 10m
sh archive -c
.RE
.IP ""
then existing files will be overwritten unconditionally.
.IP "\f2\-X\f1 \f2\-\-query-user\f1"
When unpacking, interactively ask the user if files should be overwritten.
(DO NOT USE FOR SHARS SUBMITTED TO THE NET).
.IP "\f2\-m\f1 \f2\-\-no-timestamp\f1"
Avoid generating 'touch' commands to restore the file modification
dates when unpacking files from the archive.
.IP "\f2\-Q\f1 \f2\-\-quiet-unshar\f1"
Verbose OFF. Disables the inclusion of comments to be output when the archive
is unpacked.
.IP "\f2\-f\f1 \f2\-\-basename\f1"
Restore by filename only, rather than path. This option causes only file
names to be used, which is useful when building a shar from several
directories, or another directory. Note that if a directory name is passed
to shar, the substructure of that directory will be restored whether \f2\-f\f1
is specified or not.
.SS "Internationalization:"
.IP "\f2\-\-no-i18n\f1"
Do not produce internationalized shell archives, use default english messages.
By default, shar produces archives that will try to output messages in
the unpackers preferred language (as determined by the LANG/LC_MESSAGES
environmental variables) when they are unpacked.
If no message file for the unpackers language is found at unpack time,
messages will be in english.
.IP "\f2\-\-print-text-domain-dir\f1"
Prints the directory shar looks in to find messages files for different
languages, then immediately exits.
.SH EXAMPLES
.nf
.ta 37n
shar *.c > cprog.shar # all C prog sources
shar \-Q *.[ch] > cprog.shar # non-verbose, .c and .h files
shar \-B \-l28 \-oarc.sh *.arc # all binary .arc files, into
# files arc.sh.01 thru arc.sh.NN
shar \-f /lcl/src/u*.c > u.sh # use only the filenames
.ta
.fi
.SH WARNINGS
.PP
No chmod or touch is ever generated for directories created when unpacking.
Thus, if a directory is given to shar, the protection and
modification dates of corresponding unpacked directory
may not match those of the original.
.PP
If a directory is passed to shar, it may be scanned more than once. Therefore,
one should be careful not change the directory while shar is running.
.PP
Be careful that the output file(s) are not included in the inputs or shar
may loop until the disk fills up. Be particularly careful when a directory
is passed to shar that the output files are not in that directory
(or a subdirectory of that directory).
.PP
Use of the \f2\-B\f1, \f2\-z\f1 or \f2\-Z\f1, and especially
\f2\-M\f1, may slow the archive process considerably, depending on
the number of files.
.PP
Use of \f2\-X\f1 produces shars which \f2WILL\f1 cause problems
with many unshar procedures. Use this feature only for archives
to be passed among agreeable parties. Certainly, \f2\-X\f1 is NOT
for shell archives which are to be submitted to Usenet. Usage of
\f2\-B\f1, \f2\-z\f1 or \f2\-Z\f1 in net shars will cause you to
be flamed off the earth. Not using \f2\-m\f1 or not using \f2\-F\f1
may also get you occasional complaints.
.SH SEE ALSO
.PP
unshar(1)
.SH DIAGNOSTICS
.PP
Error messages for illegal or incompatible options,
for non-regular, missing or inaccessible files or for (unlikely)
memory allocation failure.
.SH AUTHORS
The shar and unshar programs is the collective work of many authors.
Many people contributed by reporting problems, suggesting
various improvements or submitting actual code. A list of
these people is in the THANKS file in the sharutils distribution.

View File

@ -0,0 +1,578 @@
This is Info file sharutils.info, produced by Makeinfo-1.63 from the
input file sharutils.texi.
START-INFO-DIR-ENTRY
* Shar utilities: (sharutils). GNU shar utilities.
* mail-files: (sharutils)mail-files invocation. Send files to remote site.
* mailshar: (sharutils)mailshar invocation. Make and send a shell archive.
* remsync: (sharutils)remsync invocation. Synchronize remote files.
* shar: (sharutils)shar invocation. Make a shell archive.
* unshar: (sharutils)unshar invocation. Explode a shell archive.
* uudecode: (sharutils)uudecode invocation. Restore file from 7-bits.
* uuencode: (sharutils)uuencode invocation. Force binary file to 7-bits.
END-INFO-DIR-ENTRY
This file documents the GNU set of shar utilities.
Copyright (C) 1994 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.

File: sharutils.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir)
GNU `shar' utilities
********************
GNU `shar' makes so-called shell archives out of many files,
preparing them for transmission by electronic mail services. GNU
`unshar' helps unpacking shell archives after reception. This is
release 4.1.9.
* Menu:
* Introduction:: Introduction to both programs
* shar invocation:: Invoking the `shar' program
* unshar invocation:: Invoking the `unshar' program
* Miscellaneous:: Miscellaneous considerations
-- The Detailed Node Listing --
Creating shell archives
* Selecting:: Selecting files
* Splitting:: Splitting output
* Headers:: Controlling the shar headers
* Stocking:: Selecting how files are stocked
* Transmission:: Protecting against transmission
* Kinds:: Producing different kinds of shar

File: sharutils.info, Node: Introduction, Next: shar invocation, Prev: Top, Up: Top
Introduction to both programs
*****************************
GNU `shar' makes so-called shell archives out of many files,
preparing them for transmission by electronic mail services. A "shell
archive" is a collection of files that can be unpacked by `/bin/sh'. A
wide range of features provide extensive flexibility in manufacturing
shars and in specifying shar *smartness*. For example, `shar' may
compress files, uuencode binary files, split long files and construct
multi-part mailings, ensure correct unsharing order, and provide
simplistic checksums. *Note shar invocation::.
GNU `unshar' scans a set of mail messages looking for the start of
shell archives. It will automatically strip off the mail headers and
other introductory text. The archive bodies are then unpacked by a
copy of the shell. `unshar' may also process files containing
concatenated shell archives. *Note unshar invocation::.
GNU `shar' has a long history. All along this long road, numerous
users contributed various improvements. The file `THANKS', from the
GNU `shar' distribution, contain all names still having valid email
addresses, as far as we know.
Please help me getting the history straight, for the following
information is approximative. James Gosling wrote the public domain
`shar 1.x'. William Davidsen rewrote it as `shar 2.x'. Warren Tucker
brought modifications and called it `shar 3.x'. Richard Gumpertz
maintained it until 1990. Franc,ois Pinard, from the public domain
`shar 3.49', made `GNU shar 4.x', in 1994. Some modules and other code
sections were freely borrowed from other GNU distributions, bringing
this `shar' under the terms of the GNU General Public License.
Your feedback helps us to make a better and more portable product.
Mail suggestions and bug reports (including documentation errors) for
these programs to `bug-gnu-utils@prep.ai.mit.edu'.

File: sharutils.info, Node: shar invocation, Next: unshar invocation, Prev: Introduction, Up: Top
Invoking the `shar' program
***************************
The format of the `shar' command is one of:
shar [ OPTION ] ... FILE ...
shar -S [ OPTION ] ...
In the first form, the file list is given as command arguments. In
the second form, the file list is read from standard input. The
resulting archive is sent to standard output unless the `-o' option is
given.
Options can be given in any order. Some options depend on each
other: the `-o' option is required if the `-l' or `-L' option is used.
The `-n' option is required if the `-a' option is used. Also see `-V'
below.
Some options are special purpose:
`--help'
Print a help summary on standard output, then immediately exits.
`--version'
Print the version number of the program on standard output, then
immediately exits.
`-q'
`--quiet'
Verbose *off* at `shar' time. Messages are usually issued on
standard error to let the user follow the progress, while making
the archives. This option inhibits these messages.
* Menu:
* Selecting:: Selecting files
* Splitting:: Splitting output
* Headers:: Controlling the shar headers
* Stocking:: Selecting how files are stocked
* Transmission:: Protecting against transmission
* Kinds:: Producing different kinds of shar

File: sharutils.info, Node: Selecting, Next: Splitting, Prev: shar invocation, Up: shar invocation
Selecting files
===============
`-p'
`--intermix-type'
Allow positional parameter options. The options `-M', `-B', `-T',
`-z' and `-Z' may be embedded, and files to the right of the
option will be processed in the specified mode. Without the `-p'
option, embedded options would be interpreted as file names.
*Note Stocking:: for more information on these options.
`-S'
`--stdin-file-list'
Read list of files to be packed from the standard input rather
than from the command line. Input must be one file name per line.
This switch is especially useful when the command line will not
hold the list of files to be packed. For example:
find . -type f -print | shar -S -o /tmp/big.shar
If `-p' is specified on the command line, then the options `-M',
`-B', `-T', `-z' and `-Z' may be included in the standard input
(on a line separate from file names). The maximum number of lines
of standard input, file names and options, may not exceed 1024.

File: sharutils.info, Node: Splitting, Next: Headers, Prev: Selecting, Up: shar invocation
Splitting output
================
`-o PREFIX'
`--output-prefix=PREFIX'
Save the archive to files `PREFIX.01' through `PREFIX.NNN' instead
of standard output. This option *must* be used when the `-l' or
the `-L' switches are used.
When PREFIX contains any `%' character, PREFIX is then interpreted
as a `sprintf' format, which should be able to display a single
decimal number. When PREFIX does not contain such a `%'
character, the string `.%02d' is internally appended.
`-l SIZE'
`--whole-size-limit=SIZE'
Limit the output file size to SIZE times 1024 bytes but don't
split input files. This allows the recipient of the shell archives
to unpack them in any order.
`-L SIZE'
`--split-size-limit=SIZE'
Limit output file size to SIZE times 1024 bytes and split files if
necessary. The archives created with this option must be unpacked
in the correct order. If the recipient of the shell archives
wants to put all of them in a single folder, she shall save them
in the correct order for `unshar', used with option `-e', to
unpack them all at once. *Note unshar invocation::.
For people used to saving all the shell archives into a single mail
folder, care must be taken to save them in the appropriate order.
For those having the appropriate tools (like Masanobu Umeda's
`rmailsort' package for GNU Emacs), shell archives can be saved in
any order, then sorted by increasing date (or send time) before
massive unpacking.

File: sharutils.info, Node: Headers, Next: Stocking, Prev: Splitting, Up: shar invocation
Controlling the shar headers
============================
`-n NAME'
`--archive-name=NAME'
Name of archive to be included in the header of the shar files.
Also see the `-a' switch further down.
`-s ADDRESS'
`--submitter=ADDRESS'
The `-s' option allows for overriding the email address for the
submitter, for when the default is not appropriate. The
automatically determined address looks like `USERNAME@HOSTNAME'.
`-a'
`--net-headers'
Allows automatic generation of headers:
Submitted-by: ADDRESS
Archive-name: NAME/partNN
The NAME must be given with the `-n' switch. If name includes a
`/', then `/part' isn't used. Thus `-n xyzzy' produces:
xyzzy/part01
xyzzy/part02
while `-n xyzzy/patch' produces:
xyzzy/patch01
xyzzy/patch02
and `-n xyzzy/patch01.' produces:
xyzzy/patch01.01
xyzzy/patch01.02
`-c'
`--cut-mark'
Start the shar with a cut line. A line saying `Cut here' is
placed at the start of each output file.

File: sharutils.info, Node: Stocking, Next: Transmission, Prev: Headers, Up: shar invocation
Selecting how files are stocked
===============================
`-T'
`--text-files'
Treat all files as text, regardless of their contents.
`-B'
`--uuencode'
Treat all files as binary, use `uuencode' prior to packing. This
increases the size of the archive. The recipient must have
`uudecode' in order to unpack.
Use of `uuencode' is not appreciated by many on the net, because
people like to readily see, by mere inspection of a shell archive,
what it is about.
`-M'
`--mixed-uuencode'
Mixed mode. Automatically determine if the files are text or
binary and archive correctly. Files found to be binary are
uuencoded prior to packing. This option is selected by default.
For a file is considered to be a text file, instead of a binary
file, all the following should be true simultaneously:
1. The file does not contain any ASCII control character besides
BS (backspace), HT (horizontal tab), LF (new line) or FF
(form feed).
2. The file does not contains a DEL (delete).
3. The file contains no character with its eighth-bit set.
4. The file, unless totally empty, terminates with a LF
(newline).
5. No line in the file contains more than 200 characters. For
counting purpose, lines are separated by a LF (newline).
`-z'
`--gzip'
Use `gzip' and `uuencode' on all files prior to packing. The
recipient must have `uudecode' and `gzip' (used with `-d') in
order to unpack.
Usage of `-z' in net shars will cause you to be flamed off the
earth.
`-g LEVEL'
`--level-for-gzip=LEVEL'
When doing compression, use `-LEVEL' as a parameter to `gzip'.
The `-g' option turns on the `-z' option by default. The default
value is 9, that is, maximum compression.
`-Z'
`--compress'
Use `compress' and `uuencode' on all files prior to packing. The
recipient must have `uudecode' and `compress' (used with `-d') in
order to unpack. Option `-C' is a synonymous for `-Z', but is
deprecated.
Usage of `-Z' in net shars will cause you to be flamed off the
earth.
`-b BITS'
`--bits-per-code=BITS'
When doing compression, use `-bX' as a parameter to `compress'.
The `-B' option turns on the `-Z' option by default. The default
value is 12, foreseeing the memory limitations of some `compress'
programs on smallish systems, at `unshar' time.

File: sharutils.info, Node: Transmission, Next: Kinds, Prev: Stocking, Up: shar invocation
Protecting against transmission errors
======================================
Transmission of shell archives is not always free of errors. So one
should make consistency checks on the receiving site. A very simple
(and unreliable) method is running the UNIX `wc' tool on the output
file. This can report the number of characters in the file.
As one can guess this does not catch all errors. Especially
changing of a character value does not change the computed check sum.
To achieve this goal better method were invented and standardized. One
very strong is MD5 (MD = message digests). This is standardized in RFC
1321. The produced shell scripts do not force the `md5sum' program to
be installed on the system. This is necessary because it is not yet
part of every UNIX. The program is however not necessary for producing
the shell archive.
`-w'
`--no-character-count'
Do *not* check with `wc -c' after unpack. The default is to check.
`-D'
`--no-md5-digest'
Do *not* check with `md5sum' after unpack. The default is to
check.
`-F'
`--force-prefix'
Prepend the prefix character to every line even if not required.
This option may slightly increase the size of the archive,
especially if `-B' or `-Z' is used. Normally, the prefix character
is `X'. If the parameter to the `-d' option starts with `X', then
the prefix character becomes `Y'.
`-d STRING'
`--here-delimiter=STRING'
Use STRING to delimit the files in the shar instead of `SHAR_EOF'.
This is for those who want to personalize their shar files.

File: sharutils.info, Node: Kinds, Prev: Transmission, Up: shar invocation
Producing different kinds of shars
==================================
`-V'
`--vanilla-operation'
This option produces "vanilla" shars which rely only upon the
existence of `echo', `test' and `sed' in the unpacking environment.
The `-V' disables options offensive to the "network cop" (or
"brown shirt"). It also changes the default from mixed mode `-M'
to text mode `-T'. Warnings are produced if option `-B', `-z',
`-Z', `-p' or `-M' is specified (any of which does or might
require `uudecode', `gzip' or `compress' in the unpacking
environment).
`-P'
`--no-piping'
In the shar file, use a temporary file to hold the file to
`uudecode', instead of using pipes. This option is mandatory when
you know the unpacking `uudecode' is unwilling to merely read its
standard input. Richard Marks wrote what is certainly the most
(in)famous of these, for MSDOS :-).
(Here is a side note from the maintainer. Why isnt't this option
the default? In the past history of `shar', it was decided that
piping was better, surely because it is less demanding on disk
space, and people seem to be happy with this. Besides, I think
that the `uudecode' from Richard Marks, on MSDOS, is wrong in
refusing to handle `stdin'. So far that I remember, he has the
strong opinion that a program without any parameters should give
its `--help' output. Besides that, should I say, his `uuencode'
and `uudecode' programs are full-featured, one of the most
complete set I ever saw. But Richard will not release his
sources, he wants to stay in control.)
`-x'
`--no-check-existing'
Overwrite existing files without checking. If neither `-x' nor
`-X' is specified, when unpacking itself, the shell archive will
check for and not overwrite existing files (unless `-c' is passed
as a parameter to the script when unpacking).
`-X'
`--query-user'
Interactively overwrite existing files.
Use of `-X' produces shars which *will* cause problems with some
`unshar'-style procedures, particularily when used together with
vanilla mode (`-V'). Use this feature mainly for archives to be
passed among agreeable parties. Certainly, `-X' is *not* for
shell archives which are to be submitted to Usenet or other public
networks.
The problem is that `unshar' programs or procedures often feed
`/bin/sh' from its standard input, thus putting `/bin/sh' and the
shell archive script in competition for input lines. As an
attempt to alleviate this problem, `shar' will try to detect if
`/dev/tty' exists at the receiving site and will use it to read
user replies. But this does not work in all cases, it may happen
that the receiving user will have to avoid using `unshar' programs
or procedures, and call `/bin/sh' directly. In vanilla mode,
using `/dev/tty' is not even attempted.
`-m'
`--no-timestamp'
Avoid generating `touch' commands to restore the file modification
dates when unpacking files from the archive.
When the timestamp relationship is not preserved, some files like
`configure' or `*.info' may be uselessly remade after unpacking.
This is why, when this option is not used, a special effort is
made to restore timestamps,
`-Q'
`--quiet-unshar'
Verbose *off* at `unshar' time. Disables the inclusion of
comments to be output when the archive is unpacked.
`-f'
`--basename'
Use only the last file name component of each input file name,
ignoring any prefix directories. This is sometimes useful when
building a shar from several directories, or another directory.
If a directory name is passed to `shar', the substructure of that
directory will be restored whether `-f' is specified or not.

File: sharutils.info, Node: unshar invocation, Next: Miscellaneous, Prev: shar invocation, Up: Top
Invoking the `unshar' program
*****************************
The format of the `unshar' command is:
unshar [ OPTION ] ... [ FILE ... ]
Each FILE is processed in turn, as a shell archive or a collection
of shell archives. If no files are given, then standard input is
processed instead.
Options:
`--version'
Print the version number of the program on standard output, then
immediately exits.
`--help'
Print an help summary on standard output, then immediately exits.
`-d DIRECTORY'
`--directory=DIRECTORY'
Change directory to DIRECTORY before unpacking any files.
`-c'
`--overwrite'
`-f'
`--force'
Passed as an option to the shar file. Many shell archive scripts
(including those produced by `shar' 3.40 and newer) accepts a `-c'
argument to indicate that existing files should be overwritten.
The option `-f' is provided for a more unique interface. Many
programs (such as `cp' and `mv') use this option to trigger the
very same action.
`-e'
`--exit-0'
This option exists mainly for people who collect many shell
archives into a single mail folder. With this option, `unshar'
isolates each different shell archive from the others which have
been put in the same file, unpacking each in turn, from the
beginning of the file towards its end. Its proper operation
relies on the fact that many shar files are terminated by a
`exit 0' at the beginning of a line.
Option `-e' is internally equivalent to `-E "exit 0"'.
`-E STRING'
`--split-at=STRING'
This option works like `-e', but it allows you to specify the
string that separates archives if `exit 0' isn't appropriate.
For example, noticing that most `.signatures' have a `--' on a
line right before them, one can sometimes use `--split-at=--' for
splitting shell archives which lack the `exit 0' line at end. The
signature will then be skipped altogether with the headers of the
following message.

File: sharutils.info, Node: Miscellaneous, Prev: unshar invocation, Up: Top
Miscellaneous considerations
****************************
Here is a place-holder for many considerations which do not fit
elsewhere, while not worth a section for themselves.
Be careful that the output file(s) are not included in the inputs or
`shar' may loop until the disk fills up. Be particularly careful when
a directory is passed to `shar' that the output files are not in that
directory (or a subdirectory of that directory).
When a directory is passed to `shar', it may be scanned more than
once, to conserve memory. Therefore, one should be careful to not
change the directory contents while `shar' is running.
No attempt is made to restore the protection and modification dates
for directories, even if this is done by default for files. Thus, if a
directory is given to `shar', the protection and modification dates of
corresponding unpacked directory may not match those of the original.
Use of the `-M' or `-B' options will slow down the archive process.
Use of the `-z' or `-Z' options may slow the archive process
considerably.
Let us conclude by a showing a few examples of `shar' usage:
shar *.c > cprog.shar
shar -Q *.[ch] > cprog.shar
shar -B -l28 -oarc.sh. *.arc
shar -f /lcl/src/u*.c > u.sh
The first shows how to make a shell archive out of all C program
sources. The second produces a shell archive with all `.c' and `.h'
files, which unpacks silently. The third gives a shell archive of all
uuencoded `.arc' files, into files `arc.sh.01' through to `arc.sh.NNN'.
The last example gives a shell archive which will use only the file
names at unpack time.

Tag Table:
Node: Top1489
Node: Introduction2494
Node: shar invocation4478
Node: Selecting5980
Node: Splitting7111
Node: Headers8750
Node: Stocking9915
Node: Transmission12494
Node: Kinds14174
Node: unshar invocation18124
Node: Miscellaneous20237

End Tag Table

View File

@ -0,0 +1,657 @@
\input texinfo
@c %**start of header
@setfilename sharutils.info
@settitle GNU @code{shar} utilities
@finalout
@c %**end of header
@include version.texi
@ifinfo
@set Francois Franc,ois
@end ifinfo
@tex
@set Francois Fran\noexpand\ptexc cois
@end tex
@ifinfo
@format
START-INFO-DIR-ENTRY
* Shar utilities: (sharutils). GNU shar utilities.
* mail-files: (sharutils)mail-files invocation. Send files to remote site.
* mailshar: (sharutils)mailshar invocation. Make and send a shell archive.
* remsync: (sharutils)remsync invocation. Synchronize remote files.
* shar: (sharutils)shar invocation. Make a shell archive.
* unshar: (sharutils)unshar invocation. Explode a shell archive.
* uudecode: (sharutils)uudecode invocation. Restore file from 7-bits.
* uuencode: (sharutils)uuencode invocation. Force binary file to 7-bits.
END-INFO-DIR-ENTRY
@end format
@end ifinfo
@ifinfo
This file documents the GNU set of shar utilities.
Copyright (C) 1994 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.
@ignore
Permission is granted to process this file through TeX and print the
results, provided the printed document carries copying permission
notice identical to this one except for the removal of this paragraph
(this paragraph not being relevant to the printed manual).
@end ignore
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.
@end ifinfo
@titlepage
@title GNU sharutils, version @value{VERSION}
@subtitle A set of shell archiver utilities
@subtitle Edition @value{EDITION}, @value{UPDATED}
@author Jan Dj@"arv
@author @value{Francois} Pinard
@page
@vskip 0pt plus 1filll
Copyright @copyright{} 1994 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.
@end titlepage
@ifinfo
@node Top, Introduction, (dir), (dir)
@top GNU @code{shar} utilities
@c @item @b{@code{sharutils}} @value{hfillkludge} (UtilD, SrcCD (??))
@c
GNU @code{shar} makes so-called shell archives out of many files,
preparing them for transmission by electronic mail services.
GNU @code{unshar} helps unpacking shell archives after reception.
This is release @value{VERSION}.
@menu
* Introduction:: Introduction to both programs
* shar invocation:: Invoking the @code{shar} program
* unshar invocation:: Invoking the @code{unshar} program
* Miscellaneous:: Miscellaneous considerations
--- The Detailed Node Listing ---
Creating shell archives
* Selecting:: Selecting files
* Splitting:: Splitting output
* Headers:: Controlling the shar headers
* Stocking:: Selecting how files are stocked
* Transmission:: Protecting against transmission
* Kinds:: Producing different kinds of shar
@end menu
@end ifinfo
@node Introduction, shar invocation, Top, Top
@chapter Introduction to both programs
GNU @code{shar} makes so-called shell archives out of many files,
preparing them for transmission by electronic mail services.
A @dfn{shell archive} is a collection of files that can be unpacked by
@code{/bin/sh}. A wide range of features provide extensive flexibility
in manufacturing shars and in specifying shar @emph{smartness}. For
example, @code{shar} may compress files, uuencode binary files, split
long files and construct multi-part mailings, ensure correct unsharing
order, and provide simplistic checksums. @xref{shar invocation}.
GNU @code{unshar} scans a set of mail messages looking for the start
of shell archives. It will automatically strip off the mail headers
and other introductory text. The archive bodies are then unpacked by
a copy of the shell. @code{unshar} may also process files containing
concatenated shell archives. @xref{unshar invocation}.
GNU @code{shar} has a long history. All along this long road, numerous
users contributed various improvements. The file @file{THANKS}, from
the GNU @code{shar} distribution, contain all names still having
valid email addresses, as far as we know.
Please help me getting the history straight, for the following
information is approximative. James Gosling wrote the public domain
@code{shar 1.x}. William Davidsen rewrote it as @code{shar 2.x}.
Warren Tucker brought modifications and called it @code{shar 3.x}.
Richard Gumpertz maintained it until 1990. @value{Francois} Pinard,
from the public domain @code{shar 3.49}, made @code{GNU shar 4.x},
in 1994. Some modules and other code sections were freely borrowed
from other GNU distributions, bringing this @code{shar} under the
terms of the GNU General Public License.
Your feedback helps us to make a better and more portable product.
Mail suggestions and bug reports (including documentation errors)
for these programs to @file{bug-gnu-utils@@prep.ai.mit.edu}.
@node shar invocation, unshar invocation, Introduction, Top
@chapter Invoking the @code{shar} program
@pindex shar
The format of the @code{shar} command is one of:
@example
shar [ @var{option} ] @dots{} @var{file} @dots{}
shar -S [ @var{option} ] @dots{}
@end example
In the first form, the file list is given as command arguments. In the
second form, the file list is read from standard input. The resulting
archive is sent to standard output unless the @code{-o} option is given.
Options can be given in any order. Some options depend on each other:
the @code{-o} option is required if the @code{-l} or @code{-L} option
is used. The @code{-n} option is required if the @code{-a} option
is used. Also see @code{-V} below.
Some options are special purpose:
@table @code
@item --help
Print a help summary on standard output, then immediately exits.
@item --version
Print the version number of the program on standard output, then
immediately exits.
@item -q
@itemx --quiet
Verbose @emph{off} at @code{shar} time. Messages are usually issued
on standard error to let the user follow the progress, while making
the archives. This option inhibits these messages.
@end table
@menu
* Selecting:: Selecting files
* Splitting:: Splitting output
* Headers:: Controlling the shar headers
* Stocking:: Selecting how files are stocked
* Transmission:: Protecting against transmission
* Kinds:: Producing different kinds of shar
@end menu
@node Selecting, Splitting, shar invocation, shar invocation
@section Selecting files
@table @code
@item -p
@itemx --intermix-type
Allow positional parameter options. The options @code{-M}, @code{-B},
@code{-T}, @code{-z} and @code{-Z} may be embedded, and files to
the right of the option will be processed in the specified mode.
Without the @code{-p} option, embedded options would be interpreted
as file names. @xref{Stocking} for more information on these options.
@item -S
@itemx --stdin-file-list
Read list of files to be packed from the standard input rather
than from the command line. Input must be one file name per line.
This switch is especially useful when the command line will not hold
the list of files to be packed. For example:
@example
find . -type f -print | shar -S -o /tmp/big.shar
@end example
If @code{-p} is specified on the command line, then the options
@code{-M}, @code{-B}, @code{-T}, @code{-z} and @code{-Z} may be
included in the standard input (on a line separate from file names).
The maximum number of lines of standard input, file names and options,
may not exceed 1024.
@end table
@node Splitting, Headers, Selecting, shar invocation
@section Splitting output
@table @code
@item -o @var{@var{prefix}}
@itemx --output-prefix=@var{prefix}
Save the archive to files @file{@var{prefix}.01} through
@file{@var{prefix}.@var{nnn}} instead of standard output. This option
@emph{must} be used when the @code{-l} or the @code{-L} switches
are used.
When @var{prefix} contains any @samp{%} character, @var{prefix} is then
interpreted as a @code{sprintf} format, which should be able to display
a single decimal number. When @var{prefix} does not contain such a
@samp{%} character, the string @samp{.%02d} is internally appended.
@item -l @var{size}
@itemx --whole-size-limit=@var{size}
Limit the output file size to @var{size} times 1024 bytes but don't
split input files. This allows the recipient of the shell archives
to unpack them in any order.
@item -L @var{size}
@itemx --split-size-limit=@var{size}
Limit output file size to @var{size} times 1024 bytes and split files
if necessary. The archives created with this option must be unpacked
in the correct order. If the recipient of the shell archives wants to
put all of them in a single folder, she shall save them in the correct
order for @code{unshar}, used with option @code{-e}, to unpack them
all at once. @xref{unshar invocation}.
For people used to saving all the shell archives into a single mail
folder, care must be taken to save them in the appropriate order.
For those having the appropriate tools (like Masanobu Umeda's
@code{rmailsort} package for GNU Emacs), shell archives can be saved
in any order, then sorted by increasing date (or send time) before
massive unpacking.
@end table
@node Headers, Stocking, Splitting, shar invocation
@section Controlling the shar headers
@table @code
@item -n @var{name}
@itemx --archive-name=@var{name}
Name of archive to be included in the header of the shar files.
Also see the @code{-a} switch further down.
@item -s @var{address}
@itemx --submitter=@var{address}
The @code{-s} option allows for overriding the email address for the
submitter, for when the default is not appropriate. The automatically
determined address looks like @file{@var{username}@@@var{hostname}}.
@item -a
@itemx --net-headers
Allows automatic generation of headers:
@example
Submitted-by: @var{address}
Archive-name: @var{name}/part@var{nn}
@end example
The @var{name} must be given with the @code{-n} switch. If name
includes a @samp{/}, then @samp{/part} isn't used. Thus
@samp{-n xyzzy} produces:
@example
xyzzy/part01
xyzzy/part02
@end example
@noindent
while @samp{-n xyzzy/patch} produces:
@example
xyzzy/patch01
xyzzy/patch02
@end example
@noindent
and @samp{-n xyzzy/patch01.} produces:
@example
xyzzy/patch01.01
xyzzy/patch01.02
@end example
@item -c
@itemx --cut-mark
Start the shar with a cut line. A line saying @samp{Cut here} is
placed at the start of each output file.
@end table
@node Stocking, Transmission, Headers, shar invocation
@section Selecting how files are stocked
@table @code
@item -T
@itemx --text-files
Treat all files as text, regardless of their contents.
@item -B
@itemx --uuencode
Treat all files as binary, use @code{uuencode} prior to packing. This
increases the size of the archive. The recipient must have
@code{uudecode} in order to unpack.
@display
Use of @code{uuencode} is not appreciated by many on the net, because
people like to readily see, by mere inspection of a shell archive,
what it is about.
@end display
@item -M
@itemx --mixed-uuencode
Mixed mode. Automatically determine if the files are text or binary
and archive correctly. Files found to be binary are uuencoded prior
to packing. This option is selected by default.
For a file is considered to be a text file, instead of a binary file,
all the following should be true simultaneously:
@enumerate
@item
The file does not contain any ASCII control character besides @key{BS}
(backspace), @key{HT} (horizontal tab), @key{LF} (new line) or @key{FF}
(form feed).
@item
The file does not contains a @key{DEL} (delete).
@item
The file contains no character with its eighth-bit set.
@item
The file, unless totally empty, terminates with a @key{LF} (newline).
@item
No line in the file contains more than 200 characters. For counting
purpose, lines are separated by a @key{LF} (newline).
@end enumerate
@item -z
@itemx --gzip
Use @code{gzip} and @code{uuencode} on all files prior to packing.
The recipient must have @code{uudecode} and @code{gzip} (used with
@code{-d}) in order to unpack.
Usage of @code{-z} in net shars will cause you to be flamed off
the earth.
@item -g @var{level}
@itemx --level-for-gzip=@var{level}
When doing compression, use @code{-@var{level}} as a parameter to
@code{gzip}. The @code{-g} option turns on the @code{-z} option
by default. The default value is 9, that is, maximum compression.
@item -Z
@itemx --compress
Use @code{compress} and @code{uuencode} on all files prior to packing.
The recipient must have @code{uudecode} and @code{compress} (used
with @code{-d}) in order to unpack. Option @code{-C} is a synonymous
for @code{-Z}, but is deprecated.
Usage of @code{-Z} in net shars will cause you to be flamed off
the earth.
@item -b @var{bits}
@itemx --bits-per-code=@var{bits}
When doing compression, use @code{-b@var{x}} as a parameter to
@code{compress}. The @code{-B} option turns on the @code{-Z}
option by default. The default value is 12, foreseeing the memory
limitations of some @code{compress} programs on smallish systems, at
@code{unshar} time.
@end table
@node Transmission, Kinds, Stocking, shar invocation
@section Protecting against transmission errors
Transmission of shell archives is not always free of errors. So one
should make consistency checks on the receiving site. A very simple
(and unreliable) method is running the UNIX @code{wc} tool on the output
file. This can report the number of characters in the file.
As one can guess this does not catch all errors. Especially changing of
a character value does not change the computed check sum. To achieve
this goal better method were invented and standardized. One very strong
is MD5 (MD = message digests). This is standardized in RFC 1321. The
produced shell scripts do not force the @code{md5sum} program to be
installed on the system. This is necessary because it is not yet part
of every UNIX. The program is however not necessary for producing the
shell archive.
@table @code
@item -w
@itemx --no-character-count
Do @emph{not} check with @samp{wc -c} after unpack. The default is
to check.
@item -D
@itemx --no-md5-digest
Do @emph{not} check with @samp{md5sum} after unpack. The default is
to check.
@item -F
@itemx --force-prefix
Prepend the prefix character to every line even if not required.
This option may slightly increase the size of the archive, especially
if @code{-B} or @code{-Z} is used. Normally, the prefix character
is @samp{X}. If the parameter to the @code{-d} option starts with
@samp{X}, then the prefix character becomes @samp{Y}.
@item -d @var{string}
@itemx --here-delimiter=@var{string}
Use @var{string} to delimit the files in the shar instead of
@samp{SHAR_EOF}. This is for those who want to personalize their
shar files.
@end table
@node Kinds, , Transmission, shar invocation
@section Producing different kinds of shars
@table @code
@item -V
@itemx --vanilla-operation
This option produces @dfn{vanilla} shars which rely only upon the
existence of @code{echo}, @code{test} and @code{sed} in the unpacking
environment.
The @code{-V} disables options offensive to the @dfn{network cop}
(or @dfn{brown shirt}). It also changes the default from mixed mode
@code{-M} to text mode @code{-T}. Warnings are produced if option
@code{-B}, @code{-z}, @code{-Z}, @code{-p} or @code{-M} is specified
(any of which does or might require @code{uudecode}, @code{gzip} or
@code{compress} in the unpacking environment).
@item -P
@itemx --no-piping
In the shar file, use a temporary file to hold the file to
@code{uudecode}, instead of using pipes. This option is mandatory
when you know the unpacking @code{uudecode} is unwilling to merely
read its standard input. Richard Marks wrote what is certainly the
most (in)famous of these, for MSDOS :-).
(Here is a side note from the maintainer. Why isnt't this option
the default? In the past history of @code{shar}, it was decided
that piping was better, surely because it is less demanding on disk
space, and people seem to be happy with this. Besides, I think
that the @code{uudecode} from Richard Marks, on MSDOS, is wrong in
refusing to handle @code{stdin}. So far that I remember, he has
the strong opinion that a program without any parameters should
give its @code{--help} output. Besides that, should I say, his
@code{uuencode} and @code{uudecode} programs are full-featured, one
of the most complete set I ever saw. But Richard will not release
his sources, he wants to stay in control.)
@item -x
@itemx --no-check-existing
Overwrite existing files without checking. If neither @code{-x} nor
@code{-X} is specified, when unpacking itself, the shell archive will
check for and not overwrite existing files (unless @code{-c} is passed
as a parameter to the script when unpacking).
@item -X
@itemx --query-user
Interactively overwrite existing files.
Use of @code{-X} produces shars which @emph{will} cause problems
with some @code{unshar}-style procedures, particularily when used
together with vanilla mode (@code{-V}). Use this feature mainly for
archives to be passed among agreeable parties. Certainly, @code{-X}
is @emph{not} for shell archives which are to be submitted to Usenet
or other public networks.
The problem is that @code{unshar} programs or procedures often feed
@file{/bin/sh} from its standard input, thus putting @file{/bin/sh}
and the shell archive script in competition for input lines. As an
attempt to alleviate this problem, @code{shar} will try to detect if
@file{/dev/tty} exists at the receiving site and will use it to read
user replies. But this does not work in all cases, it may happen that
the receiving user will have to avoid using @code{unshar} programs
or procedures, and call @code{/bin/sh} directly. In vanilla mode,
using @file{/dev/tty} is not even attempted.
@item -m
@itemx --no-timestamp
Avoid generating @code{touch} commands to restore the file modification
dates when unpacking files from the archive.
When the timestamp relationship is not preserved, some files like
@file{configure} or @file{*.info} may be uselessly remade after
unpacking. This is why, when this option is not used, a special
effort is made to restore timestamps,
@item -Q
@itemx --quiet-unshar
Verbose @emph{off} at @code{unshar} time. Disables the inclusion of
comments to be output when the archive is unpacked.
@item -f
@itemx --basename
Use only the last file name component of each input file name, ignoring
any prefix directories. This is sometimes useful when building a shar
from several directories, or another directory. If a directory name
is passed to @code{shar}, the substructure of that directory will be
restored whether @code{-f} is specified or not.
@end table
@node unshar invocation, Miscellaneous, shar invocation, Top
@chapter Invoking the @code{unshar} program
@pindex unshar
The format of the @code{unshar} command is:
@example
unshar [ @var{option} ] @dots{} [ @var{file} @dots{} ]
@end example
Each @var{file} is processed in turn, as a shell archive or a
collection of shell archives. If no files are given, then standard
input is processed instead.
Options:
@table @code
@item --version
Print the version number of the program on standard output, then
immediately exits.
@item --help
Print an help summary on standard output, then immediately exits.
@item -d @var{directory}
@itemx --directory=@var{directory}
Change directory to @var{directory} before unpacking any files.
@item -c
@itemx --overwrite
@item -f
@itemx --force
Passed as an option to the shar file. Many shell archive scripts
(including those produced by @code{shar} 3.40 and newer) accepts
a @code{-c} argument to indicate that existing files should be
overwritten.
The option @code{-f} is provided for a more unique interface. Many
programs (such as @code{cp} and @code{mv}) use this option to trigger
the very same action.
@item -e
@itemx --exit-0
This option exists mainly for people who collect many shell archives
into a single mail folder. With this option, @code{unshar} isolates
each different shell archive from the others which have been put in the
same file, unpacking each in turn, from the beginning of the file
towards its end. Its proper operation relies on the fact that many shar
files are terminated by a @w{@samp{exit 0}} at the beginning of a line.
Option @code{-e} is internally equivalent to @w{@code{-E "exit 0"}}.
@item -E @var{string}
@itemx --split-at=@var{string}
This option works like @code{-e}, but it allows you to specify the
string that separates archives if @samp{exit 0} isn't appropriate.
For example, noticing that most @file{.signatures} have a @samp{--} on
a line right before them, one can sometimes use @samp{--split-at=--}
for splitting shell archives which lack the @samp{exit 0} line at end.
The signature will then be skipped altogether with the headers of
the following message.
@end table
@node Miscellaneous, , unshar invocation, Top
@chapter Miscellaneous considerations
Here is a place-holder for many considerations which do not fit
elsewhere, while not worth a section for themselves.
Be careful that the output file(s) are not included in the inputs
or @code{shar} may loop until the disk fills up. Be particularly
careful when a directory is passed to @code{shar} that the output
files are not in that directory (or a subdirectory of that directory).
When a directory is passed to @code{shar}, it may be scanned more
than once, to conserve memory. Therefore, one should be careful to
not change the directory contents while @code{shar} is running.
No attempt is made to restore the protection and modification dates
for directories, even if this is done by default for files. Thus, if
a directory is given to @code{shar}, the protection and modification
dates of corresponding unpacked directory may not match those of
the original.
Use of the @code{-M} or @code{-B} options will slow down the archive
process. Use of the @code{-z} or @code{-Z} options may slow the
archive process considerably.
Let us conclude by a showing a few examples of @code{shar} usage:
@example
shar *.c > cprog.shar
shar -Q *.[ch] > cprog.shar
shar -B -l28 -oarc.sh. *.arc
shar -f /lcl/src/u*.c > u.sh
@end example
@noindent
The first shows how to make a shell archive out of all C program
sources. The second produces a shell archive with all @file{.c}
and @file{.h} files, which unpacks silently. The third gives a shell
archive of all uuencoded @file{.arc} files, into files @file{arc.sh.01}
through to @file{arc.sh.@var{nnn}}. The last example gives a shell
archive which will use only the file names at unpack time.
@contents
@bye
@c Local variables:
@c texinfo-column-for-description: 32
@c End:

View File

@ -0,0 +1 @@
timestamp

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,56 @@
.TH UNSHAR 1 "September 10, 1995"
.SH NAME
unshar \- unpack a shar file
.SH SYNOPSIS
unshar [ options ] [ file ... ]
.SH DESCRIPTION
.PP
Unshar scans mail messages looking for the start of a shell archive. It
then passes the archive through a copy of the shell to unpack it. It
will accept multiple files. If no files are given, standard input is used.
.SH OPTIONS
.PP
Options have a one letter version starting with \- or a long version starting
with \-\-. The exception is \f2\-\-help\f1 and \f2\-\-version\f1,
which does not have a short version.
.IP "\f2\-\-version\f1"
Print the version number of the program on standard output,
then immediately exits.
.IP "\f2\-\-help\f1"
Print a help summary on standard output, then immediately exits.
.IP "\f2\-d\f1 DIRECTORY \f2\-\-directory=\f1DIRECTORY"
Change directory to DIRECTORY before unpacking any files.
.IP "\f2\-c\f1 \f2\-\-overwrite\f1"
Passed as an option to the shar file. Many shell archive scripts
(including those produced by `shar' 3.40 and newer) accepts a \f2\-c\f1
argument to indicate that existing files should be overwritten.
.IP "\f2\-e\f1 \f2\-\-exit-0\f1"
This option exists mainly for people who collect many shell
archives into a single mail folder. With this option, `unshar'
isolates each different shell archive from the others which have
been put in the same file, unpacking each in turn, from the
beginning of the file towards its end. Its proper operation
relies on the fact that many shar files are terminated by a
`exit 0' at the beginning of a line.
Option \f2\-e\f1 is internally equivalent to \f2\-E\f1 "exit 0".
.IP "\f2\-E\f1 STRING \f2\-\-split-at=\f1STRING"
This option works like \f2\-e\f1, but it allows you to specify the
string that separates archives if `exit 0' isn't appropriate.
For example, noticing that most `.signatures' have a `\-\-' on a
line right before them, one can sometimes use `\f2\-\-split-at\f1=\-\-' for
splitting shell archives which lack the `exit 0' line at end. The
signature will then be skipped altogether with the headers of the
following message.
.IP "\f2\-f\f1 \f2\-\-force\f1"
The same as \f2\-c\f1.
.SH SEE ALSO
shar(1)
.SH DIAGNOSTICS
Any message from the shell may be displayed.
.SH AUTHORS
The shar and unshar programs is the collective work of many authors.
Many people contributed by reporting problems, suggesting
various improvements or submitting actual code. A list of
these people is in the THANKS file in the sharutils distribution.

View File

@ -0,0 +1,129 @@
'.\" Copyright (c) 1980, 1990 The Regents of the University of California.
'.\" All rights reserved.
'.\"
'.\" Redistribution and use in source and binary forms, with or without
'.\" modification, are permitted provided that the following conditions
'.\" are met:
'.\" 1. Redistributions of source code must retain the above copyright
'.\" notice, this list of conditions and the following disclaimer.
'.\" 2. Redistributions in binary form must reproduce the above copyright
'.\" notice, this list of conditions and the following disclaimer in the
'.\" documentation and/or other materials provided with the distribution.
'.\" 3. All advertising materials mentioning features or use of this software
'.\" must display the following acknowledgement:
'.\" This product includes software developed by the University of
'.\" California, Berkeley and its contributors.
'.\" 4. Neither the name of the University nor the names of its contributors
'.\" may be used to endorse or promote products derived from this software
'.\" without specific prior written permission.
'.\"
'.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
'.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
'.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
'.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
'.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
'.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
'.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
'.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
'.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
'.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
'.\" SUCH DAMAGE.
'.\"
'.\" Modified from
'.\" @(#)uuencode.1 6.9 (Berkeley) 4/23/91
'.\"
.TH uuencode 1
.SH NAME
uuencode \- encode a binary file
.PP
uudecode \- decode a file created by uuencode
.SH SYNOPSIS
.B uuencode
[\-m] [ file ] name
.PP
.B uudecode
[-o outfile] [ file ]...
.SH DESCRIPTION
.I Uuencode
and
.I uudecode
are used to transmit binary files over transmission mediums
that do not support other than simple
ASCII
data.
.PP
.I Uuencode
reads
.I file
(or by default the standard input) and writes an encoded version
to the standard output.
The encoding uses only printing
ASCII
characters and includes the
mode of the file and the operand
.I name
for use by
.I uudecode.
If
.I name
is
.I /dev/stdout
the result will be written to standard output. By default the standard
UU encoding format will be used. If the option
.I \-m
is given on the command line
.B base64
encoding is used instead.
.PP
.I Uudecode
transforms
uuencoded
.I files
(or by default, the standard input) into the original form.
The resulting file is named
.I name
(or
.I outfile
if the \-o option is given)
and will have the mode of the original file except that setuid
and execute bits are not retained. If
.I outfile
or
.I name
is /dev/stdout the result will be written to standard output.
.I Uudecode
ignores any leading and trailing lines. The program can automatically decide
which of the both supported encoding schemes are used.
.SH EXAMPLES
The following example packages up a source tree, compresses it,
uuencodes it and mails it to a user on another system.
When
.I uudecode
is run on the target system, the file ``src_tree.tar.Z'' will be
created which may then be uncompressed and extracted into the original
tree.
.PP
.IP
.NF
tar cf \- src_tree \&| compress \&|
uuencode src_tree.tar.Z \&| mail sys1!sys2!user
.FI
.LP
.SH SEE ALSO
compress(1), mail(1), uucp(1), uuencode(5)
.SH STANDARDS
This implementation is compliant with P1003.2b/D11.
.SH BUGS
If more than one file is given to
.I uudecode
and the \-o option is given or more than one
.I name
in the encoded files are the same the result is probably not what is expected.
.PP
The encoded form of the file is expanded by 37% for UU encoding and by 35%
for base64 encoding (3 bytes become 4 plus control information).
.SH HISTORY
The
.I uuencode
command appeared in
BSD 4.0.

View File

@ -0,0 +1,93 @@
'.\" Copyright (c) 1989, 1991 The Regents of the University of California.
'.\" All rights reserved.
'.\"
'.\" Redistribution and use in source and binary forms, with or without
'.\" modification, are permitted provided that the following conditions
'.\" are met:
'.\" 1. Redistributions of source code must retain the above copyright
'.\" notice, this list of conditions and the following disclaimer.
'.\" 2. Redistributions in binary form must reproduce the above copyright
'.\" notice, this list of conditions and the following disclaimer in the
'.\" documentation and/or other materials provided with the distribution.
'.\" 3. All advertising materials mentioning features or use of this software
'.\" must display the following acknowledgement:
'.\" This product includes software developed by the University of
'.\" California, Berkeley and its contributors.
'.\" 4. Neither the name of the University nor the names of its contributors
'.\" may be used to endorse or promote products derived from this software
'.\" without specific prior written permission.
'.\"
'.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
'.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
'.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
'.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
'.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
'.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
'.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
'.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
'.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
'.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
'.\" SUCH DAMAGE.
'.\"
'.\" @(#)uuencode.format.5 6.4 (Berkeley) 5/10/91
'.\"
.TH UUENCODE 5
.SH NAME
uuencode \- format of an encoded uuencode file
.SH DESCRIPTION
Files output by
uuencode(1)
consist of a header line,
followed by a number of body lines,
and a trailer line.
The
uudecode(1)
command
will ignore any lines preceding the header or
following the trailer.
Lines preceding a header must not, of course,
look like a header.
.PP
The header line is distinguished by having the first
6 characters
.I begin\ \&
The word
.I begin
is followed by a mode (in octal),
and a string which names the remote file.
A space separates the three items in the header line.
.PP
The body consists of a number of lines, each at most 62 characters
long (including the trailing newline).
These consist of a character count,
followed by encoded characters,
followed by a newline.
The character count is a single printing character,
and represents an integer, the number of bytes
the rest of the line represents.
Such integers are always in the range from 0 to 63 and can
be determined by subtracting the character space (octal 40)
from the character.
.PP
Groups of 3 bytes are stored in 4 characters, 6 bits per character.
All are offset by a space to make the characters printing.
The last line may be shorter than the normal 45 bytes.
If the size is not a multiple of 3, this fact can be determined
by the value of the count on the last line.
Extra garbage will be included to make the character count a multiple
of 4.
The body is terminated by a line with a count of zero.
This line consists of one
ASCII
space.
.PP
The trailer line consists of
.I end
on a line by itself.
.SH SEE ALSO
uuencode(1), uudecode(1), uusend(1), uucp(1), mail(1)
.SH HISTORY
The
.I uuencode
file format appeared in
BSD 4.0 .

View File

@ -0,0 +1,3 @@
@set EDITION 4.1.9
@set UPDATED 28 October
@set VERSION 4.1.9

View File

@ -0,0 +1,238 @@
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
#
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
tranformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
true
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
else
instcmd=mkdir
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
pathcomp="${pathcomp}/"
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
true
fi
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
exit 0

View File

@ -0,0 +1,693 @@
Sat Dec 2 22:51:38 1995 Marcus Daniels <marcus@sysc.pdx.edu>
* cat-compat.c (textdomain):
Reverse order in which files are tried you load. First
try local file, when this failed absolute path.
Wed Nov 29 02:03:53 1995 Nelson H. F. Beebe <beebe@math.utah.edu>
* cat-compat.c (bindtextdomain): Add missing { }.
Sun Nov 26 18:21:41 1995 Ulrich Drepper <drepper@myware>
* libintl.inst: Add missing __P definition. Reported by Nelson Beebe.
* Makefile.in:
Add dummy `all' and `dvi' goals. Reported by Tom Tromey.
Sat Nov 25 16:12:01 1995 Franc,ois Pinard <pinard@iro.umontreal.ca>
* hash-string.h: Capitalize arguments of macros.
Sat Nov 25 12:01:36 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (DISTFILES): Prevent files names longer than 13
characters. libintl.h.glibc->libintl.glibc,
libintl.h.install->libintl.inst. Reported by Joshua R. Poulson.
Sat Nov 25 11:31:12 1995 Eric Backus <ericb@lsid.hp.com>
* dcgettext.c: Fix bug in preprocessor conditionals.
Sat Nov 25 02:35:27 1995 Nelson H. F. Beebe <beebe@math.utah.edu>
* libgettext.h: Solaris cc does not understand
#if !SYMBOL1 && !SYMBOL2. Sad but true.
Thu Nov 23 16:22:14 1995 Ulrich Drepper <drepper@myware>
* hash-string.h (hash_string):
Fix for machine with >32 bit `unsigned long's.
* dcgettext.c (DCGETTEXT):
Fix horrible bug in loop for alternative translation.
Thu Nov 23 01:45:29 1995 Ulrich Drepper <drepper@myware>
* po2tbl.sed.in, linux-msg.sed, xopen-msg.sed:
Some further simplifications in message number generation.
Mon Nov 20 21:08:43 1995 Ulrich Drepper <drepper@myware>
* libintl.h.glibc: Use __const instead of const in prototypes.
* Makefile.in (install-src):
Install libintl.h.install instead of libintl.h. This
is a stripped-down version. Suggested by Peter Miller.
* libintl.h.install, libintl.h.glibc: Initial revision.
* localealias.c (_nl_expand_alias, read_alias_file):
Protect prototypes in type casts by __P.
Tue Nov 14 16:43:58 1995 Ulrich Drepper <drepper@myware>
* hash-string.h: Correct prototype for hash_string.
Sun Nov 12 12:42:30 1995 Ulrich Drepper <drepper@myware>
* hash-string.h (hash_string): Add prototype.
* gettextP.h: Fix copyright.
(SWAP): Add prototype.
Wed Nov 8 22:56:33 1995 Ulrich Drepper <drepper@myware>
* localealias.c (read_alias_file): Forgot sizeof.
Avoid calling *printf function. This introduces a big overhead.
Patch by Roland McGrath.
Tue Nov 7 14:21:08 1995 Ulrich Drepper <drepper@myware>
* finddomain.c, cat-compat.c: Wrong indentation in #if for stpcpy.
* finddomain.c (stpcpy):
Define substitution function local. The macro was to flaky.
* cat-compat.c: Fix typo.
* xopen-msg.sed, linux-msg.sed:
While bringing message number to right place only accept digits.
* linux-msg.sed, xopen-msg.sed: Now that the counter does not have
leading 0s we don't need to remove them. Reported by Marcus
Daniels.
* Makefile.in (../po/cat-id-tbl.o): Use $(top_srdir) in
dependency. Reported by Marcus Daniels.
* cat-compat.c: (stpcpy) [!_LIBC && !HAVE_STPCPY]: Define replacement.
Generally cleanup using #if instead of #ifndef.
* Makefile.in: Correct typos in comment. By Franc,ois Pinard.
Mon Nov 6 00:27:02 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (install-src): Don't install libintl.h and libintl.a
if we use an available gettext implementation.
Sun Nov 5 22:02:08 1995 Ulrich Drepper <drepper@myware>
* libgettext.h: Fix typo: HAVE_CATGETTS -> HAVE_CATGETS. Reported
by Franc,ois Pinard.
* libgettext.h: Use #if instead of #ifdef/#ifndef.
* finddomain.c:
Comments describing what has to be done should start with FIXME.
Sun Nov 5 19:38:01 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (DISTFILES): Split. Use DISTFILES with normal meaning.
DISTFILES.common names the files common to both dist goals.
DISTFILES.gettext are the files only distributed in GNU gettext.
Sun Nov 5 17:32:54 1995 Ulrich Drepper <drepper@myware>
* dcgettext.c (DCGETTEXT): Correct searching in derived locales.
This was necessary since a change in _nl_find_msg several weeks
ago. I really don't know this is still not fixed.
Sun Nov 5 12:43:12 1995 Ulrich Drepper <drepper@myware>
* loadmsgcat.c (_nl_load_domain): Test for FILENAME == NULL. This
might mark a special condition.
* finddomain.c (make_entry_rec): Don't make illegal entry as decided.
* Makefile.in (dist): Suppress error message when ln failed.
Get files from $(srcdir) explicitly.
* libgettext.h (gettext_const): Rename to gettext_noop.
Fri Nov 3 07:36:50 1995 Ulrich Drepper <drepper@myware>
* finddomain.c (make_entry_rec):
Protect against wrong locale names by testing mask.
* libgettext.h (gettext_const): Add macro definition.
Capitalize macro arguments.
Thu Nov 2 23:15:51 1995 Ulrich Drepper <drepper@myware>
* finddomain.c (_nl_find_domain):
Test for pointer != NULL before accessing value.
Reported by Tom Tromey.
* gettext.c (NULL):
Define as (void*)0 instad of 0. Reported by Franc,ois Pinard.
Mon Oct 30 21:28:52 1995 Ulrich Drepper <drepper@myware>
* po2tbl.sed.in: Serious typo bug fixed by Jim Meyering.
Sat Oct 28 23:20:47 1995 Ulrich Drepper <drepper@myware>
* libgettext.h: Disable dcgettext optimization for Solaris 2.3.
* localealias.c (alias_compare):
Peter Miller reported that tolower in some systems is
even dumber than I thought. Protect call by `isupper'.
Fri Oct 27 22:22:51 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (libdir, includedir): New variables.
(install-src): Install libintl.a and libintl.h in correct dirs.
Fri Oct 27 22:07:29 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (SOURCES): Fix typo: intrl.compat.c -> intl-compat.c.
* po2tbl.sed.in: Patch for buggy SEDs by Christian von Roques.
* localealias.c:
Fix typo and superflous test. Reported by Christian von Roques.
Fri Oct 6 11:52:05 1995 Ulrich Drepper <drepper@myware>
* finddomain.c (_nl_find_domain):
Correct some remainder from the pre-CEN syntax. Now
we don't have a constant number of successors anymore.
Wed Sep 27 21:41:13 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (DISTFILES): Add libintl.h.glibc.
* Makefile.in (dist-libc): Add goal for packing sources for glibc.
(COMSRCS, COMHDRS): Splitted to separate sources shared with glibc.
* loadmsgcat.c: Forget to continue #if line.
* localealias.c:
[_LIBC]: Rename strcasecmp to __strcasecmp to keep ANSI C name
space clean.
* dcgettext.c, finddomain.c: Better comment to last change.
* loadmsgcat.c:
[_LIBC]: Rename fstat, open, close, read, mmap, and munmap to
__fstat, __open, __close, __read, __mmap, and __munmap resp
to keep ANSI C name space clean.
* finddomain.c:
[_LIBC]: Rename stpcpy to __stpcpy to keep ANSI C name space clean.
* dcgettext.c:
[_LIBC]: Rename getced and stpcpy to __getcwd and __stpcpy resp to
keep ANSI C name space clean.
* libgettext.h:
Include sys/types.h for those old SysV systems out there.
Reported by Francesco Potorti`.
* loadmsgcat.c (use_mmap): Define if compiled for glibc.
* bindtextdom.c: Include all those standard headers
unconditionally if _LIBC is defined.
* finddomain.c: Fix 2 times defiend -> defined.
* textdomain.c: Include libintl.h instead of libgettext.h when
compiling for glibc. Include all those standard headers
unconditionally if _LIBC is defined.
* localealias.c, loadmsgcat.c: Prepare to be compiled in glibc.
* gettext.c:
Include libintl.h instead of libgettext.h when compiling for glibc.
Get NULL from stddef.h if we compile for glibc.
* finddomain.c: Include libintl.h instead of libgettext.h when
compiling for glibc. Include all those standard headers
unconditionally if _LIBC is defined.
* dcgettext.c: Include all those standard headers unconditionally
if _LIBC is defined.
* dgettext.c: If compiled in glibc include libintl.h instead of
libgettext.h.
(locale.h): Don't rely on HAVE_LOCALE_H when compiling for glibc.
* dcgettext.c: If compiled in glibc include libintl.h instead of
libgettext.h.
(getcwd): Don't rely on HAVE_GETCWD when compiling for glibc.
* bindtextdom.c:
If compiled in glibc include libintl.h instead of libgettext.h.
Mon Sep 25 22:23:06 1995 Ulrich Drepper <drepper@myware>
* localealias.c (_nl_expand_alias): Don't call bsearch if NMAP <= 0.
Reported by Marcus Daniels.
* cat-compat.c (bindtextdomain):
String used in putenv must not be recycled.
Reported by Marcus Daniels.
* libgettext.h (__USE_GNU_GETTEXT):
Additional symbol to signal that we use GNU gettext
library.
* cat-compat.c (bindtextdomain):
Fix bug with the strange stpcpy replacement.
Reported by Nelson Beebe.
Sat Sep 23 08:23:51 1995 Ulrich Drepper <drepper@myware>
* cat-compat.c: Include <string.h> for stpcpy prototype.
* localealias.c (read_alias_file):
While expand strdup code temporary variable `cp' hided
higher level variable with same name. Rename to `tp'.
* textdomain.c (textdomain):
Avoid warning by using temporary variable in strdup code.
* finddomain.c (_nl_find_domain): Remove unused variable `application'.
Thu Sep 21 15:51:44 1995 Ulrich Drepper <drepper@myware>
* localealias.c (alias_compare):
Use strcasecmp() only if available. Else use
implementation in place.
* intl-compat.c:
Wrapper functions now call *__ functions instead of __*.
* libgettext.h: Declare prototypes for *__ functions instead for __*.
* cat-compat.c, loadmsgcat.c:
Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
of the standard libc and so prevent libintl.a from being used
standalone.
* bindtextdom.c:
Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
of the standard libc and so prevent libintl.a from being used
standalone.
Rename to bindtextdomain__ if not used in GNU C Library.
* dgettext.c:
Rename function to dgettext__ if not used in GNU C Library.
* gettext.c:
Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
of the standard libc and so prevent libintl.a from being used
standalone.
Functions now called gettext__ if not used in GNU C Library.
* dcgettext.c, localealias.c, textdomain.c, finddomain.c:
Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
of the standard libc and so prevent libintl.a from being used
standalone.
Sun Sep 17 23:14:49 1995 Ulrich Drepper <drepper@myware>
* finddomain.c: Correct some bugs in handling of CEN standard
locale definitions.
Thu Sep 7 01:49:28 1995 Ulrich Drepper <drepper@myware>
* finddomain.c: Implement CEN syntax.
* gettextP.h (loaded_domain): Extend number of successors to 31.
Sat Aug 19 19:25:29 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (aliaspath): Remove path to X11 locale dir.
* Makefile.in: Make install-src depend on install. This helps
gettext to install the sources and other packages can use the
install goal.
Sat Aug 19 15:19:33 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (uninstall): Remove stuff installed by install-src.
Tue Aug 15 13:13:53 1995 Ulrich Drepper <drepper@myware>
* VERSION.in: Initial revision.
* Makefile.in (DISTFILES):
Add VERSION file. This is not necessary for gettext, but
for other packages using this library.
Tue Aug 15 06:16:44 1995 Ulrich Drepper <drepper@myware>
* gettextP.h (_nl_find_domain):
New prototype after changing search strategy.
* finddomain.c (_nl_find_domain):
We now try only to find a specified catalog. Fall back to other
catalogs listed in the locale list is now done in __dcgettext.
* dcgettext.c (__dcgettext):
Now we provide message fall back even to different languages.
I.e. if a message is not available in one language all the other
in the locale list a tried. Formerly fall back was only possible
within one language. Implemented by moving one loop from
_nl_find_domain to here.
Mon Aug 14 23:45:50 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (gettextsrcdir):
Directory where source of GNU gettext library are made
available.
(INSTALL, INSTALL_DATA): Programs used for installing sources.
(gettext-src): New. Rule to install GNU gettext sources for use in
gettextize shell script.
Sun Aug 13 14:40:48 1995 Ulrich Drepper <drepper@myware>
* loadmsgcat.c (_nl_load_domain):
Use mmap for loading only when munmap function is
also available.
* Makefile.in (install): Depend on `all' goal.
Wed Aug 9 11:04:33 1995 Ulrich Drepper <drepper@myware>
* localealias.c (read_alias_file):
Do not overwrite '\n' when terminating alias value string.
* localealias.c (read_alias_file):
Handle long lines. Ignore the rest not fitting in
the buffer after the initial `fgets' call.
Wed Aug 9 00:54:29 1995 Ulrich Drepper <drepper@myware>
* gettextP.h (_nl_load_domain):
Add prototype, replacing prototype for _nl_load_msg_cat.
* finddomain.c (_nl_find_domain):
Remove unneeded variable filename and filename_len.
(expand_alias): Remove prototype because functions does not
exist anymore.
* localealias.c (read_alias_file):
Change type of fname_len parameter to int.
(xmalloc): Add prototype.
* loadmsgcat.c: Better prototypes for xmalloc.
Tue Aug 8 22:30:39 1995 Ulrich Drepper <drepper@myware>
* finddomain.c (_nl_find_domain):
Allow alias name to be constructed from the four components.
* Makefile.in (aliaspath): New variable. Set to preliminary value.
(SOURCES): Add localealias.c.
(OBJECTS): Add localealias.o.
* gettextP.h: Add prototype for _nl_expand_alias.
* finddomain.c: Aliasing handled in intl/localealias.c.
* localealias.c: Aliasing for locale names.
* bindtextdom.c: Better prototypes for xmalloc and xstrdup.
Mon Aug 7 23:47:42 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (DISTFILES): gettext.perl is now found in misc/.
* cat-compat.c (bindtextdomain):
Correct implementation. dirname parameter was not used.
Reported by Marcus Daniels.
* gettextP.h (loaded_domain):
New fields `successor' and `decided' for oo, lazy
message handling implementation.
* dcgettext.c:
Adopt for oo, lazy message handliing.
Now we can inherit translations from less specific locales.
(find_msg): New function.
* loadmsgcat.c, finddomain.c:
Complete rewrite. Implement oo, lazy message handling :-).
We now have an additional environment variable `LANGUAGE' with
a higher priority than LC_ALL for the LC_MESSAGE locale.
Here we can set a colon separated list of specifications each
of the form `language[_territory[.codeset]][@modifier]'.
Sat Aug 5 09:55:42 1995 Ulrich Drepper <drepper@myware>
* finddomain.c (unistd.h):
Include to get _PC_PATH_MAX defined on system having it.
Fri Aug 4 22:42:00 1995 Ulrich Drepper <drepper@myware>
* finddomain.c (stpcpy): Include prototype.
* Makefile.in (dist): Remove `copying instead' message.
Wed Aug 2 18:52:03 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (ID, TAGS): Do not use $^.
Tue Aug 1 20:07:11 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (TAGS, ID): Use $^ as command argument.
(TAGS): Give etags -o option t write to current directory,
not $(srcdir).
(ID): Use $(srcdir) instead os $(top_srcdir)/src.
(distclean): Remove ID.
Sun Jul 30 11:51:46 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (gnulocaledir):
New variable, always using share/ for data directory.
(DEFS): Add GNULOCALEDIR, used in finddomain.c.
* finddomain.c (_nl_default_dirname):
Set to GNULOCALEDIR, because it always has to point
to the directory where GNU gettext Library writes it to.
* intl-compat.c (textdomain, bindtextdomain):
Undefine macros before function definition.
Sat Jul 22 01:10:02 1995 Ulrich Drepper <drepper@myware>
* libgettext.h (_LIBINTL_H):
Protect definition in case where this file is included as
libgettext.h on Solaris machines. Add comment about this.
Wed Jul 19 02:36:42 1995 Ulrich Drepper <drepper@myware>
* intl-compat.c (textdomain): Correct typo.
Wed Jul 19 01:51:35 1995 Ulrich Drepper <drepper@myware>
* dcgettext.c (dcgettext): Function now called __dcgettext.
* dgettext.c (dgettext): Now called __dgettext and calls
__dcgettext.
* gettext.c (gettext):
Function now called __gettext and calls __dgettext.
* textdomain.c (textdomain): Function now called __textdomain.
* bindtextdom.c (bindtextdomain): Function now called
__bindtextdomain.
* intl-compat.c: Initial revision.
* Makefile.in (SOURCES): Add intl-compat.c.
(OBJECTS): We always compile the GNU gettext library functions.
OBJECTS contains all objects but cat-compat.o, ../po/cat-if-tbl.o,
and intl-compat.o.
(GETTOBJS): Contains now only intl-compat.o.
* libgettext.h:
Re-include protection matches dualistic character of libgettext.h.
For all functions in GNU gettext library define __ counter part.
* finddomain.c (strchr): Define as index if not found in C library.
(_nl_find_domain): For relative paths paste / in between.
Tue Jul 18 16:37:45 1995 Ulrich Drepper <drepper@myware>
* loadmsgcat.c, finddomain.c: Add inclusion of sys/types.h.
* xopen-msg.sed: Fix bug with `msgstr ""' lines.
A little bit better comments.
Tue Jul 18 01:18:27 1995 Ulrich Drepper <drepper@myware>
* Makefile.in:
po-mode.el, makelinks, combine-sh are now found in ../misc.
* po-mode.el, makelinks, combine-sh, elisp-comp:
Moved to ../misc/.
* libgettext.h, gettextP.h, gettext.h: Uniform test for __STDC__.
Sun Jul 16 22:33:02 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (INSTALL, INSTALL_DATA): New variables.
(install-data, uninstall): Install/uninstall .elc file.
* po-mode.el (Installation comment):
Add .pox as possible extension of .po files.
Sun Jul 16 13:23:27 1995 Ulrich Drepper <drepper@myware>
* elisp-comp: Complete new version by Franc,ois: This does not
fail when not compiling in the source directory.
Sun Jul 16 00:12:17 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (../po/cat-id-tbl.o):
Use $(MAKE) instead of make for recursive make.
* Makefile.in (.el.elc): Use $(SHELL) instead of /bin/sh.
(install-exec): Add missing dummy goal.
(install-data, uninstall): @ in multi-line shell command at
beginning, not in front of echo. Reported by Eric Backus.
Sat Jul 15 00:21:28 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (DISTFILES):
Rename libgettext.perl to gettext.perl to fit in 14 chars
file systems.
* gettext.perl:
Rename to gettext.perl to fit in 14 chars file systems.
Thu Jul 13 23:17:20 1995 Ulrich Drepper <drepper@myware>
* cat-compat.c: If !STDC_HEADERS try to include malloc.h.
Thu Jul 13 20:55:02 1995 Ulrich Drepper <drepper@myware>
* po2tbl.sed.in: Pretty printing.
* linux-msg.sed, xopen-msg.sed:
Correct bugs with handling substitute flags in branches.
* hash-string.h (hash_string):
Old K&R compilers don't under stand `unsigned char'.
* gettext.h (nls_uint32):
Some old K&R compilers (eg HP) don't understand `unsigned int'.
* cat-compat.c (msg_to_cat_id): De-ANSI-fy prototypes.
Thu Jul 13 01:34:33 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (ELCFILES): New variable.
(DISTFILES): Add elisp-comp.
Add implicit rule for .el -> .elc compilation.
(install-data): install $ELCFILES
(clean): renamed po-to-tbl and po-to-msg to po2tbl and po2msg resp.
* elisp-comp: Initial revision
Wed Jul 12 16:14:52 1995 Ulrich Drepper <drepper@myware>
* Makefile.in:
cat-id-tbl.c is now found in po/. This enables us to use an identical
intl/ directory in all packages.
* dcgettext.c (dcgettext): hashing does not work for table size <= 2.
* textdomain.c: fix typo (#if def -> #if defined)
Tue Jul 11 18:44:43 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (stamp-cat-id): use top_srcdir to address source files
(DISTFILES,distclean): move tupdate.perl to src/
* po-to-tbl.sed.in:
add additional jump to clear change flag to recognize multiline strings
Tue Jul 11 01:32:50 1995 Ulrich Drepper <drepper@myware>
* textdomain.c: Protect inclusion of stdlib.h and string.h.
* loadmsgcat.c: Protect inclusion of stdlib.h.
* libgettext.h: Protect inclusion of locale.h.
Allow use in C++ programs.
Define NULL is not happened already.
* Makefile.in (DISTFILES): ship po-to-tbl.sed.in instead of
po-to-tbl.sed.
(distclean): remove po-to-tbl.sed and tupdate.perl.
* tupdate.perl.in: Substitute Perl path even in exec line.
Don't include entries without translation from old .po file.
Tue Jul 4 00:41:51 1995 Ulrich Drepper <drepper@myware>
* tupdate.perl.in: use "Updated: " in msgid "".
* cat-compat.c: Fix typo (LOCALDIR -> LOCALEDIR).
Define getenv if !__STDC__.
* bindtextdom.c: Protect stdlib.h and string.h inclusion.
Define free if !__STDC__.
* finddomain.c: Change DEF_MSG_DOM_DIR to LOCALEDIR.
Define free if !__STDC__.
* cat-compat.c: Change DEF_MSG_DOM_DIR to LOCALEDIR.
Mon Jul 3 23:56:30 1995 Ulrich Drepper <drepper@myware>
* Makefile.in: Use LOCALEDIR instead of DEF_MSG_DOM_DIR.
Remove unneeded $(srcdir) from Makefile.in dependency.
* makelinks: Add copyright and short description.
* po-mode.el: Last version for 0.7.
* tupdate.perl.in: Fix die message.
* dcgettext.c: Protect include of string.h.
* gettext.c: Protect include of stdlib.h and further tries to get NULL.
* finddomain.c: Some corrections in includes.
* Makefile.in (INCLUDES): Prune list correct path to Makefile.in.
* po-to-tbl.sed: Adopt for new .po file format.
* linux-msg.sed, xopen-msg.sed: Adopt for new .po file format.
Sun Jul 2 23:55:03 1995 Ulrich Drepper <drepper@myware>
* tupdate.perl.in: Complete rewrite for new .po file format.
Sun Jul 2 02:06:50 1995 Ulrich Drepper <drepper@myware>
* First official release. This directory contains all the code
needed to internationalize own packages. It provides functions
which allow to use the X/Open catgets function with an interface
like the Uniforum gettext function. For system which does not
have neither of those a complete implementation is provided.

View File

@ -0,0 +1,166 @@
# Generated automatically from Makefile.in by configure.
# Makefile for directory with message catalog handling in GNU NLS Utilities.
# Copyright (C) 1995 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.
PACKAGE = sharutils
VERSION = 4.2.1
SHELL = /bin/sh
srcdir = .
top_srcdir = ..
prefix = /usr/local
exec_prefix = ${prefix}
transform = s,x,x,
libdir = $(prefix)/lib
includedir = $(prefix)/include
datadir = $(prefix)/share
localedir = $(datadir)/locale
gnulocaledir = $(prefix)/share/locale
gettextsrcdir = $(prefix)/share/gettext
aliaspath = $(localedir):.
subdir = intl
INSTALL = /bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
AR = ar
CC = gcc
RANLIB = ranlib
DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \
-DLOCALE_ALIAS_PATH=\"$(aliaspath)\" -DHAVE_CONFIG_H
CFLAGS = -g -O
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
HEADERS = $(COMHDRS) libgettext.h
COMHDRS = gettext.h gettextP.h hash-string.h
SOURCES = $(COMSRCS) intl-compat.c cat-compat.c
COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
finddomain.c loadmsgcat.c localealias.c textdomain.c
OBJECTS = $(GETTOBJS) bindtextdom.o dcgettext.o dgettext.o gettext.o \
finddomain.o loadmsgcat.o localealias.o textdomain.o
CATOBJS = cat-compat.o ../po/cat-id-tbl.o
GETTOBJS = intl-compat.o
DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \
xopen-msg.sed $(HEADERS) $(SOURCES)
DISTFILES = $(DISTFILES.common) VERSION
DISTFILES.gettext = $(DISTFILES.common) libintl.glibc libintl.inst
.SUFFIXES:
.SUFFIXES: .c .o
.c.o:
$(COMPILE) $<
INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib
all: libintl.a
libintl.a: $(OBJECTS)
rm -f $@
$(AR) cru $@ $(OBJECTS)
$(RANLIB) $@
../po/cat-id-tbl.o: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot
cd ../po && $(MAKE) cat-id-tbl.o
check install: all
# This installation goal is only used in GNU gettext. Packages which
# only use the library should use install instead.
#
# We must not install the libintl.h/libintl.a files if we are on a system
# which has the gettext() function in its C library or in a separate
# library. A special case is where configure found a previously installed
# GNU gettext library. If you want to use the one which comes with this
# version of the package, you have to use `configure --with-gnu-gettext'.
install-src: install
$(top_srcdir)/mkinstalldirs $(libdir) $(includedir) $(gettextsrcdir)
if test -f libintl.h; then \
$(INSTALL_DATA) $(srcdir)/libintl.inst \
$(includedir)/libintl.h; \
$(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \
fi
cd $(srcdir) && \
for file in $(DISTFILES.common); do \
$(INSTALL_DATA) $$file $(gettextsrcdir)/intl-$$file; \
done
$(INSTALL_DATA) VERSION $(gettextsrcdir)/intl-VERSION
uninstall:
for file in $(DISTFILES); do \
rm -f $(gettextsrcdir)/intl-$$file; \
done
info dvi:
$(OBJECTS): ../config.h libgettext.h
bindtextdom.o finddomain.o loadmsgcat.o: gettextP.h gettext.h
dcgettext.o: gettextP.h gettext.h hash-string.h
tags: TAGS
TAGS: $(HEADERS) $(SOURCES)
here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
id: ID
ID: $(HEADERS) $(SOURCES)
here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
mostlyclean:
rm -f *.a *.o core core.*
clean: mostlyclean
distclean: clean
rm -f Makefile ID TAGS po2msg.sed po2tbl.sed libintl.h
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist: Makefile $(DISTFILES)
for file in $(DISTFILES); do \
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir); \
done
# This dist goal is only used in GNU gettext. GNU gettext needs not contain
# the file `VERSION' but contains some other files which should not be
# distributed in other packages.
dist-gettext: Makefile $(DISTFILES.gettext)
for file in $(DISTFILES.gettext); do \
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir); \
done
dist-libc:
tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc
Makefile: Makefile.in ../config.status
cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,166 @@
# Makefile for directory with message catalog handling in GNU NLS Utilities.
# Copyright (C) 1995 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.
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
transform = @program_transform_name@
libdir = $(prefix)/lib
includedir = $(prefix)/include
datadir = $(prefix)/@DATADIRNAME@
localedir = $(datadir)/locale
gnulocaledir = $(prefix)/share/locale
gettextsrcdir = $(prefix)/share/gettext
aliaspath = $(localedir):.
subdir = intl
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
AR = ar
CC = @CC@
RANLIB = @RANLIB@
DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \
-DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@
CFLAGS = @CFLAGS@
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
HEADERS = $(COMHDRS) libgettext.h
COMHDRS = gettext.h gettextP.h hash-string.h
SOURCES = $(COMSRCS) intl-compat.c cat-compat.c
COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
finddomain.c loadmsgcat.c localealias.c textdomain.c
OBJECTS = @INTLOBJS@ bindtextdom.o dcgettext.o dgettext.o gettext.o \
finddomain.o loadmsgcat.o localealias.o textdomain.o
CATOBJS = cat-compat.o ../po/cat-id-tbl.o
GETTOBJS = intl-compat.o
DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \
xopen-msg.sed $(HEADERS) $(SOURCES)
DISTFILES = $(DISTFILES.common) VERSION
DISTFILES.gettext = $(DISTFILES.common) libintl.glibc libintl.inst
.SUFFIXES:
.SUFFIXES: .c .o
.c.o:
$(COMPILE) $<
INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib
all: libintl.a
libintl.a: $(OBJECTS)
rm -f $@
$(AR) cru $@ $(OBJECTS)
$(RANLIB) $@
../po/cat-id-tbl.o: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot
cd ../po && $(MAKE) cat-id-tbl.o
check install: all
# This installation goal is only used in GNU gettext. Packages which
# only use the library should use install instead.
#
# We must not install the libintl.h/libintl.a files if we are on a system
# which has the gettext() function in its C library or in a separate
# library. A special case is where configure found a previously installed
# GNU gettext library. If you want to use the one which comes with this
# version of the package, you have to use `configure --with-gnu-gettext'.
install-src: install
$(top_srcdir)/mkinstalldirs $(libdir) $(includedir) $(gettextsrcdir)
if test -f libintl.h; then \
$(INSTALL_DATA) $(srcdir)/libintl.inst \
$(includedir)/libintl.h; \
$(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \
fi
cd $(srcdir) && \
for file in $(DISTFILES.common); do \
$(INSTALL_DATA) $$file $(gettextsrcdir)/intl-$$file; \
done
$(INSTALL_DATA) VERSION $(gettextsrcdir)/intl-VERSION
uninstall:
for file in $(DISTFILES); do \
rm -f $(gettextsrcdir)/intl-$$file; \
done
info dvi:
$(OBJECTS): ../config.h libgettext.h
bindtextdom.o finddomain.o loadmsgcat.o: gettextP.h gettext.h
dcgettext.o: gettextP.h gettext.h hash-string.h
tags: TAGS
TAGS: $(HEADERS) $(SOURCES)
here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
id: ID
ID: $(HEADERS) $(SOURCES)
here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
mostlyclean:
rm -f *.a *.o core core.*
clean: mostlyclean
distclean: clean
rm -f Makefile ID TAGS po2msg.sed po2tbl.sed libintl.h
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist: Makefile $(DISTFILES)
for file in $(DISTFILES); do \
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir); \
done
# This dist goal is only used in GNU gettext. GNU gettext needs not contain
# the file `VERSION' but contains some other files which should not be
# distributed in other packages.
dist-gettext: Makefile $(DISTFILES.gettext)
for file in $(DISTFILES.gettext); do \
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir); \
done
dist-libc:
tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc
Makefile: Makefile.in ../config.status
cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1 @@
GNU gettext library from gettext-0.10

View File

@ -0,0 +1,172 @@
/* bindtextdom.c -- implementation of the bindtextdomain(3) function
Copyright (C) 1995 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. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#if defined STDC_HEADERS || defined _LIBC
# include <stdlib.h>
#else
# ifdef HAVE_MALLOC_H
# include <malloc.h>
# else
void free ();
# endif
#endif
#if defined HAVE_STRING_H || defined _LIBC
# include <string.h>
#else
# include <strings.h>
#endif
#ifdef _LIBC
# include <libintl.h>
#else
# include "libgettext.h"
#endif
#include "gettext.h"
#include "gettextP.h"
/* @@ end of prolog @@ */
/* Contains the default location of the message catalogs. */
extern const char _nl_default_dirname[];
/* List with bindings of specific domains. */
extern struct binding *_nl_domain_bindings;
/* Names for the libintl functions are a problem. They must not clash
with existing names and they should follow ANSI C. But this source
code is also used in GNU C Library where the names have a __
prefix. So we have to make a difference here. */
#ifdef _LIBC
# define BINDTEXTDOMAIN __bindtextdomain
#else
# define BINDTEXTDOMAIN bindtextdomain__
#endif
/* Specify that the DOMAINNAME message catalog will be found
in DIRNAME rather than in the system locale data base. */
char *
BINDTEXTDOMAIN (domainname, dirname)
const char *domainname;
const char *dirname;
{
struct binding *binding;
/* Some sanity checks. */
if (domainname == NULL || domainname[0] == '\0')
return NULL;
for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
{
int compare = strcmp (domainname, binding->domainname);
if (compare == 0)
/* We found it! */
break;
if (compare < 0)
{
/* It is not in the list. */
binding = NULL;
break;
}
}
if (dirname == NULL)
/* The current binding has be to returned. */
return binding == NULL ? (char *) _nl_default_dirname : binding->dirname;
if (binding != NULL)
{
/* The domain is already bound. Replace the old binding. */
char *new_dirname;
if (strcmp (dirname, _nl_default_dirname) == 0)
new_dirname = (char *) _nl_default_dirname;
else
{
size_t len = strlen (dirname) + 1;
new_dirname = (char *) malloc (len);
if (new_dirname == NULL)
return NULL;
memcpy (new_dirname, dirname, len);
}
if (strcmp (binding->dirname, _nl_default_dirname) != 0)
free (binding->dirname);
binding->dirname = new_dirname;
}
else
{
/* We have to create a new binding. */
size_t len;
struct binding *new_binding =
(struct binding *) malloc (sizeof (*new_binding));
if (new_binding == NULL)
return NULL;
len = strlen (domainname) + 1;
new_binding->domainname = (char *) malloc (len);
if (new_binding->domainname == NULL)
return NULL;
memcpy (new_binding->domainname, domainname, len);
if (strcmp (dirname, _nl_default_dirname) == 0)
new_binding->dirname = (char *) _nl_default_dirname;
else
{
len = strlen (dirname) + 1;
new_binding->dirname = (char *) malloc (len);
if (new_binding->dirname == NULL)
return NULL;
memcpy (new_binding->dirname, dirname, len);
}
/* Now enqueue it. */
if (_nl_domain_bindings == NULL
|| strcmp (domainname, _nl_domain_bindings->domainname) < 0)
{
new_binding->next = _nl_domain_bindings;
_nl_domain_bindings = new_binding;
}
else
{
binding = _nl_domain_bindings;
while (binding->next != NULL
&& strcmp (domainname, binding->next->domainname) > 0)
binding = binding->next;
new_binding->next = binding->next;
binding->next = new_binding;
}
binding = new_binding;
}
return binding->dirname;
}
#ifdef _LIBC
/* Alias for function name in GNU C Library. */
weak_alias (__bindtextdomain, bindtextdomain);
#endif

Binary file not shown.

View File

@ -0,0 +1,252 @@
/* Compatibility code for gettext-using-catgets interface.
Copyright (C) 1995 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.
The GNU C Library 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.
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. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#ifdef STDC_HEADERS
# include <stdlib.h>
# include <string.h>
#else
char *getenv ();
# ifdef HAVE_MALLOC_H
# include <malloc.h>
# endif
#endif
#ifdef HAVE_NL_TYPES_H
# include <nl_types.h>
#endif
#include "libgettext.h"
/* @@ end of prolog @@ */
/* The catalog descriptor. */
static nl_catd catalog = (nl_catd) -1;
/* Name of the default catalog. */
static const char default_catalog_name[] = "messages";
/* Name of currently used catalog. */
static const char *catalog_name = default_catalog_name;
/* Get ID for given string. If not found return -1. */
static int msg_to_cat_id __P ((const char *msg));
/* Substitution for systems lacking this function in their C library. */
#if !_LIBC && !HAVE_STPCPY
static char *stpcpy __P ((char *dest, const char *src));
#endif
/* Set currently used domain/catalog. */
char *
textdomain (domainname)
const char *domainname;
{
nl_catd new_catalog;
char *new_name;
size_t new_name_len;
char *lang;
#if HAVE_SETLOCALE && HAVE_LC_MESSAGES && HAVE_SETLOCALE_NULL
lang = setlocale (LC_MESSAGES, NULL);
#else
lang = getenv ("LC_ALL");
if (lang == NULL || lang[0] == '\0')
{
lang = getenv ("LC_MESSAGES");
if (lang == NULL || lang[0] == '\0')
lang = getenv ("LANG");
}
#endif
if (lang == NULL || lang[0] == '\0')
lang = "C";
/* See whether name of currently used domain is asked. */
if (domainname == NULL)
return (char *) catalog_name;
if (domainname[0] == '\0')
domainname = default_catalog_name;
/* Compute length of added path element. */
new_name_len = sizeof (LOCALEDIR) - 1 + 1 + strlen (lang)
+ sizeof ("/LC_MESSAGES/") - 1 + sizeof (PACKAGE) - 1
+ sizeof (".cat");
new_name = (char *) malloc (new_name_len);
if (new_name == NULL)
return NULL;
strcpy (new_name, PACKAGE);
new_catalog = catopen (new_name, 0);
if (new_catalog == (nl_catd) -1)
{
/* NLSPATH search didn't work, try absolute path */
sprintf (new_name, "%s/%s/LC_MESSAGES/%s.cat", LOCALEDIR, lang,
PACKAGE);
new_catalog = catopen (new_name, 0);
if (new_catalog == (nl_catd) -1)
{
free (new_name);
return (char *) catalog_name;
}
}
/* Close old catalog. */
if (catalog != (nl_catd) -1)
catclose (catalog);
if (catalog_name != default_catalog_name)
free ((char *) catalog_name);
catalog = new_catalog;
catalog_name = new_name;
return (char *) catalog_name;
}
char *
bindtextdomain (domainname, dirname)
const char *domainname;
const char *dirname;
{
#if HAVE_SETENV || HAVE_PUTENV
char *old_val, *new_val, *cp;
size_t new_val_len;
/* This does not make much sense here but to be compatible do it. */
if (domainname == NULL)
return NULL;
/* Compute length of added path element. If we use setenv we don't need
the first byts for NLSPATH=, but why complicate the code for this
peanuts. */
new_val_len = sizeof ("NLSPATH=") - 1 + strlen (dirname)
+ sizeof ("/%L/LC_MESSAGES/%N.cat");
old_val = getenv ("NLSPATH");
if (old_val == NULL || old_val[0] == '\0')
{
old_val = NULL;
new_val_len += 1 + sizeof (LOCALEDIR) - 1
+ sizeof ("/%L/LC_MESSAGES/%N.cat");
}
else
new_val_len += strlen (old_val);
new_val = (char *) malloc (new_val_len);
if (new_val == NULL)
return NULL;
# if HAVE_SETENV
cp = new_val;
# else
cp = stpcpy (new_val, "NLSPATH=");
# endif
cp = stpcpy (cp, dirname);
cp = stpcpy (cp, "/%L/LC_MESSAGES/%N.cat:");
if (old_val == NULL)
{
# if __STDC__
stpcpy (cp, LOCALEDIR "/%L/LC_MESSAGES/%N.cat");
# else
cp = stpcpy (cp, LOCALEDIR);
stpcpy (cp, "/%L/LC_MESSAGES/%N.cat");
# endif
}
else
stpcpy (cp, old_val);
# if HAVE_SETENV
setenv ("NLSPATH", new_val, 1);
free (new_val);
# else
putenv (new_val);
/* Do *not* free the environment entry we just entered. It is used
from now on. */
# endif
#endif
return (char *) domainname;
}
#undef gettext
char *
gettext (msg)
const char *msg;
{
int msgid;
if (msg == NULL || catalog == (nl_catd) -1)
return (char *) msg;
/* Get the message from the catalog. We always use set number 1.
The message ID is computed by the function `msg_to_cat_id'
which works on the table generated by `po-to-tbl'. */
msgid = msg_to_cat_id (msg);
if (msgid == -1)
return (char *) msg;
return catgets (catalog, 1, msgid, (char *) msg);
}
/* Look through the table `_msg_tbl' which has `_msg_tbl_length' entries
for the one equal to msg. If it is found return the ID. In case when
the string is not found return -1. */
static int
msg_to_cat_id (msg)
const char *msg;
{
int cnt;
for (cnt = 0; cnt < _msg_tbl_length; ++cnt)
if (strcmp (msg, _msg_tbl[cnt]._msg) == 0)
return _msg_tbl[cnt]._msg_number;
return -1;
}
/* @@ begin of epilog @@ */
/* We don't want libintl.a to depend on any other library. So we
avoid the non-standard function stpcpy. In GNU C Library this
function is available, though. Also allow the symbol HAVE_STPCPY
to be defined. */
#if !_LIBC && !HAVE_STPCPY
static char *
stpcpy (dest, src)
char *dest;
const char *src;
{
while ((*dest++ = *src++) != '\0')
/* Do nothing. */ ;
return dest - 1;
}
#endif

View File

@ -0,0 +1,522 @@
/* dcgettext.c -- implemenatation of the dcgettext(3) function
Copyright (C) 1995 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. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# if defined HAVE_ALLOCA_H || defined _LIBC
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca
char *alloca ();
# endif
# endif
# endif
#endif
#include <errno.h>
#ifndef errno
extern int errno;
#endif
#if defined STDC_HEADERS || defined _LIBC
# include <stdlib.h>
#else
char *getenv ();
# ifdef HAVE_MALLOC_H
# include <malloc.h>
# else
void free ();
# endif
#endif
#if defined HAVE_STRING_H || defined _LIBC
# include <string.h>
#else
# include <strings.h>
#endif
#if !HAVE_STRCHR && !defined _LIBC
# ifndef strchr
# define strchr index
# endif
#endif
#if defined HAVE_UNISTD_H || defined _LIBC
# include <unistd.h>
#endif
#include "gettext.h"
#include "gettextP.h"
#ifdef _LIBC
# include <libintl.h>
#else
# include "libgettext.h"
#endif
#include "hash-string.h"
/* @@ end of prolog @@ */
#ifdef _LIBC
/* Rename the non ANSI C functions. This is required by the standard
because some ANSI C functions will require linking with this object
file and the name space must not be polluted. */
# define getcwd __getcwd
# define stpcpy __stpcpy
#endif
#if !defined HAVE_GETCWD && !defined _LIBC
char *getwd ();
# define getcwd(buf, max) getwd (buf)
#else
char *getcwd ();
#endif
/* Amount to increase buffer size by in each try. */
#define PATH_INCR 32
/* The following is from pathmax.h. */
/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
PATH_MAX but might cause redefinition warnings when sys/param.h is
later included (as on MORE/BSD 4.3). */
#if defined(_POSIX_VERSION) || (defined(HAVE_LIMITS_H) && !defined(__GNUC__))
# include <limits.h>
#endif
#ifndef _POSIX_PATH_MAX
# define _POSIX_PATH_MAX 255
#endif
#if !defined(PATH_MAX) && defined(_PC_PATH_MAX)
# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
#endif
/* Don't include sys/param.h if it already has been. */
#if defined(HAVE_SYS_PARAM_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN)
# include <sys/param.h>
#endif
#if !defined(PATH_MAX) && defined(MAXPATHLEN)
# define PATH_MAX MAXPATHLEN
#endif
#ifndef PATH_MAX
# define PATH_MAX _POSIX_PATH_MAX
#endif
/* XPG3 defines the result of `setlocale (category, NULL)' as:
``Directs `setlocale()' to query `category' and return the current
setting of `local'.''
However it does not specify the exact format. And even worse: POSIX
defines this not at all. So we can use this feature only on selected
system (e.g. those using GNU C Library). */
#ifdef _LIBC
# define HAVE_LOCALE_NULL
#endif
/* Name of the default domain used for gettext(3) prior any call to
textdomain(3). The default value for this is "messages". */
const char _nl_default_default_domain[] = "messages";
/* Value used as the default domain for gettext(3). */
const char *_nl_current_default_domain = _nl_default_default_domain;
/* Contains the default location of the message catalogs. */
const char _nl_default_dirname[] = GNULOCALEDIR;
/* List with bindings of specific domains created by bindtextdomain()
calls. */
struct binding *_nl_domain_bindings;
/* Prototypes for local functions. */
static char *find_msg __P ((struct loaded_domain *domain, const char *msgid));
static const char *category_to_name __P((int category));
static const char *guess_category_value __P((int category,
const char *categoryname));
/* Names for the libintl functions are a problem. They must not clash
with existing names and they should follow ANSI C. But this source
code is also used in GNU C Library where the names have a __
prefix. So we have to make a difference here. */
#ifdef _LIBC
# define DCGETTEXT __dcgettext
#else
# define DCGETTEXT dcgettext__
#endif
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
locale. */
char *
DCGETTEXT (domainname, msgid, category)
const char *domainname;
const char *msgid;
int category;
{
struct loaded_domain *domain;
struct binding *binding;
const char *categoryname;
const char *categoryvalue;
char *dirname, *xdomainname;
char *single_locale;
char *retval;
/* If no real MSGID is given return NULL. */
if (msgid == NULL)
return NULL;
/* If DOMAINNAME is NULL, we are interested in the default domain. If
CATEGORY is not LC_MESSAGES this might not make much sense but the
defintion left this undefined. */
if (domainname == NULL)
domainname = _nl_current_default_domain;
/* First find matching binding. */
for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
{
int compare = strcmp (domainname, binding->domainname);
if (compare == 0)
/* We found it! */
break;
if (compare < 0)
{
/* It is not in the list. */
binding = NULL;
break;
}
}
if (binding == NULL)
dirname = (char *) _nl_default_dirname;
else if (binding->dirname[0] == '/')
dirname = binding->dirname;
else
{
/* We have a relative path. Make it absolute now. */
size_t dirname_len = strlen (binding->dirname) + 1;
size_t path_max;
char *ret;
path_max = (unsigned) PATH_MAX;
path_max += 2; /* The getcwd docs say to do this. */
dirname = (char *) alloca (path_max + dirname_len);
errno = 0;
while ((ret = getcwd (dirname, path_max)) == NULL && errno == ERANGE)
{
path_max += PATH_INCR;
dirname = (char *) alloca (path_max + dirname_len);
errno = 0;
}
if (ret == NULL)
/* We cannot get the current working directory. Don't signal an
error but simply return the default string. */
return (char *) msgid;
/* We don't want libintl.a to depend on any other library. So
we avoid the non-standard function stpcpy. In GNU C Library
this function is available, though. Also allow the symbol
HAVE_STPCPY to be defined. */
#if defined _LIBC || defined HAVE_STPCPY
stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
#else
strcat (dirname, "/");
strcat (dirname, binding->dirname);
#endif
}
/* Now determine the symbolic name of CATEGORY and its value. */
categoryname = category_to_name (category);
categoryvalue = guess_category_value (category, categoryname);
xdomainname = (char *) alloca (strlen (categoryname)
+ strlen (domainname) + 5);
/* We don't want libintl.a to depend on any other library. So we
avoid the non-standard function stpcpy. In GNU C Library this
function is available, though. Also allow the symbol HAVE_STPCPY
to be defined. */
#if defined _LIBC || defined HAVE_STPCPY
stpcpy (stpcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
domainname),
".mo");
#else
strcpy (xdomainname, categoryname);
strcat (xdomainname, "/");
strcat (xdomainname, domainname);
strcat (xdomainname, ".mo");
#endif
/* Creating working area. */
single_locale = (char *) alloca (strlen (categoryvalue) + 1);
/* Search for the given string. This is a loop because we perhaps
got an ordered list of languages to consider for th translation. */
while (1)
{
/* Make CATEGORYVALUE point to the next element of the list. */
while (categoryvalue[0] != '\0' && categoryvalue[0] == ':')
++categoryvalue;
if (categoryvalue[0] == '\0')
{
/* The whole contents of CATEGORYVALUE has been searched but
no valid entry has been found. We solve this situation
by implicitely appending a "C" entry, i.e. no translation
will take place. */
single_locale[0] = 'C';
single_locale[1] = '\0';
}
else
{
char *cp = single_locale;
while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
*cp++ = *categoryvalue++;
*cp = '\0';
}
/* If the current locale value is C (or POSIX) we don't load a
domain. Return the MSGID. */
if (strcmp (single_locale, "C") == 0
|| strcmp (single_locale, "POSIX") == 0)
return (char *) msgid;
/* Find structure describing the message catalog matching the
DOMAINNAME and CATEGORY. */
domain = _nl_find_domain (dirname, single_locale, xdomainname);
if (domain != NULL)
{
retval = find_msg (domain, msgid);
if (retval == NULL)
{
int cnt;
for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
{
retval = find_msg (domain->successor[cnt], msgid);
if (retval != NULL)
break;
}
}
if (retval != NULL)
return retval;
}
}
/* NOTREACHED */
}
#ifdef _LIBC
/* Alias for function name in GNU C Library. */
weak_alias (__dcgettext, dcgettext);
#endif
static char *
find_msg (domain, msgid)
struct loaded_domain *domain;
const char *msgid;
{
size_t top, act, bottom;
if (domain->decided == 0)
_nl_load_domain (domain);
if (domain->data == NULL)
return NULL;
/* Locate the MSGID and its translation. */
if (domain->hash_size > 2 && domain->hash_tab != NULL)
{
/* Use the hashing table. */
nls_uint32 len = strlen (msgid);
nls_uint32 hash_val = hash_string (msgid);
nls_uint32 idx = hash_val % domain->hash_size;
nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]);
if (nstr == 0)
/* Hash table entry is empty. */
return NULL;
if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len
&& strcmp (msgid,
domain->data + W (domain->must_swap,
domain->orig_tab[nstr - 1].offset)) == 0)
return (char *) domain->data + W (domain->must_swap,
domain->trans_tab[nstr - 1].offset);
while (1)
{
if (idx >= W (domain->must_swap, domain->hash_size) - incr)
idx -= W (domain->must_swap, domain->hash_size) - incr;
else
idx += incr;
nstr = W (domain->must_swap, domain->hash_tab[idx]);
if (nstr == 0)
/* Hash table entry is empty. */
return NULL;
if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len
&& strcmp (msgid,
domain->data + W (domain->must_swap,
domain->orig_tab[nstr - 1].offset))
== 0)
return (char *) domain->data
+ W (domain->must_swap, domain->trans_tab[nstr - 1].offset);
}
/* NOTREACHED */
}
/* Now we try the default method: binary search in the sorted
array of messages. */
bottom = 0;
top = domain->nstrings;
while (bottom < top)
{
int cmp_val;
act = (bottom + top) / 2;
cmp_val = strcmp (msgid, domain->data
+ W (domain->must_swap,
domain->orig_tab[act].offset));
if (cmp_val < 0)
top = act;
else if (cmp_val > 0)
bottom = act + 1;
else
break;
}
/* If an translation is found return this. */
return bottom >= top ? NULL : (char *) domain->data
+ W (domain->must_swap,
domain->trans_tab[act].offset);
}
/* Return string representation of locale CATEGORY. */
static const char *category_to_name (category)
int category;
{
const char *retval;
switch (category)
{
#ifdef LC_COLLATE
case LC_COLLATE:
retval = "LC_COLLATE";
break;
#endif
#ifdef LC_CTYPE
case LC_CTYPE:
retval = "LC_CTYPE";
break;
#endif
#ifdef LC_MONETARY
case LC_MONETARY:
retval = "LC_MONETARY";
break;
#endif
#ifdef LC_NUMERIC
case LC_NUMERIC:
retval = "LC_NUMERIC";
break;
#endif
#ifdef LC_TIME
case LC_TIME:
retval = "LC_TIME";
break;
#endif
#ifdef LC_MESSAGES
case LC_MESSAGES:
retval = "LC_MESSAGES";
break;
#endif
#ifdef LC_RESPONSE
case LC_RESPONSE:
retval = "LC_RESPONSE";
break;
#endif
#ifdef LC_ALL
case LC_ALL:
/* This might not make sense but is perhaps better than any other
value. */
retval = "LC_ALL";
break;
#endif
default:
/* If you have a better idea for a default value let me know. */
retval = "LC_XXX";
}
return retval;
}
/* Guess value of current locale from value of the environment variables. */
static const char *guess_category_value (category, categoryname)
int category;
const char *categoryname;
{
const char *retval;
/* The highest priority value is the `LANGUAGE' environment
variable. This is a GNU extension. */
retval = getenv ("LANGUAGE");
if (retval != NULL && retval[0] != '\0')
return retval;
/* `LANGUAGE' is not set. So we have to proceed with the POSIX
methods of looking to `LC_ALL', `LC_xxx', and `LANG'. On some
systems this can be done by the `setlocale' function itself. */
#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
return setlocale (category, NULL);
#else
/* Setting of LC_ALL overwrites all other. */
retval = getenv ("LC_ALL");
if (retval != NULL && retval[0] != '\0')
return retval;
/* Next comes the name of the desired category. */
retval = getenv (categoryname);
if (retval != NULL && retval[0] != '\0')
return retval;
/* Last possibility is the LANG environment variable. */
retval = getenv ("LANG");
if (retval != NULL && retval[0] != '\0')
return retval;
/* We use C as the default domain. POSIX says this is implementation
defined. */
return "C";
#endif
}

Binary file not shown.

View File

@ -0,0 +1,59 @@
/* dgettext.c -- implementation of the dgettext(3) function
Copyright (C) 1995 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. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#if defined HAVE_LOCALE_H || defined _LIBC
# include <locale.h>
#endif
#ifdef _LIBC
# include <libintl.h>
#else
# include "libgettext.h"
#endif
/* @@ end of prolog @@ */
/* Names for the libintl functions are a problem. They must not clash
with existing names and they should follow ANSI C. But this source
code is also used in GNU C Library where the names have a __
prefix. So we have to make a difference here. */
#ifdef _LIBC
# define DGETTEXT __dgettext
# define DCGETTEXT __dcgettext
#else
# define DGETTEXT dgettext__
# define DCGETTEXT dcgettext__
#endif
/* Look up MSGID in the DOMAINNAME message catalog of the current
LC_MESSAGES locale. */
char *
DGETTEXT (domainname, msgid)
const char *domainname;
const char *msgid;
{
return DCGETTEXT (domainname, msgid, LC_MESSAGES);
}
#ifdef _LIBC
/* Alias for function name in GNU C Library. */
weak_alias (__dgettext, dgettext);
#endif

Binary file not shown.

View File

@ -0,0 +1,503 @@
/* finddomain.c -- handle list of needed message catalogs
Copyright (C) 1995 Software Foundation, Inc.
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
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. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <errno.h>
#include <stdio.h>
#include <sys/types.h>
#if defined STDC_HEADERS || defined _LIBC
# include <stdlib.h>
#else
# ifdef HAVE_MALLOC_H
# include <malloc.h>
# else
void free ();
# endif
#endif
#if defined HAVE_STRING_H || defined _LIBC
# include <string.h>
#else
# include <strings.h>
#endif
#if !HAVE_STRCHR && !defined _LIBC
# ifndef strchr
# define strchr index
# endif
#endif
#if defined HAVE_UNISTD_H || defined _LIBC
# include <unistd.h>
#endif
#include "gettext.h"
#include "gettextP.h"
#ifdef _LIBC
# include <libintl.h>
#else
# include "libgettext.h"
#endif
/* @@ end of prolog @@ */
#ifdef _LIBC
/* Rename the non ANSI C functions. This is required by the standard
because some ANSI C functions will require linking with this object
file and the name space must not be polluted. */
# define stpcpy __stpcpy
#endif
/* Encoding of locale name parts. */
#define CEN_REVISION 1
#define CEN_SPONSOR 2
#define CEN_SPECIAL 4
#define XPG_CODESET 8
#define TERRITORY 16
#define CEN_AUDIENCE 32
#define XPG_MODIFIER 64
#define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
#define XPG_SPECIFIC (XPG_CODESET|XPG_MODIFIER)
/* List of already loaded domains. */
static struct loaded_domain *_nl_loaded_domains;
/* Prototypes for local functions. */
static struct loaded_domain *make_entry_rec __P ((const char *dirname,
int mask,
const char *language,
const char *territory,
const char *codeset,
const char *modifier,
const char *special,
const char *sponsor,
const char *revision,
const char *domainname,
int do_allocate));
/* Substitution for systems lacking this function in their C library. */
#if !_LIBC && !HAVE_STPCPY
static char *stpcpy __P ((char *dest, const char *src));
#endif
/* Return a data structure describing the message catalog described by
the DOMAINNAME and CATEGORY parameters with respect to the currently
established bindings. */
struct loaded_domain *
_nl_find_domain (dirname, locale, domainname)
const char *dirname;
char *locale;
const char *domainname;
{
enum { undecided, xpg, cen } syntax;
struct loaded_domain *retval;
const char *language;
const char *modifier = NULL;
const char *territory = NULL;
const char *codeset = NULL;
const char *special = NULL;
const char *sponsor = NULL;
const char *revision = NULL;
const char *alias_value = NULL;
char *cp;
int mask;
/* CATEGORYVALUE now possibly contains a colon separated list of
locales. Each single locale can consist of up to four recognized
parts for the XPG syntax:
language[_territory[.codeset]][@modifier]
and six parts for the CEN syntax:
language[_territory][+audience][+special][,sponsor][_revision]
Beside the first all of them are allowed to be missing. If the
full specified locale is not found, the less specific one are
looked for. The various part will be stripped of according to
the following order:
(1) revision
(2) sponsor
(3) special
(4) codeset
(5) territory
(6) audience/modifier
*/
/* If we have already tested for this locale entry there has to
be one data set in the list of loaded domains. */
retval = make_entry_rec (dirname, 0, locale, NULL, NULL, NULL,
NULL, NULL, NULL, domainname, 0);
if (retval != NULL)
{
/* We know something about this locale. */
int cnt;
if (retval->decided == 0)
_nl_load_domain (retval); /* @@@ */
if (retval->data != NULL)
return retval;
for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
{
if (retval->successor[cnt]->decided == 0)
_nl_load_domain (retval->successor[cnt]);
if (retval->successor[cnt]->data != NULL)
break;
}
/* We really found some usable information. */
return cnt >= 0 ? retval : NULL;
/* NOTREACHED */
}
/* See whether the locale value is an alias. If yes its value
*overwrites* the alias name. No test for the original value is
done. */
alias_value = _nl_expand_alias (locale);
if (alias_value != NULL)
{
size_t len = strlen (alias_value) + 1;
locale = (char *) malloc (len);
if (locale == NULL)
return NULL;
memcpy (locale, alias_value, len);
}
/* Now we determine the single parts of the locale name. First
look for the language. Termination symbols are `_' and `@' if
we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
mask = 0;
syntax = undecided;
language = cp = locale;
while (cp[0] != '\0' && cp[0] != '_' && cp[0] != '@'
&& cp[0] != '+' && cp[0] != ',')
++cp;
if (language == cp)
/* This does not make sense: language has to be specified. Use
this entry as it is without exploding. Perhaps it is an alias. */
cp = strchr (language, '\0');
else if (cp[0] == '_')
{
/* Next is the territory. */
cp[0] = '\0';
territory = ++cp;
while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@'
&& cp[0] != '+' && cp[0] != ',' && cp[0] != '_')
++cp;
mask |= TERRITORY;
if (cp[0] == '.')
{
/* Next is the codeset. */
syntax = xpg;
cp[0] = '\0';
codeset = ++cp;
while (cp[0] != '\0' && cp[0] != '@')
++cp;
mask |= XPG_CODESET;
}
}
if (cp[0] == '@' || (syntax != xpg && cp[0] == '+'))
{
/* Next is the modifier. */
syntax = cp[0] == '@' ? xpg : cen;
cp[0] = '\0';
modifier = ++cp;
while (syntax == cen && cp[0] != '\0' && cp[0] != '+'
&& cp[0] != ',' && cp[0] != '_')
++cp;
mask |= XPG_MODIFIER | CEN_AUDIENCE;
}
if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_'))
{
syntax = cen;
if (cp[0] == '+')
{
/* Next is special application (CEN syntax). */
cp[0] = '\0';
special = ++cp;
while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_')
++cp;
mask |= CEN_SPECIAL;
}
if (cp[0] == ',')
{
/* Next is sponsor (CEN syntax). */
cp[0] = '\0';
sponsor = ++cp;
while (cp[0] != '\0' && cp[0] != '_')
++cp;
mask |= CEN_SPONSOR;
}
if (cp[0] == '_')
{
/* Next is revision (CEN syntax). */
cp[0] = '\0';
revision = ++cp;
mask |= CEN_REVISION;
}
}
/* For CEN sytnax values it might be important to have the
separator character in the file name, not for XPG syntax. */
if (syntax == xpg)
{
if (territory != NULL && territory[0] == '\0')
mask &= ~TERRITORY;
if (codeset != NULL && codeset[0] == '\0')
mask &= ~XPG_CODESET;
if (modifier != NULL && modifier[0] == '\0')
mask &= ~XPG_MODIFIER;
}
/* Create all possible locale entries which might be interested in
generalzation. */
retval = make_entry_rec (dirname, mask, language, territory, codeset,
modifier, special, sponsor, revision,
domainname, 1);
if (retval == NULL)
/* This means we are out of core. */
return NULL;
if (retval->decided == 0)
_nl_load_domain (retval);
if (retval->data == NULL)
{
int cnt;
for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
{
if (retval->successor[cnt]->decided == 0)
_nl_load_domain (retval->successor[cnt]);
if (retval->successor[cnt]->data != NULL)
break;
/* Signal that locale is not available. */
retval->successor[cnt] = NULL;
}
if (retval->successor[cnt] == NULL)
retval = NULL;
}
/* The room for an alias was dynamically allocated. Free it now. */
if (alias_value != NULL)
free (locale);
return retval;
}
static struct loaded_domain *
make_entry_rec (dirname, mask, language, territory, codeset, modifier,
special, sponsor, revision, domain, do_allocate)
const char *dirname;
int mask;
const char *language;
const char *territory;
const char *codeset;
const char *modifier;
const char *special;
const char *sponsor;
const char *revision;
const char *domain;
int do_allocate;
{
char *filename = NULL;
struct loaded_domain *last = NULL;
struct loaded_domain *retval;
char *cp;
size_t entries;
int cnt;
/* Process the current entry described by the MASK only when it is
valid. Because the mask can have in the first call bits from
both syntaces set this is necessary to prevent constructing
illegal local names. */
/* FIXME: Rewrite because test is necessary only in first round. */
if ((mask & CEN_SPECIFIC) == 0 || (mask & XPG_SPECIFIC) == 0)
{
/* Allocate room for the full file name. */
filename = (char *) malloc (strlen (dirname) + 1
+ strlen (language)
+ ((mask & TERRITORY) != 0
? strlen (territory) : 0)
+ ((mask & XPG_CODESET) != 0
? strlen (codeset) : 0)
+ ((mask & XPG_MODIFIER) != 0 ?
strlen (modifier) : 0)
+ ((mask & CEN_SPECIAL) != 0
? strlen (special) : 0)
+ ((mask & CEN_SPONSOR) != 0
? strlen (sponsor) : 0)
+ ((mask & CEN_REVISION) != 0
? strlen (revision) : 0) + 1
+ strlen (domain) + 1);
if (filename == NULL)
return NULL;
retval = NULL;
last = NULL;
/* Construct file name. */
cp = stpcpy (filename, dirname);
*cp++ = '/';
cp = stpcpy (cp, language);
if ((mask & TERRITORY) != 0)
{
*cp++ = '_';
cp = stpcpy (cp, territory);
}
if ((mask & XPG_CODESET) != 0)
{
*cp++ = '.';
cp = stpcpy (cp, codeset);
}
if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0)
{
/* This component can be part of both syntaces but has different
leading characters. For CEN we use `+', else `@'. */
*cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@';
cp = stpcpy (cp, modifier);
}
if ((mask & CEN_SPECIAL) != 0)
{
*cp++ = '+';
cp = stpcpy (cp, special);
}
if ((mask & CEN_SPONSOR) != 0)
{
*cp++ = ',';
cp = stpcpy (cp, sponsor);
}
if ((mask & CEN_REVISION) != 0)
{
*cp++ = '_';
cp = stpcpy (cp, revision);
}
*cp++ = '/';
stpcpy (cp, domain);
/* Look in list of already loaded domains whether it is already
available. */
last = NULL;
for (retval = _nl_loaded_domains; retval != NULL; retval = retval->next)
if (retval->filename != NULL)
{
int compare = strcmp (retval->filename, filename);
if (compare == 0)
/* We found it! */
break;
if (compare < 0)
{
/* It's not in the list. */
retval = NULL;
break;
}
last = retval;
}
if (retval != NULL || do_allocate == 0)
{
free (filename);
return retval;
}
}
retval = (struct loaded_domain *) malloc (sizeof (*retval));
if (retval == NULL)
return NULL;
retval->filename = filename;
retval->decided = 0;
if (last == NULL)
{
retval->next = _nl_loaded_domains;
_nl_loaded_domains = retval;
}
else
{
retval->next = last->next;
last->next = retval;
}
entries = 0;
for (cnt = 126; cnt >= 0; --cnt)
if (cnt < mask && (cnt & ~mask) == 0
&& ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0))
retval->successor[entries++] = make_entry_rec (dirname, cnt,
language, territory,
codeset, modifier,
special, sponsor,
revision, domain, 1);
retval->successor[entries] = NULL;
return retval;
}
/* @@ begin of epilog @@ */
/* We don't want libintl.a to depend on any other library. So we
avoid the non-standard function stpcpy. In GNU C Library this
function is available, though. Also allow the symbol HAVE_STPCPY
to be defined. */
#if !_LIBC && !HAVE_STPCPY
static char *
stpcpy (dest, src)
char *dest;
const char *src;
{
while ((*dest++ = *src++) != '\0')
/* Do nothing. */ ;
return dest - 1;
}
#endif

Binary file not shown.

View File

@ -0,0 +1,70 @@
/* gettext.c -- implementation of gettext(3) function
Copyright (C) 1995 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. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifdef _LIBC
# define __need_NULL
# include <stddef.h>
#else
# ifdef STDC_HEADERS
# include <stdlib.h> /* Just for NULL. */
# else
# ifdef HAVE_STRING_H
# include <string.h>
# else
# define NULL ((void *) 0)
# endif
# endif
#endif
#ifdef _LIBC
# include <libintl.h>
#else
# include "libgettext.h"
#endif
/* @@ end of prolog @@ */
/* Names for the libintl functions are a problem. They must not clash
with existing names and they should follow ANSI C. But this source
code is also used in GNU C Library where the names have a __
prefix. So we have to make a difference here. */
#ifdef _LIBC
# define GETTEXT __gettext
# define DGETTEXT __dgettext
#else
# define GETTEXT gettext__
# define DGETTEXT dgettext__
#endif
/* Look up MSGID in the current default message catalog for the current
LC_MESSAGES locale. If not found, returns MSGID itself (the default
text). */
char *
GETTEXT (msgid)
const char *msgid;
{
return DGETTEXT (NULL, msgid);
}
#ifdef _LIBC
/* Alias for function name in GNU C Library. */
weak_alias (__gettext, gettext);
#endif

View File

@ -0,0 +1,105 @@
/* gettext.h - internal header for GNU gettext internationalization functions
Copyright (C) 1995 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 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. */
#ifndef _GETTEXT_H
#define _GETTEXT_H 1
#include <stdio.h>
#if HAVE_LIMITS_H || _LIBC
# include <limits.h>
#endif
/* @@ end of prolog @@ */
/* The magic number of the GNU message catalog format. */
#define _MAGIC 0x950412de
#define _MAGIC_SWAPPED 0xde120495
/* Revision number of the currently used .mo (binary) file format. */
#define MO_REVISION_NUMBER 0
/* The following contortions are an attempt to use the C preprocessor
to determine an unsigned integral type that is 32 bits wide. An
alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
doing that would require that the configure script compile and *run*
the resulting executable. Locally running cross-compiled executables
is usually not possible. */
#if __STDC__
# define UINT_MAX_32_BITS 4294967295U
#else
# define UINT_MAX_32_BITS 0xFFFFFFFF
#endif
/* If UINT_MAX isn't defined, assume it's a 32-bit type.
This should be valid for all systems GNU cares about because
that doesn't include 16-bit systems, and only modern systems
(that certainly have <limits.h>) have 64+-bit integral types. */
#ifndef UINT_MAX
# define UINT_MAX UINT_MAX_32_BITS
#endif
#if UINT_MAX == UINT_MAX_32_BITS
typedef unsigned nls_uint32;
#else
# if USHRT_MAX == UINT_MAX_32_BITS
typedef unsigned short nls_uint32;
# else
# if ULONG_MAX == UINT_MAX_32_BITS
typedef unsigned long nls_uint32;
# else
/* The following line is intended to throw an error. Using #error is
not portable enough. */
"Cannot determine unsigned 32-bit data type."
# endif
# endif
#endif
/* Header for binary .mo file format. */
struct mo_file_header
{
/* The magic number. */
nls_uint32 magic;
/* The revision number of the file format. */
nls_uint32 revision;
/* The number of strings pairs. */
nls_uint32 nstrings;
/* Offset of table with start offsets of original strings. */
nls_uint32 orig_tab_offset;
/* Offset of table with start offsets of translation strings. */
nls_uint32 trans_tab_offset;
/* Size of hashing table. */
nls_uint32 hash_tab_size;
/* Offset of first hashing entry. */
nls_uint32 hash_tab_offset;
};
struct string_desc
{
/* Length of addressed string. */
nls_uint32 length;
/* Offset of string in file. */
nls_uint32 offset;
};
/* @@ begin of epilog @@ */
#endif /* gettext.h */

Binary file not shown.

View File

@ -0,0 +1,79 @@
/* gettextP.h -- header describing internals of gettext library
Copyright (C) 1995 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _GETTEXTP_H
#define _GETTEXTP_H
/* @@ end of prolog @@ */
#ifndef __P
# if __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif
#ifndef W
# define W(flag, data) ((flag) ? SWAP (data) : (data))
#endif
static nls_uint32 SWAP __P ((nls_uint32 i));
static inline nls_uint32
SWAP (i)
nls_uint32 i;
{
return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
}
struct loaded_domain
{
struct loaded_domain *next;
struct loaded_domain *successor[31];
const char *filename;
int decided;
const char *data;
int must_swap;
nls_uint32 nstrings;
struct string_desc *orig_tab;
struct string_desc *trans_tab;
nls_uint32 hash_size;
nls_uint32 *hash_tab;
};
struct binding
{
struct binding *next;
char *domainname;
char *dirname;
};
struct loaded_domain *_nl_find_domain __P ((const char *__dirname,
char *__locale,
const char *__domainname));
void _nl_load_domain __P ((struct loaded_domain *__domain));
const char *_nl_expand_alias __P ((const char *__name));
/* @@ begin of epilog @@ */
#endif /* gettextP.h */

View File

@ -0,0 +1,62 @@
/* hash-string - Implements a string hashing function.
Copyright (C) 1995 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. */
#ifdef HAVE_VALUES_H
# include <values.h>
#endif
/* @@ end of prolog @@ */
#ifndef __P
# if __STDC__
# define __P(Args) Args
# else
# define __P(Args) ()
# endif
#endif
/* We assume to have `unsigned long int' value with at least 32 bits. */
#define HASHWORDBITS 32
/* Defines the so called `hashpjw' function by P.J. Weinberger
[see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
1986, 1987 Bell Telephone Laboratories, Inc.] */
static unsigned long hash_string __P ((const char *__str_param));
static inline unsigned long
hash_string (str_param)
const char *str_param;
{
unsigned long int hval, g;
const char *str = str_param;
/* Compute the hash value for the given string. */
hval = 0;
while (*str != '\0')
{
hval <<= 4;
hval += (unsigned long) *str++;
g = hval & ((unsigned long) 0xf << (HASHWORDBITS - 4));
if (g != 0)
{
hval ^= g >> (HASHWORDBITS - 8);
hval ^= g;
}
}
return hval;
}

View File

@ -0,0 +1,76 @@
/* intl-compat.c - Stub functions to call gettext functions from GNU gettext
Library.
Copyright (C) 1995 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. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "libgettext.h"
/* @@ end of prolog @@ */
#undef gettext
#undef dgettext
#undef dcgettext
#undef textdomain
#undef bindtextdomain
char *
bindtextdomain (domainname, dirname)
const char *domainname;
const char *dirname;
{
return bindtextdomain__ (domainname, dirname);
}
char *
dcgettext (domainname, msgid, category)
const char *domainname;
const char *msgid;
int category;
{
return dcgettext__ (domainname, msgid, category);
}
char *
dgettext (domainname, msgid)
const char *domainname;
const char *msgid;
{
return dgettext__ (domainname, msgid);
}
char *
gettext (msgid)
const char *msgid;
{
return gettext__ (msgid);
}
char *
textdomain (domainname)
const char *domainname;
{
return textdomain__ (domainname);
}

Binary file not shown.

View File

@ -0,0 +1,177 @@
/* libgettext.h -- Message catalogs for internationalization.
Copyright (C) 1995 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. */
/* Because on some systems (e.g. Solaris) we sometimes have to include
the systems libintl.h as well as this file we have more complex
include protection above. But the systems header might perhaps also
define _LIBINTL_H and therefore we have to protect the definition here. */
#if !defined (_LIBINTL_H) || !defined (_LIBGETTEXT_H)
#if !_LIBINTL_H
# define _LIBINTL_H 1
#endif
#define _LIBGETTEXT_H 1
/* We define an additional symbol to signal that we use the GNU
implementation of gettext. */
#define __USE_GNU_GETTEXT 1
#include <sys/types.h>
#if HAVE_LOCALE_H
# include <locale.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* @@ end of prolog @@ */
#ifndef __P
# if __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif
#ifndef NULL
# if !defined __cplusplus || defined __GNUC__
# define NULL ((void *) 0)
# else
# define NULL (0)
# endif
#endif
#if !HAVE_LC_MESSAGES
/* This value determines the behaviour of the gettext() and dgettext()
function. But some system does not have this defined. Define it
to a default value. */
# define LC_MESSAGES (-1)
#endif
/* Declarations for gettext-using-catgets interface. Derived from
Jim Meyering's libintl.h. */
struct _msg_ent
{
const char *_msg;
int _msg_number;
};
#if HAVE_CATGETS
/* These two variables are defined in the automatically by po-to-tbl.sed
generated file `cat-id-tbl.c'. */
extern const struct _msg_ent _msg_tbl[];
extern int _msg_tbl_length;
#endif
/* For automatical extraction of messages sometimes no real
translation is needed. Instead the string itself is the result. */
#define gettext_noop(Str) (Str)
/* Look up MSGID in the current default message catalog for the current
LC_MESSAGES locale. If not found, returns MSGID itself (the default
text). */
extern char *gettext __P ((const char *__msgid));
extern char *gettext__ __P ((const char *__msgid));
/* Look up MSGID in the DOMAINNAME message catalog for the current
LC_MESSAGES locale. */
extern char *dgettext __P ((const char *__domainname, const char *__msgid));
extern char *dgettext__ __P ((const char *__domainname, const char *__msgid));
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
locale. */
extern char *dcgettext __P ((const char *__domainname, const char *__msgid,
int __category));
extern char *dcgettext__ __P ((const char *__domainname, const char *__msgid,
int __category));
/* Set the current default message catalog to DOMAINNAME.
If DOMAINNAME is null, return the current default.
If DOMAINNAME is "", reset to the default of "messages". */
extern char *textdomain __P ((const char *__domainname));
extern char *textdomain__ __P ((const char *__domainname));
/* Specify that the DOMAINNAME message catalog will be found
in DIRNAME rather than in the system locale data base. */
extern char *bindtextdomain __P ((const char *__domainname,
const char *__dirname));
extern char *bindtextdomain__ __P ((const char *__domainname,
const char *__dirname));
#if ENABLE_NLS
/* Solaris 2.3 has the gettext function but dcgettext is missing.
So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4
has dcgettext. */
# if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT)
# define gettext(Msgid) \
dgettext (NULL, Msgid)
# define dgettext(Domainname, Msgid) \
dcgettext (Domainname, Msgid, LC_MESSAGES)
# if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7
# define dcgettext(Domainname, Msgid, Category) \
(__extension__ \
({ \
char *result; \
if (__builtin_constant_p (Msgid)) \
{ \
extern int _nl_msg_cat_cntr; \
static char *__translation__; \
static int __catalog_counter__; \
if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \
{ \
__translation__ = \
dcgettext__ ((Domainname), (Msgid), (Category)); \
__catalog_counter__ = _nl_msg_cat_cntr; \
} \
result = __translation__; \
} \
else \
result = dcgettext__ ((Domainname), (Msgid), (Category)); \
result; \
}))
# endif
# endif
#else
# define gettext(Msgid) (Msgid)
# define dgettext(Domainname, Msgid) (Msgid)
# define dcgettext(Domainname, Msgid, Category) (Msgid)
# define textdomain(Domainname) while (0) /* nothing */
# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
#endif
/* @@ begin of epilog @@ */
#ifdef __cplusplus
}
#endif
#endif

Binary file not shown.

View File

@ -0,0 +1,177 @@
/* libgettext.h -- Message catalogs for internationalization.
Copyright (C) 1995 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. */
/* Because on some systems (e.g. Solaris) we sometimes have to include
the systems libintl.h as well as this file we have more complex
include protection above. But the systems header might perhaps also
define _LIBINTL_H and therefore we have to protect the definition here. */
#if !defined (_LIBINTL_H) || !defined (_LIBGETTEXT_H)
#if !_LIBINTL_H
# define _LIBINTL_H 1
#endif
#define _LIBGETTEXT_H 1
/* We define an additional symbol to signal that we use the GNU
implementation of gettext. */
#define __USE_GNU_GETTEXT 1
#include <sys/types.h>
#if HAVE_LOCALE_H
# include <locale.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* @@ end of prolog @@ */
#ifndef __P
# if __STDC__
# define __P(args) args
# else
# define __P(args) ()
# endif
#endif
#ifndef NULL
# if !defined __cplusplus || defined __GNUC__
# define NULL ((void *) 0)
# else
# define NULL (0)
# endif
#endif
#if !HAVE_LC_MESSAGES
/* This value determines the behaviour of the gettext() and dgettext()
function. But some system does not have this defined. Define it
to a default value. */
# define LC_MESSAGES (-1)
#endif
/* Declarations for gettext-using-catgets interface. Derived from
Jim Meyering's libintl.h. */
struct _msg_ent
{
const char *_msg;
int _msg_number;
};
#if HAVE_CATGETS
/* These two variables are defined in the automatically by po-to-tbl.sed
generated file `cat-id-tbl.c'. */
extern const struct _msg_ent _msg_tbl[];
extern int _msg_tbl_length;
#endif
/* For automatical extraction of messages sometimes no real
translation is needed. Instead the string itself is the result. */
#define gettext_noop(Str) (Str)
/* Look up MSGID in the current default message catalog for the current
LC_MESSAGES locale. If not found, returns MSGID itself (the default
text). */
extern char *gettext __P ((const char *__msgid));
extern char *gettext__ __P ((const char *__msgid));
/* Look up MSGID in the DOMAINNAME message catalog for the current
LC_MESSAGES locale. */
extern char *dgettext __P ((const char *__domainname, const char *__msgid));
extern char *dgettext__ __P ((const char *__domainname, const char *__msgid));
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
locale. */
extern char *dcgettext __P ((const char *__domainname, const char *__msgid,
int __category));
extern char *dcgettext__ __P ((const char *__domainname, const char *__msgid,
int __category));
/* Set the current default message catalog to DOMAINNAME.
If DOMAINNAME is null, return the current default.
If DOMAINNAME is "", reset to the default of "messages". */
extern char *textdomain __P ((const char *__domainname));
extern char *textdomain__ __P ((const char *__domainname));
/* Specify that the DOMAINNAME message catalog will be found
in DIRNAME rather than in the system locale data base. */
extern char *bindtextdomain __P ((const char *__domainname,
const char *__dirname));
extern char *bindtextdomain__ __P ((const char *__domainname,
const char *__dirname));
#if ENABLE_NLS
/* Solaris 2.3 has the gettext function but dcgettext is missing.
So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4
has dcgettext. */
# if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT)
# define gettext(Msgid) \
dgettext (NULL, Msgid)
# define dgettext(Domainname, Msgid) \
dcgettext (Domainname, Msgid, LC_MESSAGES)
# if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7
# define dcgettext(Domainname, Msgid, Category) \
(__extension__ \
({ \
char *result; \
if (__builtin_constant_p (Msgid)) \
{ \
extern int _nl_msg_cat_cntr; \
static char *__translation__; \
static int __catalog_counter__; \
if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \
{ \
__translation__ = \
dcgettext__ ((Domainname), (Msgid), (Category)); \
__catalog_counter__ = _nl_msg_cat_cntr; \
} \
result = __translation__; \
} \
else \
result = dcgettext__ ((Domainname), (Msgid), (Category)); \
result; \
}))
# endif
# endif
#else
# define gettext(Msgid) (Msgid)
# define dgettext(Domainname, Msgid) (Msgid)
# define dcgettext(Domainname, Msgid, Category) (Msgid)
# define textdomain(Domainname) while (0) /* nothing */
# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
#endif
/* @@ begin of epilog @@ */
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,100 @@
# po2msg.sed - Convert Uniforum style .po file to Linux style .msg file
# Copyright (C) 1995 Free Software Foundation, Inc.
# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
#
# 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.
#
#
# The first directive in the .msg should be the definition of the
# message set number. We use always set number 1.
#
1 {
i\
$set 1 # Automatically created by po2msg.sed
h
s/.*/0/
x
}
#
# Mitch's old catalog format does not allow comments.
#
# We copy the original message as a comment into the .msg file.
#
/^msgid/ {
s/msgid[ ]*"//
#
# This does not work now with the new format.
# /"$/! {
# s/\\$//
# s/$/ ... (more lines following)"/
# }
x
# The following nice solution is by
# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
td
# Increment a decimal number in pattern space.
# First hide trailing `9' digits.
:d
s/9\(_*\)$/_\1/
td
# Assure at least one digit is available.
s/^\(_*\)$/0\1/
# Increment the last digit.
s/8\(_*\)$/9\1/
s/7\(_*\)$/8\1/
s/6\(_*\)$/7\1/
s/5\(_*\)$/6\1/
s/4\(_*\)$/5\1/
s/3\(_*\)$/4\1/
s/2\(_*\)$/3\1/
s/1\(_*\)$/2\1/
s/0\(_*\)$/1\1/
# Convert the hidden `9' digits to `0's.
s/_/0/g
x
G
s/\(.*\)"\n\([0-9]*\)/$ #\2 Original Message:(\1)/p
}
#
# The .msg file contains, other then the .po file, only the translations
# but each given a unique ID. Starting from 1 and incrementing by 1 for
# each message we assign them to the messages.
# It is important that the .po file used to generate the cat-id-tbl.c file
# (with po-to-tbl) is the same as the one used here. (At least the order
# of declarations must not be changed.)
#
/^msgstr/ {
s/msgstr[ ]*"\(.*\)"/# \1/
# Clear substitution flag.
tb
# Append the next line.
:b
N
# Look whether second part is continuation line.
s/\(.*\n\)"\(.*\)"/\1\2/
# Yes, then branch.
ta
P
D
# Note that D includes a jump to the start!!
# We found a continuation line. But before printing insert '\'.
:a
s/\(.*\)\(\n.*\)/\1\\\2/
P
# We cannot use D here.
s/.*\n\(.*\)/\1/
tb
}
d

View File

@ -0,0 +1,191 @@
/* loadmsgcat.c -- load needed message catalogs
Copyright (C) 1995 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. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#if defined STDC_HEADERS || defined _LIBC
# include <stdlib.h>
#endif
#if defined HAVE_UNISTD_H || defined _LIBC
# include <unistd.h>
#endif
#if (defined HAVE_MMAP && defined HAVE_MUNMAP) || defined _LIBC
# include <sys/mman.h>
#endif
#include "gettext.h"
#include "gettextP.h"
/* @@ end of prolog @@ */
#ifdef _LIBC
/* Rename the non ANSI C functions. This is required by the standard
because some ANSI C functions will require linking with this object
file and the name space must not be polluted. */
# define fstat __fstat
# define open __open
# define close __close
# define read __read
# define mmap __mmap
# define munmap __munmap
#endif
/* We need a sign, whether a new catalog was loaded, which can be associated
with all translations. This is important if the translations are
cached by one of GCC's features. */
int _nl_msg_cat_cntr;
/* Load the message catalogs specified by FILENAME. If it is no valid
message catalog do nothing. */
void
_nl_load_domain (domain)
struct loaded_domain *domain;
{
int fd;
struct stat st;
struct mo_file_header *data = (struct mo_file_header *) -1;
#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
|| defined _LIBC
int use_mmap = 0;
#endif
domain->decided = 1;
domain->data = NULL;
/* If the record does not represent a valid locale the FILENAME
might be NULL. This can happen when according to the given
specification the locale file name is different for XPG and CEN
syntax. */
if (domain->filename == NULL)
return;
/* Try to open the addressed file. */
fd = open (domain->filename, O_RDONLY);
if (fd == -1)
return;
/* We must know about the size of the file. */
if (fstat (fd, &st) != 0
&& st.st_size < (off_t) sizeof (struct mo_file_header))
{
/* Something went wrong. */
close (fd);
return;
}
#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
|| defined _LIBC
/* Now we are ready to load the file. If mmap() is available we try
this first. If not available or it failed we try to load it. */
data = (struct mo_file_header *) mmap (NULL, st.st_size, PROT_READ,
MAP_PRIVATE, fd, 0);
if (data != (struct mo_file_header *) -1)
{
/* mmap() call was successful. */
close (fd);
use_mmap = 1;
}
#endif
/* If the data is not yet available (i.e. mmap'ed) we try to load
it manually. */
if (data == (struct mo_file_header *) -1)
{
off_t to_read;
char *read_ptr;
data = (struct mo_file_header *) malloc (st.st_size);
if (data == NULL)
return;
to_read = st.st_size;
read_ptr = (char *) data;
do
{
long int nb = (long int) read (fd, read_ptr, to_read);
if (nb == -1)
{
close (fd);
return;
}
read_ptr += nb;
to_read -= nb;
}
while (to_read > 0);
close (fd);
}
/* Using the magic number we can test whether it really is a message
catalog file. */
if (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED)
{
/* The magic number is wrong: not a message catalog file. */
#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
|| defined _LIBC
if (use_mmap)
munmap ((caddr_t) data, st.st_size);
else
#endif
free (data);
return;
}
domain->data = (char *) data;
domain->must_swap = data->magic != _MAGIC;
/* Fill in the information about the available tables. */
switch (W (domain->must_swap, data->revision))
{
case 0:
domain->nstrings = W (domain->must_swap, data->nstrings);
domain->orig_tab = (struct string_desc *)
((char *) data + W (domain->must_swap, data->orig_tab_offset));
domain->trans_tab = (struct string_desc *)
((char *) data + W (domain->must_swap, data->trans_tab_offset));
domain->hash_size = W (domain->must_swap, data->hash_tab_size);
domain->hash_tab = (nls_uint32 *)
((char *) data + W (domain->must_swap, data->hash_tab_offset));
break;
default:
/* This is an illegal revision. */
#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
|| defined _LIBC
if (use_mmap)
munmap ((caddr_t) data, st.st_size);
else
#endif
free (data);
domain->data = NULL;
return;
}
/* Show that one domain is changed. This might make some cached
translation invalid. */
++_nl_msg_cat_cntr;
}

Binary file not shown.

View File

@ -0,0 +1,317 @@
/* localealias.c -- handle aliases for locale names
Copyright (C) 1995 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. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <ctype.h>
#include <stdio.h>
#include <sys/types.h>
#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# if defined HAVE_ALLOCA_H || defined _LIBC
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca
char *alloca ();
# endif
# endif
# endif
#endif
#if defined STDC_HEADERS || defined _LIBC
# include <stdlib.h>
#else
char *getenv ();
# ifdef HAVE_MALLOC_H
# include <malloc.h>
# else
void free ();
# endif
#endif
#if defined HAVE_STRING_H || defined _LIBC
# include <string.h>
#else
# include <strings.h>
#endif
#if !HAVE_STRCHR && !defined _LIBC
# ifndef strchr
# define strchr index
# endif
#endif
#include "gettext.h"
#include "gettextP.h"
/* @@ end of prolog @@ */
#ifdef _LIBC
/* Rename the non ANSI C functions. This is required by the standard
because some ANSI C functions will require linking with this object
file and the name space must not be polluted. */
# define strcasecmp __strcasecmp
#endif
struct alias_map
{
const char *alias;
const char *value;
};
static struct alias_map *map;
static size_t nmap = 0;
static size_t maxmap = 0;
/* Prototypes for local functions. */
static size_t read_alias_file __P ((const char *fname, int fname_len));
static void extend_alias_table __P ((void));
static int alias_compare __P ((const struct alias_map *map1,
const struct alias_map *map2));
const char *
_nl_expand_alias (name)
const char *name;
{
static const char *locale_alias_path = LOCALE_ALIAS_PATH;
struct alias_map *retval;
size_t added;
do
{
struct alias_map item;
item.alias = name;
if (nmap > 0)
retval = (struct alias_map *) bsearch (&item, map, nmap,
sizeof (struct alias_map),
(int (*) __P ((const void *,
const void *)))
alias_compare);
else
retval = NULL;
/* We really found an alias. Return the value. */
if (retval != NULL)
return retval->value;
/* Perhaps we can find another alias file. */
added = 0;
while (added == 0 && locale_alias_path[0] != '\0')
{
const char *start;
while (locale_alias_path[0] == ':')
++locale_alias_path;
start = locale_alias_path;
while (locale_alias_path[0] != '\0' && locale_alias_path[0] != ':')
++locale_alias_path;
if (start < locale_alias_path)
added = read_alias_file (start, locale_alias_path - start);
}
}
while (added != 0);
return NULL;
}
static size_t
read_alias_file (fname, fname_len)
const char *fname;
int fname_len;
{
FILE *fp;
char *full_fname;
size_t added;
static const char aliasfile[] = "/locale.alias";
full_fname = (char *) alloca (fname_len + sizeof aliasfile);
memcpy (full_fname, fname, fname_len);
memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
fp = fopen (full_fname, "r");
if (fp == NULL)
return 0;
added = 0;
while (!feof (fp))
{
/* It is a reasonable approach to use a fix buffer here because
a) we are only interested in the first two fields
b) these fields must be usable as file names and so must not
be that long
*/
char buf[BUFSIZ];
char *alias;
char *value;
char *cp;
if (fgets (buf, BUFSIZ, fp) == NULL)
/* EOF reached. */
break;
cp = buf;
/* Ignore leading white space. */
while (isspace (cp[0]))
++cp;
/* A leading '#' signals a comment line. */
if (cp[0] != '\0' && cp[0] != '#')
{
alias = cp++;
while (cp[0] != '\0' && !isspace (cp[0]))
++cp;
/* Terminate alias name. */
if (cp[0] != '\0')
*cp++ = '\0';
/* Now look for the beginning of the value. */
while (isspace (cp[0]))
++cp;
if (cp[0] != '\0')
{
char *tp;
size_t len;
value = cp++;
while (cp[0] != '\0' && !isspace (cp[0]))
++cp;
/* Terminate value. */
if (cp[0] == '\n')
{
/* This has to be done to make the following test
for the end of line possible. We are looking for
the terminating '\n' which do not overwrite here. */
*cp++ = '\0';
*cp = '\n';
}
else if (cp[0] != '\0')
*cp++ = '\0';
if (nmap >= maxmap)
extend_alias_table ();
/* We cannot depend on strdup available in the libc. Sigh! */
len = strlen (alias) + 1;
tp = (char *) malloc (len);
if (tp == NULL)
return added;
memcpy (tp, alias, len);
map[nmap].alias = tp;
len = strlen (value) + 1;
tp = (char *) malloc (len);
if (tp == NULL)
return added;
memcpy (tp, value, len);
map[nmap].value = tp;
++nmap;
++added;
}
}
/* Possibily not the whole line fitted into the buffer. Ignore
the rest of the line. */
while (strchr (cp, '\n') == NULL)
{
cp = buf;
if (fgets (buf, BUFSIZ, fp) == NULL)
/* Make sure the inner loop will be left. The outer loop
will exit at the `feof' test. */
*cp = '\n';
}
}
/* Should we test for ferror()? I think we have to silently ignore
errors. --drepper */
fclose (fp);
if (added > 0)
qsort (map, nmap, sizeof (struct alias_map),
(int (*) __P ((const void *, const void *))) alias_compare);
return added;
}
static void
extend_alias_table ()
{
size_t new_size;
struct alias_map *new_map;
new_size = maxmap == 0 ? 100 : 2 * maxmap;
new_map = (struct alias_map *) malloc (new_size
* sizeof (struct alias_map));
if (new_map == NULL)
/* Simply don't extend: we don't have any more core. */
return;
memcpy (new_map, map, nmap * sizeof (struct alias_map));
if (maxmap != 0)
free (map);
map = new_map;
maxmap = new_size;
}
static int
alias_compare (map1, map2)
const struct alias_map *map1;
const struct alias_map *map2;
{
#if defined _LIBC || defined HAVE_STRCASECMP
return strcasecmp (map1->alias, map2->alias);
#else
const unsigned char *p1 = (const unsigned char *) map1->alias;
const unsigned char *p2 = (const unsigned char *) map2->alias;
unsigned char c1, c2;
if (p1 == p2)
return 0;
do
{
/* I know this seems to be odd but the tolower() function in
some systems libc cannot handle nonalpha characters. */
c1 = isupper (*p1) ? tolower (*p1) : *p1;
c2 = isupper (*p2) ? tolower (*p2) : *p2;
if (c1 == '\0')
break;
}
while (c1 == c2);
return c1 - c2;
#endif
}

Binary file not shown.

View File

@ -0,0 +1,102 @@
# po2tbl.sed - Convert Uniforum style .po file to lookup table for catgets
# Copyright (C) 1995 Free Software Foundation, Inc.
# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
#
# 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.
#
1 {
i\
/* Automatically generated by po2tbl.sed from @PACKAGE NAME@.pot. */\
\
#if HAVE_CONFIG_H\
# include <config.h>\
#endif\
\
#include "libgettext.h"\
\
const struct _msg_ent _msg_tbl[] = {
h
s/.*/0/
x
}
#
# Write msgid entries in C array form.
#
/^msgid/ {
s/msgid[ ]*\(".*"\)/ {\1/
tb
# Append the next line
:b
N
# Look whether second part is continuation line.
s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/
# Yes, then branch.
ta
# Because we assume that the input file correctly formed the line
# just read cannot be again be a msgid line. So it's safe to ignore
# it.
s/\(.*\)\n.*/\1/
bc
# We found a continuation line. But before printing insert '\'.
:a
s/\(.*\)\(\n.*\)/\1\\\2/
P
# We cannot use D here.
s/.*\n\(.*\)/\1/
# Some buggy seds do not clear the `successful substitution since last ``t'''
# flag on `N', so we do a `t' here to clear it.
tb
# Not reached
:c
x
# The following nice solution is by
# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
td
# Increment a decimal number in pattern space.
# First hide trailing `9' digits.
:d
s/9\(_*\)$/_\1/
td
# Assure at least one digit is available.
s/^\(_*\)$/0\1/
# Increment the last digit.
s/8\(_*\)$/9\1/
s/7\(_*\)$/8\1/
s/6\(_*\)$/7\1/
s/5\(_*\)$/6\1/
s/4\(_*\)$/5\1/
s/3\(_*\)$/4\1/
s/2\(_*\)$/3\1/
s/1\(_*\)$/2\1/
s/0\(_*\)$/1\1/
# Convert the hidden `9' digits to `0's.
s/_/0/g
x
G
s/\(.*\)\n\([0-9]*\)/\1, \2},/
s/\(.*\)"$/\1/
p
}
#
# Last line.
#
$ {
i\
};\
g
s/0*\(.*\)/int _msg_tbl_length = \1;/p
}
d

View File

@ -0,0 +1,102 @@
# po2tbl.sed - Convert Uniforum style .po file to lookup table for catgets
# Copyright (C) 1995 Free Software Foundation, Inc.
# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
#
# 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.
#
1 {
i\
/* Automatically generated by po2tbl.sed from @PACKAGE NAME@.pot. */\
\
#if HAVE_CONFIG_H\
# include <config.h>\
#endif\
\
#include "libgettext.h"\
\
const struct _msg_ent _msg_tbl[] = {
h
s/.*/0/
x
}
#
# Write msgid entries in C array form.
#
/^msgid/ {
s/msgid[ ]*\(".*"\)/ {\1/
tb
# Append the next line
:b
N
# Look whether second part is continuation line.
s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/
# Yes, then branch.
ta
# Because we assume that the input file correctly formed the line
# just read cannot be again be a msgid line. So it's safe to ignore
# it.
s/\(.*\)\n.*/\1/
bc
# We found a continuation line. But before printing insert '\'.
:a
s/\(.*\)\(\n.*\)/\1\\\2/
P
# We cannot use D here.
s/.*\n\(.*\)/\1/
# Some buggy seds do not clear the `successful substitution since last ``t'''
# flag on `N', so we do a `t' here to clear it.
tb
# Not reached
:c
x
# The following nice solution is by
# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
td
# Increment a decimal number in pattern space.
# First hide trailing `9' digits.
:d
s/9\(_*\)$/_\1/
td
# Assure at least one digit is available.
s/^\(_*\)$/0\1/
# Increment the last digit.
s/8\(_*\)$/9\1/
s/7\(_*\)$/8\1/
s/6\(_*\)$/7\1/
s/5\(_*\)$/6\1/
s/4\(_*\)$/5\1/
s/3\(_*\)$/4\1/
s/2\(_*\)$/3\1/
s/1\(_*\)$/2\1/
s/0\(_*\)$/1\1/
# Convert the hidden `9' digits to `0's.
s/_/0/g
x
G
s/\(.*\)\n\([0-9]*\)/\1, \2},/
s/\(.*\)"$/\1/
p
}
#
# Last line.
#
$ {
i\
};\
g
s/0*\(.*\)/int _msg_tbl_length = \1;/p
}
d

View File

@ -0,0 +1,97 @@
/* textdomain.c -- implementation of the textdomain(3) function
Copyright (C) 1995 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. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#if defined STDC_HEADERS || defined _LIBC
# include <stdlib.h>
#endif
#if defined STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC
# include <string.h>
#else
# include <strings.h>
#endif
#ifdef _LIBC
# include <libintl.h>
#else
# include "libgettext.h"
#endif
/* @@ end of prolog @@ */
/* Name of the default text domain. */
extern const char _nl_default_default_domain[];
/* Default text domain in which entries for gettext(3) are to be found. */
extern const char *_nl_current_default_domain;
/* Names for the libintl functions are a problem. They must not clash
with existing names and they should follow ANSI C. But this source
code is also used in GNU C Library where the names have a __
prefix. So we have to make a difference here. */
#ifdef _LIBC
# define TEXTDOMAIN __textdomain
#else
# define TEXTDOMAIN textdomain__
#endif
/* Set the current default message catalog to DOMAINNAME.
If DOMAINNAME is null, return the current default.
If DOMAINNAME is "", reset to the default of "messages". */
char *
TEXTDOMAIN (domainname)
const char *domainname;
{
char *old;
/* A NULL pointer requests the current setting. */
if (domainname == NULL)
return (char *) _nl_current_default_domain;
old = (char *) _nl_current_default_domain;
/* If domain name is the null string set to default domain "messages". */
if (domainname[0] == '\0'
|| strcmp (domainname, _nl_default_default_domain) == 0)
_nl_current_default_domain = _nl_default_default_domain;
else
{
/* If the following malloc fails `_nl_current_default_domain'
will be NULL. This value will be returned and so signals we
are out of core. */
size_t len = strlen (domainname) + 1;
char *cp = (char *) malloc (len);
if (cp != NULL)
memcpy (cp, domainname, len);
_nl_current_default_domain = cp;
}
if (old != _nl_default_default_domain)
free (old);
return (char *) _nl_current_default_domain;
}
#ifdef _LIBC
/* Alias for function name in GNU C Library. */
weak_alias (__textdomain, textdomain);
#endif

Binary file not shown.

View File

@ -0,0 +1,104 @@
# po2msg.sed - Convert Uniforum style .po file to X/Open style .msg file
# Copyright (C) 1995 Free Software Foundation, Inc.
# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
#
# 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.
#
#
# The first directive in the .msg should be the definition of the
# message set number. We use always set number 1.
#
1 {
i\
$set 1 # Automatically created by po2msg.sed
h
s/.*/0/
x
}
#
# We copy all comments into the .msg file. Perhaps they can help.
#
/^#/ s/^#[ ]*/$ /p
#
# We copy the original message as a comment into the .msg file.
#
/^msgid/ {
# Does not work now
# /"$/! {
# s/\\$//
# s/$/ ... (more lines following)"/
# }
s/^msgid[ ]*"\(.*\)"$/$ Original Message: \1/
p
}
#
# The .msg file contains, other then the .po file, only the translations
# but each given a unique ID. Starting from 1 and incrementing by 1 for
# each message we assign them to the messages.
# It is important that the .po file used to generate the cat-id-tbl.c file
# (with po-to-tbl) is the same as the one used here. (At least the order
# of declarations must not be changed.)
#
/^msgstr/ {
s/msgstr[ ]*"\(.*\)"/\1/
x
# The following nice solution is by
# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
td
# Increment a decimal number in pattern space.
# First hide trailing `9' digits.
:d
s/9\(_*\)$/_\1/
td
# Assure at least one digit is available.
s/^\(_*\)$/0\1/
# Increment the last digit.
s/8\(_*\)$/9\1/
s/7\(_*\)$/8\1/
s/6\(_*\)$/7\1/
s/5\(_*\)$/6\1/
s/4\(_*\)$/5\1/
s/3\(_*\)$/4\1/
s/2\(_*\)$/3\1/
s/1\(_*\)$/2\1/
s/0\(_*\)$/1\1/
# Convert the hidden `9' digits to `0's.
s/_/0/g
x
# Bring the line in the format `<number> <message>'
G
s/^[^\n]*$/& /
s/\(.*\)\n\([0-9]*\)/\2 \1/
# Clear flag from last substitution.
tb
# Append the next line.
:b
N
# Look whether second part is a continuation line.
s/\(.*\n\)"\(.*\)"/\1\2/
# Yes, then branch.
ta
P
D
# Note that `D' includes a jump to the start!!
# We found a continuation line. But before printing insert '\'.
:a
s/\(.*\)\(\n.*\)/\1\\\2/
P
# We cannot use the sed command `D' here
s/.*\n\(.*\)/\1/
tb
}
d

View File

@ -0,0 +1,54 @@
Tue Nov 21 16:28:58 1995 Ulrich Drepper <drepper@myware>
* system.h: Add prototype for stpcpy.
Thu Nov 16 20:52:11 1995 Ulrich Drepper <drepper@myware>
* whoami.c (get_hostname): Prefer HAVE_UNAME before
HAVE_ETC_SYSTEMID. Seems not to work on DGUX systems. Hope this
does not break anything else. Reported by Roderick Schertler.
Sun Nov 5 20:24:38 1995 Ulrich Drepper <drepper@myware>
* system.h: Rename _N to N_.
Sun Nov 5 13:33:16 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (dist): Suppress error message when ln failed.
* system.h:
Rename macro _C to _N and use gettext_noop instead of gettext_const.
Fri Nov 3 00:41:01 1995 Ulrich Drepper <drepper@myware>
* system.h (_GTM): Remove macro.
(_C): Define according to gettext-0.9.7. Use gettext_const.
Tue Oct 31 01:25:13 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (LINK, LDFLAGS, ANSI2KNR): Remove unused variables.
(ALLOCA, ALLOCA_SRC): Define variables and use in SOURCES and OBJECTS.
Sat Sep 23 13:10:39 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (HEADERS): Add md5.h.
(SOURCES): Add md5.c.
(OBJECTS): Add md5.o.
Tue Aug 15 16:48:38 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (dist): Remove `copying instead' message.
Thu Aug 10 22:40:31 1995 Ulrich Drepper <drepper@myware>
* Makefile.in (SOURCES): Add stpcpy.c.
Reported by Franc,ois Pinard.
* system.h (_GTM): Add definition.
Tue Aug 1 18:33:24 1995 Ulrich Drepper <drepper@myware>
* Makefile.in: New file.
* Sharutils is now not any more a flat directory structure.

View File

@ -0,0 +1,21 @@
SubDir OBOS_TOP src apps bin sharutils-4.2.1 lib ;
SubDirCcFlags += -DHAVE_CONFIG_H ;
StaticLibrary sharutils :
alloca.c
basename.c
error.c
getopt.c
getopt1.c
md5.c
memset.c
mktime.c
stpcpy.c
strftime.c
whoami.c
xgetcwd.c
xmalloc.c
xstrdup.c
: STATIC_LIBRARY_DIR
;

View File

@ -0,0 +1,118 @@
# Generated automatically from Makefile.in by configure.
# Makefile for the support library subdirectory of the GNU Shar Utilities
# Copyright (C) 1995 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.
PACKAGE = sharutils
VERSION = 4.2.1
SHELL = /bin/sh
srcdir = .
top_srcdir = ..
subdir = lib
AR = ar
CC = gcc
RANLIB = ranlib
DEFS = -DHAVE_CONFIG_H
CFLAGS = -g -O
CPPFLAGS =
LIBS = libshar.a
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
# If your system doesn't have alloca, or the one provided is bad, define this.
ALLOCA =
ALLOCA_SRC = alloca.c
# If your systems has the GNU getopt functions available you may comment
# out the following line.
GETOPT = getopt.o getopt1.o
GETOPTSRC = getopt.c getopt1.c
HEADERS = getopt.h md5.h pathmax.h system.h
SOURCES = $(ALLOCA_SRC) basename.c error.c $(GETOPTSRC) md5.c memset.c \
mktime.c stpcpy.c strftime.c whoami.c xgetcwd.c xmalloc.c xstrdup.c
OBJECTS = $(ALLOCA) error.o $(GETOPT) md5.o xgetcwd.o xmalloc.o xstrdup.o \
whoami.o basename.o
DISTFILES = ChangeLog Makefile.in $(HEADERS) $(SOURCES)
.SUFFIXES:
.SUFFIXES: .c .o
.c.o:
$(COMPILE) $<
INCLUDES = -I$(srcdir) -I.. -I../intl -I$(top_srcdir)/intl
all: libshar.a $(ANSI2KNR)
libshar.a: $(OBJECTS)
rm -f libshar.a
$(AR) cru libshar.a $(OBJECTS)
$(RANLIB) libshar.a
ansi2knr: ansi2knr.o
$(LINK) ansi2knr.o $(LIBS)
install install-exec install-data: all
uninstall:
check: all
$(OBJECTS): ../config.h
error.o getopt.o xmalloc.o: ../intl/libgettext.h
getopt.o: getopt.h
tags: TAGS
TAGS: $(HEADERS) $(SOURCES)
here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
id: ID
ID: $(HEADERS) $(SOURCES)
here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
mostlyclean:
rm -f *.a *.o core core.*
clean: mostlyclean
distclean: clean
rm -f Makefile ID TAGS ansi2knr
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist: Makefile $(DISTFILES)
for file in $(DISTFILES); do \
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir); \
done
Makefile: $(srcdir)/Makefile.in ../config.status
cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,118 @@
# Makefile for the support library subdirectory of the GNU Shar Utilities
# Copyright (C) 1995 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.
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
subdir = lib
AR = ar
CC = @CC@
RANLIB = @RANLIB@
DEFS = @DEFS@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
LIBS = libshar.a
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
# If your system doesn't have alloca, or the one provided is bad, define this.
ALLOCA = @ALLOCA@
ALLOCA_SRC = alloca.c
# If your systems has the GNU getopt functions available you may comment
# out the following line.
GETOPT = getopt.o getopt1.o
GETOPTSRC = getopt.c getopt1.c
HEADERS = getopt.h md5.h pathmax.h system.h
SOURCES = $(ALLOCA_SRC) basename.c error.c $(GETOPTSRC) md5.c memset.c \
mktime.c stpcpy.c strftime.c whoami.c xgetcwd.c xmalloc.c xstrdup.c
OBJECTS = $(ALLOCA) error.o $(GETOPT) md5.o xgetcwd.o xmalloc.o xstrdup.o \
whoami.o @LIBOBJS@
DISTFILES = ChangeLog Makefile.in $(HEADERS) $(SOURCES)
.SUFFIXES:
.SUFFIXES: .c .o
.c.o:
$(COMPILE) $<
INCLUDES = -I$(srcdir) -I.. -I../intl -I$(top_srcdir)/intl
all: libshar.a $(ANSI2KNR)
libshar.a: $(OBJECTS)
rm -f libshar.a
$(AR) cru libshar.a $(OBJECTS)
$(RANLIB) libshar.a
ansi2knr: ansi2knr.o
$(LINK) ansi2knr.o $(LIBS)
install install-exec install-data: all
uninstall:
check: all
$(OBJECTS): ../config.h
error.o getopt.o xmalloc.o: ../intl/libgettext.h
getopt.o: getopt.h
tags: TAGS
TAGS: $(HEADERS) $(SOURCES)
here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
id: ID
ID: $(HEADERS) $(SOURCES)
here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
mostlyclean:
rm -f *.a *.o core core.*
clean: mostlyclean
distclean: clean
rm -f Makefile ID TAGS ansi2knr
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist: Makefile $(DISTFILES)
for file in $(DISTFILES); do \
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir); \
done
Makefile: $(srcdir)/Makefile.in ../config.status
cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,492 @@
/* alloca.c -- allocate automatically reclaimed memory
(Mostly) portable public-domain implementation -- D A Gwyn
This implementation of the PWB library alloca function,
which is used to allocate space off the run-time stack so
that it is automatically reclaimed upon procedure exit,
was inspired by discussions with J. Q. Johnson of Cornell.
J.Otto Tennant <jot@cray.com> contributed the Cray support.
There are some preprocessor constants that can
be defined when compiling for your specific system, for
improved efficiency; however, the defaults should be okay.
The general concept of this implementation is to keep
track of all alloca-allocated blocks, and reclaim any
that are found to be deeper in the stack than the current
invocation. This heuristic does not reclaim storage as
soon as it becomes invalid, but it will do so eventually.
As a special case, alloca(0) reclaims storage without
allocating any. It is a good idea to use alloca(0) in
your main control loop, etc. to force garbage collection. */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifdef emacs
#include "blockinput.h"
#endif
/* If compiling with GCC 2, this file's not needed. */
#if !defined (__GNUC__) || __GNUC__ < 2
/* If someone has defined alloca as a macro,
there must be some other way alloca is supposed to work. */
#ifndef alloca
#ifdef emacs
#ifdef static
/* actually, only want this if static is defined as ""
-- this is for usg, in which emacs must undefine static
in order to make unexec workable
*/
#ifndef STACK_DIRECTION
you
lose
-- must know STACK_DIRECTION at compile-time
#endif /* STACK_DIRECTION undefined */
#endif /* static */
#endif /* emacs */
/* If your stack is a linked list of frames, you have to
provide an "address metric" ADDRESS_FUNCTION macro. */
#if defined (CRAY) && defined (CRAY_STACKSEG_END)
long i00afunc ();
#define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
#else
#define ADDRESS_FUNCTION(arg) &(arg)
#endif
#if __STDC__
typedef void *pointer;
#else
typedef char *pointer;
#endif
#define NULL 0
/* Different portions of Emacs need to call different versions of
malloc. The Emacs executable needs alloca to call xmalloc, because
ordinary malloc isn't protected from input signals. On the other
hand, the utilities in lib-src need alloca to call malloc; some of
them are very simple, and don't have an xmalloc routine.
Non-Emacs programs expect this to call use xmalloc.
Callers below should use malloc. */
#ifndef emacs
#define malloc xmalloc
#endif
extern pointer malloc ();
/* Define STACK_DIRECTION if you know the direction of stack
growth for your system; otherwise it will be automatically
deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
#ifndef STACK_DIRECTION
#define STACK_DIRECTION 0 /* Direction unknown. */
#endif
#if STACK_DIRECTION != 0
#define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
#else /* STACK_DIRECTION == 0; need run-time code. */
static int stack_dir; /* 1 or -1 once known. */
#define STACK_DIR stack_dir
static void
find_stack_direction ()
{
static char *addr = NULL; /* Address of first `dummy', once known. */
auto char dummy; /* To get stack address. */
if (addr == NULL)
{ /* Initial entry. */
addr = ADDRESS_FUNCTION (dummy);
find_stack_direction (); /* Recurse once. */
}
else
{
/* Second entry. */
if (ADDRESS_FUNCTION (dummy) > addr)
stack_dir = 1; /* Stack grew upward. */
else
stack_dir = -1; /* Stack grew downward. */
}
}
#endif /* STACK_DIRECTION == 0 */
/* An "alloca header" is used to:
(a) chain together all alloca'ed blocks;
(b) keep track of stack depth.
It is very important that sizeof(header) agree with malloc
alignment chunk size. The following default should work okay. */
#ifndef ALIGN_SIZE
#define ALIGN_SIZE sizeof(double)
#endif
typedef union hdr
{
char align[ALIGN_SIZE]; /* To force sizeof(header). */
struct
{
union hdr *next; /* For chaining headers. */
char *deep; /* For stack depth measure. */
} h;
} header;
static header *last_alloca_header = NULL; /* -> last alloca header. */
/* Return a pointer to at least SIZE bytes of storage,
which will be automatically reclaimed upon exit from
the procedure that called alloca. Originally, this space
was supposed to be taken from the current stack frame of the
caller, but that method cannot be made to work for some
implementations of C, for example under Gould's UTX/32. */
pointer
alloca (size)
unsigned size;
{
auto char probe; /* Probes stack depth: */
register char *depth = ADDRESS_FUNCTION (probe);
#if STACK_DIRECTION == 0
if (STACK_DIR == 0) /* Unknown growth direction. */
find_stack_direction ();
#endif
/* Reclaim garbage, defined as all alloca'd storage that
was allocated from deeper in the stack than currently. */
{
register header *hp; /* Traverses linked list. */
#ifdef emacs
BLOCK_INPUT;
#endif
for (hp = last_alloca_header; hp != NULL;)
if ((STACK_DIR > 0 && hp->h.deep > depth)
|| (STACK_DIR < 0 && hp->h.deep < depth))
{
register header *np = hp->h.next;
free ((pointer) hp); /* Collect garbage. */
hp = np; /* -> next header. */
}
else
break; /* Rest are not deeper. */
last_alloca_header = hp; /* -> last valid storage. */
#ifdef emacs
UNBLOCK_INPUT;
#endif
}
if (size == 0)
return NULL; /* No allocation required. */
/* Allocate combined header + user data storage. */
{
register pointer new = malloc (sizeof (header) + size);
/* Address of header. */
((header *) new)->h.next = last_alloca_header;
((header *) new)->h.deep = depth;
last_alloca_header = (header *) new;
/* User storage begins just after header. */
return (pointer) ((char *) new + sizeof (header));
}
}
#if defined (CRAY) && defined (CRAY_STACKSEG_END)
#ifdef DEBUG_I00AFUNC
#include <stdio.h>
#endif
#ifndef CRAY_STACK
#define CRAY_STACK
#ifndef CRAY2
/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
struct stack_control_header
{
long shgrow:32; /* Number of times stack has grown. */
long shaseg:32; /* Size of increments to stack. */
long shhwm:32; /* High water mark of stack. */
long shsize:32; /* Current size of stack (all segments). */
};
/* The stack segment linkage control information occurs at
the high-address end of a stack segment. (The stack
grows from low addresses to high addresses.) The initial
part of the stack segment linkage control information is
0200 (octal) words. This provides for register storage
for the routine which overflows the stack. */
struct stack_segment_linkage
{
long ss[0200]; /* 0200 overflow words. */
long sssize:32; /* Number of words in this segment. */
long ssbase:32; /* Offset to stack base. */
long:32;
long sspseg:32; /* Offset to linkage control of previous
segment of stack. */
long:32;
long sstcpt:32; /* Pointer to task common address block. */
long sscsnm; /* Private control structure number for
microtasking. */
long ssusr1; /* Reserved for user. */
long ssusr2; /* Reserved for user. */
long sstpid; /* Process ID for pid based multi-tasking. */
long ssgvup; /* Pointer to multitasking thread giveup. */
long sscray[7]; /* Reserved for Cray Research. */
long ssa0;
long ssa1;
long ssa2;
long ssa3;
long ssa4;
long ssa5;
long ssa6;
long ssa7;
long sss0;
long sss1;
long sss2;
long sss3;
long sss4;
long sss5;
long sss6;
long sss7;
};
#else /* CRAY2 */
/* The following structure defines the vector of words
returned by the STKSTAT library routine. */
struct stk_stat
{
long now; /* Current total stack size. */
long maxc; /* Amount of contiguous space which would
be required to satisfy the maximum
stack demand to date. */
long high_water; /* Stack high-water mark. */
long overflows; /* Number of stack overflow ($STKOFEN) calls. */
long hits; /* Number of internal buffer hits. */
long extends; /* Number of block extensions. */
long stko_mallocs; /* Block allocations by $STKOFEN. */
long underflows; /* Number of stack underflow calls ($STKRETN). */
long stko_free; /* Number of deallocations by $STKRETN. */
long stkm_free; /* Number of deallocations by $STKMRET. */
long segments; /* Current number of stack segments. */
long maxs; /* Maximum number of stack segments so far. */
long pad_size; /* Stack pad size. */
long current_address; /* Current stack segment address. */
long current_size; /* Current stack segment size. This
number is actually corrupted by STKSTAT to
include the fifteen word trailer area. */
long initial_address; /* Address of initial segment. */
long initial_size; /* Size of initial segment. */
};
/* The following structure describes the data structure which trails
any stack segment. I think that the description in 'asdef' is
out of date. I only describe the parts that I am sure about. */
struct stk_trailer
{
long this_address; /* Address of this block. */
long this_size; /* Size of this block (does not include
this trailer). */
long unknown2;
long unknown3;
long link; /* Address of trailer block of previous
segment. */
long unknown5;
long unknown6;
long unknown7;
long unknown8;
long unknown9;
long unknown10;
long unknown11;
long unknown12;
long unknown13;
long unknown14;
};
#endif /* CRAY2 */
#endif /* not CRAY_STACK */
#ifdef CRAY2
/* Determine a "stack measure" for an arbitrary ADDRESS.
I doubt that "lint" will like this much. */
static long
i00afunc (long *address)
{
struct stk_stat status;
struct stk_trailer *trailer;
long *block, size;
long result = 0;
/* We want to iterate through all of the segments. The first
step is to get the stack status structure. We could do this
more quickly and more directly, perhaps, by referencing the
$LM00 common block, but I know that this works. */
STKSTAT (&status);
/* Set up the iteration. */
trailer = (struct stk_trailer *) (status.current_address
+ status.current_size
- 15);
/* There must be at least one stack segment. Therefore it is
a fatal error if "trailer" is null. */
if (trailer == 0)
abort ();
/* Discard segments that do not contain our argument address. */
while (trailer != 0)
{
block = (long *) trailer->this_address;
size = trailer->this_size;
if (block == 0 || size == 0)
abort ();
trailer = (struct stk_trailer *) trailer->link;
if ((block <= address) && (address < (block + size)))
break;
}
/* Set the result to the offset in this segment and add the sizes
of all predecessor segments. */
result = address - block;
if (trailer == 0)
{
return result;
}
do
{
if (trailer->this_size <= 0)
abort ();
result += trailer->this_size;
trailer = (struct stk_trailer *) trailer->link;
}
while (trailer != 0);
/* We are done. Note that if you present a bogus address (one
not in any segment), you will get a different number back, formed
from subtracting the address of the first block. This is probably
not what you want. */
return (result);
}
#else /* not CRAY2 */
/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
Determine the number of the cell within the stack,
given the address of the cell. The purpose of this
routine is to linearize, in some sense, stack addresses
for alloca. */
static long
i00afunc (long address)
{
long stkl = 0;
long size, pseg, this_segment, stack;
long result = 0;
struct stack_segment_linkage *ssptr;
/* Register B67 contains the address of the end of the
current stack segment. If you (as a subprogram) store
your registers on the stack and find that you are past
the contents of B67, you have overflowed the segment.
B67 also points to the stack segment linkage control
area, which is what we are really interested in. */
stkl = CRAY_STACKSEG_END ();
ssptr = (struct stack_segment_linkage *) stkl;
/* If one subtracts 'size' from the end of the segment,
one has the address of the first word of the segment.
If this is not the first segment, 'pseg' will be
nonzero. */
pseg = ssptr->sspseg;
size = ssptr->sssize;
this_segment = stkl - size;
/* It is possible that calling this routine itself caused
a stack overflow. Discard stack segments which do not
contain the target address. */
while (!(this_segment <= address && address <= stkl))
{
#ifdef DEBUG_I00AFUNC
fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
#endif
if (pseg == 0)
break;
stkl = stkl - pseg;
ssptr = (struct stack_segment_linkage *) stkl;
size = ssptr->sssize;
pseg = ssptr->sspseg;
this_segment = stkl - size;
}
result = address - this_segment;
/* If you subtract pseg from the current end of the stack,
you get the address of the previous stack segment's end.
This seems a little convoluted to me, but I'll bet you save
a cycle somewhere. */
while (pseg != 0)
{
#ifdef DEBUG_I00AFUNC
fprintf (stderr, "%011o %011o\n", pseg, size);
#endif
stkl = stkl - pseg;
ssptr = (struct stack_segment_linkage *) stkl;
size = ssptr->sssize;
pseg = ssptr->sspseg;
result += size;
}
return (result);
}
#endif /* not CRAY2 */
#endif /* CRAY */
#endif /* no alloca */
#endif /* not GCC version 2 */

View File

@ -0,0 +1,41 @@
/* basename.c -- return the last element in a path
Copyright (C) 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., 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
#include <string.h>
#ifndef rindex
#define rindex strrchr
#endif
#else
#include <strings.h>
#endif
/* Return NAME with any leading path stripped off. */
char *
basename (name)
char *name;
{
char *base;
base = rindex (name, '/');
return base ? base + 1 : name;
}

View File

@ -0,0 +1,220 @@
/* config.h. Generated automatically by configure. */
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* Define if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
#ifndef _ALL_SOURCE
/* #undef _ALL_SOURCE */
#endif
/* Define if using alloca.c. */
/* #undef C_ALLOCA */
/* Define if type char is unsigned and you are not using gcc. */
#ifndef __CHAR_UNSIGNED__
/* #undef __CHAR_UNSIGNED__ */
#endif
/* Define if the closedir function returns void instead of int. */
/* #undef CLOSEDIR_VOID */
/* Define to empty if the keyword does not work. */
/* #undef const */
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
/* #undef CRAY_STACKSEG_END */
/* Define if you have alloca, as a function or macro. */
#define HAVE_ALLOCA 1
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
#define HAVE_ALLOCA_H 1
/* Define if you don't have vprintf but do have _doprnt. */
/* #undef HAVE_DOPRNT */
/* Define if you have a working `mmap' system call. */
/* #undef HAVE_MMAP */
/* Define if you have the strftime function. */
#define HAVE_STRFTIME 1
/* Define if your struct tm has tm_zone. */
#define HAVE_TM_ZONE 1
/* Define if you don't have tm_zone but do have the external array
tzname. */
/* #undef HAVE_TZNAME */
/* Define if you have the vprintf function. */
#define HAVE_VPRINTF 1
/* Define as __inline if that's what the C compiler calls it. */
/* #undef inline */
/* Define if on MINIX. */
/* #undef _MINIX */
/* Define to `long' if <sys/types.h> doesn't define. */
/* #undef off_t */
/* Define if the system does not provide POSIX.1 features except
with this defined. */
/* #undef _POSIX_1_SOURCE */
/* Define if you need to in order for stat and other things to work. */
/* #undef _POSIX_SOURCE */
/* Define to `unsigned' if <sys/types.h> doesn't define. */
/* #undef size_t */
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown
*/
/* #undef STACK_DIRECTION */
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
/* #undef STAT_MACROS_BROKEN */
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if your <sys/time.h> declares struct tm. */
/* #undef TM_IN_SYS_TIME */
/* Define if your processor stores words with the most significant
byte first (like Motorola and SPARC, unlike Intel and VAX). */
/* #undef WORDS_BIGENDIAN */
/* Define if the current hostname may be found in /etc/systemid. */
/* #undef HAVE_ETC_SYSTEMID */
/* Define to the name of the distribution. */
#define PACKAGE "sharutils"
/* Define to 1 if ANSI function prototypes are usable. */
#define PROTOTYPES 1
/* Define to the version of the distribution. */
#define VERSION "4.2.1"
/* Define to 1 for better use of the debugging malloc library. See
site ftp.antaire.com in antaire/src, file dmalloc/dmalloc.tar.gz. */
/* #undef WITH_DMALLOC */
/* Define if your locale.h file contains LC_MESSAGES. */
#define HAVE_LC_MESSAGES 1
/* Define to 1 if NLS is requested. */
//#define ENABLE_NLS 1
/* Define as 1 if you have catgets and don't want to use GNU gettext. */
/* #undef HAVE_CATGETS */
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
/* #undef HAVE_GETTEXT */
/* Define as 1 if you have the stpcpy function. */
#define HAVE_STPCPY 1
/* Define if you have the basename function. */
/* #undef HAVE_BASENAME */
/* Define if you have the dcgettext function. */
/* #undef HAVE_DCGETTEXT */
/* Define if you have the fchmod function. */
/* #undef HAVE_FCHMOD */
/* Define if you have the getcwd function. */
#define HAVE_GETCWD 1
/* Define if you have the getpagesize function. */
/* #undef HAVE_GETPAGESIZE */
/* Define if you have the isascii function. */
#define HAVE_ISASCII 1
/* Define if you have the memcpy function. */
#define HAVE_MEMCPY 1
/* Define if you have the munmap function. */
/* #undef HAVE_MUNMAP */
/* Define if you have the putenv function. */
#define HAVE_PUTENV 1
/* Define if you have the setenv function. */
/* #undef HAVE_SETENV */
/* Define if you have the setlocale function. */
#define HAVE_SETLOCALE 1
/* Define if you have the stpcpy function. */
#define HAVE_STPCPY 1
/* Define if you have the strcasecmp function. */
#define HAVE_STRCASECMP 1
/* Define if you have the strchr function. */
#define HAVE_STRCHR 1
/* Define if you have the strerror function. */
#define HAVE_STRERROR 1
/* Define if you have the uname function. */
#define HAVE_UNAME 1
/* Define if you have the valloc function. */
#define HAVE_VALLOC 1
/* Define if you have the <dirent.h> header file. */
#define HAVE_DIRENT_H 1
/* Define if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1
/* Define if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define if you have the <ndir.h> header file. */
/* #undef HAVE_NDIR_H */
/* Define if you have the <nl_types.h> header file. */
/* #undef HAVE_NL_TYPES_H */
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define if you have the <sys/dir.h> header file. */
/* #undef HAVE_SYS_DIR_H */
/* Define if you have the <sys/ndir.h> header file. */
/* #undef HAVE_SYS_NDIR_H */
/* Define if you have the <sys/wait.h> header file. */
#define HAVE_SYS_WAIT_H 1
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define if you have the <values.h> header file. */
/* #undef HAVE_VALUES_H */
/* Define if you have the i library (-li). */
/* #undef HAVE_LIBI */
/* Define if you have the intl library (-lintl). */
/* #undef HAVE_LIBINTL */

View File

@ -0,0 +1,174 @@
/* error.c -- error handler for noninteractive utilities
Copyright (C) 1990, 91, 92, 93, 94, 1995
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 David MacKenzie <djm@gnu.ai.mit.edu>. */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <sys/types.h>
#if HAVE_VPRINTF || HAVE_DOPRNT
# if __STDC__
# include <stdarg.h>
# define VA_START(args, lastarg) va_start(args, lastarg)
# else
# include <varargs.h>
# define VA_START(args, lastarg) va_start(args)
# endif
#else
# define va_alist a1, a2, a3, a4, a5, a6, a7, a8
# define va_dcl char *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8;
#endif
#if STDC_HEADERS
# include <stdlib.h>
# include <string.h>
#else
void exit ();
#endif
//#include <libintl.h>
#define _(str) (str)
/* If NULL, error will flush stdout, then print on stderr the program
name, a colon and a space. Otherwise, error will call this
function without parameters instead. */
void (*error_print_progname) () = NULL;
/* The calling program should define program_name and set it to the
name of the executing program. */
extern char *program_name;
#if HAVE_STRERROR
char *strerror ();
#else
static char *
private_strerror (errnum)
int errnum;
{
extern char *sys_errlist[];
extern int sys_nerr;
if (errnum > 0 && errnum <= sys_nerr)
return sys_errlist[errnum];
return _("Unknown system error");
}
#define strerror private_strerror
#endif
/* Print the program name and error message MESSAGE, which is a printf-style
format string with optional args.
If ERRNUM is nonzero, print its corresponding system error message.
Exit with status STATUS if it is nonzero. */
/* VARARGS */
void
#if defined(VA_START) && __STDC__
error (int status, int errnum, const char *message, ...)
#else
error (status, errnum, message, va_alist)
int status;
int errnum;
char *message;
va_dcl
#endif
{
#ifdef VA_START
va_list args;
#endif
if (error_print_progname)
(*error_print_progname) ();
else
{
fflush (stdout);
fprintf (stderr, "%s: ", program_name);
}
#ifdef VA_START
VA_START (args, message);
# if HAVE_VPRINTF
vfprintf (stderr, message, args);
# else
_doprnt (message, args, stderr);
# endif
va_end (args);
#else
fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
#endif
if (errnum)
fprintf (stderr, ": %s", strerror (errnum));
putc ('\n', stderr);
fflush (stderr);
if (status)
exit (status);
}
void
#if defined(VA_START) && __STDC__
error_with_loc (int status, int errnum, const char *file_name,
size_t line_number, const char *message, ...)
#else
error_with_loc (status, errnum, file_name, line_number, message, va_alist)
int status;
int errnum;
char *file_name;
size_t line_number;
char *message;
va_dcl
#endif
{
#ifdef VA_START
va_list args;
#endif
if (error_print_progname)
(*error_print_progname) ();
else
{
fflush (stdout);
fprintf (stderr, "%s:", program_name);
}
if (file_name != NULL)
fprintf (stderr, "%s:%d: ", file_name, line_number);
#ifdef VA_START
VA_START (args, message);
# if HAVE_VPRINTF
vfprintf (stderr, message, args);
# else
_doprnt (message, args, stderr);
# endif
va_end (args);
#else
fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
#endif
if (errnum)
fprintf (stderr, ": %s", strerror (errnum));
putc ('\n', stderr);
fflush (stderr);
if (status)
exit (status);
}

View File

@ -0,0 +1,756 @@
/* 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 roland@gnu.ai.mit.edu
before changing it!
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94
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, 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>. */
#ifndef _NO_PROTO
#define _NO_PROTO
#endif
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#if !__STDC__
/* This is a separate conditional since some stdc systems
reject `defined (const)'. */
#ifndef const
#define const
#endif
#endif
#include <stdio.h>
//#include <libintl.h>
#define _(str) gettext (str)
/* Comment out all this code if we are using the GNU C Library, and are not
actually compiling the library itself. This code is part of the GNU C
Library, but also included in many other GNU distributions. Compiling
and linking in this code is a waste when using the GNU C library
(especially if it is a shared library). Rather than having every GNU
program understand `configure --with-gnu-libc' and omit the object files,
it is simpler to just do this in the source for each such file. */
#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
/* This needs to come after some library #include
to get __GNU_LIBRARY__ defined. */
#if defined (__GNU_LIBRARY__) || defined (__sgi)
/* Don't include stdlib.h for non-GNU C libraries because some of them
contain conflicting prototypes for getopt. */
#include <stdlib.h>
#endif /* GNU C library. */
/* This version of `getopt' appears to the caller like standard Unix `getopt'
but it behaves differently for the user, since it allows the user
to intersperse the options with the other arguments.
As `getopt' works, it permutes the elements of ARGV so that,
when it is done, all the options precede everything else. Thus
all application programs are extended to handle flexible argument order.
Setting the environment variable POSIXLY_CORRECT disables permutation.
Then the behavior is completely standard.
GNU application programs can use a third alternative mode in which
they can distinguish the relative order of options and other arguments. */
#include "getopt.h"
/* For communication from `getopt' to the caller.
When `getopt' finds an option that takes an argument,
the argument value is returned here.
Also, when `ordering' is RETURN_IN_ORDER,
each non-option ARGV-element is returned here. */
char *optarg = NULL;
/* Index in ARGV of the next element to be scanned.
This is used for communication to and from the caller
and for communication between successive calls to `getopt'.
On entry to `getopt', zero means this is the first call; initialize.
When `getopt' returns EOF, this is the index of the first of the
non-option elements that the caller should itself scan.
Otherwise, `optind' communicates from one call to the next
how much of ARGV has been scanned so far. */
/* XXX 1003.2 says this must be 1 before any call. */
int optind = 0;
/* The next char to be scanned in the option-element
in which the last option character we returned was found.
This allows us to pick up the scan where we left off.
If this is zero, or a null string, it means resume the scan
by advancing to the next ARGV-element. */
static char *nextchar;
/* Callers store zero here to inhibit the error message
for unrecognized options. */
int opterr = 1;
/* Set to an option character which was unrecognized.
This must be initialized on some systems to avoid linking in the
system's own getopt implementation. */
int optopt = '?';
/* Describe how to deal with options that follow non-option ARGV-elements.
If the caller did not specify anything,
the default is REQUIRE_ORDER if the environment variable
POSIXLY_CORRECT is defined, PERMUTE otherwise.
REQUIRE_ORDER means don't recognize them as options;
stop option processing when the first non-option is seen.
This is what Unix does.
This mode of operation is selected by either setting the environment
variable POSIXLY_CORRECT, or using `+' as the first character
of the list of option characters.
PERMUTE is the default. We permute the contents of ARGV as we scan,
so that eventually all the non-options are at the end. This allows options
to be given in any order, even with programs that were not written to
expect this.
RETURN_IN_ORDER is an option available to programs that were written
to expect options and other ARGV-elements in any order and that care about
the ordering of the two. We describe each non-option ARGV-element
as if it were the argument of an option with character code 1.
Using `-' as the first character of the list of option characters
selects this mode of operation.
The special argument `--' forces an end of option-scanning regardless
of the value of `ordering'. In the case of RETURN_IN_ORDER, only
`--' can cause `getopt' to return EOF with `optind' != ARGC. */
static enum
{
REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
} ordering;
/* Value of POSIXLY_CORRECT environment variable. */
static char *posixly_correct;
#if defined (__GNU_LIBRARY__) || defined (__sgi)
/* We want to avoid inclusion of string.h with non-GNU libraries
because there are many ways it can cause trouble.
On some systems, it contains special magic macros that don't work
in GCC. */
#include <string.h>
#define my_index strchr
#else
/* Avoid depending on library functions or files
whose names are inconsistent. */
char *getenv ();
static char *
my_index (str, chr)
const char *str;
int chr;
{
while (*str)
{
if (*str == chr)
return (char *) str;
str++;
}
return 0;
}
/* If using GCC, we can safely declare strlen this way.
If not using GCC, it is ok not to declare it. */
#ifdef __GNUC__
/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h.
That was relevant to code that was here before. */
#if !__STDC__
/* gcc with -traditional declares the built-in strlen to return int,
and has done so at least since version 2.4.5. -- rms. */
extern int strlen (const char *);
#endif /* not __STDC__ */
#endif /* __GNUC__ */
#endif /* not __GNU_LIBRARY__ */
/* Handle permutation of arguments. */
/* Describe the part of ARGV that contains non-options that have
been skipped. `first_nonopt' is the index in ARGV of the first of them;
`last_nonopt' is the index after the last of them. */
static int first_nonopt;
static int last_nonopt;
/* Exchange two adjacent subsequences of ARGV.
One subsequence is elements [first_nonopt,last_nonopt)
which contains all the non-options that have been skipped so far.
The other is elements [last_nonopt,optind), which contains all
the options processed since those non-options were skipped.
`first_nonopt' and `last_nonopt' are relocated so that they describe
the new indices of the non-options in ARGV after they are moved. */
static void
exchange (argv)
char **argv;
{
int bottom = first_nonopt;
int middle = last_nonopt;
int top = optind;
char *tem;
/* Exchange the shorter segment with the far end of the longer segment.
That puts the shorter segment into the right place.
It leaves the longer segment in the right place overall,
but it consists of two parts that need to be swapped next. */
while (top > middle && middle > bottom)
{
if (top - middle > middle - bottom)
{
/* Bottom segment is the short one. */
int len = middle - bottom;
register int i;
/* Swap it with the top part of the top segment. */
for (i = 0; i < len; i++)
{
tem = argv[bottom + i];
argv[bottom + i] = argv[top - (middle - bottom) + i];
argv[top - (middle - bottom) + i] = tem;
}
/* Exclude the moved bottom segment from further swapping. */
top -= len;
}
else
{
/* Top segment is the short one. */
int len = top - middle;
register int i;
/* Swap it with the bottom part of the bottom segment. */
for (i = 0; i < len; i++)
{
tem = argv[bottom + i];
argv[bottom + i] = argv[middle + i];
argv[middle + i] = tem;
}
/* Exclude the moved top segment from further swapping. */
bottom += len;
}
}
/* Update records for the slots the non-options now occupy. */
first_nonopt += (optind - last_nonopt);
last_nonopt = optind;
}
/* Initialize the internal data when the first call is made. */
static const char *
_getopt_initialize (optstring)
const char *optstring;
{
/* Start processing options with ARGV-element 1 (since ARGV-element 0
is the program name); the sequence of previously skipped
non-option ARGV-elements is empty. */
first_nonopt = last_nonopt = optind = 1;
nextchar = NULL;
posixly_correct = getenv ("POSIXLY_CORRECT");
/* Determine how to handle the ordering of options and nonoptions. */
if (optstring[0] == '-')
{
ordering = RETURN_IN_ORDER;
++optstring;
}
else if (optstring[0] == '+')
{
ordering = REQUIRE_ORDER;
++optstring;
}
else if (posixly_correct != NULL)
ordering = REQUIRE_ORDER;
else
ordering = PERMUTE;
return optstring;
}
/* Scan elements of ARGV (whose length is ARGC) for option characters
given in OPTSTRING.
If an element of ARGV starts with '-', and is not exactly "-" or "--",
then it is an option element. The characters of this element
(aside from the initial '-') are option characters. If `getopt'
is called repeatedly, it returns successively each of the option characters
from each of the option elements.
If `getopt' finds another option character, it returns that character,
updating `optind' and `nextchar' so that the next call to `getopt' can
resume the scan with the following option character or ARGV-element.
If there are no more option characters, `getopt' returns `EOF'.
Then `optind' is the index in ARGV of the first ARGV-element
that is not an option. (The ARGV-elements have been permuted
so that those that are not options now come last.)
OPTSTRING is a string containing the legitimate option characters.
If an option character is seen that is not listed in OPTSTRING,
return '?' after printing an error message. If you set `opterr' to
zero, the error message is suppressed but we still return '?'.
If a char in OPTSTRING is followed by a colon, that means it wants an arg,
so the following text in the same ARGV-element, or the text of the following
ARGV-element, is returned in `optarg'. Two colons mean an option that
wants an optional arg; if there is text in the current ARGV-element,
it is returned in `optarg', otherwise `optarg' is set to zero.
If OPTSTRING starts with `-' or `+', it requests different methods of
handling the non-option ARGV-elements.
See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
Long-named options begin with `--' instead of `-'.
Their names may be abbreviated as long as the abbreviation is unique
or is an exact match for some defined option. If they have an
argument, it follows the option name in the same ARGV-element, separated
from the option name by a `=', or else the in next ARGV-element.
When `getopt' finds a long-named option, it returns 0 if that option's
`flag' field is nonzero, the value of the option's `val' field
if the `flag' field is zero.
The elements of ARGV aren't really const, because we permute them.
But we pretend they're const in the prototype to be compatible
with other systems.
LONGOPTS is a vector of `struct option' terminated by an
element containing a name which is zero.
LONGIND returns the index in LONGOPT of the long-named option found.
It is only valid when a long-named option has been found by the most
recent call.
If LONG_ONLY is nonzero, '-' as well as '--' can introduce
long-named options. */
int
_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
int argc;
char *const *argv;
const char *optstring;
const struct option *longopts;
int *longind;
int long_only;
{
optarg = NULL;
if (optind == 0)
optstring = _getopt_initialize (optstring);
if (nextchar == NULL || *nextchar == '\0')
{
/* Advance to the next ARGV-element. */
if (ordering == PERMUTE)
{
/* If we have just processed some options following some non-options,
exchange them so that the options come first. */
if (first_nonopt != last_nonopt && last_nonopt != optind)
exchange ((char **) argv);
else if (last_nonopt != optind)
first_nonopt = optind;
/* Skip any additional non-options
and extend the range of non-options previously skipped. */
while (optind < argc
&& (argv[optind][0] != '-' || argv[optind][1] == '\0'))
optind++;
last_nonopt = optind;
}
/* The special ARGV-element `--' means premature end of options.
Skip it like a null option,
then exchange with previous non-options as if it were an option,
then skip everything else like a non-option. */
if (optind != argc && !strcmp (argv[optind], "--"))
{
optind++;
if (first_nonopt != last_nonopt && last_nonopt != optind)
exchange ((char **) argv);
else if (first_nonopt == last_nonopt)
first_nonopt = optind;
last_nonopt = argc;
optind = argc;
}
/* If we have done all the ARGV-elements, stop the scan
and back over any non-options that we skipped and permuted. */
if (optind == argc)
{
/* Set the next-arg-index to point at the non-options
that we previously skipped, so the caller will digest them. */
if (first_nonopt != last_nonopt)
optind = first_nonopt;
return EOF;
}
/* If we have come to a non-option and did not permute it,
either stop the scan or describe it to the caller and pass it by. */
if ((argv[optind][0] != '-' || argv[optind][1] == '\0'))
{
if (ordering == REQUIRE_ORDER)
return EOF;
optarg = argv[optind++];
return 1;
}
/* We have found another option-ARGV-element.
Skip the initial punctuation. */
nextchar = (argv[optind] + 1
+ (longopts != NULL && argv[optind][1] == '-'));
}
/* Decode the current option-ARGV-element. */
/* Check whether the ARGV-element is a long option.
If long_only and the ARGV-element has the form "-f", where f is
a valid short option, don't consider it an abbreviated form of
a long option that starts with f. Otherwise there would be no
way to give the -f short option.
On the other hand, if there's a long option "fubar" and
the ARGV-element is "-fu", do consider that an abbreviation of
the long option, just like "--fu", and not "-f" with arg "u".
This distinction seems to be the most useful approach. */
if (longopts != NULL
&& (argv[optind][1] == '-'
|| (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
{
char *nameend;
const struct option *p;
const struct option *pfound = NULL;
int exact = 0;
int ambig = 0;
int indfound;
int option_index;
for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
/* Do nothing. */ ;
#ifdef lint /* Suppress `used before initialized' warning. */
indfound = 0;
#endif
/* Test all long options for either exact match
or abbreviated matches. */
for (p = longopts, option_index = 0; p->name; p++, option_index++)
if (!strncmp (p->name, nextchar, nameend - nextchar))
{
if (nameend - nextchar == strlen (p->name))
{
/* Exact match found. */
pfound = p;
indfound = option_index;
exact = 1;
break;
}
else if (pfound == NULL)
{
/* First nonexact match found. */
pfound = p;
indfound = option_index;
}
else
/* Second or later nonexact match found. */
ambig = 1;
}
if (ambig && !exact)
{
if (opterr)
fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
argv[0], argv[optind]);
nextchar += strlen (nextchar);
optind++;
return '?';
}
if (pfound != NULL)
{
option_index = indfound;
optind++;
if (*nameend)
{
/* Don't test has_arg with >, because some C compilers don't
allow it to be used on enums. */
if (pfound->has_arg)
optarg = nameend + 1;
else
{
if (opterr)
{
if (argv[optind - 1][1] == '-')
/* --option */
fprintf (stderr,
_("%s: option `--%s' doesn't allow an argument\n"),
argv[0], pfound->name);
else
/* +option or -option */
fprintf (stderr,
_("%s: option `%c%s' doesn't allow an argument\n"),
argv[0], argv[optind - 1][0], pfound->name);
}
nextchar += strlen (nextchar);
return '?';
}
}
else if (pfound->has_arg == 1)
{
if (optind < argc)
optarg = argv[optind++];
else
{
if (opterr)
fprintf (stderr, _("%s: option `%s' requires an argument\n"),
argv[0], argv[optind - 1]);
nextchar += strlen (nextchar);
return optstring[0] == ':' ? ':' : '?';
}
}
nextchar += strlen (nextchar);
if (longind != NULL)
*longind = option_index;
if (pfound->flag)
{
*(pfound->flag) = pfound->val;
return 0;
}
return pfound->val;
}
/* Can't find it as a long option. If this is not getopt_long_only,
or the option starts with '--' or is not a valid short
option, then it's an error.
Otherwise interpret it as a short option. */
if (!long_only || argv[optind][1] == '-'
|| my_index (optstring, *nextchar) == NULL)
{
if (opterr)
{
if (argv[optind][1] == '-')
/* --option */
fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
argv[0], nextchar);
else
/* +option or -option */
fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
argv[0], argv[optind][0], nextchar);
}
nextchar = (char *) "";
optind++;
return '?';
}
}
/* Look at and handle the next short option-character. */
{
char c = *nextchar++;
char *temp = my_index (optstring, c);
/* Increment `optind' when we start to process its last character. */
if (*nextchar == '\0')
++optind;
if (temp == NULL || c == ':')
{
if (opterr)
{
if (posixly_correct)
/* 1003.2 specifies the format of this message. */
fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c);
else
fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c);
}
optopt = c;
return '?';
}
if (temp[1] == ':')
{
if (temp[2] == ':')
{
/* This is an option that accepts an argument optionally. */
if (*nextchar != '\0')
{
optarg = nextchar;
optind++;
}
else
optarg = NULL;
nextchar = NULL;
}
else
{
/* This is an option that requires an argument. */
if (*nextchar != '\0')
{
optarg = nextchar;
/* If we end this ARGV-element by taking the rest as an arg,
we must advance to the next element now. */
optind++;
}
else if (optind == argc)
{
if (opterr)
{
/* 1003.2 specifies the format of this message. */
fprintf (stderr, _("%s: option requires an argument -- %c\n"),
argv[0], c);
}
optopt = c;
if (optstring[0] == ':')
c = ':';
else
c = '?';
}
else
/* We already incremented `optind' once;
increment it again when taking next ARGV-elt as argument. */
optarg = argv[optind++];
nextchar = NULL;
}
}
return c;
}
}
int
getopt (argc, argv, optstring)
int argc;
char *const *argv;
const char *optstring;
{
return _getopt_internal (argc, argv, optstring,
(const struct option *) 0,
(int *) 0,
0);
}
#endif /* _LIBC or not __GNU_LIBRARY__. */
#ifdef TEST
/* Compile with -DTEST to make an executable for use in testing
the above definition of `getopt'. */
int
main (argc, argv)
int argc;
char **argv;
{
int c;
int digit_optind = 0;
while (1)
{
int this_option_optind = optind ? optind : 1;
c = getopt (argc, argv, "abc:d:0123456789");
if (c == EOF)
break;
switch (c)
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
if (digit_optind != 0 && digit_optind != this_option_optind)
printf ("digits occur in two different argv-elements.\n");
digit_optind = this_option_optind;
printf ("option %c\n", c);
break;
case 'a':
printf ("option a\n");
break;
case 'b':
printf ("option b\n");
break;
case 'c':
printf ("option c with value `%s'\n", optarg);
break;
case '?':
break;
default:
printf ("?? getopt returned character code 0%o ??\n", c);
}
}
if (optind < argc)
{
printf ("non-option ARGV-elements: ");
while (optind < argc)
printf ("%s ", argv[optind++]);
printf ("\n");
}
exit (0);
}
#endif /* TEST */

View File

@ -0,0 +1,129 @@
/* Declarations for getopt.
Copyright (C) 1989, 1990, 1991, 1992, 1993 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _GETOPT_H
#define _GETOPT_H 1
#ifdef __cplusplus
extern "C" {
#endif
/* For communication from `getopt' to the caller.
When `getopt' finds an option that takes an argument,
the argument value is returned here.
Also, when `ordering' is RETURN_IN_ORDER,
each non-option ARGV-element is returned here. */
extern char *optarg;
/* Index in ARGV of the next element to be scanned.
This is used for communication to and from the caller
and for communication between successive calls to `getopt'.
On entry to `getopt', zero means this is the first call; initialize.
When `getopt' returns EOF, this is the index of the first of the
non-option elements that the caller should itself scan.
Otherwise, `optind' communicates from one call to the next
how much of ARGV has been scanned so far. */
extern int optind;
/* Callers store zero here to inhibit the error message `getopt' prints
for unrecognized options. */
extern int opterr;
/* Set to an option character which was unrecognized. */
extern int optopt;
/* Describe the long-named options requested by the application.
The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
of `struct option' terminated by an element containing a name which is
zero.
The field `has_arg' is:
no_argument (or 0) if the option does not take an argument,
required_argument (or 1) if the option requires an argument,
optional_argument (or 2) if the option takes an optional argument.
If the field `flag' is not NULL, it points to a variable that is set
to the value given in the field `val' when the option is found, but
left unchanged if the option is not found.
To have a long-named option do something other than set an `int' to
a compiled-in constant, such as set a value from `optarg', set the
option's `flag' field to zero and its `val' field to a nonzero
value (the equivalent single-letter option character, if there is
one). For long options that have a zero `flag' field, `getopt'
returns the contents of the `val' field. */
struct option
{
#if __STDC__
const char *name;
#else
char *name;
#endif
/* has_arg can't be an enum because some compilers complain about
type mismatches in all the code that assumes it is an int. */
int has_arg;
int *flag;
int val;
};
/* Names for the values of the `has_arg' field of `struct option'. */
#define no_argument 0
#define required_argument 1
#define optional_argument 2
#if __STDC__
#if defined(__GNU_LIBRARY__)
/* Many other libraries have conflicting prototypes for getopt, with
differences in the consts, in stdlib.h. To avoid compilation
errors, only prototype getopt for the GNU C library. */
extern int getopt (int argc, char *const *argv, const char *shortopts);
#else /* not __GNU_LIBRARY__ */
extern int getopt ();
#endif /* not __GNU_LIBRARY__ */
extern int getopt_long (int argc, char *const *argv, const char *shortopts,
const struct option *longopts, int *longind);
extern int getopt_long_only (int argc, char *const *argv,
const char *shortopts,
const struct option *longopts, int *longind);
/* Internal only. Users should not call this directly. */
extern int _getopt_internal (int argc, char *const *argv,
const char *shortopts,
const struct option *longopts, int *longind,
int long_only);
#else /* not __STDC__ */
extern int getopt ();
extern int getopt_long ();
extern int getopt_long_only ();
extern int _getopt_internal ();
#endif /* not __STDC__ */
#ifdef __cplusplus
}
#endif
#endif /* _GETOPT_H */

Some files were not shown because too many files have changed in this diff Show More