tardy-1.28/README 644 0 0 2265212163037023 117460ustar PeterMillerreadme(tardy) readme(tardy) NAME tardy version 1.28 - a tar post-processor Copyright (C) 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2008, 2009, 2010, 2011, 2012, 2013 Peter Miller The tardy program is distributed under the terms of the GNU General Public License. See the LICENSE section, below, for more details. tardy a., slow to act, behind time. DESCRIPTION The tardy program is a tar(1) post-processor. It may be used to manip- ulate the file headers in tar(5) archive files in various ways. The reason the tardy program was written was because the author wanted to "spruce up" his tar files before posting them to the net, mostly to remove artefacts of the development environment, without introducing more. The tardy program was designed to allow you to alter certain character- istics of files AFTER they have been included in the TAR file. Among them are: * change file owner (by NUMBER or NAME) * change file group (by NUMBER or NAME) * add directory prefix (dot is a really useful prefix) * change file protections (for example from 600 to 644) Note that all of these affect ALL files in the archive. BUILDING Instructions on how to build and test the tardy program are to be found in the BUILDING file included in this distribution. LICENSE The tardy program is free software; you can redistribute it and/or mod- ify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. The tardy program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY 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, see . It should be in the LICENSE file included in this distribution. AUTHOR Peter Miller EMail: pmiller@opensource.org.au /\/\* WWW: http://miller.emu.id.au/pmiller/ RELEASE NOTES Version 1.28 (2013-Jun-27) * jari discovered a false negative from test/00/t0075a.sh, causd by a difference in time zones. * jari discovered that three files were mysteri- ously absent from the tarball causing FTBFS. * jari discovered a problem in the download pages, causing the debian-less orig.tar.gz to be improperly linked. Version 1.27 (2013-May-28) * There is now a tarball on the web site with no debian/ directory, to make it easier for downstream packagers. * There is now a debian/watch file, in main tarball. * There is now a test tarballs > 2GB. This was fixed back in i1.25.D012 (12-Jun-2012). Debian: Closes: #659630 Version 1.26 (2012-Jul-09) * The tardy(1) command now understands ZX compression for both reading and writing, symmetric with how it handles gzip comporession. * A memory scribble deep within the string code has been fixed. It was related to how it split the hash table when growing the size. * Tardy now uses 64-bit file sizes consistently. * The tardy(1) command is now able to use bzip2 compression on input and output, symmetric with its gzip compression handling. * Emanuel Haupt discovered an incorrect function prototype, that caused build problems on some 32-bit systems. * Dagobert Michelsen discovered that Solaris needs more #include lines. * Dagobert Michelsen discovered a build problem with the memmem replacement function. Version 1.25 (2011-Nov-07) * Dagobert Michelsen discovered that several string functions were undeclared on Solaris, causing build problems; and that there was no replacement memmem() function for systems that didn't have one. Version 1.24 (2011-Oct-03) * The tardy(1) command is now more tolerant of tar(5) archives that contain regular files labeled LD_DIRECTORY instead of LD_NORMAL. Version 1.23 (2011-Sep-09) * Thomas discovered that the V7 tar output was using an incorrect link flag when writing file headers for directo- ries, causing pax(1) and star(1) to complain. * Thomas discovered that the BSD tar output was using an incorrect link flag when writing file headers for directo- ries, causing mc(1) and Xarchiver(1) to complain. * Dagobert Michelsen discovered a build problem on systems without the strverscmp(3) function. Version 1.22 (2011-May-14) * Thomas contributed a patch to detect reading from a terminal, or writing to a terminal. These are usually indica- tions that the user has failed to supply a command line argument. * Tardy is now able to read and write long file names in ar(1) ar- chives. * A bug has been fixed in the BSD ar(1) format archives, the file pad- ding has been corrected to 2-byte boundaries. * The ar(1) padding now uses newlines, to be compatible with GNU binu- tils. * The ./configure script will now fail if libexplain has not been installed, rather than failing later in the build. Version 1.21 (2011-Mar-21) * Tardy is now able to automatically gunzip(1) input files gzip(1) out- put files. * Tardy is now able to read and write several ar(1) file formats. * Tardy is now able to read and write several cpio(1) file formats. * There is a new tardy -relative-paths filter, it may be used to ensure that all file names in the archive are relative (do not start with a '/' slash character). This is tidier that the "-prefix ." alterna- tive. * Tardy now uses libexplain for improved error messages. http://libexplain.sourceforge.net/ * There is a new Tardy -extract option, that may be used to extract the contents of an archive, in any format that Tardy understands. * Thomas submitted a patch that added better output support for the USTAR archive format on. * Jari Aalto reported several spelling errors im the man page, these have been corrected. Version 1.20 (2010-May-22) * A build problem on FreeBSD has been fixed. * A build problem on Debian has been fixed. Version 1.19 (2010-Mar-10) * The Makefile.in file has been fixed so the package now builds cor- rectly. Additional support for building Debian packages has been added. Version 1.18 (2009-Nov-29) * Numerous build glitches and warnings have been fixed. * There is a new tardy -exclude option that may be used to exclude (remove) files from the archive. Version 1.17 (2008-Jun-23) * A build problem with GCC 4.3 has been fixed [Gentoo Bug 226861]. Version 1.16 (2008-Apr-29) * The tabs in the Makefile.in file have been fixed. Version 1.15 (2008-Apr-14) * The license has been updated to GNU GPL version 3. Version 1.12 (2004-Aug-17) * Tardy has a new home page, http://tardy.sourceforge.net/ * The tardy --remove-prefix option has been extended to accept a numeric argument, giving the count of directories to be removed. * A bug has been fixed in the tardy --reomve-prefix option. If there is a directory named exactly for the prefix being removed, it is now renamed to "." rather than being left unaltered. * The tar output has been altered to be consistent with GNU Tar 1.14 and later. As of GNU Tar 1.14, it warns if the block size on input is not what it expects. Tardy now uses the same default block size as GNU Tar when writing tarballs, which silences the GNU Tar warning. Version 1.11 (2002-Oct-20) * A bug has been fixed with the processing of very long directory names. Version 1.10 (2002-Oct-16) * Some documentation errors have been corrected. * Some build problems have been fixed. Version 1.9 (27-Aug-2001) * A number fo build problems have been fixed. * Support has been added for long names. Version 1.8 (24-Oct-2001) * The generated Makefile.in file was missing some dependencies. This has been fixed. Version 1.7 (23-Oct-2001) * A number of files were missing from the tarball. These have been added. Version 1.6 (23-Oct-2001) * Build and test problems caused by the recent RH7 release have been fixed. Version 1.5 (13-Sep-2000) * Tardy has been entirely re-written in C++. * Tardy now understands cpio formats in addition to tar formats. * Tardy now comes with an RPM package spec. Version 1.4 (1998-Jan-25) Never had a public release. Version 1.3 Never had a public release. Version 1.2 * This version of tardy now uses a GNU autoconf generated configure script to automatically configure the tardy program. readme(tardy) tardy-1.28/AUTHORS 644 0 0 12712163037023 120670ustar PeterMillerCopyright (C) 1994-2011 Peter Miller Copyright (C) 2011 Thomas tardy-1.28/BUILDING 644 0 0 2241412163037023 122020ustar PeterMillerbuild(tardy) build(tardy) NAME How to build Tardy Copyright (C) 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2008, 2009, 2010, 2011, 2012, 2013 Peter Miller The tardy program is distributed under the terms of the GNU General Public License. See the LICENSE section, below, for more details. tardy a., slow to act, behind time. BEFORE YOU START There are a few pieces of software you may want to fetch and install before you proceed with your installation of Tardy. Boost Library You will need the C++ Boost Library. If you are using a pack- age based system, you will need the libboost-devel package, or one named something very similar. http://boost.org/ BZ2 library You will need the bzip2 library. If you are using a package based system, you will need the libbz2-devel package, or one named something very similar. LZMA library You will need the lzma library, for .xz compression. If you are using a package based system, you will need the liblzma- devel package, or one named something very similar. cpio The test suite uses the cpio(1) command to create CPIO archives for testing. GNU Groff The documentation for the Tardy package was prepared using the GNU Groff package (version 1.14 or later). This distribution includes full documentation, which may be processed into Post- Script or DVI files at install time - if GNU Groff has been installed. GCC You may also want to consider fetching and installing the GNU C Compiler if you have not done so already. This is not essen- tial. Tardy was developed using the GNU C++ compiler, and the GNU C++ libraries. libexplain The libexplain project provides a library if system-call-spe- cific sterror(3) replacements, for more informative error mes- sages. http://libexplain.sourceforge.net/ zlib zlib is a library implementing the deflate compression method (and inflate decompression method) found in gzip(1) and PKZIP. http://zlib.net/ SITE CONFIGURATION The tardy program is configured using the configure shell script included in this distribution. The configure shell script attempts to guess correct values for various system-dependent variables used during compilation, and creates the Makefile and libtardy/config.h files. It also creates a shell script config.status that you can run in the future to recreate the current configuration. Normally, you just cd to the directory containing tardy's source code and type % ./configure ...lots of output... % If you're using csh on an old version of System V, you might need to type % sh configure ...lots of output... % instead to prevent csh from trying to execute configure itself. Running configure takes a minute or two. While it is running, it prints some messages that tell what it is doing. If you don't want to see the messages, run configure using the --quiet option; for example, % ./configure --quiet % By default, configure will arrange for the make install command to install the tardy program's files in /usr/local/bin and /usr/local/man. 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-spe- cific files and architecture-independent files. If you give configure the option --exec-prefix=PATH the tardy package will use PATH as the prefix for installing programs and libraries. Data files and documen- tation will still use the regular prefix. Normally, all files are installed using the same prefix. configure ignores any other arguments that you give it. On systems that require unusual options for compilation or linking that the tardy package's configure script does not know about, you can give configure initial values for variables by setting them in the environ- ment. In Bourne-compatible shells, you can do that on the command line like this: $ CC='gcc -traditional' LIBS=-lposix ./configure ...lots of output... $ Here are the make variables that you might want to override with envi- ronment variables when running configure. Variable: CC C compiler program. The default is cc. Variable: INSTALL Program to use to install files. The default is install if you have it, cp otherwise. Variable: LIBS Libraries to link with, in the form -lfoo -lbar. The configure script will append to this, rather than replace it. If you need to do unusual things to compile the package, the author encourages you to figure out how configure could check whether to do them, and mail diffs or instructions to the author so that they can be included in the next release. BUILDING TARDY All you should need to do is use the % make ...lots of output... % command and wait. When this finishes you should see a directory called bin containing one file: tardy. The tardy program is a tar post-pro- cessor. You can remove the program binaries and object files from the source directory by using the % make clean ...lots of output... % command. To remove all of the above files, and also remove the Make- file and libtardy/config.h and config.status files, use the % make distclean ...lots of output... % command. The file etc/configure.ac is used to create configure by a GNU program called autoconf. You only need to know this if you want to regenerate configure using a newer version of autoconf. TESTING TARDY The tardy program comes with a test suite. To run this test suite, use the command % make sure ...lots of output... Passed All Tests % The tests take a about a minute each, with a few very fast, and a cou- ple very slow, but it varies greatly depending on your CPU. INSTALLING TARDY The tardy program is installed under the /usr/local tree by default. Use the --prefix=PATH option to configure if you want some other path. All that is required to install the tardy program is to use the % make install ...lots of output... % command. Control of the directories used may be found in the first few lines of the Makefile file if you want to bypass the configure script. The above procedure assumes that the soelim(1) command is somewhere in the command search PATH. The soelim(1) command is available as part of the GNU Roff package. The above procedure also assumes that the $(prefix)/man/man1 and $(pre- fix)/man/man5 directories already exist. If they do not, you will need to mkdir them manually. PRINTED MANUALS This distribution contains the sources to all of the documentation for tardy. The author used the GNU groff package and a postscript printer to prepare the documentation. If you do not have this software, you will need to substitute commands appropriate to your site. To print copies of the README, and BUILDING files, the following com- mands may be used % groff -t -man etc/*.man | lpr % This will produce about 4 pages. The "-t" flag means preprocess with tbl(1). To print copies of the manual entry, the following commands may be used % cd man1 % groff -s -t -man *.1 | lpr % cd .. % This will produce about 3 pages. The "-s" flag means preprocess with soelim(1), and the "-t" flag means preprocess with tbl(1). GETTING HELP If you need assistance with the tardy program, please do not hesitate to contact the author at Peter Miller Any and all feedback is welcome. When reporting problems, please include the version number given by the % tardy -version tardy version a.b.cccc ... % command. LICENSE The tardy program is free software; you can redistribute it and/or mod- ify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. The tardy program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. It should be in the LICENSE file included in this distribution. AUTHOR Peter Miller EMail: pmiller@opensource.org.au /\/\* WWW: http://miller.emu.id.au/pmiller/ build(tardy) tardy-1.28/LICENSE 644 0 0 11453012163037023 121100ustar PeterMillerGPL(GNU) Free Software Foundation GPL(GNU) GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program -- to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. 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 them 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 pro- grams, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. 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. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modi- fied versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protect- ing users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future ver- sions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modifi- cation follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recip- ients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without per- mission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not convey- ing. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible fea- ture that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a promi- nent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Compo- nent, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implemen- tation is available to the public in source code form. A "Major Compo- nent", in this context, means a major essential component (kernel, win- dow system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to con- trol those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free pro- grams which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copy- right on the Program, and are irrevocable provided the stated condi- tions are met. This License explicitly affirms your unlimited permis- sion to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facil- ities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological mea- sure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumven- tion is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appro- priately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permis- sion if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Cor- responding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a writ- ten offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customar- ily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alterna- tive is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corre- sponding Source in the same way through the same place at no fur- ther charge. You need not require recipients to copy the Corre- sponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corre- sponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorpora- tion into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the partic- ular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, proce- dures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modifi- cation has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipi- ent, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly docu- mented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Addi- tional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional per- missions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in rea- sonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restric- tion, you may remove that term. If a license document contains a fur- ther restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly pro- vided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third para- graph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occur- ring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so avail- able, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consis- tent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrange- ment, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the busi- ness of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If 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 convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permis- sion to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single com- bined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU 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 that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permis- sions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later ver- sion. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLI- CABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLD- ERS 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 PARTIC- ULAR 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. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CON- VEYS 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 OPER- ATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Pro- gram, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS 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 state 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) < year > < name of author > This program is free software: you can redistribute it and/or mod- ify it under the terms of the GNU General Public License as pub- lished by the Free Software Foundation, either version 3 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 MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Gen- eral Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type "show w". This is free software, and you are welcome to redis- tribute it under certain conditions; type "show c" for details. The hypothetical commands "show w" and "show c" should show the appro- priate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your pro- gram 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 Lesser General Public License instead of this License. But first, please read . GNU GPL GPL(GNU) tardy-1.28/Makefile.in 644 0 0 27647012163037023 131640ustar PeterMiller# # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # # W W A RRRR N N III N N III N N GGG # W W A A R R NN N I NN N I NN N G G # W W A A RRRR N N N I N N N I N N N G # W W W AAAAA R R N NN I N NN I N NN G GG # W W W A A R R N N I N N I N N G G # W W A A R R N N III N N III N N GGG # # Warning: DO NOT send patches which fix this file. IT IS NOT the original # source file. This file is GENERATED from the Aegis repository file manifest. # If you find a bug in this file, it could well be an Aegis bug. # # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # # # @configure_input@ # # The configure script generates 2 files: # 1. This Makefile # 2. libtardy/config.h # If you change this Makefile, you may also need to change these files. To see # what is configured by the configure script, search for @ in the Makefile.in # file. # # If you wish to reconfigure the installations directories it is RECOMMENDED # that you re-run the configure script. # # Use "./configure --help" for a list of options. # # # directory containing the source # srcdir = @srcdir@ VPATH = @srcdir@ # # the name of the install program to use # INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DIR = @INSTALL@ -m 0755 -d # # The name of the C++ compiler to use. # CXX = @CXX@ # # The C++ compiler flags to use. # CXXFLAGS = @CXXFLAGS@ # # The C++ preprocessor flags to use. # CPPFLAGS = @CPPFLAGS@ # # The linker flags to use # LDFLAGS = @LDFLAGS@ # # prefix for installation path # prefix = @prefix@ exec_prefix = @exec_prefix@ # # Where to put the executables. # # On a network, this would only be shared between machines of identical # cpu-hw-os flavour. It can be read-only. # # The $(DESTDIR) is for packaging. # bindir = $(DESTDIR)@bindir@ # # Where to put the manuals. # # On a network, this would be shared between all machines on the network. It can # be read-only. # # The $(DESTDIR) is for packaging. # mandir = $(DESTDIR)@mandir@ # define this to silence ./configure warning datarootdir = $(DESTDIR)@datarootdir@ # # extra libraries required for your system # LIBS = @LIBS@ # # shell to use to run tests and commands # SH = @SH@ # # The program to use to construct static libraries. # AR = @AR@ # # The program to use to place symbol indexes within static libraries. # RANLIB = @RANLIB@ # # Set GROFF to the name of the roff command on your system, usually "groff" or # "troff" or "nroff". # GROFF = @GROFF@ # # Set SOELIM to the name of the roff proprocessor command on your system, # usually "soelim" or "gsoelim". # SOELIM = @SOELIM@ # --------------------------------------------------------- # You should not need to change anything below this line. # # The default target # the-default-target: all etc/BUILDING.pdf: etc/BUILDING.man $(GROFF) -Tps -s -I. -t -man etc/BUILDING.man > etc/BUILDING.ps ps2pdf etc/BUILDING.ps $@ rm etc/BUILDING.ps $(datarootdir)/doc/tardy/BUILDING.pdf: .mkdir.__datarootdir__doc_tardy \ etc/BUILDING.pdf $(INSTALL_DATA) etc/BUILDING.pdf $@ etc/README.pdf: etc/README.man etc/new.1.10.so etc/new.1.11.so etc/new.1.12.so \ etc/new.1.15.so etc/new.1.16.so etc/new.1.17.so \ etc/new.1.18.so etc/new.1.19.so etc/new.1.2.so etc/new.1.20.so \ etc/new.1.21.so etc/new.1.22.so etc/new.1.23.so \ etc/new.1.24.so etc/new.1.25.so etc/new.1.26.so \ etc/new.1.27.so etc/new.1.28.so etc/new.1.4.so etc/new.1.5.so \ etc/new.1.6.so etc/new.1.7.so etc/new.1.8.so etc/new.1.9.so $(GROFF) -Tps -s -I. -t -man etc/README.man > etc/README.ps ps2pdf etc/README.ps $@ rm etc/README.ps $(datarootdir)/doc/tardy/README.pdf: .mkdir.__datarootdir__doc_tardy \ etc/README.pdf $(INSTALL_DATA) etc/README.pdf $@ etc/howto.conf: config.status etc/howto.conf.in CONFIG_FILES=$@:etc/howto.conf.in CONFIG_HEADERS= $(SH) config.status etc/reference.pdf: etc/BUILDING.man etc/README.man etc/new.1.10.so \ etc/new.1.11.so etc/new.1.12.so etc/new.1.15.so \ etc/new.1.16.so etc/new.1.17.so etc/new.1.18.so \ etc/new.1.19.so etc/new.1.2.so etc/new.1.20.so etc/new.1.21.so \ etc/new.1.22.so etc/new.1.23.so etc/new.1.24.so \ etc/new.1.25.so etc/new.1.26.so etc/new.1.27.so \ etc/new.1.28.so etc/new.1.4.so etc/new.1.5.so etc/new.1.6.so \ etc/new.1.7.so etc/new.1.8.so etc/new.1.9.so etc/ref-toc.so \ etc/reference.man man/man1/o__rules.so man/man1/o_help.so \ man/man1/tardy.1 man/man1/tardy_license.1 man/man1/z_cr.so \ man/man1/z_exit.so $(GROFF) -Tps -s -I. -t -man etc/reference.man > etc/reference.ps ps2pdf etc/reference.ps $@ rm etc/reference.ps $(datarootdir)/doc/tardy/reference.pdf: .mkdir.__datarootdir__doc_tardy \ etc/reference.pdf $(INSTALL_DATA) etc/reference.pdf $@ libtardy/ac/bzlib.o: libtardy/ac/bzlib.cc libtardy/ac/bzlib.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/ac/bzlib.cc mv bzlib.o $@ libtardy/ac/lzma.o: libtardy/ac/lzma.cc libtardy/ac/lzma.h libtardy/ac/stdio.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/ac/lzma.cc mv lzma.o $@ libtardy/ac/stdio.o: libtardy/ac/stdarg.h libtardy/ac/stdio.cc \ libtardy/ac/stdio.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/ac/stdio.cc mv stdio.o $@ libtardy/ac/string.o: libtardy/ac/stddef.h libtardy/ac/stdio.h \ libtardy/ac/string.cc libtardy/ac/string.h libtardy/main.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/ac/string.cc mv string.o $@ libtardy/ac/zlib.o: libtardy/ac/string.h libtardy/ac/zlib.cc libtardy/ac/zlib.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/ac/zlib.cc mv zlib.o $@ libtardy/arglex.o: libtardy/ac/ctype.h libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/stdlib.h libtardy/ac/string.h \ libtardy/arglex.cc libtardy/arglex.h libtardy/main.h \ libtardy/rcstring.h libtardy/roff.h libtardy/trace.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/arglex.cc mv arglex.o $@ libtardy/cannonical.o: libtardy/ac/assert.h libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/cannonical.cc \ libtardy/cannonical.h libtardy/main.h libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/cannonical.cc mv cannonical.o $@ libtardy/endian.o: libtardy/endian.cc libtardy/endian.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/endian.cc mv endian.o $@ libtardy/file/input.o: libtardy/ac/errno.h libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/stdio.h libtardy/ac/string.h \ libtardy/ac/sys/types.h libtardy/file/input.cc \ libtardy/file/input.h libtardy/main.h libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/file/input.cc mv input.o $@ libtardy/file/input/bunzip2.o: libtardy/ac/bzlib.h libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/sys/resource.h \ libtardy/ac/sys/types.h libtardy/file/input.h \ libtardy/file/input/bunzip2.cc libtardy/file/input/bunzip2.h \ libtardy/main.h libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/file/input/bunzip2.cc mv bunzip2.o $@ libtardy/file/input/bunzip2/candidate.o: libtardy/ac/bzlib.h \ libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/types.h libtardy/file/input.h \ libtardy/file/input/bunzip2.h \ libtardy/file/input/bunzip2/candidate.cc libtardy/main.h \ libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/file/input/bunzip2/candidate.cc mv candidate.o $@ libtardy/file/input/bunzip2/create_if_candidate.o: libtardy/ac/bzlib.h \ libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/types.h libtardy/file/input.h \ libtardy/file/input/bunzip2.h \ libtardy/file/input/bunzip2/create_if_candidate.cc \ libtardy/main.h libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/file/input/bunzip2/create_if_candidate.cc mv create_if_candidate.o $@ libtardy/file/input/bunzip2/filename.o: libtardy/ac/bzlib.h \ libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/types.h libtardy/file/input.h \ libtardy/file/input/bunzip2.h \ libtardy/file/input/bunzip2/filename.cc libtardy/main.h \ libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/file/input/bunzip2/filename.cc mv filename.o $@ libtardy/file/input/bunzip2/get_position_inner.o: libtardy/ac/bzlib.h \ libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/types.h libtardy/file/input.h \ libtardy/file/input/bunzip2.h \ libtardy/file/input/bunzip2/get_position_inner.cc \ libtardy/main.h libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/file/input/bunzip2/get_position_inner.cc mv get_position_inner.o $@ libtardy/file/input/bunzip2/remove_filename_suffix.o: libtardy/ac/bzlib.h \ libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/types.h libtardy/file/input.h \ libtardy/file/input/bunzip2.h \ libtardy/file/input/bunzip2/remove_filename_suffix.cc \ libtardy/main.h libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/file/input/bunzip2/remove_filename_suffix.cc mv remove_filename_suffix.o $@ libtardy/file/input/factory.o: libtardy/ac/bzlib.h libtardy/ac/lzma.h \ libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/types.h libtardy/ac/zlib.h \ libtardy/file/input.h libtardy/file/input/bunzip2.h \ libtardy/file/input/factory.cc libtardy/file/input/gunzip.h \ libtardy/file/input/normal.h libtardy/file/input/stdin.h \ libtardy/file/input/xz.h libtardy/main.h libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/file/input/factory.cc mv factory.o $@ libtardy/file/input/gunzip.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/ac/sys/types.h \ libtardy/ac/zlib.h libtardy/endian.h libtardy/file/input.h \ libtardy/file/input/gunzip.cc libtardy/file/input/gunzip.h \ libtardy/main.h libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/file/input/gunzip.cc mv gunzip.o $@ libtardy/file/input/gunzip/remove_filename_suffix.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/sys/types.h \ libtardy/ac/zlib.h libtardy/file/input.h \ libtardy/file/input/gunzip.h \ libtardy/file/input/gunzip/remove_filename_suffix.cc \ libtardy/main.h libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/file/input/gunzip/remove_filename_suffix.cc mv remove_filename_suffix.o $@ libtardy/file/input/normal.o: libtardy/ac/fcntl.h libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/sys/stat.h \ libtardy/ac/sys/types.h libtardy/ac/unistd.h \ libtardy/file/input.h libtardy/file/input/normal.cc \ libtardy/file/input/normal.h libtardy/file/input/position.h \ libtardy/main.h libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/file/input/normal.cc mv normal.o $@ libtardy/file/input/position.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/types.h libtardy/file/input.h \ libtardy/file/input/position.cc libtardy/file/input/position.h \ libtardy/main.h libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/file/input/position.cc mv position.o $@ libtardy/file/input/stdin.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/stat.h libtardy/ac/sys/types.h \ libtardy/ac/unistd.h libtardy/file/input.h \ libtardy/file/input/position.h libtardy/file/input/stdin.cc \ libtardy/file/input/stdin.h libtardy/main.h libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/file/input/stdin.cc mv stdin.o $@ libtardy/file/input/xz.o: libtardy/ac/lzma.h libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/sys/types.h \ libtardy/file/input.h libtardy/file/input/xz.cc \ libtardy/file/input/xz.h libtardy/main.h libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/file/input/xz.cc mv xz.o $@ libtardy/file/input/xz/candidate.o: libtardy/ac/lzma.h libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/string.h \ libtardy/ac/sys/types.h libtardy/file/input.h \ libtardy/file/input/xz.h libtardy/file/input/xz/candidate.cc \ libtardy/main.h libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/file/input/xz/candidate.cc mv candidate.o $@ libtardy/file/input/xz/create_if_candidate.o: libtardy/ac/lzma.h \ libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/types.h libtardy/file/input.h \ libtardy/file/input/xz.h \ libtardy/file/input/xz/create_if_candidate.cc libtardy/main.h \ libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/file/input/xz/create_if_candidate.cc mv create_if_candidate.o $@ libtardy/file/input/xz/filename.o: libtardy/ac/lzma.h libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/sys/types.h \ libtardy/file/input.h libtardy/file/input/xz.h \ libtardy/file/input/xz/filename.cc libtardy/main.h \ libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/file/input/xz/filename.cc mv filename.o $@ libtardy/file/input/xz/get_position_inner.o: libtardy/ac/lzma.h \ libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/types.h libtardy/file/input.h \ libtardy/file/input/xz.h \ libtardy/file/input/xz/get_position_inner.cc libtardy/main.h \ libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/file/input/xz/get_position_inner.cc mv get_position_inner.o $@ libtardy/file/input/xz/remove_filename_suffix.o: libtardy/ac/lzma.h \ libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/types.h libtardy/file/input.h \ libtardy/file/input/xz.h \ libtardy/file/input/xz/remove_filename_suffix.cc \ libtardy/main.h libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/file/input/xz/remove_filename_suffix.cc mv remove_filename_suffix.o $@ libtardy/file/output.o: libtardy/ac/assert.h libtardy/ac/errno.h \ libtardy/ac/stdarg.h libtardy/ac/stddef.h libtardy/ac/stdio.h \ libtardy/file/output.cc libtardy/file/output.h libtardy/main.h \ libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/file/output.cc mv output.o $@ libtardy/file/output/buffer.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/file/output.h \ libtardy/file/output/buffer.cc libtardy/file/output/buffer.h \ libtardy/main.h libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/file/output/buffer.cc mv buffer.o $@ libtardy/file/output/bzip2.o: libtardy/ac/bzlib.h libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/file/output.h \ libtardy/file/output/bzip2.cc libtardy/file/output/bzip2.h \ libtardy/main.h libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/file/output/bzip2.cc mv bzip2.o $@ libtardy/file/output/bzip2/candidate.o: libtardy/ac/bzlib.h \ libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/types.h libtardy/file/input.h \ libtardy/file/input/bunzip2.h libtardy/file/output.h \ libtardy/file/output/bzip2.h \ libtardy/file/output/bzip2/candidate.cc libtardy/main.h \ libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/file/output/bzip2/candidate.cc mv candidate.o $@ libtardy/file/output/bzip2/filename.o: libtardy/ac/bzlib.h \ libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/types.h libtardy/file/input.h \ libtardy/file/input/bunzip2.h libtardy/file/output.h \ libtardy/file/output/bzip2.h \ libtardy/file/output/bzip2/filename.cc libtardy/main.h \ libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/file/output/bzip2/filename.cc mv filename.o $@ libtardy/file/output/factory.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/file/output.h libtardy/file/output/factory.cc \ libtardy/file/output/normal.h libtardy/file/output/stdout.h \ libtardy/main.h libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/file/output/factory.cc mv factory.o $@ libtardy/file/output/gzip.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/ac/zlib.h libtardy/endian.h \ libtardy/file/output.h libtardy/file/output/gzip.cc \ libtardy/file/output/gzip.h libtardy/main.h libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/file/output/gzip.cc mv gzip.o $@ libtardy/file/output/gzip/candidate.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/sys/types.h \ libtardy/ac/zlib.h libtardy/file/input.h \ libtardy/file/input/gunzip.h libtardy/file/output.h \ libtardy/file/output/gzip.h \ libtardy/file/output/gzip/candidate.cc libtardy/main.h \ libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/file/output/gzip/candidate.cc mv candidate.o $@ libtardy/file/output/gzip/filename.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/sys/types.h \ libtardy/ac/zlib.h libtardy/file/input.h \ libtardy/file/input/gunzip.h libtardy/file/output.h \ libtardy/file/output/gzip.h \ libtardy/file/output/gzip/filename.cc libtardy/main.h \ libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/file/output/gzip/filename.cc mv filename.o $@ libtardy/file/output/hexdump.o: libtardy/ac/ctype.h libtardy/ac/limits.h \ libtardy/ac/stdarg.h libtardy/ac/stddef.h libtardy/ac/string.h \ libtardy/file/output.h libtardy/file/output/hexdump.cc \ libtardy/file/output/hexdump.h libtardy/main.h \ libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/file/output/hexdump.cc mv hexdump.o $@ libtardy/file/output/normal.o: libtardy/ac/assert.h libtardy/ac/fcntl.h \ libtardy/ac/stdarg.h libtardy/ac/stddef.h libtardy/ac/unistd.h \ libtardy/file/output.h libtardy/file/output/normal.cc \ libtardy/file/output/normal.h libtardy/main.h \ libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/file/output/normal.cc mv normal.o $@ libtardy/file/output/stdout.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/unistd.h libtardy/file/output.h \ libtardy/file/output/stdout.cc libtardy/file/output/stdout.h \ libtardy/main.h libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/file/output/stdout.cc mv stdout.o $@ libtardy/file/output/xz.o: libtardy/ac/lzma.h libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/file/output.h \ libtardy/file/output/xz.cc libtardy/file/output/xz.h \ libtardy/main.h libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/file/output/xz.cc mv xz.o $@ libtardy/file/output/xz/candidate.o: libtardy/ac/lzma.h libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/sys/types.h \ libtardy/file/input.h libtardy/file/input/xz.h \ libtardy/file/output.h libtardy/file/output/xz.h \ libtardy/file/output/xz/candidate.cc libtardy/main.h \ libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/file/output/xz/candidate.cc mv candidate.o $@ libtardy/file/output/xz/filename.o: libtardy/ac/lzma.h libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/sys/types.h \ libtardy/file/input.h libtardy/file/input/xz.h \ libtardy/file/output.h libtardy/file/output/xz.h \ libtardy/file/output/xz/filename.cc libtardy/main.h \ libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/file/output/xz/filename.cc mv filename.o $@ libtardy/filenamelist.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/filenamelist.cc libtardy/filenamelist.h \ libtardy/main.h libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/filenamelist.cc mv filenamelist.o $@ libtardy/filenamelist/file.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/ac/sys/types.h \ libtardy/file/input.h libtardy/filenamelist.h \ libtardy/filenamelist/file.cc libtardy/filenamelist/file.h \ libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/accumulator.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/filenamelist/file.cc mv file.o $@ libtardy/filenamelist/filter.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/filenamelist.h libtardy/filenamelist/filter.cc \ libtardy/filenamelist/filter.h libtardy/main.h \ libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/filenamelist/filter.cc mv filter.o $@ libtardy/filenamelist/filter/progress.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/stdio.h libtardy/ac/string.h \ libtardy/ac/sys/stat.h libtardy/ac/sys/types.h \ libtardy/ac/time.h libtardy/ac/unistd.h \ libtardy/filenamelist.h libtardy/filenamelist/filter.h \ libtardy/filenamelist/filter/progress.cc \ libtardy/filenamelist/filter/progress.h libtardy/main.h \ libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/filenamelist/filter/progress.cc mv progress.o $@ libtardy/format_family.o: libtardy/ac/bzlib.h libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/sys/types.h \ libtardy/ac/zlib.h libtardy/file/input.h \ libtardy/file/input/bunzip2.h libtardy/file/input/gunzip.h \ libtardy/format_family.cc libtardy/format_family.h \ libtardy/main.h libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/format_family.cc mv format_family.o $@ libtardy/fstrcmp.o: libtardy/ac/assert.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/fstrcmp.cc libtardy/fstrcmp.h \ libtardy/main.h libtardy/trace.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/fstrcmp.cc mv fstrcmp.o $@ libtardy/gmatch.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/gmatch.cc libtardy/gmatch.h \ libtardy/main.h libtardy/rcstring.h libtardy/trace.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/gmatch.cc mv gmatch.o $@ libtardy/mprintf.o: libtardy/ac/assert.h libtardy/ac/errno.h \ libtardy/ac/stdarg.h libtardy/ac/stddef.h libtardy/ac/stdio.h \ libtardy/ac/stdlib.h libtardy/ac/string.h libtardy/main.h \ libtardy/mprintf.cc libtardy/mprintf.h libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/mprintf.cc mv mprintf.o $@ libtardy/rcstring.o: libtardy/ac/assert.h libtardy/ac/ctype.h \ libtardy/ac/stdarg.h libtardy/ac/stddef.h libtardy/ac/stdio.h \ libtardy/ac/stdlib.h libtardy/ac/string.h libtardy/main.h \ libtardy/rcstring.cc libtardy/rcstring.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring.cc mv rcstring.o $@ libtardy/rcstring/accumulator.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/accumulator.cc libtardy/rcstring/accumulator.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/accumulator.cc mv accumulator.o $@ libtardy/rcstring/accumulator/pop_front.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/string.h libtardy/main.h \ libtardy/rcstring.h libtardy/rcstring/accumulator.h \ libtardy/rcstring/accumulator/pop_front.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/rcstring/accumulator/pop_front.cc mv pop_front.o $@ libtardy/rcstring/accumulator/printf.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/stdio.h libtardy/main.h \ libtardy/rcstring.h libtardy/rcstring/accumulator.h \ libtardy/rcstring/accumulator/printf.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/rcstring/accumulator/printf.cc mv printf.o $@ libtardy/rcstring/basename.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/basename.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/basename.cc mv basename.o $@ libtardy/rcstring/clear.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/main.h libtardy/rcstring.h libtardy/rcstring/clear.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/clear.cc mv clear.o $@ libtardy/rcstring/constructor_1.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/constructor_1.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/constructor_1.cc mv constructor_1.o $@ libtardy/rcstring/constructor_2.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/constructor_2.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/constructor_2.cc mv constructor_2.o $@ libtardy/rcstring/copy_constructor.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/copy_constructor.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/rcstring/copy_constructor.cc mv copy_constructor.o $@ libtardy/rcstring/dirname.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/dirname.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/dirname.cc mv dirname.o $@ libtardy/rcstring/downcase.o: libtardy/ac/ctype.h libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/downcase.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/downcase.cc mv downcase.o $@ libtardy/rcstring/ends_with.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/ends_with.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/ends_with.cc mv ends_with.o $@ libtardy/rcstring/eq.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/main.h libtardy/rcstring.h libtardy/rcstring/eq.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/eq.cc mv eq.o $@ libtardy/rcstring/hexdump.o: libtardy/ac/ctype.h libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/accumulator.h libtardy/rcstring/hexdump.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/hexdump.cc mv hexdump.o $@ libtardy/rcstring/list/appelistuniq.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/list.h libtardy/rcstring/list/appelistuniq.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/rcstring/list/appelistuniq.cc mv appelistuniq.o $@ libtardy/rcstring/list/append.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/main.h libtardy/rcstring.h libtardy/rcstring/list.h \ libtardy/rcstring/list/append.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/list/append.cc mv append.o $@ libtardy/rcstring/list/append_list.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/list.h libtardy/rcstring/list/append_list.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/rcstring/list/append_list.cc mv append_list.o $@ libtardy/rcstring/list/append_uniqu.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/list.h libtardy/rcstring/list/append_uniqu.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/rcstring/list/append_uniqu.cc mv append_uniqu.o $@ libtardy/rcstring/list/assign_op.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/main.h libtardy/rcstring.h libtardy/rcstring/list.h \ libtardy/rcstring/list/assign_op.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/rcstring/list/assign_op.cc mv assign_op.o $@ libtardy/rcstring/list/clear.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/main.h libtardy/rcstring.h libtardy/rcstring/list.h \ libtardy/rcstring/list/clear.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/list/clear.cc mv clear.o $@ libtardy/rcstring/list/constructor.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/list.h libtardy/rcstring/list/constructor.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/rcstring/list/constructor.cc mv constructor.o $@ libtardy/rcstring/list/copy.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/main.h libtardy/rcstring.h libtardy/rcstring/list.h \ libtardy/rcstring/list/copy.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/list/copy.cc mv copy.o $@ libtardy/rcstring/list/destructor.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/main.h libtardy/rcstring.h libtardy/rcstring/list.h \ libtardy/rcstring/list/destructor.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/rcstring/list/destructor.cc mv destructor.o $@ libtardy/rcstring/list/equal.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/main.h libtardy/rcstring.h libtardy/rcstring/list.h \ libtardy/rcstring/list/equal.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/list/equal.cc mv equal.o $@ libtardy/rcstring/list/intersection.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/list.h libtardy/rcstring/list/intersection.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/rcstring/list/intersection.cc mv intersection.o $@ libtardy/rcstring/list/member.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/main.h libtardy/rcstring.h libtardy/rcstring/list.h \ libtardy/rcstring/list/member.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/list/member.cc mv member.o $@ libtardy/rcstring/list/member_nocas.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/string.h libtardy/main.h \ libtardy/rcstring.h libtardy/rcstring/list.h \ libtardy/rcstring/list/member_nocas.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/rcstring/list/member_nocas.cc mv member_nocas.o $@ libtardy/rcstring/list/pop_back.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/main.h libtardy/rcstring.h libtardy/rcstring/list.h \ libtardy/rcstring/list/pop_back.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/list/pop_back.cc mv pop_back.o $@ libtardy/rcstring/list/pop_front.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/main.h libtardy/rcstring.h libtardy/rcstring/list.h \ libtardy/rcstring/list/pop_front.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/rcstring/list/pop_front.cc mv pop_front.o $@ libtardy/rcstring/list/prepend.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/main.h libtardy/rcstring.h libtardy/rcstring/list.h \ libtardy/rcstring/list/prepend.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/list/prepend.cc mv prepend.o $@ libtardy/rcstring/list/prepend_list.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/list.h libtardy/rcstring/list/prepend_list.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/rcstring/list/prepend_list.cc mv prepend_list.o $@ libtardy/rcstring/list/quote.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/main.h libtardy/rcstring.h libtardy/rcstring/list.h \ libtardy/rcstring/list/quote.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/list/quote.cc mv quote.o $@ libtardy/rcstring/list/remove.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/main.h libtardy/rcstring.h libtardy/rcstring/list.h \ libtardy/rcstring/list/remove.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/list/remove.cc mv remove.o $@ libtardy/rcstring/list/remove_list.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/list.h libtardy/rcstring/list/remove_list.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/rcstring/list/remove_list.cc mv remove_list.o $@ libtardy/rcstring/list/sort.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/main.h libtardy/rcstring.h libtardy/rcstring/list.h \ libtardy/rcstring/list/sort.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/list/sort.cc mv sort.o $@ libtardy/rcstring/list/sort_long_short.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/list.h \ libtardy/rcstring/list/sort_long_short.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/rcstring/list/sort_long_short.cc mv sort_long_short.o $@ libtardy/rcstring/list/sort_nocase.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/string.h libtardy/main.h \ libtardy/rcstring.h libtardy/rcstring/list.h \ libtardy/rcstring/list/sort_nocase.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/rcstring/list/sort_nocase.cc mv sort_nocase.o $@ libtardy/rcstring/list/sort_vers.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/list.h libtardy/rcstring/list/sort_vers.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/rcstring/list/sort_vers.cc mv sort_vers.o $@ libtardy/rcstring/list/str2wl.o: libtardy/ac/ctype.h libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/string.h libtardy/main.h \ libtardy/rcstring.h libtardy/rcstring/list.h \ libtardy/rcstring/list/str2wl.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/list/str2wl.cc mv str2wl.o $@ libtardy/rcstring/list/subset.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/main.h libtardy/rcstring.h libtardy/rcstring/list.h \ libtardy/rcstring/list/subset.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/list/subset.cc mv subset.o $@ libtardy/rcstring/list/validate.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/main.h libtardy/rcstring.h libtardy/rcstring/list.h \ libtardy/rcstring/list/validate.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/list/validate.cc mv validate.o $@ libtardy/rcstring/list/wl2str.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/accumulator.h libtardy/rcstring/list.h \ libtardy/rcstring/list/wl2str.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/list/wl2str.cc mv wl2str.o $@ libtardy/rcstring/list/xor.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/main.h libtardy/rcstring.h libtardy/rcstring/list.h \ libtardy/rcstring/list/xor.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/list/xor.cc mv xor.o $@ libtardy/rcstring/op_sq_br.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/op_sq_br.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/op_sq_br.cc mv op_sq_br.o $@ libtardy/rcstring/operator_plus.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/operator_plus.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/operator_plus.cc mv operator_plus.o $@ libtardy/rcstring/printf.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/main.h libtardy/mprintf.h libtardy/rcstring.h \ libtardy/rcstring/printf.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/printf.cc mv printf.o $@ libtardy/rcstring/quote_c.o: libtardy/ac/ctype.h libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/accumulator.h libtardy/rcstring/quote_c.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/quote_c.cc mv quote_c.o $@ libtardy/rcstring/substitute.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/accumulator.h libtardy/rcstring/substitute.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/substitute.cc mv substitute.o $@ libtardy/rcstring/substring.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/substring.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/substring.cc mv substring.o $@ libtardy/rcstring/upcase.o: libtardy/ac/ctype.h libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/upcase.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/rcstring/upcase.cc mv upcase.o $@ libtardy/read_whole_directory.o: libtardy/ac/dirent.h libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/unistd.h libtardy/main.h \ libtardy/rcstring.h libtardy/rcstring/list.h \ libtardy/read_whole_directory.cc libtardy/read_whole_directory.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/read_whole_directory.cc mv read_whole_directory.o $@ libtardy/roff.o: libtardy/ac/ctype.h libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/stdio.h libtardy/ac/stdlib.h libtardy/ac/string.h \ libtardy/main.h libtardy/rcstring.h libtardy/roff.cc \ libtardy/roff.h libtardy/trace.h libtardy/version_stmp.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/roff.cc mv roff.o $@ libtardy/symtab.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/stdio.h libtardy/fstrcmp.h libtardy/main.h \ libtardy/rcstring.h libtardy/symtab.cc libtardy/symtab.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/symtab.cc mv symtab.o $@ libtardy/tar/format.o: libtardy/ac/assert.h libtardy/ac/errno.h \ libtardy/ac/stdarg.h libtardy/ac/stddef.h libtardy/ac/stdio.h \ libtardy/ac/string.h libtardy/main.h libtardy/rcstring.h \ libtardy/tar/format.cc libtardy/tar/format.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/format.cc mv format.o $@ libtardy/tar/header.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/time.h libtardy/main.h libtardy/rcstring.h \ libtardy/tar/header.cc libtardy/tar/header.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/header.cc mv header.o $@ libtardy/tar/input.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/stdio.h libtardy/ac/sys/types.h libtardy/ac/time.h \ libtardy/file/input.h libtardy/file/output.h \ libtardy/format_family.h libtardy/main.h libtardy/rcstring.h \ libtardy/tar/header.h libtardy/tar/input.cc \ libtardy/tar/input.h libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/input.cc mv input.o $@ libtardy/tar/input/ar.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/types.h libtardy/ac/time.h \ libtardy/file/input.h libtardy/file/output.h \ libtardy/format_family.h libtardy/main.h libtardy/rcstring.h \ libtardy/tar/header.h libtardy/tar/input.h \ libtardy/tar/input/ar.cc libtardy/tar/input/ar.h \ libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/input/ar.cc mv ar.o $@ libtardy/tar/input/ar/bsd.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/ac/sys/types.h \ libtardy/ac/time.h libtardy/file/input.h \ libtardy/file/output.h libtardy/format_family.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/input.h libtardy/tar/input/ar.h \ libtardy/tar/input/ar/bsd.cc libtardy/tar/input/ar/bsd.h \ libtardy/tar/input/filter.h \ libtardy/tar/input/filter/ar_long_names.h \ libtardy/tar/input/filter/ar_long_names2.h \ libtardy/tar/output.h libtardy/tar/output/ar.h \ libtardy/tar/output/ar/bsd.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/input/ar/bsd.cc mv bsd.o $@ libtardy/tar/input/ar/factory.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/types.h libtardy/ac/time.h libtardy/endian.h \ libtardy/file/input.h libtardy/file/output.h \ libtardy/format_family.h libtardy/main.h libtardy/rcstring.h \ libtardy/tar/header.h libtardy/tar/input.h \ libtardy/tar/input/ar.h libtardy/tar/input/ar/bsd.h \ libtardy/tar/input/ar/factory.cc libtardy/tar/input/ar/pdp11.h \ libtardy/tar/input/ar/v7.h libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/input/ar/factory.cc mv factory.o $@ libtardy/tar/input/ar/pdp11.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/ac/sys/types.h \ libtardy/ac/time.h libtardy/endian.h libtardy/file/input.h \ libtardy/file/output.h libtardy/format_family.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/input.h libtardy/tar/input/ar.h \ libtardy/tar/input/ar/pdp11.cc libtardy/tar/input/ar/pdp11.h \ libtardy/tar/input/filter.h \ libtardy/tar/input/filter/ar_long_names.h \ libtardy/tar/input/filter/ar_long_names2.h \ libtardy/tar/output.h libtardy/tar/output/ar.h \ libtardy/tar/output/ar/pdp11.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/input/ar/pdp11.cc mv pdp11.o $@ libtardy/tar/input/ar/v7.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/ac/sys/types.h \ libtardy/ac/time.h libtardy/endian.h libtardy/file/input.h \ libtardy/file/output.h libtardy/format_family.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/input.h libtardy/tar/input/ar.h \ libtardy/tar/input/ar/v7.cc libtardy/tar/input/ar/v7.h \ libtardy/tar/input/filter.h \ libtardy/tar/input/filter/ar_long_names.h \ libtardy/tar/input/filter/ar_long_names2.h \ libtardy/tar/output.h libtardy/tar/output/ar.h \ libtardy/tar/output/ar/v7.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/input/ar/v7.cc mv v7.o $@ libtardy/tar/input/cpio.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/ac/sys/types.h \ libtardy/ac/time.h libtardy/file/input.h \ libtardy/file/output.h libtardy/format_family.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/input.h libtardy/tar/input/cpio.cc \ libtardy/tar/input/cpio.h libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/input/cpio.cc mv cpio.o $@ libtardy/tar/input/cpio/binary.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/ac/sys/types.h \ libtardy/ac/time.h libtardy/endian.h libtardy/file/input.h \ libtardy/file/output.h libtardy/format_family.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/input.h libtardy/tar/input/cpio.h \ libtardy/tar/input/cpio/binary.cc \ libtardy/tar/input/cpio/binary.h libtardy/tar/output.h \ libtardy/tar/output/cpio.h libtardy/tar/output/cpio/binary.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/input/cpio/binary.cc mv binary.o $@ libtardy/tar/input/cpio/crc.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/ac/sys/types.h \ libtardy/ac/time.h libtardy/file/input.h \ libtardy/file/output.h libtardy/format_family.h \ libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/accumulator.h libtardy/tar/header.h \ libtardy/tar/input.h libtardy/tar/input/cpio.h \ libtardy/tar/input/cpio/crc.cc libtardy/tar/input/cpio/crc.h \ libtardy/tar/output.h libtardy/tar/output/cpio.h \ libtardy/tar/output/cpio/crc.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/input/cpio/crc.cc mv crc.o $@ libtardy/tar/input/cpio/factory.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/types.h libtardy/ac/time.h libtardy/endian.h \ libtardy/file/input.h libtardy/file/output.h \ libtardy/format_family.h libtardy/main.h libtardy/rcstring.h \ libtardy/tar/header.h libtardy/tar/input.h \ libtardy/tar/input/cpio.h libtardy/tar/input/cpio/binary.h \ libtardy/tar/input/cpio/crc.h \ libtardy/tar/input/cpio/factory.cc \ libtardy/tar/input/cpio/new_ascii.h \ libtardy/tar/input/cpio/old_ascii.h libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/input/cpio/factory.cc mv factory.o $@ libtardy/tar/input/cpio/new_ascii.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/ac/sys/types.h \ libtardy/ac/time.h libtardy/file/input.h \ libtardy/file/output.h libtardy/format_family.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/input.h libtardy/tar/input/cpio.h \ libtardy/tar/input/cpio/new_ascii.cc \ libtardy/tar/input/cpio/new_ascii.h libtardy/tar/output.h \ libtardy/tar/output/cpio.h libtardy/tar/output/cpio/newascii.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/tar/input/cpio/new_ascii.cc mv new_ascii.o $@ libtardy/tar/input/cpio/old_ascii.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/ac/sys/types.h \ libtardy/ac/time.h libtardy/file/input.h \ libtardy/file/output.h libtardy/format_family.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/input.h libtardy/tar/input/cpio.h \ libtardy/tar/input/cpio/old_ascii.cc \ libtardy/tar/input/cpio/old_ascii.h libtardy/tar/output.h \ libtardy/tar/output/cpio.h libtardy/tar/output/cpio/oldascii.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/tar/input/cpio/old_ascii.cc mv old_ascii.o $@ libtardy/tar/input/directory.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/param.h libtardy/ac/sys/stat.h \ libtardy/ac/sys/types.h libtardy/ac/time.h \ libtardy/file/input.h libtardy/file/output.h \ libtardy/filenamelist.h libtardy/filenamelist/file.h \ libtardy/format_family.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/list.h libtardy/read_whole_directory.h \ libtardy/tar/header.h libtardy/tar/input.h \ libtardy/tar/input/directory.cc libtardy/tar/input/directory.h \ libtardy/tar/input/filename.h libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/input/directory.cc mv directory.o $@ libtardy/tar/input/factory.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/types.h libtardy/ac/time.h \ libtardy/file/input.h libtardy/file/output.h \ libtardy/format_family.h libtardy/main.h libtardy/rcstring.h \ libtardy/tar/header.h libtardy/tar/input.h \ libtardy/tar/input/ar.h libtardy/tar/input/cpio.h \ libtardy/tar/input/factory.cc libtardy/tar/input/tar.h \ libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/input/factory.cc mv factory.o $@ libtardy/tar/input/filename.o: libtardy/ac/errno.h libtardy/ac/grp.h \ libtardy/ac/pwd.h libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/stdio.h libtardy/ac/string.h \ libtardy/ac/sys/param.h libtardy/ac/sys/stat.h \ libtardy/ac/sys/sysmacros.h libtardy/ac/sys/types.h \ libtardy/ac/time.h libtardy/ac/unistd.h libtardy/file/input.h \ libtardy/file/input/normal.h libtardy/file/output.h \ libtardy/format_family.h libtardy/main.h libtardy/rcstring.h \ libtardy/tar/header.h libtardy/tar/input.h \ libtardy/tar/input/filename.cc libtardy/tar/input/filename.h \ libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/input/filename.cc mv filename.o $@ libtardy/tar/input/filenamelist.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/param.h libtardy/ac/sys/types.h \ libtardy/ac/time.h libtardy/file/input.h \ libtardy/file/output.h libtardy/filenamelist.h \ libtardy/filenamelist/file.h libtardy/filenamelist/filter.h \ libtardy/filenamelist/filter/progress.h \ libtardy/format_family.h libtardy/main.h libtardy/rcstring.h \ libtardy/tar/header.h libtardy/tar/input.h \ libtardy/tar/input/filename.h \ libtardy/tar/input/filenamelist.cc \ libtardy/tar/input/filenamelist.h libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/input/filenamelist.cc mv filenamelist.o $@ libtardy/tar/input/filter.o: libtardy/ac/ctype.h libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/string.h \ libtardy/ac/sys/types.h libtardy/ac/time.h \ libtardy/file/input.h libtardy/file/output.h \ libtardy/format_family.h libtardy/main.h libtardy/rcstring.h \ libtardy/tar/header.h libtardy/tar/input.h \ libtardy/tar/input/filter.cc libtardy/tar/input/filter.h \ libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/input/filter.cc mv filter.o $@ libtardy/tar/input/filter/ar_long_names.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/string.h \ libtardy/ac/sys/types.h libtardy/ac/time.h \ libtardy/file/input.h libtardy/file/output.h \ libtardy/format_family.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/accumulator.h libtardy/rcstring/list.h \ libtardy/tar/header.h libtardy/tar/input.h \ libtardy/tar/input/filter.h \ libtardy/tar/input/filter/ar_long_names.cc \ libtardy/tar/input/filter/ar_long_names.h libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/tar/input/filter/ar_long_names.cc mv ar_long_names.o $@ libtardy/tar/input/filter/ar_long_names2.o: libtardy/ac/ctype.h \ libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/types.h libtardy/ac/time.h \ libtardy/file/input.h libtardy/file/output.h \ libtardy/format_family.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/accumulator.h libtardy/tar/header.h \ libtardy/tar/input.h libtardy/tar/input/filter.h \ libtardy/tar/input/filter/ar_long_names2.cc \ libtardy/tar/input/filter/ar_long_names2.h libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/tar/input/filter/ar_long_names2.cc mv ar_long_names2.o $@ libtardy/tar/input/filter/clean.o: libtardy/ac/ctype.h libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/string.h \ libtardy/ac/sys/types.h libtardy/ac/time.h \ libtardy/file/input.h libtardy/file/output.h \ libtardy/format_family.h libtardy/main.h libtardy/rcstring.h \ libtardy/tar/header.h libtardy/tar/input.h \ libtardy/tar/input/filter.h libtardy/tar/input/filter/clean.cc \ libtardy/tar/input/filter/clean.h libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/input/filter/clean.cc mv clean.o $@ libtardy/tar/input/filter/exclude.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/types.h libtardy/ac/time.h \ libtardy/file/input.h libtardy/file/output.h \ libtardy/format_family.h libtardy/gmatch.h libtardy/main.h \ libtardy/rcstring.h libtardy/tar/header.h libtardy/tar/input.h \ libtardy/tar/input/filter.h \ libtardy/tar/input/filter/exclude.cc \ libtardy/tar/input/filter/exclude.h libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/tar/input/filter/exclude.cc mv exclude.o $@ libtardy/tar/input/filter/group_name.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/sys/types.h \ libtardy/ac/time.h libtardy/file/input.h \ libtardy/file/output.h libtardy/format_family.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/input.h libtardy/tar/input/filter.h \ libtardy/tar/input/filter/group_name.cc \ libtardy/tar/input/filter/group_name.h libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/tar/input/filter/group_name.cc mv group_name.o $@ libtardy/tar/input/filter/group_numbr.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/sys/types.h \ libtardy/ac/time.h libtardy/file/input.h \ libtardy/file/output.h libtardy/format_family.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/input.h libtardy/tar/input/filter.h \ libtardy/tar/input/filter/group_numbr.cc \ libtardy/tar/input/filter/group_numbr.h libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/tar/input/filter/group_numbr.cc mv group_numbr.o $@ libtardy/tar/input/filter/gunzip.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/ac/sys/types.h \ libtardy/ac/time.h libtardy/ac/zlib.h libtardy/file/input.h \ libtardy/file/output.h libtardy/format_family.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/input.h libtardy/tar/input/filter.h \ libtardy/tar/input/filter/gunzip.cc \ libtardy/tar/input/filter/gunzip.h libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/tar/input/filter/gunzip.cc mv gunzip.o $@ libtardy/tar/input/filter/mode_clear.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/sys/types.h \ libtardy/ac/time.h libtardy/file/input.h \ libtardy/file/output.h libtardy/format_family.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/input.h libtardy/tar/input/filter.h \ libtardy/tar/input/filter/mode_clear.cc \ libtardy/tar/input/filter/mode_clear.h libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/tar/input/filter/mode_clear.cc mv mode_clear.o $@ libtardy/tar/input/filter/mode_set.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/sys/types.h \ libtardy/ac/time.h libtardy/file/input.h \ libtardy/file/output.h libtardy/format_family.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/input.h libtardy/tar/input/filter.h \ libtardy/tar/input/filter/mode_set.cc \ libtardy/tar/input/filter/mode_set.h libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/tar/input/filter/mode_set.cc mv mode_set.o $@ libtardy/tar/input/filter/mtime.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/types.h libtardy/ac/time.h \ libtardy/file/input.h libtardy/file/output.h \ libtardy/format_family.h libtardy/main.h libtardy/rcstring.h \ libtardy/tar/header.h libtardy/tar/input.h \ libtardy/tar/input/filter.h libtardy/tar/input/filter/mtime.cc \ libtardy/tar/input/filter/mtime.h libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/input/filter/mtime.cc mv mtime.o $@ libtardy/tar/input/filter/prefix.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/types.h libtardy/ac/time.h \ libtardy/cannonical.h libtardy/file/input.h \ libtardy/file/output.h libtardy/format_family.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/input.h libtardy/tar/input/filter.h \ libtardy/tar/input/filter/prefix.cc \ libtardy/tar/input/filter/prefix.h libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/tar/input/filter/prefix.cc mv prefix.o $@ libtardy/tar/input/filter/relative_paths.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/sys/types.h \ libtardy/ac/time.h libtardy/file/input.h \ libtardy/file/output.h libtardy/format_family.h \ libtardy/main.h libtardy/rcstring.h libtardy/rcstring/list.h \ libtardy/tar/header.h libtardy/tar/input.h \ libtardy/tar/input/filter.h \ libtardy/tar/input/filter/relative_paths.cc \ libtardy/tar/input/filter/relative_paths.h libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/tar/input/filter/relative_paths.cc mv relative_paths.o $@ libtardy/tar/input/filter/remov_prefi.o: libtardy/ac/assert.h \ libtardy/ac/stdarg.h libtardy/ac/stddef.h libtardy/ac/string.h \ libtardy/ac/sys/types.h libtardy/ac/time.h \ libtardy/cannonical.h libtardy/file/input.h \ libtardy/file/output.h libtardy/format_family.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/input.h libtardy/tar/input/filter.h \ libtardy/tar/input/filter/remov_prefi.cc \ libtardy/tar/input/filter/remov_prefi.h libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/tar/input/filter/remov_prefi.cc mv remov_prefi.o $@ libtardy/tar/input/filter/remove_prefix_count.o: libtardy/ac/assert.h \ libtardy/ac/stdarg.h libtardy/ac/stddef.h libtardy/ac/string.h \ libtardy/ac/sys/types.h libtardy/ac/time.h \ libtardy/cannonical.h libtardy/file/input.h \ libtardy/file/output.h libtardy/format_family.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/input.h libtardy/tar/input/filter.h \ libtardy/tar/input/filter/remove_prefix_count.cc \ libtardy/tar/input/filter/remove_prefix_count.h \ libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/tar/input/filter/remove_prefix_count.cc mv remove_prefix_count.o $@ libtardy/tar/input/filter/suppr_direc.o: libtardy/ac/assert.h \ libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/types.h libtardy/ac/time.h \ libtardy/file/input.h libtardy/file/output.h \ libtardy/format_family.h libtardy/main.h libtardy/rcstring.h \ libtardy/tar/header.h libtardy/tar/input.h \ libtardy/tar/input/filter.h \ libtardy/tar/input/filter/suppr_direc.cc \ libtardy/tar/input/filter/suppr_direc.h libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/tar/input/filter/suppr_direc.cc mv suppr_direc.o $@ libtardy/tar/input/filter/user_name.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/sys/types.h \ libtardy/ac/time.h libtardy/file/input.h \ libtardy/file/output.h libtardy/format_family.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/input.h libtardy/tar/input/filter.h \ libtardy/tar/input/filter/user_name.cc \ libtardy/tar/input/filter/user_name.h libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/tar/input/filter/user_name.cc mv user_name.o $@ libtardy/tar/input/filter/user_number.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/sys/types.h \ libtardy/ac/time.h libtardy/file/input.h \ libtardy/file/output.h libtardy/format_family.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/input.h libtardy/tar/input/filter.h \ libtardy/tar/input/filter/user_number.cc \ libtardy/tar/input/filter/user_number.h libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/tar/input/filter/user_number.cc mv user_number.o $@ libtardy/tar/input/tar.o: libtardy/ac/errno.h libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/string.h \ libtardy/ac/sys/types.h libtardy/ac/time.h \ libtardy/file/input.h libtardy/file/output.h \ libtardy/format_family.h libtardy/main.h libtardy/rcstring.h \ libtardy/tar/format.h libtardy/tar/header.h \ libtardy/tar/input.h libtardy/tar/input/tar.cc \ libtardy/tar/input/tar.h libtardy/tar/input/tar/bsd.h \ libtardy/tar/input/tar/posix.h libtardy/tar/input/tar/ustar.h \ libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/input/tar.cc mv tar.o $@ libtardy/tar/input/tar/bsd.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/ac/sys/types.h \ libtardy/ac/time.h libtardy/file/input.h \ libtardy/file/output.h libtardy/format_family.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/format.h \ libtardy/tar/header.h libtardy/tar/input.h \ libtardy/tar/input/tar.h libtardy/tar/input/tar/bsd.cc \ libtardy/tar/input/tar/bsd.h libtardy/tar/output.h \ libtardy/tar/output/tar.h libtardy/tar/output/tar/bsd.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/input/tar/bsd.cc mv bsd.o $@ libtardy/tar/input/tar/posix.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/types.h libtardy/ac/time.h \ libtardy/file/input.h libtardy/file/output.h \ libtardy/format_family.h libtardy/main.h libtardy/rcstring.h \ libtardy/tar/header.h libtardy/tar/input.h \ libtardy/tar/input/tar.h libtardy/tar/input/tar/posix.cc \ libtardy/tar/input/tar/posix.h libtardy/tar/output.h \ libtardy/tar/output/tar.h libtardy/tar/output/tar/posix.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/input/tar/posix.cc mv posix.o $@ libtardy/tar/input/tar/ustar.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/ac/sys/types.h \ libtardy/ac/time.h libtardy/file/input.h \ libtardy/file/output.h libtardy/format_family.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/input.h libtardy/tar/input/tar.h \ libtardy/tar/input/tar/ustar.cc libtardy/tar/input/tar/ustar.h \ libtardy/tar/output.h libtardy/tar/output/tar.h \ libtardy/tar/output/tar/ustar.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/input/tar/ustar.cc mv ustar.o $@ libtardy/tar/input/tar_output_factory.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/sys/types.h \ libtardy/ac/time.h libtardy/file/input.h \ libtardy/file/output.h libtardy/format_family.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/input.h libtardy/tar/input/tar_output_factory.cc \ libtardy/tar/output.h libtardy/tar/output/tar.h \ libtardy/tar/output/tar/posix.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/tar/input/tar_output_factory.cc mv tar_output_factory.o $@ libtardy/tar/output.o: libtardy/ac/assert.h libtardy/ac/errno.h \ libtardy/ac/stdarg.h libtardy/ac/stddef.h libtardy/ac/stdio.h \ libtardy/ac/string.h libtardy/ac/time.h libtardy/main.h \ libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/output.cc libtardy/tar/output.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/output.cc mv output.o $@ libtardy/tar/output/ar.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/stdio.h libtardy/ac/string.h libtardy/ac/time.h \ libtardy/file/output.h libtardy/main.h libtardy/rcstring.h \ libtardy/tar/header.h libtardy/tar/output.h \ libtardy/tar/output/ar.cc libtardy/tar/output/ar.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/output/ar.cc mv ar.o $@ libtardy/tar/output/ar/bsd.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/stdio.h libtardy/ac/string.h libtardy/ac/time.h \ libtardy/file/output.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/accumulator.h libtardy/tar/header.h \ libtardy/tar/output.h libtardy/tar/output/ar.h \ libtardy/tar/output/ar/bsd.cc libtardy/tar/output/ar/bsd.h \ libtardy/tar/output/filter.h \ libtardy/tar/output/filter/ar_long_names.h \ libtardy/tar/output/filter/ar_long_names2.h \ libtardy/tar/output/filter/basename.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/output/ar/bsd.cc mv bsd.o $@ libtardy/tar/output/ar/pdp11.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/ac/time.h libtardy/endian.h \ libtardy/file/output.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/accumulator.h libtardy/tar/header.h \ libtardy/tar/output.h libtardy/tar/output/ar.h \ libtardy/tar/output/ar/pdp11.cc libtardy/tar/output/ar/pdp11.h \ libtardy/tar/output/filter.h \ libtardy/tar/output/filter/ar_long_names.h \ libtardy/tar/output/filter/basename.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/output/ar/pdp11.cc mv pdp11.o $@ libtardy/tar/output/ar/port5.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/ac/time.h libtardy/endian.h \ libtardy/file/output.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/accumulator.h libtardy/tar/header.h \ libtardy/tar/output.h libtardy/tar/output/ar.h \ libtardy/tar/output/ar/port5.cc libtardy/tar/output/ar/port5.h \ libtardy/tar/output/filter.h \ libtardy/tar/output/filter/ar_long_names.h \ libtardy/tar/output/filter/basename.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/output/ar/port5.cc mv port5.o $@ libtardy/tar/output/ar/v7.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/ac/time.h libtardy/endian.h \ libtardy/file/output.h libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/accumulator.h libtardy/tar/header.h \ libtardy/tar/output.h libtardy/tar/output/ar.h \ libtardy/tar/output/ar/v7.cc libtardy/tar/output/ar/v7.h \ libtardy/tar/output/filter.h \ libtardy/tar/output/filter/ar_long_names.h \ libtardy/tar/output/filter/basename.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/output/ar/v7.cc mv v7.o $@ libtardy/tar/output/cpio.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/ac/time.h libtardy/file/output.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/output.h libtardy/tar/output/cpio.cc \ libtardy/tar/output/cpio.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/output/cpio.cc mv cpio.o $@ libtardy/tar/output/cpio/binary.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/time.h libtardy/endian.h libtardy/file/output.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/output.h libtardy/tar/output/cpio.h \ libtardy/tar/output/cpio/binary.cc \ libtardy/tar/output/cpio/binary.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/output/cpio/binary.cc mv binary.o $@ libtardy/tar/output/cpio/crc.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/stdio.h libtardy/ac/time.h libtardy/file/output.h \ libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/accumulator.h libtardy/tar/header.h \ libtardy/tar/output.h libtardy/tar/output/cpio.h \ libtardy/tar/output/cpio/crc.cc libtardy/tar/output/cpio/crc.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/output/cpio/crc.cc mv crc.o $@ libtardy/tar/output/cpio/newascii.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/stdio.h libtardy/ac/time.h libtardy/file/output.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/output.h libtardy/tar/output/cpio.h \ libtardy/tar/output/cpio/newascii.cc \ libtardy/tar/output/cpio/newascii.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/tar/output/cpio/newascii.cc mv newascii.o $@ libtardy/tar/output/cpio/oldascii.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/stdio.h libtardy/ac/time.h libtardy/file/output.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/output.h libtardy/tar/output/cpio.h \ libtardy/tar/output/cpio/oldascii.cc \ libtardy/tar/output/cpio/oldascii.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/tar/output/cpio/oldascii.cc mv oldascii.o $@ libtardy/tar/output/extract.o: libtardy/ac/errno.h libtardy/ac/fcntl.h \ libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/param.h libtardy/ac/sys/stat.h \ libtardy/ac/time.h libtardy/main.h libtardy/rcstring.h \ libtardy/tar/header.h libtardy/tar/output.h \ libtardy/tar/output/extract.cc libtardy/tar/output/extract.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/output/extract.cc mv extract.o $@ libtardy/tar/output/filter.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/time.h libtardy/main.h libtardy/rcstring.h \ libtardy/tar/header.h libtardy/tar/output.h \ libtardy/tar/output/filter.cc libtardy/tar/output/filter.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/output/filter.cc mv filter.o $@ libtardy/tar/output/filter/ar_long_names.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/string.h libtardy/ac/time.h \ libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/accumulator.h libtardy/rcstring/list.h \ libtardy/tar/header.h libtardy/tar/output.h \ libtardy/tar/output/filter.h \ libtardy/tar/output/filter/ar_long_names.cc \ libtardy/tar/output/filter/ar_long_names.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/tar/output/filter/ar_long_names.cc mv ar_long_names.o $@ libtardy/tar/output/filter/ar_long_names2.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/string.h libtardy/ac/time.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/output.h libtardy/tar/output/filter.h \ libtardy/tar/output/filter/ar_long_names2.cc \ libtardy/tar/output/filter/ar_long_names2.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/tar/output/filter/ar_long_names2.cc mv ar_long_names2.o $@ libtardy/tar/output/filter/basename.o: libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/time.h libtardy/main.h \ libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/output.h libtardy/tar/output/filter.h \ libtardy/tar/output/filter/basename.cc \ libtardy/tar/output/filter/basename.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c \ libtardy/tar/output/filter/basename.cc mv basename.o $@ libtardy/tar/output/filter/gzip.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/stdio.h libtardy/ac/stdlib.h libtardy/ac/string.h \ libtardy/ac/time.h libtardy/ac/unistd.h libtardy/ac/zlib.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/output.h libtardy/tar/output/filter.h \ libtardy/tar/output/filter/gzip.cc \ libtardy/tar/output/filter/gzip.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/output/filter/gzip.cc mv gzip.o $@ libtardy/tar/output/filter/list.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/stdio.h libtardy/ac/time.h libtardy/main.h \ libtardy/rcstring.h libtardy/tar/header.h \ libtardy/tar/output.h libtardy/tar/output/filter.h \ libtardy/tar/output/filter/list.cc \ libtardy/tar/output/filter/list.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/output/filter/list.cc mv list.o $@ libtardy/tar/output/tar.o: libtardy/ac/assert.h libtardy/ac/stdarg.h \ libtardy/ac/stddef.h libtardy/ac/string.h libtardy/ac/time.h \ libtardy/file/output.h libtardy/main.h libtardy/rcstring.h \ libtardy/tar/format.h libtardy/tar/header.h \ libtardy/tar/output.h libtardy/tar/output/tar.cc \ libtardy/tar/output/tar.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/output/tar.cc mv tar.o $@ libtardy/tar/output/tar/bsd.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/ac/time.h libtardy/file/output.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/format.h \ libtardy/tar/header.h libtardy/tar/output.h \ libtardy/tar/output/tar.h libtardy/tar/output/tar/bsd.cc \ libtardy/tar/output/tar/bsd.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/output/tar/bsd.cc mv bsd.o $@ libtardy/tar/output/tar/posix.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/ac/time.h libtardy/file/output.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/format.h \ libtardy/tar/header.h libtardy/tar/output.h \ libtardy/tar/output/tar.h libtardy/tar/output/tar/posix.cc \ libtardy/tar/output/tar/posix.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/output/tar/posix.cc mv posix.o $@ libtardy/tar/output/tar/ustar.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/ac/time.h libtardy/file/output.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/format.h \ libtardy/tar/header.h libtardy/tar/output.h \ libtardy/tar/output/tar.h libtardy/tar/output/tar/ustar.cc \ libtardy/tar/output/tar/ustar.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/output/tar/ustar.cc mv ustar.o $@ libtardy/tar/output/tar/v7.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/string.h libtardy/ac/time.h libtardy/file/output.h \ libtardy/main.h libtardy/rcstring.h libtardy/tar/format.h \ libtardy/tar/header.h libtardy/tar/output.h \ libtardy/tar/output/tar.h libtardy/tar/output/tar/v7.cc \ libtardy/tar/output/tar/v7.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/tar/output/tar/v7.cc mv v7.o $@ libtardy/trace.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/stdio.h libtardy/ac/string.h libtardy/main.h \ libtardy/rcstring.h libtardy/trace.cc libtardy/trace.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/trace.cc mv trace.o $@ libtardy/versi_stamp.o: libtardy/main.h libtardy/versi_stamp.cc \ libtardy/version_stmp.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/versi_stamp.cc mv versi_stamp.o $@ libtardy/version.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/stdio.h libtardy/ac/stdlib.h libtardy/arglex.h \ libtardy/main.h libtardy/rcstring.h libtardy/roff.h \ libtardy/trace.h libtardy/version.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c libtardy/version.cc mv version.o $@ man/cat1/tardy.1: man/man1/o__rules.so man/man1/o_help.so man/man1/tardy.1 \ man/man1/z_cr.so man/man1/z_exit.so @mkdir -p man/cat1 GROFF_NO_SGR=-c $(GROFF) -I. -Tascii -t -man man/man1/tardy.1 > $@ $(mandir)/man1/tardy.1: .mkdir.__mandir__man1 man/man1/o__rules.so \ man/man1/o_help.so man/man1/tardy.1 man/man1/z_cr.so \ man/man1/z_exit.so $(SOELIM) -I. man/man1/tardy.1 | sed '/^[.]XX ./d' > \ man/man1/tardy.1.tmp $(INSTALL_DATA) man/man1/tardy.1.tmp $@ @rm -f man/man1/tardy.1.tmp man/cat1/tardy_license.1: man/man1/tardy_license.1 @mkdir -p man/cat1 GROFF_NO_SGR=-c $(GROFF) -I. -Tascii -t -man man/man1/tardy_license.1 \ > $@ $(mandir)/man1/tardy_license.1: .mkdir.__mandir__man1 man/man1/tardy_license.1 sed '/^[.]XX ./d' < man/man1/tardy_license.1 > \ man/man1/tardy_license.1.tmp $(INSTALL_DATA) man/man1/tardy_license.1.tmp $@ @rm -f man/man1/tardy_license.1.tmp script/test_prelude.sh: config.status script/test_prelude.sh.in CONFIG_FILES=$@:script/test_prelude.sh.in CONFIG_HEADERS= $(SH) \ config.status bin/test_prelude: .bin script/test_prelude.sh cp script/test_prelude.sh $@ chmod a+rx $@ tardy/arglex/tardy.o: libtardy/ac/stdio.h libtardy/ac/stdlib.h \ libtardy/arglex.h libtardy/main.h tardy/arglex/tardy.cc \ tardy/arglex/tardy.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c tardy/arglex/tardy.cc mv tardy.o $@ tardy/ifmt.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/sys/types.h libtardy/ac/time.h libtardy/endian.h \ libtardy/file/input.h libtardy/file/output.h \ libtardy/filenamelist.h libtardy/format_family.h \ libtardy/main.h libtardy/rcstring.h libtardy/symtab.h \ libtardy/tar/header.h libtardy/tar/input.h \ libtardy/tar/input/ar.h libtardy/tar/input/ar/bsd.h \ libtardy/tar/input/ar/pdp11.h libtardy/tar/input/ar/v7.h \ libtardy/tar/input/cpio.h libtardy/tar/input/cpio/binary.h \ libtardy/tar/input/cpio/crc.h \ libtardy/tar/input/cpio/new_ascii.h \ libtardy/tar/input/cpio/old_ascii.h \ libtardy/tar/input/directory.h \ libtardy/tar/input/filenamelist.h libtardy/tar/input/tar.h \ libtardy/tar/input/tar/bsd.h libtardy/tar/input/tar/posix.h \ libtardy/tar/input/tar/ustar.h libtardy/tar/output.h \ tardy/ifmt.cc tardy/ifmt.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c tardy/ifmt.cc mv ifmt.o $@ tardy/main.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h libtardy/ac/stdio.h \ libtardy/ac/stdlib.h libtardy/ac/sys/types.h \ libtardy/ac/time.h libtardy/arglex.h libtardy/file/input.h \ libtardy/file/output.h libtardy/filenamelist.h \ libtardy/format_family.h libtardy/main.h libtardy/rcstring.h \ libtardy/tar/header.h libtardy/tar/input.h \ libtardy/tar/input/filenamelist.h libtardy/tar/output.h \ libtardy/trace.h tardy/arglex/tardy.h tardy/ifmt.h \ tardy/main.cc tardy/tardy.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c tardy/main.cc mv main.o $@ tardy/ofmt.o: libtardy/ac/stdarg.h libtardy/ac/stddef.h libtardy/ac/stdio.h \ libtardy/ac/time.h libtardy/endian.h libtardy/file/output.h \ libtardy/main.h libtardy/rcstring.h \ libtardy/rcstring/accumulator.h libtardy/symtab.h \ libtardy/tar/header.h libtardy/tar/output.h \ libtardy/tar/output/ar.h libtardy/tar/output/ar/bsd.h \ libtardy/tar/output/ar/pdp11.h libtardy/tar/output/ar/port5.h \ libtardy/tar/output/ar/v7.h libtardy/tar/output/cpio.h \ libtardy/tar/output/cpio/binary.h \ libtardy/tar/output/cpio/crc.h \ libtardy/tar/output/cpio/newascii.h \ libtardy/tar/output/cpio/oldascii.h libtardy/tar/output/tar.h \ libtardy/tar/output/tar/bsd.h libtardy/tar/output/tar/posix.h \ libtardy/tar/output/tar/ustar.h libtardy/tar/output/tar/v7.h \ tardy/ofmt.cc tardy/ofmt.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c tardy/ofmt.cc mv ofmt.o $@ tardy/tardy.o: libtardy/ac/bzlib.h libtardy/ac/grp.h libtardy/ac/lzma.h \ libtardy/ac/pwd.h libtardy/ac/stdarg.h libtardy/ac/stddef.h \ libtardy/ac/stdio.h libtardy/ac/sys/types.h libtardy/ac/time.h \ libtardy/ac/zlib.h libtardy/file/input.h \ libtardy/file/output.h libtardy/file/output/buffer.h \ libtardy/file/output/bzip2.h libtardy/file/output/gzip.h \ libtardy/file/output/hexdump.h libtardy/file/output/xz.h \ libtardy/format_family.h libtardy/main.h libtardy/rcstring.h \ libtardy/tar/header.h libtardy/tar/input.h \ libtardy/tar/input/filter.h libtardy/tar/input/filter/clean.h \ libtardy/tar/input/filter/exclude.h \ libtardy/tar/input/filter/group_name.h \ libtardy/tar/input/filter/group_numbr.h \ libtardy/tar/input/filter/gunzip.h \ libtardy/tar/input/filter/mode_clear.h \ libtardy/tar/input/filter/mode_set.h \ libtardy/tar/input/filter/mtime.h \ libtardy/tar/input/filter/prefix.h \ libtardy/tar/input/filter/relative_paths.h \ libtardy/tar/input/filter/remov_prefi.h \ libtardy/tar/input/filter/remove_prefix_count.h \ libtardy/tar/input/filter/suppr_direc.h \ libtardy/tar/input/filter/user_name.h \ libtardy/tar/input/filter/user_number.h libtardy/tar/output.h \ libtardy/tar/output/extract.h libtardy/tar/output/filter.h \ libtardy/tar/output/filter/gzip.h \ libtardy/tar/output/filter/list.h tardy/ifmt.h tardy/ofmt.h \ tardy/tardy.cc tardy/tardy.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I. -c tardy/tardy.cc mv tardy.o $@ t0001a: all test/00/t0001a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0001a.sh t0002a: all test/00/t0002a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0002a.sh t0003a: all test/00/t0003a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0003a.sh t0004a: all test/00/t0004a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0004a.sh t0005a: all test/00/t0005a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0005a.sh t0006a: all test/00/t0006a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0006a.sh t0007a: all test/00/t0007a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0007a.sh t0008a: all test/00/t0008a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0008a.sh t0009a: all test/00/t0009a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0009a.sh t0010a: all test/00/t0010a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0010a.sh t0011a: all test/00/t0011a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0011a.sh t0012a: all test/00/t0012a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0012a.sh t0013a: all test/00/t0013a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0013a.sh t0014a: all test/00/t0014a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0014a.sh t0015a: all test/00/t0015a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0015a.sh t0016a: all test/00/t0016a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0016a.sh t0017a: all test/00/t0017a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0017a.sh t0018a: all test/00/t0018a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0018a.sh t0019a: all test/00/t0019a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0019a.sh t0020a: all test/00/t0020a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0020a.sh t0021a: all test/00/t0021a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0021a.sh t0022a: all test/00/t0022a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0022a.sh t0023a: all test/00/t0023a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0023a.sh t0025a: all test/00/t0025a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0025a.sh t0026a: all test/00/t0026a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0026a.sh t0027a: all test/00/t0027a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0027a.sh t0028a: all test/00/t0028a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0028a.sh t0029a: all test/00/t0029a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0029a.sh t0030a: all test/00/t0030a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0030a.sh t0031a: all test/00/t0031a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0031a.sh t0032a: all test/00/t0032a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0032a.sh t0033a: all test/00/t0033a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0033a.sh t0035a: all test/00/t0035a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0035a.sh t0036a: all test/00/t0036a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0036a.sh t0037a: all test/00/t0037a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0037a.sh t0039a: all test/00/t0039a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0039a.sh t0050a: all test/00/t0050a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0050a.sh t0051a: all test/00/t0051a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0051a.sh t0052a: all test/00/t0052a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0052a.sh t0053a: all test/00/t0053a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0053a.sh t0055a: all test/00/t0055a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0055a.sh t0056a: all test/00/t0056a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0056a.sh t0057a: all test/00/t0057a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0057a.sh t0058a: all test/00/t0058a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0058a.sh t0059a: all test/00/t0059a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0059a.sh t0060a: all test/00/t0060a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0060a.sh t0061a: all test/00/t0061a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0061a.sh t0062a: all test/00/t0062a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0062a.sh t0063a: all test/00/t0063a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0063a.sh t0065a: all test/00/t0065a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0065a.sh t0067a: all test/00/t0067a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0067a.sh t0068a: all test/00/t0068a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0068a.sh t0070a: all test/00/t0070a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0070a.sh t0072a: all test/00/t0072a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0072a.sh t0073a: all test/00/t0073a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0073a.sh t0075a: all test/00/t0075a.sh PATH=`pwd`/bin:$$PATH $(SH) test/00/t0075a.sh web.src/icon-01.png: web.src/icon-01.png.uue uudecode -o $@ web.src/icon-01.png.uue web.src/icon-02.png: web.src/icon-02.png.uue uudecode -o $@ web.src/icon-02.png.uue web.src/icon-03.png: web.src/icon-03.png.uue uudecode -o $@ web.src/icon-03.png.uue web.src/icon-04.png: web.src/icon-04.png.uue uudecode -o $@ web.src/icon-04.png.uue web.src/icon-05.png: web.src/icon-05.png.uue uudecode -o $@ web.src/icon-05.png.uue web.src/icon-06.png: web.src/icon-06.png.uue uudecode -o $@ web.src/icon-06.png.uue web.src/icon-07.png: web.src/icon-07.png.uue uudecode -o $@ web.src/icon-07.png.uue web.src/icon-08.png: web.src/icon-08.png.uue uudecode -o $@ web.src/icon-08.png.uue web.src/icon-09.png: web.src/icon-09.png.uue uudecode -o $@ web.src/icon-09.png.uue web.src/icon-10.png: web.src/icon-10.png.uue uudecode -o $@ web.src/icon-10.png.uue web.src/icon-11.png: web.src/icon-11.png.uue uudecode -o $@ web.src/icon-11.png.uue web.src/icon-12.png: web.src/icon-12.png.uue uudecode -o $@ web.src/icon-12.png.uue # # The libtardy/libtardy.a library. # libtardy_obj = libtardy/ac/bzlib.o libtardy/ac/lzma.o libtardy/ac/stdio.o \ libtardy/ac/string.o libtardy/ac/zlib.o libtardy/arglex.o \ libtardy/cannonical.o libtardy/endian.o libtardy/file/input.o \ libtardy/file/input/bunzip2.o \ libtardy/file/input/bunzip2/candidate.o \ libtardy/file/input/bunzip2/create_if_candidate.o \ libtardy/file/input/bunzip2/filename.o \ libtardy/file/input/bunzip2/get_position_inner.o \ libtardy/file/input/bunzip2/remove_filename_suffix.o \ libtardy/file/input/factory.o libtardy/file/input/gunzip.o \ libtardy/file/input/gunzip/remove_filename_suffix.o \ libtardy/file/input/normal.o libtardy/file/input/position.o \ libtardy/file/input/stdin.o libtardy/file/input/xz.o \ libtardy/file/input/xz/candidate.o \ libtardy/file/input/xz/create_if_candidate.o \ libtardy/file/input/xz/filename.o \ libtardy/file/input/xz/get_position_inner.o \ libtardy/file/input/xz/remove_filename_suffix.o \ libtardy/file/output.o libtardy/file/output/buffer.o \ libtardy/file/output/bzip2.o \ libtardy/file/output/bzip2/candidate.o \ libtardy/file/output/bzip2/filename.o \ libtardy/file/output/factory.o libtardy/file/output/gzip.o \ libtardy/file/output/gzip/candidate.o \ libtardy/file/output/gzip/filename.o \ libtardy/file/output/hexdump.o libtardy/file/output/normal.o \ libtardy/file/output/stdout.o libtardy/file/output/xz.o \ libtardy/file/output/xz/candidate.o \ libtardy/file/output/xz/filename.o libtardy/filenamelist.o \ libtardy/filenamelist/file.o libtardy/filenamelist/filter.o \ libtardy/filenamelist/filter/progress.o \ libtardy/format_family.o libtardy/fstrcmp.o libtardy/gmatch.o \ libtardy/mprintf.o libtardy/rcstring.o \ libtardy/rcstring/accumulator.o \ libtardy/rcstring/accumulator/pop_front.o \ libtardy/rcstring/accumulator/printf.o \ libtardy/rcstring/basename.o libtardy/rcstring/clear.o \ libtardy/rcstring/constructor_1.o \ libtardy/rcstring/constructor_2.o \ libtardy/rcstring/copy_constructor.o \ libtardy/rcstring/dirname.o libtardy/rcstring/downcase.o \ libtardy/rcstring/ends_with.o libtardy/rcstring/eq.o \ libtardy/rcstring/hexdump.o \ libtardy/rcstring/list/appelistuniq.o \ libtardy/rcstring/list/append.o \ libtardy/rcstring/list/append_list.o \ libtardy/rcstring/list/append_uniqu.o \ libtardy/rcstring/list/assign_op.o \ libtardy/rcstring/list/clear.o \ libtardy/rcstring/list/constructor.o \ libtardy/rcstring/list/copy.o \ libtardy/rcstring/list/destructor.o \ libtardy/rcstring/list/equal.o \ libtardy/rcstring/list/intersection.o \ libtardy/rcstring/list/member.o \ libtardy/rcstring/list/member_nocas.o \ libtardy/rcstring/list/pop_back.o \ libtardy/rcstring/list/pop_front.o \ libtardy/rcstring/list/prepend.o \ libtardy/rcstring/list/prepend_list.o \ libtardy/rcstring/list/quote.o libtardy/rcstring/list/remove.o \ libtardy/rcstring/list/remove_list.o \ libtardy/rcstring/list/sort.o \ libtardy/rcstring/list/sort_long_short.o \ libtardy/rcstring/list/sort_nocase.o \ libtardy/rcstring/list/sort_vers.o \ libtardy/rcstring/list/str2wl.o \ libtardy/rcstring/list/subset.o \ libtardy/rcstring/list/validate.o \ libtardy/rcstring/list/wl2str.o libtardy/rcstring/list/xor.o \ libtardy/rcstring/op_sq_br.o libtardy/rcstring/operator_plus.o \ libtardy/rcstring/printf.o libtardy/rcstring/quote_c.o \ libtardy/rcstring/substitute.o libtardy/rcstring/substring.o \ libtardy/rcstring/upcase.o libtardy/read_whole_directory.o \ libtardy/roff.o libtardy/symtab.o libtardy/tar/format.o \ libtardy/tar/header.o libtardy/tar/input.o \ libtardy/tar/input/ar.o libtardy/tar/input/ar/bsd.o \ libtardy/tar/input/ar/factory.o libtardy/tar/input/ar/pdp11.o \ libtardy/tar/input/ar/v7.o libtardy/tar/input/cpio.o \ libtardy/tar/input/cpio/binary.o libtardy/tar/input/cpio/crc.o \ libtardy/tar/input/cpio/factory.o \ libtardy/tar/input/cpio/new_ascii.o \ libtardy/tar/input/cpio/old_ascii.o \ libtardy/tar/input/directory.o libtardy/tar/input/factory.o \ libtardy/tar/input/filename.o \ libtardy/tar/input/filenamelist.o libtardy/tar/input/filter.o \ libtardy/tar/input/filter/ar_long_names.o \ libtardy/tar/input/filter/ar_long_names2.o \ libtardy/tar/input/filter/clean.o \ libtardy/tar/input/filter/exclude.o \ libtardy/tar/input/filter/group_name.o \ libtardy/tar/input/filter/group_numbr.o \ libtardy/tar/input/filter/gunzip.o \ libtardy/tar/input/filter/mode_clear.o \ libtardy/tar/input/filter/mode_set.o \ libtardy/tar/input/filter/mtime.o \ libtardy/tar/input/filter/prefix.o \ libtardy/tar/input/filter/relative_paths.o \ libtardy/tar/input/filter/remov_prefi.o \ libtardy/tar/input/filter/remove_prefix_count.o \ libtardy/tar/input/filter/suppr_direc.o \ libtardy/tar/input/filter/user_name.o \ libtardy/tar/input/filter/user_number.o \ libtardy/tar/input/tar.o libtardy/tar/input/tar/bsd.o \ libtardy/tar/input/tar/posix.o libtardy/tar/input/tar/ustar.o \ libtardy/tar/input/tar_output_factory.o libtardy/tar/output.o \ libtardy/tar/output/ar.o libtardy/tar/output/ar/bsd.o \ libtardy/tar/output/ar/pdp11.o libtardy/tar/output/ar/port5.o \ libtardy/tar/output/ar/v7.o libtardy/tar/output/cpio.o \ libtardy/tar/output/cpio/binary.o \ libtardy/tar/output/cpio/crc.o \ libtardy/tar/output/cpio/newascii.o \ libtardy/tar/output/cpio/oldascii.o \ libtardy/tar/output/extract.o libtardy/tar/output/filter.o \ libtardy/tar/output/filter/ar_long_names.o \ libtardy/tar/output/filter/ar_long_names2.o \ libtardy/tar/output/filter/basename.o \ libtardy/tar/output/filter/gzip.o \ libtardy/tar/output/filter/list.o libtardy/tar/output/tar.o \ libtardy/tar/output/tar/bsd.o libtardy/tar/output/tar/posix.o \ libtardy/tar/output/tar/ustar.o libtardy/tar/output/tar/v7.o \ libtardy/trace.o libtardy/versi_stamp.o libtardy/version.o libtardy/libtardy.a: $(libtardy_obj) rm -f $@ $(AR) qc $@ $(libtardy_obj) $(RANLIB) $@ .mkdir.__bindir_: -$(INSTALL_DIR) $(bindir) @-test -d $(bindir) && touch $@ @sleep 1 .mkdir.__datarootdir_: -$(INSTALL_DIR) $(datarootdir) @-test -d $(datarootdir) && touch $@ @sleep 1 .mkdir.__datarootdir__doc: .mkdir.__datarootdir_ -$(INSTALL_DIR) $(datarootdir)/doc @-test -d $(datarootdir)/doc && touch $@ @sleep 1 .mkdir.__datarootdir__doc_tardy: .mkdir.__datarootdir__doc -$(INSTALL_DIR) $(datarootdir)/doc/tardy @-test -d $(datarootdir)/doc/tardy && touch $@ @sleep 1 .mkdir.__mandir_: -$(INSTALL_DIR) $(mandir) @-test -d $(mandir) && touch $@ @sleep 1 .mkdir.__mandir__man1: .mkdir.__mandir_ -$(INSTALL_DIR) $(mandir)/man1 @-test -d $(mandir)/man1 && touch $@ @sleep 1 # # The tardy program. # tardy_obj = tardy/arglex/tardy.o tardy/ifmt.o tardy/main.o tardy/ofmt.o \ tardy/tardy.o bin/tardy: $(tardy_obj) .bin libtardy/libtardy.a $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $(tardy_obj) libtardy/libtardy.a \ $(LDFLAGS) $(LIBS) $(bindir)/tardy: .mkdir.__bindir_ bin/tardy $(INSTALL_PROGRAM) bin/tardy $@ all: all-bin all-doc all-bin: bin/tardy bin/test_prelude all-doc: etc/BUILDING.pdf etc/README.pdf etc/reference.pdf man/cat1/tardy.1 \ man/cat1/tardy_license.1 .bin: -mkdir bin -chmod 0755 bin @-test -d bin && touch $@ @sleep 1 check: sure test_files = t0001a t0002a t0003a t0004a t0005a t0006a t0007a t0008a t0009a \ t0010a t0011a t0012a t0013a t0014a t0015a t0016a t0017a t0018a \ t0019a t0020a t0021a t0022a t0023a t0025a t0026a t0027a t0028a \ t0029a t0030a t0031a t0032a t0033a t0035a t0036a t0037a t0039a \ t0050a t0051a t0052a t0053a t0055a t0056a t0057a t0058a t0059a \ t0060a t0061a t0062a t0063a t0065a t0067a t0068a t0070a t0072a \ t0073a t0075a sure: $(test_files) @echo Passed All Tests clean: clean-bin clean-doc clean-misc clean-obj clean-bin: rm -f bin/tardy bin/test_prelude clean-doc: rm -f etc/BUILDING.pdf etc/README.pdf etc/reference.pdf man/cat1/tardy.1 rm -f man/cat1/tardy_license.1 clean-misc: rm -f .bin .mkdir.__bindir_ .mkdir.__datarootdir_ rm -f .mkdir.__datarootdir__doc .mkdir.__datarootdir__doc_tardy rm -f .mkdir.__mandir_ .mkdir.__mandir__man1 core etc/BUILDING.pdf rm -f etc/README.pdf etc/reference.pdf web.src/icon-01.png rm -f web.src/icon-02.png web.src/icon-03.png web.src/icon-04.png rm -f web.src/icon-05.png web.src/icon-06.png web.src/icon-07.png rm -f web.src/icon-08.png web.src/icon-09.png web.src/icon-10.png rm -f web.src/icon-11.png web.src/icon-12.png clean-obj: rm -f libtardy/ac/bzlib.o libtardy/ac/lzma.o libtardy/ac/stdio.o rm -f libtardy/ac/string.o libtardy/ac/zlib.o libtardy/arglex.o rm -f libtardy/cannonical.o libtardy/endian.o libtardy/file/input.o rm -f libtardy/file/input/bunzip2.o rm -f libtardy/file/input/bunzip2/candidate.o rm -f libtardy/file/input/bunzip2/create_if_candidate.o rm -f libtardy/file/input/bunzip2/filename.o rm -f libtardy/file/input/bunzip2/get_position_inner.o rm -f libtardy/file/input/bunzip2/remove_filename_suffix.o rm -f libtardy/file/input/factory.o libtardy/file/input/gunzip.o rm -f libtardy/file/input/gunzip/remove_filename_suffix.o rm -f libtardy/file/input/normal.o libtardy/file/input/position.o rm -f libtardy/file/input/stdin.o libtardy/file/input/xz.o rm -f libtardy/file/input/xz/candidate.o rm -f libtardy/file/input/xz/create_if_candidate.o rm -f libtardy/file/input/xz/filename.o rm -f libtardy/file/input/xz/get_position_inner.o rm -f libtardy/file/input/xz/remove_filename_suffix.o rm -f libtardy/file/output.o libtardy/file/output/buffer.o rm -f libtardy/file/output/bzip2.o rm -f libtardy/file/output/bzip2/candidate.o rm -f libtardy/file/output/bzip2/filename.o rm -f libtardy/file/output/factory.o libtardy/file/output/gzip.o rm -f libtardy/file/output/gzip/candidate.o rm -f libtardy/file/output/gzip/filename.o rm -f libtardy/file/output/hexdump.o libtardy/file/output/normal.o rm -f libtardy/file/output/stdout.o libtardy/file/output/xz.o rm -f libtardy/file/output/xz/candidate.o rm -f libtardy/file/output/xz/filename.o libtardy/filenamelist.o rm -f libtardy/filenamelist/file.o libtardy/filenamelist/filter.o rm -f libtardy/filenamelist/filter/progress.o libtardy/format_family.o rm -f libtardy/fstrcmp.o libtardy/gmatch.o libtardy/libtardy.a rm -f libtardy/mprintf.o libtardy/rcstring.o rm -f libtardy/rcstring/accumulator.o rm -f libtardy/rcstring/accumulator/pop_front.o rm -f libtardy/rcstring/accumulator/printf.o rm -f libtardy/rcstring/basename.o libtardy/rcstring/clear.o rm -f libtardy/rcstring/constructor_1.o rm -f libtardy/rcstring/constructor_2.o rm -f libtardy/rcstring/copy_constructor.o libtardy/rcstring/dirname.o rm -f libtardy/rcstring/downcase.o libtardy/rcstring/ends_with.o rm -f libtardy/rcstring/eq.o libtardy/rcstring/hexdump.o rm -f libtardy/rcstring/list/appelistuniq.o rm -f libtardy/rcstring/list/append.o rm -f libtardy/rcstring/list/append_list.o rm -f libtardy/rcstring/list/append_uniqu.o rm -f libtardy/rcstring/list/assign_op.o libtardy/rcstring/list/clear.o rm -f libtardy/rcstring/list/constructor.o libtardy/rcstring/list/copy.o rm -f libtardy/rcstring/list/destructor.o libtardy/rcstring/list/equal.o rm -f libtardy/rcstring/list/intersection.o rm -f libtardy/rcstring/list/member.o rm -f libtardy/rcstring/list/member_nocas.o rm -f libtardy/rcstring/list/pop_back.o rm -f libtardy/rcstring/list/pop_front.o rm -f libtardy/rcstring/list/prepend.o rm -f libtardy/rcstring/list/prepend_list.o rm -f libtardy/rcstring/list/quote.o libtardy/rcstring/list/remove.o rm -f libtardy/rcstring/list/remove_list.o libtardy/rcstring/list/sort.o rm -f libtardy/rcstring/list/sort_long_short.o rm -f libtardy/rcstring/list/sort_nocase.o rm -f libtardy/rcstring/list/sort_vers.o libtardy/rcstring/list/str2wl.o rm -f libtardy/rcstring/list/subset.o libtardy/rcstring/list/validate.o rm -f libtardy/rcstring/list/wl2str.o libtardy/rcstring/list/xor.o rm -f libtardy/rcstring/op_sq_br.o libtardy/rcstring/operator_plus.o rm -f libtardy/rcstring/printf.o libtardy/rcstring/quote_c.o rm -f libtardy/rcstring/substitute.o libtardy/rcstring/substring.o rm -f libtardy/rcstring/upcase.o libtardy/read_whole_directory.o rm -f libtardy/roff.o libtardy/symtab.o libtardy/tar/format.o rm -f libtardy/tar/header.o libtardy/tar/input.o libtardy/tar/input/ar.o rm -f libtardy/tar/input/ar/bsd.o libtardy/tar/input/ar/factory.o rm -f libtardy/tar/input/ar/pdp11.o libtardy/tar/input/ar/v7.o rm -f libtardy/tar/input/cpio.o libtardy/tar/input/cpio/binary.o rm -f libtardy/tar/input/cpio/crc.o libtardy/tar/input/cpio/factory.o rm -f libtardy/tar/input/cpio/new_ascii.o rm -f libtardy/tar/input/cpio/old_ascii.o libtardy/tar/input/directory.o rm -f libtardy/tar/input/factory.o libtardy/tar/input/filename.o rm -f libtardy/tar/input/filenamelist.o libtardy/tar/input/filter.o rm -f libtardy/tar/input/filter/ar_long_names.o rm -f libtardy/tar/input/filter/ar_long_names2.o rm -f libtardy/tar/input/filter/clean.o rm -f libtardy/tar/input/filter/exclude.o rm -f libtardy/tar/input/filter/group_name.o rm -f libtardy/tar/input/filter/group_numbr.o rm -f libtardy/tar/input/filter/gunzip.o rm -f libtardy/tar/input/filter/mode_clear.o rm -f libtardy/tar/input/filter/mode_set.o rm -f libtardy/tar/input/filter/mtime.o rm -f libtardy/tar/input/filter/prefix.o rm -f libtardy/tar/input/filter/relative_paths.o rm -f libtardy/tar/input/filter/remov_prefi.o rm -f libtardy/tar/input/filter/remove_prefix_count.o rm -f libtardy/tar/input/filter/suppr_direc.o rm -f libtardy/tar/input/filter/user_name.o rm -f libtardy/tar/input/filter/user_number.o libtardy/tar/input/tar.o rm -f libtardy/tar/input/tar/bsd.o libtardy/tar/input/tar/posix.o rm -f libtardy/tar/input/tar/ustar.o rm -f libtardy/tar/input/tar_output_factory.o libtardy/tar/output.o rm -f libtardy/tar/output/ar.o libtardy/tar/output/ar/bsd.o rm -f libtardy/tar/output/ar/pdp11.o libtardy/tar/output/ar/port5.o rm -f libtardy/tar/output/ar/v7.o libtardy/tar/output/cpio.o rm -f libtardy/tar/output/cpio/binary.o libtardy/tar/output/cpio/crc.o rm -f libtardy/tar/output/cpio/newascii.o rm -f libtardy/tar/output/cpio/oldascii.o libtardy/tar/output/extract.o rm -f libtardy/tar/output/filter.o rm -f libtardy/tar/output/filter/ar_long_names.o rm -f libtardy/tar/output/filter/ar_long_names2.o rm -f libtardy/tar/output/filter/basename.o rm -f libtardy/tar/output/filter/gzip.o rm -f libtardy/tar/output/filter/list.o libtardy/tar/output/tar.o rm -f libtardy/tar/output/tar/bsd.o libtardy/tar/output/tar/posix.o rm -f libtardy/tar/output/tar/ustar.o libtardy/tar/output/tar/v7.o rm -f libtardy/trace.o libtardy/versi_stamp.o libtardy/version.o rm -f tardy/arglex/tardy.o tardy/ifmt.o tardy/main.o tardy/ofmt.o rm -f tardy/tardy.o distclean: clean distclean-directories distclean-files distclean-files: rm -f Makefile config.cache config.log config.status etc/howto.conf rm -f libtardy/config.h script/test_prelude.sh distclean-directories: rm -rf bin install: install-bin install-doc install-man install-bin: $(bindir)/tardy install-doc: $(datarootdir)/doc/tardy/BUILDING.pdf \ $(datarootdir)/doc/tardy/README.pdf \ $(datarootdir)/doc/tardy/reference.pdf install-man: $(mandir)/man1/tardy.1 $(mandir)/man1/tardy_license.1 uninstall: rm -f $(bindir)/tardy $(datarootdir)/doc/tardy/BUILDING.pdf rm -f $(datarootdir)/doc/tardy/README.pdf rm -f $(datarootdir)/doc/tardy/reference.pdf $(mandir)/man1/tardy.1 rm -f $(mandir)/man1/tardy_license.1 .PHONY: all all-bin all-doc check clean clean-bin clean-doc distclean \ distclean-directories distclean-files install install-bin \ install-mandir sure t0001a t0002a t0003a t0004a t0005a t0006a \ t0007a t0008a t0009a t0010a t0011a t0012a t0013a t0014a t0015a \ t0016a t0017a t0018a t0019a t0020a t0021a t0022a t0023a t0025a \ t0026a t0027a t0028a t0029a t0030a t0031a t0032a t0033a t0035a \ t0036a t0037a t0039a t0050a t0051a t0052a t0053a t0055a t0056a \ t0057a t0058a t0059a t0060a t0061a t0062a t0063a t0065a t0067a \ t0068a t0070a t0072a t0073a t0075a the-default-target # vim: set ts=8 sw=8 noet : tardy-1.28/aegis.conf 644 0 0 1121212163037023 130130ustar PeterMiller/* * tardy - a tar post-processor * Copyright (C) 1993-2000, 2003, 2004, 2008, 2009, 2011, 2012 Peter Miller * * 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 3 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, see . */ configuration_directory = "aegis.conf.d"; /* * how to build the project * mandatory */ build_command = "cook -b ${source etc/howto.cook} " "-nl " "project=$project " "change=$change " "version=$version " "arch=$arch " "search_path=$search_path"; integrate_begin_exceptions = [ "etc/version.so", "libtardy/patchlevel.h", "linux-*/bin/*", ]; symlink_exceptions = [ "etc/version.so", "libtardy/patchlevel.h", "linux-*/bin/*", ]; /* * When do -Integrate_Begin, link the baseline to the integration directory, * rather than copying it. This should be much faster. * * There is a gotcha: all the recipes in howto.cook must unlink their targets * before re-creating them, otherwise the baseline will be trashed. */ link_integration_directory = true; /* * create a new history * always executed as the project owner */ history_create_command = "fhist ${b $history} -cr -cu -i $input -p ${d $history} -r"; /* * get a file from history * may be executed by developers */ history_get_command = "fhist ${b $history} -e '$edit' -o $output -p ${d $history} -v 0"; /* * add a new change to the history * always executed as the project owner */ history_put_command = "fhist ${b $history} -cr -cu -i $input -p ${d $history} -r"; /* * query the topmost edit of a history file * Result to be printed on stdout. * may be executed by developers */ history_query_command = "fhist ${basename $history} -l 0 -p ${dirname $history} -q"; /* * difference of 2 files */ diff_command = "fcomp -w -s $original $input -o $output"; /* * difference of 3 files */ merge_command = "fmerge $original $mostrecent $input -o $output -c /dev/null"; /* * whenever files are added to or removed from the change, * execute the following command. */ change_file_command = "rm -f .c_inclrc"; /* * new file templates */ file_template = [ { pattern = [ "*.[cyl]", "*.cc" ]; body = "${read_file ${source etc/template/c abs}}"; }, { pattern = [ "libtardy/ac/*.h" ]; body = "${read_file ${source etc/template/ac_h abs}}"; }, { pattern = [ "*.h" ]; body = "${read_file ${source etc/template/h abs}}"; }, { pattern = [ "test/*/*.sh" ]; body = "${read_file ${source etc/template/test abs}}"; }, { pattern = [ "*.sh" ]; body = "${read_file ${source etc/template/sh abs}}"; }, { pattern = [ "*.man", "*.[12345678]" ]; body = "${read_file ${source etc/template/man abs}}"; }, { pattern = [ "etc/new*.so" ]; body = "${read_file ${source etc/template/etc_so abs}}"; }, { pattern = [ "*.so", "*.ms", "*.me" ]; body = "${read_file ${source etc/template/ms abs}}"; }, { pattern = [ "*" ]; body = "${read_file ${source etc/template/generic abs}}"; } ]; develop_begin_command = "ln -s $bl bl"; integrate_begin_command = "rm -f aegis.log etc/version.so common/patchlevel.h etc/new.so"; /* * list of architectures on which each change must build and test */ architecture = [ { name = "linux-x86_64"; pattern = "Linux-*-*-*86_64"; }, ]; /* * Some file names which are not allowed... */ filename_pattern_reject = [ "*.c", /* no plain C files */ "*.C", /* short, but not unique on some operating systems */ "*.[cC]++", /* not legal on some operating systems */ ]; test_command = "PATH=${path_reduce ${addpathsuffix ${arch}/bin ${spe}} ${env PATH}} " "$sh $filename $arch" ; project_specific = [ { name = "html:body-begin"; value = @@; } ]; /* vim: set ts=8 sw=4 et : */ tardy-1.28/aegis.conf.d/aede-policy 644 0 0 242312163037023 154140ustar PeterMiller# # tardy - a tar post-processor # Copyright (C) 2008-2012 Peter Miller # # 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 3 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, see . # develop_end_policy_command = "aede-policy -p $project -c $change"; project_specific = [ { name = "aede-policy"; value = "authors " "comments " "copyright " "comments " "crlf " "description " "fsf-address " "gpl-version=3 " "line-length " "merge-fhist " "no-manifest " "no-tabs " "printable " "text " "vim-mode " "white-space" ; } ]; # vim: set ts=8 sw=4 et : tardy-1.28/aegis.conf.d/aemakegen 644 0 0 415212163037023 151370ustar PeterMiller# # tardy - a tar post-processor # Copyright (C) 2010-2013 Peter Miller # # 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 3 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, see . # project_specific = [ { name = "aemakegen:debian:build-depends"; value = "cpio, " "groff, " "libboost-dev, " "libbz2-dev, " "libexplain-dev (>=0.41), " "liblzma-dev, " "zlib1g-dev" ; }, { name = "aemakegen:rpm-spec:build-requires"; value = "cpio, groff, libboost-devel, libexplain-devel, zlib-devel"; }, { name = "aemakegen:debian:copyright"; value = "false"; }, { name = "aemakegen:debian:description:tardy"; value = "a tar post-processor"; }, { name = "aemakegen:debian:extended-description:tardy"; value = @The tardy program is a tar(1) post-processor. It may be used to manipulate the file headers in tar(5) archive files in various ways. This allows you to "spruce up" your tar files before posting them to the net, mostly to remove artefacts of the development environment, without introducing more.@; }, { name = "aemakegen:debian:homepage"; value = "http://tardy.sourceforge.net"; }, { name = "aemakegen:debian:maintainer"; value = "Peter Miller "; }, { name = "aemakegen:debian:priority"; value = "extra"; }, { name = "aemakegen:debian:section"; value = "utils"; }, ]; # vim: set ts=8 sw=4 et : tardy-1.28/configure 755 0 0 55652112163037023 130240ustar PeterMiller#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="libtardy/patchlevel.h" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='LTLIBOBJS LIBOBJS SH AR SOELIM GROFF RANLIB YFLAGS YACC INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM ac_ct_CXX CXXFLAGS CXX EGREP GREP CPP OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_largefile ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC YACC YFLAGS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-largefile omit support for large files Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags YACC The `Yet Another Compiler Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES # --------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers libtardy/config.h" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "#define _MINIX 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h $as_echo "#define _ALL_SOURCE 1" >>confdefs.h $as_echo "#define _GNU_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_YACC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_YACC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 $as_echo "$YACC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi for ac_prog in groff roff do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_GROFF+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$GROFF"; then ac_cv_prog_GROFF="$GROFF" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_GROFF="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi GROFF=$ac_cv_prog_GROFF if test -n "$GROFF"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GROFF" >&5 $as_echo "$GROFF" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$GROFF" && break done for ac_prog in gsoelim soelim do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_SOELIM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$SOELIM"; then ac_cv_prog_SOELIM="$SOELIM" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_SOELIM="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi SOELIM=$ac_cv_prog_SOELIM if test -n "$SOELIM"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOELIM" >&5 $as_echo "$SOELIM" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$SOELIM" && break done for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsocket" >&5 $as_echo_n "checking for main in -lsocket... " >&6; } if ${ac_cv_lib_socket_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_main=yes else ac_cv_lib_socket_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_main" >&5 $as_echo "$ac_cv_lib_socket_main" >&6; } if test "x$ac_cv_lib_socket_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF LIBS="-lsocket $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lz" >&5 $as_echo_n "checking for main in -lz... " >&6; } if ${ac_cv_lib_z_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_z_main=yes else ac_cv_lib_z_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_main" >&5 $as_echo "$ac_cv_lib_z_main" >&6; } if test "x$ac_cv_lib_z_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBZ 1 _ACEOF LIBS="-lz $LIBS" fi if test "$ac_cv_lib_z_main" != "yes" then { $as_echo "$as_me:${as_lineno-$LINENO}: result: You must to install the zlib compression library to compile Tardy. Homepage: http://zlib.net/" >&5 $as_echo " You must to install the zlib compression library to compile Tardy. Homepage: http://zlib.net/" >&6; } OK=no if apt-get --version > /dev/null 2> /dev/null then { $as_echo "$as_me:${as_lineno-$LINENO}: result: The following command may be used to install it: sudo apt-get install zlib1g-dev " >&5 $as_echo " The following command may be used to install it: sudo apt-get install zlib1g-dev " >&6; } OK=yes fi if yum --version > /dev/null 2> /dev/null then { $as_echo "$as_me:${as_lineno-$LINENO}: result: The following command may be used to install it: sudo yum install zlib-devel " >&5 $as_echo " The following command may be used to install it: sudo yum install zlib-devel " >&6; } OK=yes fi if test "$OK" != "yes" then { $as_echo "$as_me:${as_lineno-$LINENO}: result: If you are using a package based install, you will need the zlib-dev or zlib-devel package, or similar. " >&5 $as_echo " If you are using a package based install, you will need the zlib-dev or zlib-devel package, or similar. " >&6; } fi exit 1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzopen in -lbz2" >&5 $as_echo_n "checking for BZ2_bzopen in -lbz2... " >&6; } if ${ac_cv_lib_bz2_BZ2_bzopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbz2 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char BZ2_bzopen (); int main () { return BZ2_bzopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bz2_BZ2_bzopen=yes else ac_cv_lib_bz2_BZ2_bzopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzopen" >&5 $as_echo "$ac_cv_lib_bz2_BZ2_bzopen" >&6; } if test "x$ac_cv_lib_bz2_BZ2_bzopen" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBBZ2 1 _ACEOF LIBS="-lbz2 $LIBS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: You must have the BZip2 compression library installed in order to build Tardy. Please install the bzip2 library, and then re-run this ./configure script. Homepage: http://www.bzip.org/" >&5 $as_echo " You must have the BZip2 compression library installed in order to build Tardy. Please install the bzip2 library, and then re-run this ./configure script. Homepage: http://www.bzip.org/" >&6; } OK=no if apt-get --version > /dev/null 2> /dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: The following command may be used to install it: sudo apt-get install libbz2-dev bzip2 " >&5 $as_echo " The following command may be used to install it: sudo apt-get install libbz2-dev bzip2 " >&6; } OK=yes fi if yum --version > /dev/null 2> /dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: The following command may be used to install it: sudo yum install libbz2-devel bzip2 " >&5 $as_echo " The following command may be used to install it: sudo yum install libbz2-devel bzip2 " >&6; } OK=yes fi if test "$OK" != "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: If you are using a package based install, you will need the bzip2-devel package in addition to the bzip package. " >&5 $as_echo " If you are using a package based install, you will need the bzip2-devel package in addition to the bzip package. " >&6; } fi exit 1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -llzma" >&5 $as_echo_n "checking for main in -llzma... " >&6; } if ${ac_cv_lib_lzma_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llzma $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_lzma_main=yes else ac_cv_lib_lzma_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzma_main" >&5 $as_echo "$ac_cv_lib_lzma_main" >&6; } if test "x$ac_cv_lib_lzma_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBLZMA 1 _ACEOF LIBS="-llzma $LIBS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: You must have the lzma compression library installed in order to build Tardy. Please install the lzma library, and then re-run this ./configure script. Homepage: http://tukaani.org/xz/" >&5 $as_echo " You must have the lzma compression library installed in order to build Tardy. Please install the lzma library, and then re-run this ./configure script. Homepage: http://tukaani.org/xz/" >&6; } OK=no if apt-get --version > /dev/null 2> /dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: The following command may be used to install it: sudo apt-get install liblzma-dev " >&5 $as_echo " The following command may be used to install it: sudo apt-get install liblzma-dev " >&6; } OK=yes fi if yum --version > /dev/null 2> /dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: The following command may be used to install it: sudo yum install liblzma-devel " >&5 $as_echo " The following command may be used to install it: sudo yum install liblzma-devel " >&6; } OK=yes fi if test "$OK" != "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: If you are using a package based install, you will need the liblzma-devel package. " >&5 $as_echo " If you are using a package based install, you will need the liblzma-devel package. " >&6; } fi exit 1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for explain_open_or_die in -lexplain" >&5 $as_echo_n "checking for explain_open_or_die in -lexplain... " >&6; } if ${ac_cv_lib_explain_explain_open_or_die+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lexplain $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char explain_open_or_die (); int main () { return explain_open_or_die (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_explain_explain_open_or_die=yes else ac_cv_lib_explain_explain_open_or_die=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_explain_explain_open_or_die" >&5 $as_echo "$ac_cv_lib_explain_explain_open_or_die" >&6; } if test "x$ac_cv_lib_explain_explain_open_or_die" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBEXPLAIN 1 _ACEOF LIBS="-lexplain $LIBS" fi if test "$ac_cv_lib_explain_explain_open_or_die" != "yes" then { $as_echo "$as_me:${as_lineno-$LINENO}: result: You must to install the libexplain error library to compile Tardy. Homepage: http://libexplain.sourceforge.net/" >&5 $as_echo " You must to install the libexplain error library to compile Tardy. Homepage: http://libexplain.sourceforge.net/" >&6; } OK=no if apt-get --version > /dev/null 2> /dev/null then { $as_echo "$as_me:${as_lineno-$LINENO}: result: The following command may be used to install it: sudo apt-get install libexplain-dev " >&5 $as_echo " The following command may be used to install it: sudo apt-get install libexplain-dev " >&6; } OK=yes fi if yum --version > /dev/null 2> /dev/null then { $as_echo "$as_me:${as_lineno-$LINENO}: result: The following command may be used to install it: sudo yum install libexplain-devel " >&5 $as_echo " The following command may be used to install it: sudo yum install libexplain-devel " >&6; } OK=yes fi if test "$OK" != "yes" then { $as_echo "$as_me:${as_lineno-$LINENO}: result: If you are using a package based install, you will need the libexplain-dev or libexplain-devel package, or similar. " >&5 $as_echo " If you are using a package based install, you will need the libexplain-dev or libexplain-devel package, or similar. " >&6; } fi exit 1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdarg.h" >&5 $as_echo_n "checking for working stdarg.h... " >&6; } if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross" >&5 $as_echo "cross" >&6; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include char *foo = "test"; #if defined(__STDC__) && __STDC__ int test(char*,...); #endif int test(fmt)char*fmt;{va_list ap;char*a;int x; va_start(ap,fmt);a=va_arg(ap,char*);x=(a!=foo);va_end(ap);return x;} int main(argc,argv)int argc;char**argv;{ exit(test("",foo));} _ACEOF if ac_fn_c_try_run "$LINENO"; then : $as_echo "#define HAVE_STDARG_H 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi for ac_header in \ bzlib.h \ fcntl.h \ limits.h \ memory.h \ stddef.h \ stdlib.h \ string.h \ sys/types.h \ sys/param.h \ sys/resource.h \ sys/stat.h \ sys/sysmacros.h \ unistd.h \ zlib.h \ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } if eval \${$as_ac_Header+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_ac_Header=yes" else eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_ac_Header { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_opendir+:} false; then : break fi done if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_opendir+:} false; then : break fi done if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5 $as_echo_n "checking for long file names... " >&6; } if ${ac_cv_sys_long_file_names+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_long_file_names=yes # Test for long file names in all the places we know might matter: # . the current directory, where building will happen # $prefix/lib where we will be installing things # $exec_prefix/lib likewise # $TMPDIR if set, where it might want to write temporary files # /tmp where it might want to write temporary files # /var/tmp likewise # /usr/tmp likewise for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib # in the usual case where exec_prefix is '${prefix}'. case $ac_dir in #( . | /* | ?:[\\/]*) ;; #( *) continue;; esac test -w "$ac_dir/." || continue # It is less confusing to not echo anything here. ac_xdir=$ac_dir/cf$$ (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue ac_tf1=$ac_xdir/conftest9012345 ac_tf2=$ac_xdir/conftest9012346 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" || ac_cv_sys_long_file_names=no rm -f -r "$ac_xdir" 2>/dev/null test $ac_cv_sys_long_file_names = no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5 $as_echo "$ac_cv_sys_long_file_names" >&6; } if test $ac_cv_sys_long_file_names = yes; then $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h fi for ac_func in \ BZ2_strerror \ getpgrp \ memmem \ snprintf \ strcasecmp \ strerror \ strftime \ strverscmp \ tcgetpgrp \ vsnprintf \ do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate getpgrp argument" >&5 $as_echo_n "checking for appropriate getpgrp argument... " >&6; } if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross" >&5 $as_echo "cross" >&6; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(argc, argv) int argc; char **argv; { #ifdef HAVE_GETPGRP if (getpgrp(32767) == getpgrp(0)) exit(2); #endif exit(0); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : $as_echo "#define CONF_getpgrp_arg 0" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: zero" >&5 $as_echo "zero" >&6; } else $as_echo "#define CONF_getpgrp_arg /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: empty" >&5 $as_echo "empty" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi ac_fn_c_check_decl "$LINENO" "strcasecmp" "ac_cv_have_decl_strcasecmp" "#include " if test "x$ac_cv_have_decl_strcasecmp" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRCASECMP $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "#include " if test "x$ac_cv_have_decl_strverscmp" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRVERSCMP $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "#include " if test "x$ac_cv_have_decl_memmem" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_MEMMEM $ac_have_decl _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Bourne shell which understands functions" >&5 $as_echo_n "checking for a Bourne shell which understands functions... " >&6; } if test "z$SH" = "z"; then if test -f /bin/sh5; then SH=/bin/sh5 else SH=/bin/sh fi fi cat >>confdefs.h <<_ACEOF #define CONF_SHELL "$SH" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5 $as_echo "$SH" >&6; } ac_config_files="$ac_config_files Makefile etc/howto.conf" cat >confcache <<\_ACEOF # 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, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "libtardy/config.h") CONFIG_HEADERS="$CONFIG_HEADERS libtardy/config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "etc/howto.conf") CONFIG_FILES="$CONFIG_FILES etc/howto.conf" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi tardy-1.28/debian/watch 644 0 0 10012163037023 132610ustar PeterMillerversion=3 http://tardy.sourceforge.net/debian/tardy_(.+).tar.gz tardy-1.28/etc/BUILDING.man 644 0 0 2332612163037023 135320ustar PeterMiller'\" t .\" tardy - a tar post-processor .\" Copyright (C) 1993, 1995, 1998-2000, 2008, 2010-2012 Peter Miller .\" .\" 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 3 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, see . .\" .TH build tardy .so etc/version.so .SH NAME How to build Tardy .XX "" "How to build Tardy" .br .if t .ds C) \(co .if n .ds C) (C) Copyright \*(C) \*(Y) Peter Miller .br .PP The .I tardy program is distributed under the terms of the GNU General Public License. See the LICENSE section, below, for more details. .PP .B tardy .I a., slow to act, behind time. .SH BEFORE YOU START There are a few pieces of software you may want to fetch and install before you proceed with your installation of Tardy. .TP 8n Boost Library You will need the C++ Boost Library. If you are using a package based system, you will need the libboost\[hy]devel package, or one named something very similar. .br http://boost.org/ .TP 8n BZ2 library You will need the bzip2 library. If you are using a package based system, you will need the libbz2\[hy]devel package, or one named something very similar. .TP 8n LZMA library You will need the lzma library, for .xz compression. If you are using a package based system, you will need the liblzma\[hy]devel package, or one named something very similar. .TP 8n cpio The test suite uses the \f[I]cpio\fP(1) command to create CPIO archives for testing. .TP 8n GNU Groff The documentation for the .I Tardy package was prepared using the GNU Groff package (version 1.14 or later). This distribution includes full documentation, which may be processed into PostScript or DVI files at install time \- if GNU Groff has been installed. .TP 8n GCC You may also want to consider fetching and installing the GNU C Compiler if you have not done so already. This is not essential. Tardy was developed using the GNU C++ compiler, and the GNU C++ libraries. .TP 8n libexplain The \f[I]libexplain\fP project provides a library if system\[hy]call\[hy]specific sterror(3) replacements, for more informative error messages. .br http://libexplain.sourceforge.net/ .TP 8n zlib zlib is a library implementing the deflate compression method (and inflate decompression method) found in \f[I]gzip\fP(1) and PKZIP. .br http://zlib.net/ .SH SITE CONFIGURATION The .B tardy program is configured using the .I configure shell script included in this distribution. .PP The .I configure shell script attempts to guess correct values for various system-dependent variables used during compilation, and creates the .I Makefile and .I libtardy/config.h files. It also creates a shell script .I config.status that you can run in the future to recreate the current configuration. .PP Normally, you just .I cd to the directory containing .IR tardy "'s" source code and type .RS .ft CW .nf % \f(CB./configure\fP \fI\&...lots of output...\fP % .fi .ft R .RE If you're using .I csh on an old version of System V, you might need to type .RS .ft CW .nf % \f(CBsh configure\fP \fI\&...lots of output...\fP % .fi .ft R .RE instead to prevent .I csh from trying to execute .I configure itself. .PP Running .I configure takes a minute or two. While it is running, it prints some messages that tell what it is doing. If you don't want to see the messages, run .I configure using the --quiet option; for example, .RS .FT CW .nf % \f(CB./configure --quiet\fP % .fi .ft R .RE .PP By default, .I configure will arrange for the .I "make install" command to install the .B tardy program's files in .I /usr/local/bin and .IR /usr/local/man . You can specify an installation prefix other than .I /usr/local by giving .I configure the option \f(CW--prefix=\fP\fIPATH\fP. .PP You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give .I configure the option \f(CW--exec-prefix=\fP\fIPATH\fP the .B tardy package will use .I PATH as the prefix for installing programs and libraries. Data files and documentation will still use the regular prefix. Normally, all files are installed using the same prefix. .PP .I configure ignores any other arguments that you give it. .PP On systems that require unusual options for compilation or linking that the .I tardy package's .I configure script does not know about, you can give .I configure initial values for variables by setting them in the environment. In Bourne-compatible shells, you can do that on the command line like this: .RS .ft CW .nf $ \f(CBCC='gcc -traditional' LIBS=-lposix ./configure\fP \fI\&...lots of output...\fP $ .fi .ft R .RE Here are the .I make variables that you might want to override with environment variables when running .IR configure . .TP 8n Variable: CC C compiler program. The default is .IR cc . .TP 8n Variable: INSTALL Program to use to install files. The default is .I install if you have it, .I cp otherwise. .TP 8n Variable: LIBS Libraries to link with, in the form \f(CW-l\fP\fIfoo\fP \f(CW-l\fP\fIbar\fP. The .I configure script will append to this, rather than replace it. .PP If you need to do unusual things to compile the package, the author encourages you to figure out how .I configure could check whether to do them, and mail diffs or instructions to the author so that they can be included in the next release. .br .ne 1i .SH BUILDING TARDY All you should need to do is use the .RS .ft CW .nf % \f(CBmake\fP \fI\&...lots of output...\fP % .fi .ft R .RE command and wait. When this finishes you should see a directory called .I bin containing one file: .IR tardy . The .I tardy program is a tar post-processor. .PP You can remove the program binaries and object files from the source directory by using the .RS .ft CW .nf % \f(CBmake clean\fP \fI\&...lots of output...\fP % .fi .ft R .RE command. To remove all of the above files, and also remove the .I Makefile and .I libtardy/config.h and .I config.status files, use the .RS .ft CW .nf % \f(CBmake distclean\fP \fI\&...lots of output...\fP % .fi .ft R .RE command. .PP The file .I etc/configure.ac is used to create .I configure by a GNU program called .IR autoconf . You only need to know this if you want to regenerate .I configure using a newer version of .IR autoconf . .br .ne 1i .SH TESTING TARDY The .I tardy program comes with a test suite. To run this test suite, use the command .RS .ft CW .nf % \f(CBmake sure\fP \fI\&...lots of output...\fP Passed All Tests % .fi .ft R .RE .PP The tests take a about a minute each, with a few very fast, and a couple very slow, but it varies greatly depending on your CPU. .br .ne 1i .SH INSTALLING TARDY The .I tardy program is installed under the .I /usr/local tree by default. Use the \f(CW--prefix=\fP\fIPATH\fP option to .I configure if you want some other path. .PP All that is required to install the .I tardy program is to use the .RS .ft CW .nf % \f(CBmake install\fP \fI\&...lots of output...\fP % .fi .ft R .RE command. Control of the directories used may be found in the first few lines of the .I Makefile file if you want to bypass the .I configure script. .PP The above procedure assumes that the .IR soelim (1) command is somewhere in the command search .IR PATH . The .IR soelim (1) command is available as part of the .I "GNU Roff" package. .PP The above procedure also assumes that the .I $(prefix)/man/man1 and .I $(prefix)/man/man5 directories already exist. If they do not, you will need to .I mkdir them manually. .br .ne 1i .SH PRINTED MANUALS This distribution contains the sources to all of the documentation for .IR tardy . The author used the GNU groff package and a postscript printer to prepare the documentation. If you do not have this software, you will need to substitute commands appropriate to your site. .PP To print copies of the .IR README , and .I BUILDING files, the following commands may be used .RS .ft CW .nf % \f(CBgroff -t -man etc/*.man | lpr\fP % .fi .ft R .RE This will produce about 4 pages. The "-t" flag means preprocess with .IR tbl (1). .PP To print copies of the manual entry, the following commands may be used .RS .ft CW .nf % \f(CBcd man1\fP % \f(CBgroff -s -t -man *.1 | lpr\fP % \f(CBcd ..\fP % .fi .ft R .RE This will produce about 3 pages. The "-s" flag means preprocess with .IR soelim (1), and the "-t" flag means preprocess with .IR tbl (1). .br .ne 1i .SH GETTING HELP If you need assistance with the .I tardy program, please do not hesitate to contact the author at .RS Peter Miller .RE Any and all feedback is welcome. .PP When reporting problems, please include the version number given by the .RS .ft CW .nf % tardy -version tardy version \fIa.b.cccc\fP \&.\&.\&. % .fi .ft R .RE command. .br .ne 1i .SH LICENSE The .I tardy 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 3 of the License, or (at your option) any later version. .PP The .I tardy 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. .PP It should be in the .I LICENSE file included in this distribution. .br .ne 1i .SH AUTHOR .TS tab(;); l r l. Peter Miller;EMail:;pmiller@opensource.org.au \f(CW/\e/\e*\fR;WWW:;http://miller.emu.id.au/pmiller/ .TE .\" vim: set ts=8 sw=4 et : tardy-1.28/etc/CHANGES.1.1 644 0 0 2615612163037023 131350ustar PeterMiller Project "tardy.1.1" Page 1 List of Changes Tue Jul 27 13:44:37 1993 Change State Description ------- ------- ------------- 1 completed New release derived from tardy.1.0. 2 completed turn on patch generation 3 completed handle . in prefixes better 4 completed improve the README to say what it is 5 completed add the -now option to set file times 6 being_ add install target to Makefile integrated Project "tardy.1.1", Change 1 Page 1 Change Details Tue Jul 27 13:44:38 1993 NAME Project "tardy.1.1", Delta 1, Change 1. SUMMARY New release derived from tardy.1.0. DESCRIPTION New release derived from tardy.1.0. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- ------- ------- ----------- source create 1 LICENSE source create 1 aux/BUILDING.man source create 1 aux/CHANGES.sh source create 1 aux/Howto.cook source create 1 aux/MANIFEST.sh source create 1 aux/Makefile.awk source create 1 aux/Makefile.sh source create 1 aux/README.man source create 1 aux/patches.sh source create 1 conf/ConvexOS-10 source create 1 conf/SunOS-4.1.2 source create 1 conf/SunOS-4.1.3 source create 1 conf/ULTRIX-4.2 source create 1 conf/dcosx source create 1 conf/dgux-5.4.1 source create 1 config source create 1 man1/tardy.1 source create 1 tardy/ansi.c source create 1 tardy/arglex.c source create 1 tardy/arglex.h source create 1 tardy/error.c source create 1 tardy/error.h source create 1 tardy/help.c source create 1 tardy/help.h source create 1 tardy/main.c source create 1 tardy/main.h source create 1 tardy/s-v-arg.h source create 1 tardy/tardy.c source create 1 tardy/tardy.h source create 1 tardy/version.c source create 1 tardy/version.h test create 1 test/00/t0001a.sh test create 1 test/00/t0002a.sh test create 1 test/00/t0003a.sh test create 1 test/00/t0004a.sh test create 1 test/00/t0005a.sh test create 1 test/00/t0006a.sh test create 1 test/00/t0007a.sh Project "tardy.1.1", Change 1 Page 2 Change Details Tue Jul 27 13:44:38 1993 HISTORY What When Who Comment ------ ------ ----- --------- new_change Wed Mar 17 pmiller 16:26:53 1993 develop_begin Wed Mar 17 pmiller 16:26:53 1993 develop_end Wed Mar 17 pmiller 16:26:53 1993 review_pass Wed Mar 17 pmiller 16:26:53 1993 integrate_begin Wed Mar 17 pmiller 16:26:53 1993 integrate_pass Wed Mar 17 pmiller 16:28:26 1993 Project "tardy.1.1", Change 2 Page 1 Change Details Tue Jul 27 13:44:38 1993 NAME Project "tardy.1.1", Delta 2, Change 2. SUMMARY turn on patch generation DESCRIPTION turn on patch generation This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- ------- ------- ----------- source modify 2 aux/Howto.cook HISTORY What When Who Comment ------ ------ ----- --------- new_change Wed Mar 17 pmiller 16:29:19 1993 develop_begin Wed Mar 17 pmiller 16:29:32 1993 develop_end Wed Mar 17 pmiller 16:31:22 1993 review_pass Wed Mar 17 pmiller 16:35:00 1993 integrate_begin Wed Mar 17 pmiller Elapsed time: 1.110 16:35:13 1993 days. integrate_pass Fri Mar 19 pmiller 09:54:55 1993 Project "tardy.1.1", Change 3 Page 1 Change Details Tue Jul 27 13:44:39 1993 NAME Project "tardy.1.1", Delta 3, Change 3. SUMMARY handle . in prefixes better DESCRIPTION Some operating systems omit the trailing / for directory names. The prefix code needed to be smarter to cope with this. My thanks to Wolfgang Denk for reporting this problem. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. CAUSE This change was caused by external_bug. FILES Type Action Edit File Name ------- ------- ------- ----------- source modify 2 tardy/tardy.c HISTORY What When Who Comment ------ ------ ----- --------- new_change Fri Mar 19 pmiller 09:52:55 1993 develop_begin Fri Mar 19 pmiller Elapsed time: 0.025 09:53:17 1993 days. develop_end Fri Mar 19 pmiller 10:04:41 1993 review_pass Fri Mar 19 pmiller 10:05:09 1993 integrate_begin Fri Mar 19 pmiller 10:05:21 1993 integrate_pass Fri Mar 19 pmiller 10:11:40 1993 Project "tardy.1.1", Change 4 Page 1 Change Details Tue Jul 27 13:44:39 1993 NAME Project "tardy.1.1", Delta 4, Change 4. SUMMARY improve the README to say what it is DESCRIPTION improve the README to say what it is This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- ------- ------- ----------- source modify 2 aux/BUILDING.man source modify 2 aux/README.man source modify 2 config source modify 2 man1/tardy.1 source modify 2 tardy/help.c HISTORY What When Who Comment ------ ------ ----- --------- new_change Wed Apr 7 pmiller 17:27:09 1993 develop_begin Wed Apr 7 pmiller Elapsed time: 0.038 17:27:14 1993 days. develop_end Wed Apr 7 pmiller 17:44:21 1993 review_pass Wed Apr 7 pmiller 17:45:29 1993 integrate_begin Wed Apr 7 pmiller 17:45:44 1993 integrate_pass Wed Apr 7 pmiller 17:51:34 1993 Project "tardy.1.1", Change 5 Page 1 Change Details Tue Jul 27 13:44:40 1993 NAME Project "tardy.1.1", Delta 5, Change 5. SUMMARY add the -now option to set file times DESCRIPTION The -Now option was added to set the last-time-modified field of the file headers. All files recieve the same time. Also improved the way prefixes are handled, inparticular to get rid of the double slash when . is the prefix. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- ------- ------- ----------- source modify 3 config source modify 3 man1/tardy.1 source modify 2 tardy/main.c source modify 3 tardy/tardy.c source modify 2 tardy/tardy.h HISTORY What When Who Comment ------ ------ ----- --------- new_change Tue Jul 27 pmiller 10:33:34 1993 develop_begin Tue Jul 27 pmiller Elapsed time: 0.378 10:33:44 1993 days. develop_end Tue Jul 27 pmiller 13:23:41 1993 review_pass Tue Jul 27 pmiller 13:24:04 1993 integrate_begin Tue Jul 27 pmiller 13:24:23 1993 integrate_pass Tue Jul 27 pmiller 13:31:40 1993 Project "tardy.1.1", Change 6 Page 1 Change Details Tue Jul 27 13:44:41 1993 NAME Project "tardy.1.1", Delta 6, Change 6. SUMMARY add install target to Makefile DESCRIPTION The comp.sources.unix moderator requires an "install" target in the makefile. Add one. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. CAUSE This change was caused by internal_improvement. STATE This change is in 'being_integrated' state. FILES Type Action Edit File Name ------- ------- ------- ----------- source modify 2 aux/BUILDING.man source modify 1 aux/Makefile.sh HISTORY What When Who Comment ------ ------ ----- --------- new_change Tue Jul 27 pmiller 13:33:07 1993 develop_begin Tue Jul 27 pmiller Elapsed time: 0.023 13:33:13 1993 days. develop_end Tue Jul 27 pmiller 13:43:32 1993 review_pass Tue Jul 27 pmiller 13:43:42 1993 integrate_begin Tue Jul 27 pmiller 13:44:05 1993 tardy-1.28/etc/CHANGES.1.10 644 0 0 1166712163037023 132160ustar PeterMiller Project "tardy.1.10" Page 1 List of Changes Sun Oct 20 12:05:34 2002 Change State Description ------- ------- ------------- 10 completed prepare for release 11 completed release notes numbering 12 completed long name vs directories Project "tardy.1.10", Change 10 Page 1 Change Details Sun Oct 20 12:05:34 2002 NAME Project "tardy.1.10", Delta 1, Change 10. SUMMARY prepare for release DESCRIPTION This change prepares Tardy for the next public release. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- -------- ------- ----------- source create 1 etc/CHANGES.1.9 source create 1 etc/new.1.10.so source modify 1 -> 2 etc/new.1.9.so HISTORY What When Who Comment ------ ------ ----- --------- new_change Wed Oct 16 pmiller 21:41:29 2002 develop_begin Wed Oct 16 pmiller Elapsed time: 0.026 21:41:29 2002 days. develop_end Wed Oct 16 pmiller 21:53:12 2002 review_pass Wed Oct 16 pmiller 21:53:15 2002 integrate_begin Wed Oct 16 pmiller 21:53:18 2002 integrate_pass Wed Oct 16 pmiller 21:53:53 2002 Project "tardy.1.10", Change 11 Page 1 Change Details Sun Oct 20 12:05:35 2002 NAME Project "tardy.1.10", Delta 2, Change 11. SUMMARY release notes numbering DESCRIPTION This change fixes the order of includes, so that the release notes appear in the correct order. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_bug. FILES Type Action Edit File Name ------- -------- ------- ----------- source modify 5 -> 6 etc/Howto.cook source create 1 etc/so.sh HISTORY What When Who Comment ------ ------ ----- --------- new_change Wed Oct 16 pmiller 22:17:55 2002 develop_begin Wed Oct 16 pmiller 22:17:56 2002 develop_end Wed Oct 16 pmiller 22:25:48 2002 review_pass Wed Oct 16 pmiller 22:25:52 2002 integrate_begin Wed Oct 16 pmiller 22:25:54 2002 integrate_pass Wed Oct 16 pmiller 22:26:51 2002 Project "tardy.1.10", Change 12 Page 1 Change Details Sun Oct 20 12:05:35 2002 NAME Project "tardy.1.10", Delta 3, Change 12. SUMMARY long name vs directories DESCRIPTION This change fixes a problem with long directory names, where the trailing slash needs to be dealt with correctly. My thanks to Heikki Orsila for reporting this problem. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by external_bug. FILES Type Action Edit File Name ------- -------- ------- ----------- source modify 9 -> 10 common/tar/input/tar.cc test create 1 test/00/t0016a.sh HISTORY What When Who Comment ------ ------ ----- --------- new_change Sun Oct 20 pmiller 10:16:35 2002 develop_begin Sun Oct 20 pmiller Elapsed time: 0.190 10:16:35 2002 days. develop_end Sun Oct 20 pmiller 11:42:06 2002 review_pass Sun Oct 20 pmiller 11:42:09 2002 integrate_begin Sun Oct 20 pmiller 11:42:11 2002 integrate_pass Sun Oct 20 pmiller 11:43:58 2002 tardy-1.28/etc/CHANGES.1.2 644 0 0 7377712163037023 131510ustar PeterMiller Project "tardy.1.2" Page 1 List of Changes Sat Mar 23 22:52:46 1996 Change State Description ------- ------- ------------- 1 completed New release derived from tardy.1.1. 2 completed correct wrong file type 3 completed use autoconf 4 completed no directory option 5 completed use marter patch generation 6 completed fix tar set 7 completed add lsm 8 completed correct build problem 9 completed add option to remove directory prefixes 10 completed add -clean option 11 being_ distinguish between broken fields and negative integrated fields Project "tardy.1.2", Change 1 Page 1 Change Details Sat Mar 23 22:52:47 1996 NAME Project "tardy.1.2", Delta 1, Change 1. SUMMARY New release derived from tardy.1.1. DESCRIPTION New release derived from tardy.1.1. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "unspecified" architecture. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- ------- ------- ----------- source create 1 LICENSE source create 1 aux/BUILDING.man source create 1 aux/CHANGES.sh source create 1 aux/Howto.cook source create 1 aux/MANIFEST.sh source create 1 aux/Makefile.awk source create 1 aux/Makefile.sh source create 1 aux/README.man source create 1 aux/patches.sh source create 1 conf/ConvexOS-10 source create 1 conf/SunOS-4.1.2 source create 1 conf/SunOS-4.1.3 source create 1 conf/ULTRIX-4.2 source create 1 conf/dcosx source create 1 conf/dgux-5.4.1 source create 1 config source create 1 man1/tardy.1 source create 1 tardy/ansi.c source create 1 tardy/arglex.c source create 1 tardy/arglex.h source create 1 tardy/error.c source create 1 tardy/error.h source create 1 tardy/help.c source create 1 tardy/help.h source create 1 tardy/main.c source create 1 tardy/main.h source create 1 tardy/s-v-arg.h source create 1 tardy/tardy.c source create 1 tardy/tardy.h source create 1 tardy/version.c source create 1 tardy/version.h test create 1 test/00/t0001a.sh test create 1 test/00/t0002a.sh test create 1 test/00/t0003a.sh Project "tardy.1.2", Change 1 Page 2 Change Details Sat Mar 23 22:52:47 1996 Type Action Edit File Name ------- ------- ------- ----------- test create 1 test/00/t0004a.sh test create 1 test/00/t0005a.sh test create 1 test/00/t0006a.sh test create 1 test/00/t0007a.sh HISTORY What When Who Comment ------ ------ ----- --------- new_change Tue Jul 27 pmiller 14:12:10 1993 develop_begin Tue Jul 27 pmiller 14:12:10 1993 develop_end Tue Jul 27 pmiller 14:12:10 1993 review_pass Tue Jul 27 pmiller 14:12:10 1993 integrate_begin Tue Jul 27 pmiller 14:12:10 1993 integrate_pass Tue Jul 27 pmiller 14:13:13 1993 Project "tardy.1.2", Change 2 Page 1 Change Details Sat Mar 23 22:52:47 1996 NAME Project "tardy.1.2", Delta 3, Change 2. SUMMARY correct wrong file type DESCRIPTION This change adds filtering so that the old ``normal'' file indicator is automatically changed to the new normal file indicator. The -Old_Type option may be used to access the old behaviour. This change is necessary to get sun4 tar to talk to sun5 tar, which complains bitterly about unknown file types. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURES This change must build and test in each of the "alpha", "sun4" and "sun5" architectures. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- ------- ------- ----------- build modify 2 BUILDING build modify 2 MANIFEST build modify 2 Makefile.in build modify 2 README source create 1 aux/CHANGES.1.1 source modify 2 aux/Howto.conf.in source modify 3 aux/Howto.cook source modify 3 aux/README.man build modify 2 aux/new.so build modify 2 aux/version.so build modify 2 common/patchlevel.h build modify 2 configure source modify 3 man1/tardy.1 source modify 2 tardy/main.c source modify 3 tardy/tardy.c source modify 2 tardy/tardy.h HISTORY What When Who Comment ------ ------ ----- --------- new_change Fri Mar 31 pmiller 11:22:20 1995 develop_begin Fri Mar 31 pmiller Elapsed time: 1.603 11:22:26 1995 days. develop_end Mon Apr 3 pmiller 15:53:52 1995 review_pass Mon Apr 3 pmiller 15:54:33 1995 Project "tardy.1.2", Change 2 Page 2 Change Details Sat Mar 23 22:52:47 1996 What When Who Comment ------ ------ ----- --------- integrate_begin Mon Apr 3 pmiller 15:55:14 1995 integrate_pass Mon Apr 3 pmiller 16:04:05 1995 Project "tardy.1.2", Change 3 Page 1 Change Details Sat Mar 23 22:52:48 1996 NAME Project "tardy.1.2", Delta 2, Change 3. SUMMARY use autoconf DESCRIPTION This change adds GNU autoconf functionality to tardy. This allows simple configuration and installation. This change is exempt from testing against the baseline. ARCHITECTURES This change must build and test in each of the "alpha", "sun4" and "sun5" architectures. CAUSE This change was caused by internal_bug. FILES Type Action Edit File Name ------- ------- ------- ----------- build create 1 BUILDING build create 1 MANIFEST build create 1 Makefile.in build create 1 README source modify 2 aux/BUILDING.man source create 1 aux/Howto.conf.in source modify 2 aux/Howto.cook source create 1 aux/Makefi.file.sh source create 1 aux/Makefile.head source modify 2 aux/Makefile.sh source modify 2 aux/README.man source create 1 aux/config.h.in source create 1 aux/config.h.in1 source create 1 aux/config.h.in2 source create 1 aux/configure.in source create 1 aux/new.1.2.so build create 1 aux/new.so source create 1 aux/template/c source create 1 aux/template/generic source create 1 aux/template/h source create 1 aux/template/man source create 1 aux/template/ms source create 1 aux/template/report source create 1 aux/template/sh source create 1 aux/template/test build create 1 aux/version.so source create 1 common/ac/dirent.h source create 1 common/ac/limits.h source create 1 common/ac/stdarg.h source create 1 common/ac/stddef.h source create 1 common/ac/stdlib.h source create 1 common/ac/string.h source create 1 common/ac/termios.h source create 1 common/ac/time.h source create 1 common/ac/unistd.h Project "tardy.1.2", Change 3 Page 2 Change Details Sat Mar 23 22:52:48 1996 Type Action Edit File Name ------- ------- ------- ----------- build create 1 common/patchlevel.h source remove 1 conf/ConvexOS-10 source remove 1 conf/SunOS-4.1.2 source remove 1 conf/SunOS-4.1.3 source remove 1 conf/ULTRIX-4.2 source remove 1 conf/dcosx source remove 1 conf/dgux-5.4.1 source modify 2 config build create 1 configure source modify 2 man1/tardy.1 source modify 2 tardy/ansi.c source modify 2 tardy/arglex.c source modify 2 tardy/error.c source modify 2 tardy/help.c source remove 1 tardy/s-v-arg.h source modify 2 tardy/tardy.c source modify 2 tardy/version.c test modify 2 test/00/t0001a.sh test modify 2 test/00/t0002a.sh test modify 2 test/00/t0003a.sh test modify 2 test/00/t0004a.sh test modify 2 test/00/t0005a.sh test modify 2 test/00/t0006a.sh test modify 2 test/00/t0007a.sh HISTORY What When Who Comment ------ ------ ----- --------- new_change Fri Mar 31 pmiller 12:11:17 1995 develop_begin Fri Mar 31 pmiller Elapsed time: 1.245 12:11:22 1995 days. develop_end Mon Apr 3 pmiller 14:01:33 1995 review_pass Mon Apr 3 pmiller 14:01:39 1995 integrate_begin Mon Apr 3 pmiller Elapsed time: 0.167 14:02:03 1995 days. integrate_pass Mon Apr 3 pmiller 15:16:59 1995 Project "tardy.1.2", Change 4 Page 1 Change Details Sat Mar 23 22:52:48 1996 NAME Project "tardy.1.2", Delta 7, Change 4. SUMMARY no directory option DESCRIPTION This change adds an option to supress directories in the output tar file, and another option to supress special files. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- ------- ------- ----------- build modify 6 BUILDING build modify 6 MANIFEST build modify 6 Makefile.in build modify 6 README build modify 6 aux/new.so build modify 6 aux/version.so build modify 4 common/config.h.in build modify 6 common/patchlevel.h build modify 6 configure source modify 5 man1/tardy.1 source modify 4 tardy/main.c source modify 4 tardy/tardy.c source modify 3 tardy/tardy.h test create 1 test/00/t0008a.sh HISTORY What When Who Comment ------ ------ ----- --------- new_change Mon Apr 3 pmiller Elapsed time: 8.137 13:46:06 1995 days. develop_begin Fri Apr 14 pmiller Elapsed time: 0.090 07:17:39 1995 days. develop_end Fri Apr 14 pmiller 07:58:03 1995 review_pass Fri Apr 14 pmiller 08:00:51 1995 integrate_begin Fri Apr 14 pmiller 08:00:56 1995 integrate_pass Fri Apr 14 pmiller 08:02:39 1995 Project "tardy.1.2", Change 5 Page 1 Change Details Sat Mar 23 22:52:48 1996 NAME Project "tardy.1.2", Delta 6, Change 5. SUMMARY use marter patch generation DESCRIPTION use marter patch generation This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_improvement. FILES Type Action Edit File Name ------- ------- ------- ----------- build modify 5 BUILDING build modify 5 MANIFEST build modify 5 Makefile.in build modify 5 README source modify 6 aux/Howto.cook build modify 5 aux/new.so source create 1 aux/patch.file.sh source modify 2 aux/patches.sh build modify 5 aux/version.so build modify 3 common/config.h.in build modify 5 common/patchlevel.h build modify 5 configure HISTORY What When Who Comment ------ ------ ----- --------- new_change Mon Apr 3 pmiller Elapsed time: 6.016 14:59:22 1995 days. develop_begin Wed Apr 12 pmiller Elapsed time: 1.942 07:36:32 1995 days. develop_end Fri Apr 14 pmiller 07:10:19 1995 review_pass Fri Apr 14 pmiller 07:10:23 1995 integrate_begin Fri Apr 14 pmiller 07:10:27 1995 integrate_pass Fri Apr 14 pmiller 07:17:13 1995 Project "tardy.1.2", Change 6 Page 1 Change Details Sat Mar 23 22:52:48 1996 NAME Project "tardy.1.2", Delta 4, Change 6. SUMMARY fix tar set DESCRIPTION the common/config.h.in file is missing from the tar distribution This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_bug. FILES Type Action Edit File Name ------- ------- ------- ----------- build modify 3 BUILDING build modify 3 MANIFEST build modify 3 Makefile.in build modify 3 README source modify 3 aux/Howto.conf.in source modify 4 aux/Howto.cook source modify 2 aux/Makefi.file.sh source modify 2 aux/Makefile.head source modify 2 aux/configure.in build modify 3 aux/new.so build modify 3 aux/version.so build create 1 common/config.h.in build modify 3 common/patchlevel.h source modify 3 config build modify 3 configure HISTORY What When Who Comment ------ ------ ----- --------- new_change Mon Apr 10 pmiller 06:26:42 1995 develop_begin Mon Apr 10 pmiller Elapsed time: 0.068 06:29:25 1995 days. develop_end Mon Apr 10 pmiller 06:59:54 1995 review_pass Mon Apr 10 pmiller 07:00:52 1995 integrate_begin Mon Apr 10 pmiller Elapsed time: 1.054 07:00:56 1995 days. integrate_pass Tue Apr 11 pmiller 07:25:20 1995 Project "tardy.1.2", Change 7 Page 1 Change Details Sat Mar 23 22:52:49 1996 NAME Project "tardy.1.2", Delta 5, Change 7. SUMMARY add lsm DESCRIPTION This change adds a Linux Software Module description This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_bug. FILES Type Action Edit File Name ------- ------- ------- ----------- build modify 4 BUILDING build modify 4 MANIFEST build modify 4 Makefile.in build modify 4 README source modify 3 aux/BUILDING.man source modify 5 aux/Howto.cook source modify 3 aux/Makefile.head source modify 3 aux/Makefile.sh source create 1 aux/lsm.roff build modify 4 aux/new.so build modify 4 aux/version.so source create 1 common/ansi.c Moved from tardy/ansi.c source create 1 common/arglex.c Moved from tardy/arglex.c source create 1 common/arglex.h Moved from tardy/arglex.h build modify 2 common/config.h.in source create 1 common/error.c Moved from tardy/error.c source create 1 common/error.h Moved from tardy/error.h source create 1 common/help.c Moved from tardy/help.c source create 1 common/help.h Moved from tardy/help.h source create 1 common/main.h Moved from tardy/main.h source create 1 common/mem.c source create 1 common/mem.h source create 1 common/mprintf.c source create 1 common/mprintf.h build modify 4 common/patchlevel.h source create 1 common/progname.c Project "tardy.1.2", Change 7 Page 2 Change Details Sat Mar 23 22:52:49 1996 Type Action Edit File Name ------- ------- ------- ----------- source create 1 common/progname.h source create 1 common/str.c source create 1 common/str.h source create 1 common/trace.c source create 1 common/trace.h source create 1 common/version.c Moved from tardy/version.c source create 1 common/version.h Moved from tardy/version.h source create 1 common/version_stmp.c source create 1 common/version_stmp.h build modify 4 configure source create 1 man1/o__rules.so source create 1 man1/o_help.so source modify 4 man1/tardy.1 source create 1 man1/z_cr.so source create 1 man1/z_exit.so source create 1 ssp/main.c source create 1 ssp/ssp.c source create 1 ssp/ssp.h source remove 2 tardy/ansi.c Moved to common/ansi.c source remove 2 tardy/arglex.c Moved to common/arglex.c source remove 1 tardy/arglex.h Moved to common/arglex.h source remove 2 tardy/error.c Moved to common/error.c source remove 1 tardy/error.h Moved to common/error.h source remove 2 tardy/help.c Moved to common/help.c source remove 1 tardy/help.h Moved to common/help.h source modify 3 tardy/main.c source remove 1 tardy/main.h Moved to common/main.h source remove 2 tardy/version.c Moved to common/version.c source remove 1 tardy/version.h Moved to common/version.h source create 1 txt2c/main.c source create 1 txt2c/txt2c.c source create 1 txt2c/txt2c.h HISTORY What When Who Comment ------ ------ ----- --------- new_change Tue Apr 11 pmiller 07:28:00 1995 develop_begin Tue Apr 11 pmiller Elapsed time: 1.003 07:28:04 1995 days. develop_end Wed Apr 12 pmiller 07:29:22 1995 review_pass Wed Apr 12 pmiller Project "tardy.1.2", Change 7 Page 3 Change Details Sat Mar 23 22:52:49 1996 What When Who Comment ------ ------ ----- --------- 07:29:26 1995 integrate_begin Wed Apr 12 pmiller 07:29:33 1995 integrate_pass Wed Apr 12 pmiller 07:35:05 1995 Project "tardy.1.2", Change 8 Page 1 Change Details Sat Mar 23 22:52:49 1996 NAME Project "tardy.1.2", Delta 8, Change 8. SUMMARY correct build problem DESCRIPTION The patchlevel has not correctly updated during integration. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_bug. FILES Type Action Edit File Name ------- ------- ------- ----------- build modify 7 BUILDING build modify 7 MANIFEST build modify 7 Makefile.in build modify 7 README source modify 7 aux/Howto.cook build modify 7 aux/new.so build modify 7 aux/version.so build modify 5 common/config.h.in build modify 7 common/patchlevel.h source modify 4 config build modify 7 configure HISTORY What When Who Comment ------ ------ ----- --------- new_change Fri Apr 14 pmiller 08:09:14 1995 develop_begin Fri Apr 14 pmiller 08:09:18 1995 develop_end Fri Apr 14 pmiller 08:12:32 1995 review_pass Fri Apr 14 pmiller 08:12:35 1995 integrate_begin Fri Apr 14 pmiller 08:12:38 1995 integrate_pass Fri Apr 14 pmiller 08:14:50 1995 Project "tardy.1.2", Change 9 Page 1 Change Details Sat Mar 23 22:52:49 1996 NAME Project "tardy.1.2", Delta 9, Change 9. SUMMARY add option to remove directory prefixes DESCRIPTION This change adds the -Remove_Prefix option, to remove directory prefixes from file names ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- ------- ------- ----------- build modify 8 BUILDING build modify 8 MANIFEST build modify 8 Makefile.in build modify 8 README build modify 8 aux/new.so build modify 8 aux/version.so build modify 6 common/config.h.in build modify 8 common/patchlevel.h build modify 8 configure source modify 6 man1/tardy.1 source modify 5 tardy/main.c source modify 5 tardy/tardy.c source modify 4 tardy/tardy.h test create 1 test/00/t0009a.sh HISTORY What When Who Comment ------ ------ ----- --------- new_change Fri Oct 6 pmiller 15:50:08 1995 develop_begin Fri Oct 6 pmiller Elapsed time: 0.229 15:50:11 1995 days. develop_end Fri Oct 6 pmiller 17:33:26 1995 review_pass Fri Oct 6 pmiller 17:33:31 1995 integrate_begin Fri Oct 6 pmiller 17:33:37 1995 integrate_pass Fri Oct 6 pmiller 17:36:27 1995 Project "tardy.1.2", Change 10 Page 1 Change Details Sat Mar 23 22:52:49 1996 NAME Project "tardy.1.2", Delta 10, Change 10. SUMMARY add -clean option DESCRIPTION This change adds the -clean option, to clean shell special characters from file names. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- ------- ------- ----------- build modify 9 BUILDING build modify 9 MANIFEST build modify 9 Makefile.in build modify 9 README build modify 9 aux/new.so build modify 9 aux/version.so build modify 7 common/config.h.in build modify 9 common/patchlevel.h build modify 9 configure source modify 7 man1/tardy.1 source modify 6 tardy/main.c source modify 6 tardy/tardy.c source modify 5 tardy/tardy.h test create 1 test/00/t0010a.sh test create 1 test/00/t0011a.sh HISTORY What When Who Comment ------ ------ ----- --------- new_change Sat Mar 23 pmiller 20:28:51 1996 develop_begin Sat Mar 23 pmiller Elapsed time: 0.169 20:29:04 1996 days. develop_end Sat Mar 23 pmiller 21:45:02 1996 review_pass Sat Mar 23 pmiller 21:45:07 1996 integrate_begin Sat Mar 23 pmiller 21:45:10 1996 integrate_pass Sat Mar 23 pmiller 21:47:34 1996 Project "tardy.1.2", Change 11 Page 1 Change Details Sat Mar 23 22:52:50 1996 NAME Project "tardy.1.2", Delta 11, Change 11. SUMMARY distinguish between broken fields and negative fields DESCRIPTION distinguish between broken fields and negative fields This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. arch. host aeb aet aet -bl aet -reg -------- -------- --------- --------- --------- --------- linux- required exempt exempt exempt i486 CAUSE This change was caused by internal_bug. STATE This change is in the 'being_integrated' state. FILES Type Action Edit File Name ------- ------- ------- ----------- source modify 6 tardy/tardy.c HISTORY What When Who Comment ------ ------ ----- --------- new_change Sat Mar 23 pmiller 22:11:17 1996 develop_begin Sat Mar 23 pmiller Elapsed time: 0.090 22:11:21 1996 days. develop_end Sat Mar 23 pmiller 22:51:42 1996 review_pass Sat Mar 23 pmiller 22:51:46 1996 integrate_begin Sat Mar 23 pmiller 22:51:49 1996 tardy-1.28/etc/CHANGES.1.28 644 0 0 1313212163037023 132140ustar PeterMiller Project "tardy.1.28" Page 1 List of Changes Thu Jun 27 23:28:31 2013 Change State Description ------- ------- ------------- 10 being_ prepare for release integrated pmiller 50 being_developed gnu long file name filter (clone of 1.26.C050) pmiller (clone of 1.27.C050) 101 awaiting_ write ar(1) aix (clone of 1.26.C100) (clone of development 1.27.C100) 102 awaiting_ write ar(1) aix (clone of 1.26.C100) (clone of development 1.27.C101) 103 awaiting_ tar_input::read_data_strict (clone of 1.26.C101) development (clone of 1.27.C102) 104 awaiting_ refactor to use tar_output_filter_tar_long_name development (clone of 1.26.C102) (clone of 1.27.C103) Project "tardy.1.28", Change 10 Page 1 Change Details Thu Jun 27 23:28:31 2013 NAME Project "tardy.1.28", Delta 1, Change 10. SUMMARY prepare for release DESCRIPTION This change set prepares the Tardy projetc fo r the net public release. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-x86_64" architecture. arch. host aeb aet aet -bl aet -reg -------- -------- --------- --------- --------- --------- linux- required exempt exempt required x86_64 CAUSE This change was caused by internal_improvement. STATE This change is in the 'being_integrated' state. FILES Type Action Edit File Name ------- -------- ------- ----------- source modify 1 etc/new.1.27.so source create etc/new.1.28.so HISTORY What When Who Comment ------ ------ ----- --------- new_change Thu Jun 27 pmiller 23:24:49 2013 develop_begin Thu Jun 27 pmiller 23:24:49 2013 develop_end_2ai Thu Jun 27 pmiller 23:28:15 2013 integrate_begin Thu Jun 27 pmiller 23:28:29 2013 Project "tardy.1.28", Change 50 Page 1 Change Details Thu Jun 27 23:28:31 2013 NAME Project "tardy.1.28", Change 50. SUMMARY gnu long file name filter (clone of 1.26.C050) (clone of 1.27.C050) DESCRIPTION This change ... ARCHITECTURE This change must build and test in the "linux-x86_64" architecture. arch. host aeb aet aet -bl aet -reg -------- -------- --------- --------- --------- --------- linux- required required required required x86_64 CAUSE This change was caused by internal_enhancement. STATE This change is in the 'being_developed' state. FILES Type Action Edit File Name ------- -------- ------- ----------- source modify 14 libtardy/tar/input/tar.cc HISTORY What When Who Comment ------ ------ ----- --------- new_change Thu Jun 27 pmiller Cloned from change 50. 23:20:57 2013 develop_begin Thu Jun 27 pmiller 23:20:57 2013 Project "tardy.1.28", Change 101 Page 1 Change Details Thu Jun 27 23:28:31 2013 NAME Project "tardy.1.28", Change 101. SUMMARY write ar(1) aix (clone of 1.26.C100) (clone of 1.27.C100) DESCRIPTION This change ... ARCHITECTURE This change must build and test in the "linux-x86_64" architecture. CAUSE This change was caused by internal_enhancement. STATE This change is in the 'awaiting_development' state. FILES This change has no files. HISTORY What When Who Comment ------ ------ ----- --------- new_change Thu Jun 27 pmiller Cloned from change 100. 23:20:28 2013 Project "tardy.1.28", Change 102 Page 1 Change Details Thu Jun 27 23:28:31 2013 NAME Project "tardy.1.28", Change 102. SUMMARY write ar(1) aix (clone of 1.26.C100) (clone of 1.27.C101) DESCRIPTION This change ... ARCHITECTURE This change must build and test in the "linux-x86_64" architecture. CAUSE This change was caused by internal_enhancement. STATE This change is in the 'awaiting_development' state. FILES This change has no files. HISTORY What When Who Comment ------ ------ ----- --------- new_change Thu Jun 27 pmiller Cloned from change 101. 23:20:28 2013 Project "tardy.1.28", Change 103 Page 1 Change Details Thu Jun 27 23:28:31 2013 NAME Project "tardy.1.28", Change 103. SUMMARY tar_input::read_data_strict (clone of 1.26.C101) (clone of 1.27.C102) DESCRIPTION This change ... This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-x86_64" architecture. CAUSE This change was caused by internal_improvement. STATE This change is in the 'awaiting_development' state. FILES This change has no files. HISTORY What When Who Comment ------ ------ ----- --------- new_change Thu Jun 27 pmiller Cloned from change 102. 23:20:28 2013 Project "tardy.1.28", Change 104 Page 1 Change Details Thu Jun 27 23:28:31 2013 NAME Project "tardy.1.28", Change 104. SUMMARY refactor to use tar_output_filter_tar_long_name (clone of 1.26.C102) (clone of 1.27.C103) DESCRIPTION This change ... This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-x86_64" architecture. CAUSE This change was caused by internal_improvement. STATE This change is in the 'awaiting_development' state. FILES This change has no files. HISTORY What When Who Comment ------ ------ ----- --------- new_change Thu Jun 27 pmiller Cloned from change 103. 23:20:28 2013 tardy-1.28/etc/CHANGES.1.4 644 0 0 20713312163037023 131540ustar PeterMiller Project "tardy.1.4" Page 1 List of Changes Wed Sep 13 15:27:53 2000 Change State Description ------- ------- ------------- 10 completed New release derived from tardy.1.3. 11 completed change to use C++ 12 completed tar format input and output base classes 13 completed cpio formats 14 completed build RPM package spec 15 completed more cpio formats 16 completed re-jig output side 17 completed weird checksum problems 18 completed tracking header alignment 19 completed FSF address 20 completed aux -> etc 21 completed aux -> etc 22 completed aux -> etc 23 completed conditional history updates Project "tardy.1.4", Change 10 Page 1 Change Details Wed Sep 13 15:27:54 2000 NAME Project "tardy.1.4", Delta 1, Change 10. SUMMARY New release derived from tardy.1.3. DESCRIPTION New release derived from tardy.1.3. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "unspecified" architecture. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- -------- ------- ----------- build create 1 BUILDING source create 1 LICENSE build create 1 MANIFEST build create 1 Makefile.in build create 1 README source create 1 aux/BUILDING.man source create 1 aux/CHANGES.1.1 source create 1 aux/CHANGES.1.2 source create 1 aux/CHANGES.sh source create 1 aux/Howto.conf.in source create 1 aux/Howto.cook source create 1 aux/MANIFEST.sh source create 1 aux/Makefi.file.sh source create 1 aux/Makefile.awk source create 1 aux/Makefile.head source create 1 aux/Makefile.sh source create 1 aux/README.man source create 1 aux/config.h.in source create 1 aux/config.h.in1 source create 1 aux/config.h.in2 source create 1 aux/configure.in source create 1 aux/lsm.roff source create 1 aux/new.1.2.so build create 1 aux/new.so source create 1 aux/patch.file.sh source create 1 aux/patches.sh source create 1 aux/ssp.awk source create 1 aux/template/c source create 1 aux/template/generic source create 1 aux/template/h source create 1 aux/template/man source create 1 aux/template/ms source create 1 aux/template/report Project "tardy.1.4", Change 10 Page 2 Change Details Wed Sep 13 15:27:54 2000 Type Action Edit File Name ------- -------- ------- ----------- source create 1 aux/template/sh source create 1 aux/template/test source create 1 aux/txt2c.awk build create 1 aux/version.so source create 1 common/ac/dirent.h source create 1 common/ac/limits.h source create 1 common/ac/stdarg.h source create 1 common/ac/stddef.h source create 1 common/ac/stdlib.h source create 1 common/ac/string.h source create 1 common/ac/termios.h source create 1 common/ac/time.h source create 1 common/ac/unistd.h source create 1 common/ansi.c source create 1 common/arglex.c source create 1 common/arglex.h build create 1 common/config.h.in source create 1 common/error.c source create 1 common/error.h source create 1 common/help.c source create 1 common/help.h source create 1 common/main.h source create 1 common/mem.c source create 1 common/mem.h source create 1 common/mprintf.c source create 1 common/mprintf.h build create 1 common/patchlevel.h source create 1 common/progname.c source create 1 common/progname.h source create 1 common/str.c source create 1 common/str.h source create 1 common/trace.c source create 1 common/trace.h source create 1 common/version.c source create 1 common/version.h source create 1 common/version_stmp.c source create 1 common/version_stmp.h source create 1 config build create 1 configure source create 1 man1/o__rules.so source create 1 man1/o_help.so source create 1 man1/tardy.1 source create 1 man1/z_cr.so source create 1 man1/z_exit.so source create 1 tardy/main.c source create 1 tardy/tardy.c source create 1 tardy/tardy.h test create 1 test/00/t0001a.sh test create 1 test/00/t0002a.sh test create 1 test/00/t0003a.sh test create 1 test/00/t0004a.sh test create 1 test/00/t0005a.sh test create 1 test/00/t0006a.sh test create 1 test/00/t0007a.sh test create 1 test/00/t0008a.sh Project "tardy.1.4", Change 10 Page 3 Change Details Wed Sep 13 15:27:54 2000 Type Action Edit File Name ------- -------- ------- ----------- test create 1 test/00/t0009a.sh test create 1 test/00/t0010a.sh test create 1 test/00/t0011a.sh HISTORY What When Who Comment ------ ------ ----- --------- new_change Sun Jan 25 pmiller 22:49:01 1998 develop_begin Sun Jan 25 pmiller 22:49:01 1998 develop_end Sun Jan 25 pmiller 22:49:01 1998 review_pass Sun Jan 25 pmiller 22:49:01 1998 integrate_begin Sun Jan 25 pmiller 22:49:01 1998 integrate_pass Sun Jan 25 pmiller 22:49:47 1998 Project "tardy.1.4", Change 11 Page 1 Change Details Wed Sep 13 15:27:55 2000 NAME Project "tardy.1.4", Delta 2, Change 11. SUMMARY change to use C++ DESCRIPTION change to use C++ This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_improvement. FILES Type Action Edit File Name ------- -------- ------- ----------- build modify 1 -> 2 BUILDING build modify 1 -> 2 MANIFEST build modify 1 -> 2 Makefile.in build modify 1 -> 2 README source modify 1 -> 2 aux/Howto.conf.in source modify 1 -> 2 aux/Howto.cook source modify 1 -> 2 aux/configure.in build modify 1 -> 2 aux/new.so build modify 1 -> 2 aux/version.so source create 1 common/ac/string.cc Moved from common/ansi.c source remove 1 common/ansi.c Moved to common/ac/string.cc source remove 1 common/arglex.c Moved to common/arglex.cc source create 1 common/arglex.cc Moved from common/arglex.c source modify 1 -> 2 common/arglex.h build modify 1 -> 2 common/config.h.in source remove 1 common/error.c Moved to common/error.cc source create 1 common/error.cc Moved from common/error.c source modify 1 -> 2 common/error.h source remove 1 common/help.c Moved to common/help.cc source create 1 common/help.cc Moved from common/help.c source modify 1 -> 2 common/help.h source modify 1 -> 2 common/main.h source remove 1 common/mem.c Moved to common/mem.cc Project "tardy.1.4", Change 11 Page 2 Change Details Wed Sep 13 15:27:55 2000 Type Action Edit File Name ------- -------- ------- ----------- source create 1 common/mem.cc Moved from common/mem.c source modify 1 -> 2 common/mem.h source remove 1 common/mprintf.c Moved to common/mprintf.cc source create 1 common/mprintf.cc Moved from common/mprintf.c source modify 1 -> 2 common/mprintf.h build modify 1 -> 2 common/patchlevel.h source remove 1 common/progname.c Moved to common/progname.cc source create 1 common/progname.cc Moved from common/progname.c source modify 1 -> 2 common/progname.h source remove 1 common/str.c Moved to common/str.cc source create 1 common/str.cc Moved from common/str.c source modify 1 -> 2 common/str.h source remove 1 common/trace.c Moved to common/trace.cc source create 1 common/trace.cc Moved from common/trace.c source modify 1 -> 2 common/trace.h source create 1 common/versi_stamp.cc Moved from common/version_stmp.c source remove 1 common/version.c Moved to common/version.cc source create 1 common/version.cc Moved from common/version.c source modify 1 -> 2 common/version.h source remove 1 common/version_stmp.c Moved to common/versi_stamp.cc source modify 1 -> 2 common/version_stmp.h source modify 1 -> 2 config build modify 1 -> 2 configure source remove 1 tardy/main.c Moved to tardy/main.cc source create 1 tardy/main.cc Moved from tardy/main.c source remove 1 tardy/tardy.c Moved to tardy/tardy.cc source create 1 tardy/tardy.cc Moved from tardy/tardy.c source modify 1 -> 2 tardy/tardy.h HISTORY What When Who Comment ------ ------ ----- --------- new_change Sun Jan 25 pmiller 22:52:30 1998 develop_begin Sun Jan 25 pmiller Elapsed time: 1.000 22:52:41 1998 days. develop_end Mon Jan 26 pmiller 18:18:48 1998 Project "tardy.1.4", Change 11 Page 3 Change Details Wed Sep 13 15:27:55 2000 What When Who Comment ------ ------ ----- --------- review_pass Mon Jan 26 pmiller 18:20:00 1998 integrate_begin Mon Jan 26 pmiller 18:20:03 1998 integrate_fail Mon Jan 26 pmiller integration build 18:21:09 1998 targets need attention develop_end Mon Jan 26 pmiller 18:25:48 1998 review_pass Mon Jan 26 pmiller 18:25:51 1998 integrate_begin Mon Jan 26 pmiller 18:25:53 1998 integrate_pass Mon Jan 26 pmiller 18:27:58 1998 Project "tardy.1.4", Change 12 Page 1 Change Details Wed Sep 13 15:27:56 2000 NAME Project "tardy.1.4", Delta 3, Change 12. SUMMARY tar format input and output base classes DESCRIPTION This change introduces the base classes for reading and writing tar archives. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_improvement. FILES Type Action Edit File Name ------- -------- ------- ----------- build modify 2 -> 3 BUILDING build modify 2 -> 3 MANIFEST build modify 2 -> 3 Makefile.in build modify 2 -> 3 README source modify 2 -> 3 aux/Howto.cook source modify 2 -> 3 aux/configure.in build modify 2 -> 3 aux/new.so source modify 1 -> 2 aux/template/c source modify 1 -> 2 aux/template/h build modify 2 -> 3 aux/version.so source create 1 common/ac/fcntl.h source create 1 common/ac/stdio.h source create 1 common/cannonical.cc source create 1 common/cannonical.h build modify 2 -> 3 common/config.h.in source create 1 common/file/input.cc source create 1 common/file/input.h source create 1 common/file/input/normal.cc source create 1 common/file/input/normal.h source create 1 common/file/input/stdin.cc source create 1 common/file/input/stdin.h source create 1 common/file/output.cc source create 1 common/file/output.h source create 1 common/file/output/normal.cc source create 1 common/file/output/normal.h source create 1 common/file/output/stdout.cc source create 1 common/file/output/stdout.h build modify 2 -> 3 common/patchlevel.h source modify 1 -> 2 common/str.cc source modify 2 -> 3 common/str.h source create 1 common/tar/format.cc source create 1 common/tar/format.h source create 1 common/tar/header.cc source create 1 common/tar/header.h source create 1 common/tar/input.cc source create 1 common/tar/input.h Project "tardy.1.4", Change 12 Page 2 Change Details Wed Sep 13 15:27:56 2000 Type Action Edit File Name ------- -------- ------- ----------- source create 1 common/tar/input/clean.cc source create 1 common/tar/input/clean.h source create 1 common/tar/input/group_name.cc source create 1 common/tar/input/group_name.h source create 1 common/tar/input/group_numbr.cc source create 1 common/tar/input/group_numbr.h source create 1 common/tar/input/mode_clear.cc source create 1 common/tar/input/mode_clear.h source create 1 common/tar/input/mode_set.cc source create 1 common/tar/input/mode_set.h source create 1 common/tar/input/now.cc source create 1 common/tar/input/now.h source create 1 common/tar/input/prefix.cc source create 1 common/tar/input/prefix.h source create 1 common/tar/input/remov_prefi.cc source create 1 common/tar/input/remov_prefi.h source create 1 common/tar/input/suppr_direc.cc source create 1 common/tar/input/suppr_direc.h source create 1 common/tar/input/tar.cc source create 1 common/tar/input/tar.h source create 1 common/tar/input/user_name.cc source create 1 common/tar/input/user_name.h source create 1 common/tar/input/user_number.cc source create 1 common/tar/input/user_number.h source create 1 common/tar/output.cc source create 1 common/tar/output.h source create 1 common/tar/output/list.cc source create 1 common/tar/output/list.h source create 1 common/tar/output/tar.cc source create 1 common/tar/output/tar.h source create 1 common/tar/output/tar_old.cc source create 1 common/tar/output/tar_old.h source create 1 common/tar/output/ustar.cc source create 1 common/tar/output/ustar.h source modify 2 -> 3 config build modify 2 -> 3 configure source modify 1 -> 2 tardy/tardy.cc test modify 1 -> 2 test/00/t0007a.sh HISTORY What When Who Comment ------ ------ ----- --------- new_change Mon Jan 26 pmiller 18:29:32 1998 develop_begin Mon Jan 26 pmiller Elapsed time: 2.615 18:29:35 1998 days. develop_end Wed Jan 28 pmiller 23:06:10 1998 review_pass Wed Jan 28 pmiller 23:06:34 1998 integrate_begin Wed Jan 28 pmiller 23:06:37 1998 integrate_pass Wed Jan 28 pmiller 23:09:07 1998 Project "tardy.1.4", Change 13 Page 1 Change Details Wed Sep 13 15:27:58 2000 NAME Project "tardy.1.4", Delta 4, Change 13. SUMMARY cpio formats DESCRIPTION This change adds CPIO formats to tardy's repertoir. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- -------- ------- ----------- build modify 3 -> 4 BUILDING build modify 3 -> 4 MANIFEST build modify 3 -> 4 Makefile.in build modify 3 -> 4 README source modify 3 -> 4 aux/Howto.cook build modify 3 -> 4 aux/new.so build modify 3 -> 4 aux/version.so build modify 3 -> 4 common/config.h.in source modify 1 -> 2 common/file/output.cc source modify 1 -> 2 common/file/output.h source modify 1 -> 2 common/file/output/normal.cc source modify 1 -> 2 common/file/output/normal.h source modify 1 -> 2 common/file/output/stdout.cc source modify 1 -> 2 common/file/output/stdout.h build modify 3 -> 4 common/patchlevel.h source modify 1 -> 2 common/tar/header.cc source modify 1 -> 2 common/tar/header.h source modify 1 -> 2 common/tar/input.cc source modify 1 -> 2 common/tar/input.h source modify 1 -> 2 common/tar/input/clean.cc source modify 1 -> 2 common/tar/input/clean.h source create 1 common/tar/input/filter_base.cc source create 1 common/tar/input/filter_base.h source modify 1 -> 2 common/tar/input/group_name.cc source modify 1 -> 2 common/tar/input/group_name.h source modify 1 -> 2 common/tar/input/group_numbr.cc source modify 1 -> 2 common/tar/input/group_numbr.h source modify 1 -> 2 common/tar/input/mode_clear.cc source modify 1 -> 2 common/tar/input/mode_clear.h source modify 1 -> 2 common/tar/input/mode_set.cc source modify 1 -> 2 common/tar/input/mode_set.h source modify 1 -> 2 common/tar/input/now.cc source modify 1 -> 2 common/tar/input/now.h source modify 1 -> 2 common/tar/input/prefix.cc source modify 1 -> 2 common/tar/input/prefix.h source modify 1 -> 2 common/tar/input/remov_prefi.cc source modify 1 -> 2 common/tar/input/remov_prefi.h Project "tardy.1.4", Change 13 Page 2 Change Details Wed Sep 13 15:27:58 2000 Type Action Edit File Name ------- -------- ------- ----------- source modify 1 -> 2 common/tar/input/suppr_direc.cc source modify 1 -> 2 common/tar/input/suppr_direc.h source modify 1 -> 2 common/tar/input/tar.cc source modify 1 -> 2 common/tar/input/tar.h source modify 1 -> 2 common/tar/input/user_name.cc source modify 1 -> 2 common/tar/input/user_name.h source modify 1 -> 2 common/tar/input/user_number.cc source modify 1 -> 2 common/tar/input/user_number.h source modify 1 -> 2 common/tar/output.cc source modify 1 -> 2 common/tar/output.h source create 1 common/tar/output/cpio.cc source create 1 common/tar/output/cpio.h source create 1 common/tar/output/cpio/newascii.cc source create 1 common/tar/output/cpio/newascii.h source modify 1 -> 2 common/tar/output/list.cc source modify 1 -> 2 common/tar/output/list.h source modify 1 -> 2 common/tar/output/tar.cc source modify 1 -> 2 common/tar/output/tar.h source create 1 common/tar/output/tar_base.cc source create 1 common/tar/output/tar_base.h source modify 1 -> 2 common/tar/output/tar_old.cc source modify 1 -> 2 common/tar/output/tar_old.h source modify 1 -> 2 common/tar/output/ustar.cc source modify 1 -> 2 common/tar/output/ustar.h build modify 3 -> 4 configure source modify 1 -> 2 tardy/main.cc source modify 2 -> 3 tardy/tardy.cc source modify 2 -> 3 tardy/tardy.h test create 1 test/00/t0012a.sh HISTORY What When Who Comment ------ ------ ----- --------- new_change Thu Jan 29 pmiller 18:04:14 1998 develop_begin Thu Jan 29 pmiller Elapsed time: 2.082 18:04:21 1998 days. develop_end Sun Feb 1 pmiller 18:41:06 1998 review_pass Sun Feb 1 pmiller 18:43:16 1998 integrate_begin Sun Feb 1 pmiller 18:43:18 1998 integrate_pass Sun Feb 1 pmiller 18:45:28 1998 Project "tardy.1.4", Change 14 Page 1 Change Details Wed Sep 13 15:27:59 2000 NAME Project "tardy.1.4", Delta 5, Change 14. SUMMARY build RPM package spec DESCRIPTION build RPM package spec This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_bug. FILES Type Action Edit File Name ------- -------- ------- ----------- build modify 4 -> 5 BUILDING build modify 4 -> 5 MANIFEST build modify 4 -> 5 Makefile.in build modify 4 -> 5 README source modify 1 -> 2 aux/BUILDING.man source modify 4 -> 5 aux/Howto.cook source modify 1 -> 2 aux/Makefi.file.sh source modify 1 -> 2 aux/Makefile.head source modify 1 -> 2 aux/Makefile.sh source modify 1 -> 2 aux/README.man source create 1 aux/archive.cook source create 1 aux/html.roff source modify 1 -> 2 aux/lsm.roff build modify 4 -> 5 aux/new.so source create 1 aux/spec.sh source create 1 aux/tardy.gif.uue build modify 4 -> 5 aux/version.so build modify 4 -> 5 common/config.h.in source modify 1 -> 2 common/help.cc build modify 4 -> 5 common/patchlevel.h build modify 4 -> 5 configure source modify 1 -> 2 man1/z_cr.so HISTORY What When Who Comment ------ ------ ----- --------- new_change Sun Feb 1 pmiller 21:03:23 1998 develop_begin Sun Feb 1 pmiller Elapsed time: 2.033 21:03:27 1998 days. develop_end Tue Feb 3 pmiller 21:18:30 1998 Project "tardy.1.4", Change 14 Page 2 Change Details Wed Sep 13 15:27:59 2000 What When Who Comment ------ ------ ----- --------- review_pass Tue Feb 3 pmiller 21:18:33 1998 integrate_begin Tue Feb 3 pmiller 21:18:45 1998 integrate_pass Tue Feb 3 pmiller 21:23:31 1998 Project "tardy.1.4", Change 15 Page 1 Change Details Wed Sep 13 15:28:00 2000 NAME Project "tardy.1.4", Delta 6, Change 15. SUMMARY more cpio formats DESCRIPTION This change adds more cpio output formats. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- -------- ------- ----------- build modify 5 -> 6 BUILDING build modify 5 -> 6 MANIFEST build modify 5 -> 6 Makefile.in build modify 5 -> 6 README build modify 5 -> 6 aux/new.so build modify 5 -> 6 aux/version.so build modify 5 -> 6 common/config.h.in source create 1 common/fstrcmp.cc source create 1 common/fstrcmp.h build modify 5 -> 6 common/patchlevel.h source modify 3 -> 4 common/str.h source create 1 common/symtab.cc source create 1 common/symtab.h source modify 1 -> 2 common/tar/output/cpio.cc source create 1 common/tar/output/cpio/oldascii.cc source create 1 common/tar/output/cpio/oldascii.h build modify 5 -> 6 configure source create 1 tardy/ofmt.cc source create 1 tardy/ofmt.h source modify 3 -> 4 tardy/tardy.cc test create 1 test/00/t0013a.sh HISTORY What When Who Comment ------ ------ ----- --------- new_change Tue Feb 3 pmiller 21:36:11 1998 develop_begin Tue Feb 3 pmiller Elapsed time: 3.192 21:36:15 1998 days. develop_end Fri Feb 6 pmiller 23:02:32 1998 review_pass Fri Feb 6 pmiller 23:02:36 1998 integrate_begin Fri Feb 6 pmiller 23:02:39 1998 integrate_pass Fri Feb 6 pmiller 23:04:58 1998 Project "tardy.1.4", Change 16 Page 1 Change Details Wed Sep 13 15:28:00 2000 NAME Project "tardy.1.4", Delta 7, Change 16. SUMMARY re-jig output side DESCRIPTION This change re-aranges the source code tree to better reflect the inheritance heirachy. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_improvement. FILES Type Action Edit File Name ------- -------- ------- ----------- build modify 6 -> 7 BUILDING build modify 6 -> 7 MANIFEST build modify 6 -> 7 Makefile.in build modify 6 -> 7 README build modify 6 -> 7 aux/new.so build modify 6 -> 7 aux/version.so build modify 6 -> 7 common/config.h.in build modify 6 -> 7 common/patchlevel.h source remove 2 common/tar/output/tar.cc Moved to common/tar/output/tar/ bsd.cc source remove 2 common/tar/output/tar.h Moved to common/tar/output/tar/ bsd.h source create 1 common/tar/output/tar/bsd.cc Moved from common/tar/output/ tar.cc source create 1 common/tar/output/tar/bsd.h Moved from common/tar/output/tar.h source create 1 common/tar/output/tar/posix.cc Moved from common/tar/output/ ustar.cc source create 1 common/tar/output/tar/posix.h Moved from common/tar/output/ ustar.h source create 1 common/tar/output/tar/v7.cc Moved from common/tar/output/tar_ old.cc source create 1 common/tar/output/tar/v7.h Moved from common/tar/output/tar_ old.h Project "tardy.1.4", Change 16 Page 2 Change Details Wed Sep 13 15:28:00 2000 Type Action Edit File Name ------- -------- ------- ----------- source remove 2 common/tar/output/tar_old.cc Moved to common/tar/output/tar/ v7.cc source remove 2 common/tar/output/tar_old.h Moved to common/tar/output/tar/ v7.h source remove 2 common/tar/output/ustar.cc Moved to common/tar/output/tar/ posix.cc source remove 2 common/tar/output/ustar.h Moved to common/tar/output/tar/ posix.h build modify 6 -> 7 configure source modify 1 -> 2 tardy/ofmt.cc HISTORY What When Who Comment ------ ------ ----- --------- new_change Fri Feb 6 pmiller 23:14:22 1998 develop_begin Fri Feb 6 pmiller Elapsed time: 1.000 23:14:29 1998 days. develop_end Sat Feb 7 pmiller 20:31:36 1998 review_pass Sat Feb 7 pmiller 20:31:39 1998 integrate_begin Sat Feb 7 pmiller 20:31:42 1998 integrate_pass Sat Feb 7 pmiller 20:35:10 1998 Project "tardy.1.4", Change 17 Page 1 Change Details Wed Sep 13 15:28:01 2000 NAME Project "tardy.1.4", Delta 8, Change 17. SUMMARY weird checksum problems DESCRIPTION This change fixes a bug which gave weird checksum problems. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_bug. FILES Type Action Edit File Name ------- -------- ------- ----------- build modify 7 -> 8 BUILDING build modify 7 -> 8 MANIFEST build modify 7 -> 8 Makefile.in build modify 7 -> 8 README source modify 5 -> 6 aux/Howto.cook build modify 7 -> 8 aux/new.so build modify 7 -> 8 aux/version.so build modify 7 -> 8 common/config.h.in build modify 7 -> 8 common/patchlevel.h source modify 1 -> 2 common/tar/format.cc source modify 1 -> 2 common/tar/format.h source modify 2 -> 3 common/tar/input/tar.cc build modify 7 -> 8 configure HISTORY What When Who Comment ------ ------ ----- --------- new_change Sat Mar 6 pmiller 22:26:39 1999 develop_begin Sat Mar 6 pmiller Elapsed time: 0.059 22:26:43 1999 days. develop_end Sat Mar 6 pmiller 22:53:20 1999 review_pass Sat Mar 6 pmiller 22:53:22 1999 integrate_begin Sat Mar 6 pmiller 22:53:26 1999 integrate_pass Sat Mar 6 pmiller 22:56:05 1999 Project "tardy.1.4", Change 18 Page 1 Change Details Wed Sep 13 15:28:02 2000 NAME Project "tardy.1.4", Delta 9, Change 18. SUMMARY tracking header alignment DESCRIPTION This change adds code for tracking header alignment, to aid in finding a bug. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- -------- ------- ----------- build modify 8 -> 9 BUILDING build modify 8 -> 9 MANIFEST build modify 8 -> 9 Makefile.in build modify 8 -> 9 README build modify 8 -> 9 aux/new.so build modify 8 -> 9 aux/version.so build modify 8 -> 9 common/config.h.in build modify 8 -> 9 common/patchlevel.h source modify 2 -> 3 common/tar/input/suppr_direc.cc source modify 3 -> 4 common/tar/input/tar.cc source modify 2 -> 3 common/tar/input/tar.h build modify 8 -> 9 configure source modify 4 -> 5 tardy/tardy.cc HISTORY What When Who Comment ------ ------ ----- --------- new_change Tue Mar 9 pmiller 08:48:13 1999 develop_begin Tue Mar 9 pmiller Elapsed time: 0.226 08:48:22 1999 days. develop_end Tue Mar 9 pmiller 10:30:12 1999 review_pass Tue Mar 9 pmiller 10:30:19 1999 integrate_begin Tue Mar 9 pmiller 10:30:21 1999 integrate_pass Tue Mar 9 pmiller 10:31:52 1999 Project "tardy.1.4", Change 19 Page 1 Change Details Wed Sep 13 15:28:02 2000 NAME Project "tardy.1.4", Delta 10, Change 19. SUMMARY FSF address DESCRIPTION This change update the FSF address in the GPL file headers. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- -------- ------- ----------- build modify 9 -> 10 BUILDING source modify 1 -> 2 LICENSE build modify 9 -> 10 MANIFEST build modify 9 -> 10 Makefile.in build modify 9 -> 10 README source modify 2 -> 3 aux/BUILDING.man source modify 1 -> 2 aux/CHANGES.sh source modify 2 -> 3 aux/Howto.conf.in source modify 6 -> 7 aux/Howto.cook source modify 1 -> 2 aux/MANIFEST.sh source modify 2 -> 3 aux/Makefi.file.sh source modify 1 -> 2 aux/Makefile.awk source modify 2 -> 3 aux/Makefile.head source modify 2 -> 3 aux/Makefile.sh source modify 2 -> 3 aux/README.man source modify 1 -> 2 aux/archive.cook source modify 1 -> 2 aux/config.h.in1 source modify 3 -> 4 aux/configure.in source modify 2 -> 3 aux/lsm.roff source modify 1 -> 2 aux/new.1.2.so build modify 9 -> 10 aux/new.so source modify 1 -> 2 aux/patch.file.sh source modify 1 -> 2 aux/patches.sh source modify 1 -> 2 aux/ssp.awk source modify 1 -> 2 aux/tardy.gif.uue source modify 2 -> 3 aux/template/c source modify 1 -> 2 aux/template/generic source modify 2 -> 3 aux/template/h source modify 1 -> 2 aux/template/man source modify 1 -> 2 aux/template/ms source modify 1 -> 2 aux/template/report source modify 1 -> 2 aux/template/sh source modify 1 -> 2 aux/template/test source modify 1 -> 2 aux/txt2c.awk build modify 9 -> 10 aux/version.so Project "tardy.1.4", Change 19 Page 2 Change Details Wed Sep 13 15:28:02 2000 Type Action Edit File Name ------- -------- ------- ----------- source modify 1 -> 2 common/ac/dirent.h source modify 1 -> 2 common/ac/limits.h source modify 1 -> 2 common/ac/stdarg.h source modify 1 -> 2 common/ac/stddef.h source modify 1 -> 2 common/ac/stdlib.h source modify 1 -> 2 common/ac/string.cc source modify 1 -> 2 common/ac/string.h source modify 1 -> 2 common/ac/termios.h source modify 1 -> 2 common/ac/time.h source modify 1 -> 2 common/ac/unistd.h source modify 1 -> 2 common/arglex.cc source modify 2 -> 3 common/arglex.h source modify 1 -> 2 common/cannonical.cc source modify 1 -> 2 common/cannonical.h build modify 9 -> 10 common/config.h.in source modify 1 -> 2 common/error.cc source modify 2 -> 3 common/error.h source modify 1 -> 2 common/file/input.cc source modify 1 -> 2 common/file/input.h source modify 1 -> 2 common/file/input/normal.cc source modify 1 -> 2 common/file/input/normal.h source modify 1 -> 2 common/file/input/stdin.cc source modify 1 -> 2 common/file/input/stdin.h source modify 2 -> 3 common/file/output.cc source modify 2 -> 3 common/file/output.h source modify 2 -> 3 common/file/output/normal.cc source modify 2 -> 3 common/file/output/normal.h source modify 2 -> 3 common/file/output/stdout.cc source modify 2 -> 3 common/file/output/stdout.h source modify 1 -> 2 common/fstrcmp.cc source modify 1 -> 2 common/fstrcmp.h source modify 2 -> 3 common/help.cc source modify 2 -> 3 common/help.h source modify 2 -> 3 common/main.h source modify 1 -> 2 common/mem.cc source modify 2 -> 3 common/mem.h source modify 1 -> 2 common/mprintf.cc source modify 2 -> 3 common/mprintf.h build modify 9 -> 10 common/patchlevel.h source modify 1 -> 2 common/progname.cc source modify 2 -> 3 common/progname.h source modify 2 -> 3 common/str.cc source modify 4 -> 5 common/str.h source modify 1 -> 2 common/symtab.cc source modify 1 -> 2 common/symtab.h source modify 2 -> 3 common/tar/format.cc source modify 2 -> 3 common/tar/format.h source modify 2 -> 3 common/tar/header.cc source modify 2 -> 3 common/tar/header.h source modify 2 -> 3 common/tar/input.cc source modify 2 -> 3 common/tar/input.h source modify 2 -> 3 common/tar/input/clean.cc source modify 2 -> 3 common/tar/input/clean.h source modify 1 -> 2 common/tar/input/filter_base.cc source modify 1 -> 2 common/tar/input/filter_base.h Project "tardy.1.4", Change 19 Page 3 Change Details Wed Sep 13 15:28:02 2000 Type Action Edit File Name ------- -------- ------- ----------- source modify 2 -> 3 common/tar/input/group_name.cc source modify 2 -> 3 common/tar/input/group_name.h source modify 2 -> 3 common/tar/input/group_numbr.cc source modify 2 -> 3 common/tar/input/group_numbr.h source modify 2 -> 3 common/tar/input/mode_clear.cc source modify 2 -> 3 common/tar/input/mode_clear.h source modify 2 -> 3 common/tar/input/mode_set.cc source modify 2 -> 3 common/tar/input/mode_set.h source modify 2 -> 3 common/tar/input/now.cc source modify 2 -> 3 common/tar/input/now.h source modify 2 -> 3 common/tar/input/prefix.cc source modify 2 -> 3 common/tar/input/prefix.h source modify 2 -> 3 common/tar/input/remov_prefi.cc source modify 2 -> 3 common/tar/input/remov_prefi.h source modify 3 -> 4 common/tar/input/suppr_direc.cc source modify 2 -> 3 common/tar/input/suppr_direc.h source modify 4 -> 5 common/tar/input/tar.cc source modify 3 -> 4 common/tar/input/tar.h source modify 2 -> 3 common/tar/input/user_name.cc source modify 2 -> 3 common/tar/input/user_name.h source modify 2 -> 3 common/tar/input/user_number.cc source modify 2 -> 3 common/tar/input/user_number.h source modify 2 -> 3 common/tar/output.cc source modify 2 -> 3 common/tar/output.h source modify 2 -> 3 common/tar/output/cpio.cc source modify 1 -> 2 common/tar/output/cpio.h source modify 1 -> 2 common/tar/output/cpio/newascii.cc source modify 1 -> 2 common/tar/output/cpio/newascii.h source modify 1 -> 2 common/tar/output/cpio/oldascii.cc source modify 1 -> 2 common/tar/output/cpio/oldascii.h source modify 2 -> 3 common/tar/output/list.cc source modify 2 -> 3 common/tar/output/list.h source modify 1 -> 2 common/tar/output/tar/bsd.cc source modify 1 -> 2 common/tar/output/tar/bsd.h source modify 1 -> 2 common/tar/output/tar/posix.cc source modify 1 -> 2 common/tar/output/tar/posix.h source modify 1 -> 2 common/tar/output/tar/v7.cc source modify 1 -> 2 common/tar/output/tar/v7.h source modify 1 -> 2 common/tar/output/tar_base.cc source modify 1 -> 2 common/tar/output/tar_base.h source modify 1 -> 2 common/trace.cc source modify 2 -> 3 common/trace.h source modify 1 -> 2 common/versi_stamp.cc source modify 1 -> 2 common/version.cc source modify 2 -> 3 common/version.h source modify 2 -> 3 common/version_stmp.h source modify 3 -> 4 config build modify 9 -> 10 configure source modify 1 -> 2 man1/o__rules.so source modify 1 -> 2 man1/o_help.so source modify 1 -> 2 man1/tardy.1 source modify 2 -> 3 man1/z_cr.so source modify 1 -> 2 man1/z_exit.so source modify 2 -> 3 tardy/main.cc source modify 2 -> 3 tardy/ofmt.cc Project "tardy.1.4", Change 19 Page 4 Change Details Wed Sep 13 15:28:02 2000 Type Action Edit File Name ------- -------- ------- ----------- source modify 1 -> 2 tardy/ofmt.h source modify 5 -> 6 tardy/tardy.cc source modify 3 -> 4 tardy/tardy.h test modify 1 -> 2 test/00/t0001a.sh test modify 1 -> 2 test/00/t0002a.sh test modify 1 -> 2 test/00/t0003a.sh test modify 1 -> 2 test/00/t0004a.sh test modify 1 -> 2 test/00/t0005a.sh test modify 1 -> 2 test/00/t0006a.sh test modify 2 -> 3 test/00/t0007a.sh test modify 1 -> 2 test/00/t0008a.sh test modify 1 -> 2 test/00/t0009a.sh test modify 1 -> 2 test/00/t0010a.sh test modify 1 -> 2 test/00/t0011a.sh test modify 1 -> 2 test/00/t0012a.sh test modify 1 -> 2 test/00/t0013a.sh HISTORY What When Who Comment ------ ------ ----- --------- new_change Thu Aug 5 pmiller 11:38:27 1999 develop_begin Thu Aug 5 pmiller Elapsed time: 0.085 11:38:29 1999 days. develop_end Thu Aug 5 pmiller 12:16:54 1999 review_pass Thu Aug 5 pmiller 12:16:58 1999 integrate_begin Thu Aug 5 pmiller 12:17:02 1999 integrate_pass Thu Aug 5 pmiller 12:22:58 1999 Project "tardy.1.4", Change 20 Page 1 Change Details Wed Sep 13 15:28:05 2000 NAME Project "tardy.1.4", Delta 11, Change 20. SUMMARY aux -> etc DESCRIPTION This change moves the "aux" directory to "etc". This avoids a Cygwin build problem. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- -------- ------- ----------- build modify 10 -> 11 BUILDING build modify 10 -> 11 MANIFEST build modify 10 -> 11 Makefile.in build modify 10 -> 11 README source remove 3 aux/BUILDING.man Moved to etc/BUILDING.man source remove 1 aux/CHANGES.1.1 Moved to etc/CHANGES.1.1 source remove 1 aux/CHANGES.1.2 Moved to etc/CHANGES.1.2 source remove 2 aux/CHANGES.sh Moved to etc/CHANGES.sh source remove 3 aux/Howto.conf.in Moved to etc/Howto.conf.in source remove 7 aux/Howto.cook Moved to etc/Howto.cook source remove 2 aux/MANIFEST.sh Moved to etc/MANIFEST.sh source remove 3 aux/Makefi.file.sh Moved to etc/Makefi.file.sh source remove 2 aux/Makefile.awk Moved to etc/Makefile.awk source remove 3 aux/Makefile.head Moved to etc/Makefile.head source remove 3 aux/Makefile.sh Moved to etc/Makefile.sh source remove 3 aux/README.man Moved to etc/README.man source remove 2 aux/archive.cook Moved to etc/archive.cook source remove 1 aux/config.h.in Moved to etc/config.h.in Project "tardy.1.4", Change 20 Page 2 Change Details Wed Sep 13 15:28:05 2000 Type Action Edit File Name ------- -------- ------- ----------- source remove 2 aux/config.h.in1 Moved to etc/config.h.in1 source remove 1 aux/config.h.in2 Moved to etc/config.h.in2 source remove 4 aux/configure.in Moved to etc/configure.in source remove 1 aux/html.roff Moved to etc/html.roff source remove 3 aux/lsm.roff Moved to etc/lsm.roff source remove 2 aux/new.1.2.so Moved to etc/new.1.2.so build modify 10 -> 11 aux/new.so source remove 2 aux/patch.file.sh Moved to etc/patch.file.sh source remove 2 aux/patches.sh Moved to etc/patches.sh source remove 1 aux/spec.sh Moved to etc/spec.sh source remove 2 aux/ssp.awk Moved to etc/ssp.awk source remove 2 aux/tardy.gif.uue Moved to etc/tardy.gif.uue source remove 3 aux/template/c Moved to etc/template/c source remove 2 aux/template/generic Moved to etc/template/generic source remove 3 aux/template/h Moved to etc/template/h source remove 2 aux/template/man Moved to etc/template/man source remove 2 aux/template/ms Moved to etc/template/ms source remove 2 aux/template/report Moved to etc/template/report source remove 2 aux/template/sh Moved to etc/template/sh source remove 2 aux/template/test Moved to etc/template/test source remove 2 aux/txt2c.awk Moved to etc/txt2c.awk build modify 10 -> 11 aux/version.so build modify 10 -> 11 common/config.h.in build modify 10 -> 11 common/patchlevel.h source modify 4 -> 5 config build modify 10 -> 11 configure source create 1 etc/BUILDING.man Moved from aux/BUILDING.man source create 1 etc/CHANGES.1.1 Moved from aux/CHANGES.1.1 source create 1 etc/CHANGES.1.2 Moved from aux/CHANGES.1.2 source create 1 etc/CHANGES.sh Moved from aux/CHANGES.sh Project "tardy.1.4", Change 20 Page 3 Change Details Wed Sep 13 15:28:05 2000 Type Action Edit File Name ------- -------- ------- ----------- source create 1 etc/Howto.conf.in Moved from aux/Howto.conf.in source create 1 etc/Howto.cook Moved from aux/Howto.cook source create 1 etc/MANIFEST.sh Moved from aux/MANIFEST.sh source create 1 etc/Makefi.file.sh Moved from aux/Makefi.file.sh source create 1 etc/Makefile.awk Moved from aux/Makefile.awk source create 1 etc/Makefile.head Moved from aux/Makefile.head source create 1 etc/Makefile.sh Moved from aux/Makefile.sh source create 1 etc/README.man Moved from aux/README.man source create 1 etc/archive.cook Moved from aux/archive.cook source create 1 etc/config.h.in Moved from aux/config.h.in source create 1 etc/config.h.in1 Moved from aux/config.h.in1 source create 1 etc/config.h.in2 Moved from aux/config.h.in2 source create 1 etc/configure.in Moved from aux/configure.in source create 1 etc/html.roff Moved from aux/html.roff source create 1 etc/lsm.roff Moved from aux/lsm.roff source create 1 etc/new.1.2.so Moved from aux/new.1.2.so source create 1 etc/patch.file.sh Moved from aux/patch.file.sh source create 1 etc/patches.sh Moved from aux/patches.sh source create 1 etc/spec.sh Moved from aux/spec.sh source create 1 etc/ssp.awk Moved from aux/ssp.awk source create 1 etc/tardy.gif.uue Moved from aux/tardy.gif.uue source create 1 etc/template/c Moved from aux/template/c source create 1 etc/template/generic Moved from aux/template/generic source create 1 etc/template/h Moved from aux/template/h source create 1 etc/template/man Moved from aux/template/man source create 1 etc/template/ms Moved from aux/template/ms source create 1 etc/template/report Moved from aux/template/report Project "tardy.1.4", Change 20 Page 4 Change Details Wed Sep 13 15:28:05 2000 Type Action Edit File Name ------- -------- ------- ----------- source create 1 etc/template/sh Moved from aux/template/sh source create 1 etc/template/test Moved from aux/template/test source create 1 etc/txt2c.awk Moved from aux/txt2c.awk HISTORY What When Who Comment ------ ------ ----- --------- new_change Wed Sep 13 pmiller 13:58:12 2000 develop_begin Wed Sep 13 pmiller Elapsed time: 0.044 13:58:13 2000 days. develop_end Wed Sep 13 pmiller 14:17:54 2000 review_pass Wed Sep 13 pmiller 14:19:48 2000 integrate_begin Wed Sep 13 pmiller Elapsed time: 0.029 14:19:53 2000 days. integrate_pass Wed Sep 13 pmiller 14:33:06 2000 Project "tardy.1.4", Change 21 Page 1 Change Details Wed Sep 13 15:28:07 2000 NAME Project "tardy.1.4", Delta 12, Change 21. SUMMARY aux -> etc DESCRIPTION This change catches some more places aux was used. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by chain. FILES Type Action Edit File Name ------- -------- ------- ----------- build modify 11 -> 12 BUILDING build modify 11 -> 12 MANIFEST build modify 11 -> 12 Makefile.in build modify 11 -> 12 README build modify 11 -> 12 aux/new.so build modify 11 -> 12 aux/version.so build modify 11 -> 12 common/config.h.in source modify 3 -> 4 common/help.cc build modify 11 -> 12 common/patchlevel.h build modify 11 -> 12 configure source modify 1 -> 2 etc/BUILDING.man source modify 1 -> 2 etc/Makefi.file.sh source modify 1 -> 2 etc/Makefile.sh source modify 1 -> 2 etc/README.man source modify 1 -> 2 etc/configure.in source modify 1 -> 2 etc/lsm.roff source modify 1 -> 2 etc/spec.sh source modify 3 -> 4 man1/z_cr.so HISTORY What When Who Comment ------ ------ ----- --------- new_change Wed Sep 13 pmiller 14:39:36 2000 develop_begin Wed Sep 13 pmiller 14:39:37 2000 develop_end Wed Sep 13 pmiller 14:47:44 2000 review_pass Wed Sep 13 pmiller 14:47:49 2000 integrate_begin Wed Sep 13 pmiller 14:47:51 2000 Project "tardy.1.4", Change 21 Page 2 Change Details Wed Sep 13 15:28:07 2000 What When Who Comment ------ ------ ----- --------- integrate_pass Wed Sep 13 pmiller 14:50:21 2000 Project "tardy.1.4", Change 22 Page 1 Change Details Wed Sep 13 15:28:08 2000 NAME Project "tardy.1.4", Delta 13, Change 22. SUMMARY aux -> etc DESCRIPTION This change fixes stil more places the aux directory was named. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by chain. FILES Type Action Edit File Name ------- -------- ------- ----------- build modify 12 -> 13 BUILDING build modify 12 -> 13 MANIFEST build modify 12 -> 13 Makefile.in build modify 12 -> 13 README build remove 12 aux/new.so build remove 12 aux/version.so build modify 12 -> 13 common/config.h.in build modify 12 -> 13 common/patchlevel.h build modify 12 -> 13 configure HISTORY What When Who Comment ------ ------ ----- --------- new_change Wed Sep 13 pmiller 15:07:22 2000 develop_begin Wed Sep 13 pmiller 15:07:23 2000 develop_end Wed Sep 13 pmiller 15:08:53 2000 review_pass Wed Sep 13 pmiller 15:10:12 2000 integrate_begin Wed Sep 13 pmiller 15:10:14 2000 integrate_pass Wed Sep 13 pmiller 15:12:41 2000 Project "tardy.1.4", Change 23 Page 1 Change Details Wed Sep 13 15:28:08 2000 NAME Project "tardy.1.4", Delta 14, Change 23. SUMMARY conditional history updates DESCRIPTION This change adds conditional history updates. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_improvement. FILES Type Action Edit File Name ------- -------- ------- ----------- build modify 13 BUILDING build modify 13 MANIFEST build modify 13 Makefile.in build modify 13 README build modify 13 common/config.h.in build modify 13 -> 14 common/patchlevel.h source modify 5 -> 6 config build modify 13 configure HISTORY What When Who Comment ------ ------ ----- --------- new_change Wed Sep 13 pmiller 15:17:31 2000 develop_begin Wed Sep 13 pmiller 15:17:32 2000 develop_end Wed Sep 13 pmiller 15:18:56 2000 review_pass Wed Sep 13 pmiller 15:18:57 2000 integrate_begin Wed Sep 13 pmiller 15:18:57 2000 integrate_ Wed Sep 13 pmiller begin_undo 15:19:49 2000 develop_end_ Wed Sep 13 pmiller undo 15:19:55 2000 develop_end Wed Sep 13 pmiller 15:20:34 2000 review_pass Wed Sep 13 pmiller 15:20:34 2000 integrate_begin Wed Sep 13 pmiller 15:20:35 2000 Project "tardy.1.4", Change 23 Page 2 Change Details Wed Sep 13 15:28:08 2000 What When Who Comment ------ ------ ----- --------- integrate_pass Wed Sep 13 pmiller 15:21:10 2000 tardy-1.28/etc/CHANGES.1.5 644 0 0 1354012163037023 131320ustar PeterMiller Project "tardy.1.5" Page 1 List of Changes Tue Oct 23 08:26:31 2001 Change State Description ------- ------- ------------- 10 completed prepare for release 11 completed test problem Project "tardy.1.5", Change 10 Page 1 Change Details Tue Oct 23 08:26:31 2001 NAME Project "tardy.1.5", Delta 1, Change 10. SUMMARY prepare for release DESCRIPTION This change prepares Tardy for its next public release. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- -------- ------- ----------- build modify 13 BUILDING build modify 14 -> 15 MANIFEST build modify 13 Makefile.in build modify 14 -> 15 README build modify 13 common/config.h.in build modify 15 -> 16 common/patchlevel.h build modify 13 configure source create 1 etc/CHANGES.1.4 source modify 1 -> 2 etc/Howto.cook source modify 2 -> 3 etc/README.man source modify 1 -> 2 etc/new.1.2.so source create 1 etc/new.1.4.so source create 1 etc/new.1.5.so HISTORY What When Who Comment ------ ------ ----- --------- new_change Wed Sep 13 pmiller 15:25:54 2000 develop_begin Wed Sep 13 pmiller Elapsed time: 0.067 15:25:55 2000 days. develop_end Wed Sep 13 pmiller 15:56:14 2000 review_pass Wed Sep 13 pmiller 15:56:18 2000 integrate_begin Wed Sep 13 pmiller Elapsed time: 0.088 15:56:21 2000 days. integrate_pass Wed Sep 13 pmiller 16:36:00 2000 Project "tardy.1.5", Change 11 Page 1 Change Details Tue Oct 23 08:26:32 2001 NAME Project "tardy.1.5", Delta 2, Change 11. SUMMARY test problem DESCRIPTION This change fixes a problem with one of the tests. It also fixes a couple of build problems revealed by the recent RH 7.0 upgrade. My thanks to Steven Knight for reporting this problem. This change must pass a full regression test. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by external_improvement. FILES Type Action Edit File Name ------- -------- ------- ----------- build modify 13 BUILDING build modify 14 -> 16 MANIFEST build modify 13 Makefile.in build modify 14 -> 15 README source create 1 common/ac/errno.h source modify 2 -> 3 common/ac/string.cc build modify 13 common/config.h.in source modify 2 -> 3 common/error.cc source modify 3 -> 4 common/error.h source modify 2 -> 3 common/file/input.cc source modify 3 -> 4 common/file/output.cc source modify 4 -> 5 common/help.cc source modify 2 -> 3 common/mem.cc source modify 3 -> 4 common/mem.h source modify 2 -> 3 common/mprintf.cc build modify 15 -> 17 common/patchlevel.h source modify 2 -> 3 common/progname.cc source modify 3 -> 4 common/progname.h source modify 3 -> 4 common/str.cc source modify 3 -> 4 common/tar/format.cc source modify 3 -> 4 common/tar/input/remov_prefi.cc source modify 5 -> 6 common/tar/input/tar.cc source modify 2 -> 3 common/tar/output/tar_base.cc source modify 2 -> 3 common/trace.cc source modify 2 -> 3 common/version.cc build modify 13 configure source modify 2 -> 3 etc/Howto.cook source modify 2 -> 3 etc/spec.sh source modify 3 -> 4 tardy/main.cc source modify 6 -> 7 tardy/tardy.cc Project "tardy.1.5", Change 11 Page 2 Change Details Tue Oct 23 08:26:32 2001 Type Action Edit File Name ------- -------- ------- ----------- test modify 2 -> 3 test/00/t0010a.sh HISTORY What When Who Comment ------ ------ ----- --------- new_change Mon Jul 9 pmiller 07:49:16 2001 develop_begin Mon Jul 9 pmiller Elapsed time: 0.200 07:49:16 2001 days. develop_end Mon Jul 9 pmiller 09:19:29 2001 review_pass Mon Jul 9 pmiller 09:20:12 2001 integrate_begin Mon Jul 9 pmiller 09:20:15 2001 integrate_pass Mon Jul 9 pmiller 09:23:04 2001 tardy-1.28/etc/CHANGES.1.6 644 0 0 1244612163037023 131370ustar PeterMiller Project "tardy.1.6" Page 1 List of Changes Tue Oct 23 12:00:16 2001 Change State Description ------- ------- ------------- 10 completed prepare for release 11 completed etc/version.so omitted form tarball 12 completed more tarball dependencies Project "tardy.1.6", Change 10 Page 1 Change Details Tue Oct 23 12:00:16 2001 NAME Project "tardy.1.6", Delta 1, Change 10. SUMMARY prepare for release DESCRIPTION This change prepares Tardy for the next public release. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- -------- ------- ----------- build remove 13 BUILDING build remove 17 MANIFEST build remove 13 Makefile.in build remove 16 README build remove 13 common/config.h.in build remove 18 common/patchlevel.h build remove 13 configure source create 1 etc/CHANGES.1.5 source modify 1 -> 2 etc/new.1.5.so source create 1 etc/new.1.6.so HISTORY What When Who Comment ------ ------ ----- --------- new_change Tue Oct 23 pmiller 08:24:04 2001 develop_begin Tue Oct 23 pmiller Elapsed time: 0.022 08:24:04 2001 days. develop_end Tue Oct 23 pmiller 08:34:10 2001 review_pass Tue Oct 23 pmiller 08:34:13 2001 integrate_begin Tue Oct 23 pmiller 08:34:15 2001 integrate_pass Tue Oct 23 pmiller 08:34:45 2001 Project "tardy.1.6", Change 11 Page 1 Change Details Tue Oct 23 12:00:16 2001 NAME Project "tardy.1.6", Delta 2, Change 11. SUMMARY etc/version.so omitted form tarball DESCRIPTION This change adds the etc/version.so file to the tarball. My thanks to Mark Veltzer for reporting this problem. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by external_bug. FILES Type Action Edit File Name ------- -------- ------- ----------- source modify 1 -> 2 etc/archive.cook HISTORY What When Who Comment ------ ------ ----- --------- new_change Tue Oct 23 pmiller 11:25:14 2001 develop_begin Tue Oct 23 pmiller 11:25:14 2001 develop_end Tue Oct 23 pmiller 11:33:37 2001 review_pass Tue Oct 23 pmiller 11:33:40 2001 integrate_begin Tue Oct 23 pmiller 11:33:43 2001 integrate_pass Tue Oct 23 pmiller 11:33:59 2001 Project "tardy.1.6", Change 12 Page 1 Change Details Tue Oct 23 12:00:16 2001 NAME Project "tardy.1.6", Delta 3, Change 12. SUMMARY more tarball dependencies DESCRIPTION This change adds more tarball dependencies. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by chain. FILES Type Action Edit File Name ------- -------- ------- ----------- source modify 1 -> 2 etc/MANIFEST.sh source modify 2 -> 3 etc/archive.cook HISTORY What When Who Comment ------ ------ ----- --------- new_change Tue Oct 23 pmiller 11:49:02 2001 develop_begin Tue Oct 23 pmiller 11:49:02 2001 develop_end Tue Oct 23 pmiller 11:57:10 2001 review_pass Tue Oct 23 pmiller 11:57:14 2001 integrate_begin Tue Oct 23 pmiller 11:57:19 2001 integrate_pass Tue Oct 23 pmiller 11:57:42 2001 tardy-1.28/etc/CHANGES.1.7 644 0 0 731612163037023 131200ustar PeterMiller Project "tardy.1.7" Page 1 List of Changes Wed Oct 24 09:34:07 2001 Change State Description ------- ------- ------------- 10 completed prepare for release 11 completed makefile blues Project "tardy.1.7", Change 10 Page 1 Change Details Wed Oct 24 09:34:07 2001 NAME Project "tardy.1.7", Delta 1, Change 10. SUMMARY prepare for release DESCRIPTION This change preparse Tardy for the next public release. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- -------- ------- ----------- source create 1 etc/CHANGES.1.6 source modify 1 -> 2 etc/new.1.4.so source modify 2 -> 3 etc/new.1.5.so source modify 1 -> 2 etc/new.1.6.so source create 1 etc/new.1.7.so HISTORY What When Who Comment ------ ------ ----- --------- new_change Tue Oct 23 pmiller 11:59:48 2001 develop_begin Tue Oct 23 pmiller 11:59:48 2001 develop_end Tue Oct 23 pmiller 12:04:05 2001 review_pass Tue Oct 23 pmiller 12:04:05 2001 integrate_begin Tue Oct 23 pmiller 12:04:05 2001 integrate_pass Tue Oct 23 pmiller 12:04:20 2001 Project "tardy.1.7", Change 11 Page 1 Change Details Wed Oct 24 09:34:07 2001 NAME Project "tardy.1.7", Delta 2, Change 11. SUMMARY makefile blues DESCRIPTION This change fixes some missing dependencies in the generated Makefile.in My thanks to Mark Veltzer for reporting this problem. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by external_bug. FILES Type Action Edit File Name ------- -------- ------- ----------- source modify 3 -> 4 etc/Howto.cook source modify 2 -> 3 etc/Makefi.file.sh source modify 3 -> 4 etc/archive.cook source modify 1 -> 2 etc/new.1.7.so HISTORY What When Who Comment ------ ------ ----- --------- new_change Wed Oct 24 pmiller 08:44:50 2001 develop_begin Wed Oct 24 pmiller Elapsed time: 0.077 08:44:50 2001 days. develop_end Wed Oct 24 pmiller 09:19:25 2001 review_pass Wed Oct 24 pmiller 09:19:28 2001 integrate_begin Wed Oct 24 pmiller Elapsed time: 0.025 09:19:30 2001 days. integrate_pass Wed Oct 24 pmiller 09:30:54 2001 tardy-1.28/etc/CHANGES.1.8 644 0 0 5311612163037023 131400ustar PeterMiller Project "tardy.1.8" Page 1 List of Changes Tue Aug 27 20:33:27 2002 Change State Description ------- ------- ------------- 10 completed prepare for release 11 completed spec file 12 completed create tarballs 13 completed doxygen 14 completed progress 15 completed long file names 16 completed long link names 17 completed solaris build problems 18 completed debian fix 19 completed debian 20 completed debian, again Project "tardy.1.8", Change 10 Page 1 Change Details Tue Aug 27 20:33:27 2002 NAME Project "tardy.1.8", Delta 1, Change 10. SUMMARY prepare for release DESCRIPTION This change prepares Tardy for the next public release. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- -------- ------- ----------- source create 1 etc/CHANGES.1.7 source create 1 etc/new.1.8.so HISTORY What When Who Comment ------ ------ ----- --------- new_change Wed Oct 24 pmiller 09:33:03 2001 develop_begin Wed Oct 24 pmiller 09:33:03 2001 develop_end Wed Oct 24 pmiller 09:35:15 2001 review_pass Wed Oct 24 pmiller 09:35:17 2001 integrate_begin Wed Oct 24 pmiller 09:35:20 2001 integrate_pass Wed Oct 24 pmiller 09:35:37 2001 Project "tardy.1.8", Change 11 Page 1 Change Details Tue Aug 27 20:33:28 2002 NAME Project "tardy.1.8", Delta 2, Change 11. SUMMARY spec file DESCRIPTION This change fixes a problem with generating the spec file. My thanks to Steven Knight for reporting this problem. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by external_bug. FILES Type Action Edit File Name ------- -------- ------- ----------- source modify 4 -> 5 etc/archive.cook HISTORY What When Who Comment ------ ------ ----- --------- new_change Wed Oct 31 pmiller 08:30:07 2001 develop_begin Wed Oct 31 pmiller 08:30:07 2001 develop_end Wed Oct 31 pmiller 08:36:34 2001 review_pass Wed Oct 31 pmiller 08:36:40 2001 integrate_begin Wed Oct 31 pmiller 08:36:41 2001 integrate_pass Wed Oct 31 pmiller 08:38:17 2001 Project "tardy.1.8", Change 12 Page 1 Change Details Tue Aug 27 20:33:28 2002 NAME Project "tardy.1.8", Delta 4, Change 12. SUMMARY create tarballs DESCRIPTION This change adds the necessary classes to create tarballs. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- -------- ------- ----------- source modify 2 -> 3 common/file/input/normal.cc source create 1 common/filenamelist.cc source create 1 common/filenamelist.h source create 1 common/filenamelist/file.cc source create 1 common/filenamelist/file.h source modify 3 -> 4 common/tar/input.h source create 1 common/tar/input/filename.cc source create 1 common/tar/input/filename.h source create 1 common/tar/input/filenamelist.cc source create 1 common/tar/input/filenamelist.h source modify 1 -> 2 etc/template/c source modify 1 -> 2 etc/template/h source modify 1 -> 2 etc/template/test source modify 2 -> 3 man1/tardy.1 source create 1 tardy/ifmt.cc source create 1 tardy/ifmt.h source modify 4 -> 5 tardy/main.cc source modify 3 -> 4 tardy/ofmt.cc source modify 7 -> 8 tardy/tardy.cc source modify 4 -> 5 tardy/tardy.h test modify 3 -> 4 test/00/t0007a.sh test create 1 test/00/t0014a.sh HISTORY What When Who Comment ------ ------ ----- --------- new_change Thu May 9 pmiller 18:35:22 2002 develop_begin Thu May 9 pmiller Elapsed time: 1.000 18:35:22 2002 days. develop_end Fri May 10 pmiller 09:51:26 2002 review_pass Fri May 10 pmiller 09:51:28 2002 integrate_begin Fri May 10 pmiller 09:51:30 2002 Project "tardy.1.8", Change 12 Page 2 Change Details Tue Aug 27 20:33:28 2002 What When Who Comment ------ ------ ----- --------- integrate_pass Fri May 10 pmiller 09:52:04 2002 Project "tardy.1.8", Change 13 Page 1 Change Details Tue Aug 27 20:33:29 2002 NAME Project "tardy.1.8", Delta 3, Change 13. SUMMARY doxygen DESCRIPTION This change adds a doxygen documentation directory to the build targets. This helps with extending things. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- -------- ------- ----------- source modify 4 -> 5 etc/Howto.cook source create 1 etc/doxygen.cfg source create 1 etc/doxygen.cook HISTORY What When Who Comment ------ ------ ----- --------- new_change Thu May 9 pmiller Cloned from change 12. 19:17:17 2002 develop_begin Thu May 9 pmiller 19:17:17 2002 develop_end Thu May 9 pmiller 19:19:26 2002 review_pass Thu May 9 pmiller 19:19:29 2002 integrate_begin Thu May 9 pmiller 19:19:31 2002 integrate_pass Thu May 9 pmiller 19:20:16 2002 Project "tardy.1.8", Change 14 Page 1 Change Details Tue Aug 27 20:33:29 2002 NAME Project "tardy.1.8", Delta 5, Change 14. SUMMARY progress DESCRIPTION This change adds a filenamelist progress filter. It only works with the -ifmt=list option, and with any other filename list sources in the future. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- -------- ------- ----------- source modify 1 -> 2 common/ac/stdio.h source create 1 common/filenamelist/filter.cc source create 1 common/filenamelist/filter.h source create 1 common/filenamelist/filter/ progress.cc source create 1 common/filenamelist/filter/ progress.h source modify 1 -> 2 common/tar/input/filename.cc source modify 3 -> 4 man1/tardy.1 source modify 1 -> 2 tardy/ifmt.cc source modify 1 -> 2 tardy/ifmt.h source modify 5 -> 6 tardy/main.cc HISTORY What When Who Comment ------ ------ ----- --------- new_change Fri May 10 pmiller 16:39:28 2002 develop_begin Fri May 10 pmiller Elapsed time: 0.646 16:39:28 2002 days. develop_end Fri May 10 pmiller 21:30:02 2002 review_pass Fri May 10 pmiller 21:30:06 2002 integrate_begin Fri May 10 pmiller 21:30:09 2002 integrate_pass Fri May 10 pmiller 21:31:25 2002 Project "tardy.1.8", Change 15 Page 1 Change Details Tue Aug 27 20:33:30 2002 NAME Project "tardy.1.8", Delta 6, Change 15. SUMMARY long file names DESCRIPTION This change adds support for lobg file names, as generated by GNU tar. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- -------- ------- ----------- source modify 1 -> 2 common/filenamelist/file.cc source modify 4 -> 5 common/tar/format.cc source modify 3 -> 4 common/tar/format.h source modify 2 -> 3 common/tar/input/filename.cc source modify 6 -> 7 common/tar/input/tar.cc source modify 4 -> 5 common/tar/input/tar.h source modify 2 -> 3 common/tar/output/tar/posix.cc test create 1 test/00/t0015a.sh HISTORY What When Who Comment ------ ------ ----- --------- new_change Fri May 10 pmiller 22:23:14 2002 develop_begin Fri May 10 pmiller Elapsed time: 1.000 22:23:14 2002 days. develop_end Sat May 11 pmiller 11:55:19 2002 review_pass Sat May 11 pmiller 11:55:22 2002 integrate_begin Sat May 11 pmiller 11:55:25 2002 integrate_pass Sat May 11 pmiller 11:56:07 2002 Project "tardy.1.8", Change 16 Page 1 Change Details Tue Aug 27 20:33:30 2002 NAME Project "tardy.1.8", Delta 7, Change 16. SUMMARY long link names DESCRIPTION This change adds support for long (symbolic) link names, as generated by GNU tar. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- -------- ------- ----------- source modify 1 -> 2 common/filenamelist/filter/ progress.cc source modify 4 -> 5 common/tar/format.h source modify 7 -> 8 common/tar/input/tar.cc source modify 5 -> 6 common/tar/input/tar.h source modify 3 -> 4 common/tar/output/tar/posix.cc HISTORY What When Who Comment ------ ------ ----- --------- new_change Sat May 11 pmiller 13:21:12 2002 develop_begin Sat May 11 pmiller Elapsed time: 0.073 13:21:12 2002 days. develop_end Sat May 11 pmiller 13:53:58 2002 review_pass Sat May 11 pmiller 13:54:16 2002 integrate_begin Sat May 11 pmiller 13:54:19 2002 integrate_pass Sat May 11 pmiller 13:57:47 2002 Project "tardy.1.8", Change 17 Page 1 Change Details Tue Aug 27 20:33:31 2002 NAME Project "tardy.1.8", Delta 8, Change 17. SUMMARY solaris build problems DESCRIPTION This change fixes a couple of Solaris build problems. My thanks to Daniel M. Quinlan for reporting them. This, in turn, revealed that the code made extensize use of sprintf, where it should be using snprintf. This has also been changed. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by external_bug. FILES Type Action Edit File Name ------- -------- ------- ----------- source modify 2 -> 3 common/ac/stdarg.h source create 1 common/ac/stdio.cc source modify 3 -> 4 common/ac/string.cc source modify 3 -> 4 common/error.cc source modify 3 -> 4 common/file/input.cc source modify 4 -> 5 common/file/output.cc source modify 5 -> 6 common/help.cc source modify 3 -> 4 common/mprintf.cc source modify 4 -> 5 common/str.cc source modify 3 -> 4 common/tar/input.cc source modify 3 -> 4 common/tar/output.cc source modify 2 -> 3 common/tar/output/cpio/newascii.cc source modify 2 -> 3 common/tar/output/cpio/oldascii.cc source modify 3 -> 4 common/trace.cc source modify 2 -> 3 etc/configure.in HISTORY What When Who Comment ------ ------ ----- --------- new_change Mon Jun 24 pmiller 10:11:49 2002 develop_begin Mon Jun 24 pmiller Elapsed time: 0.167 10:11:49 2002 days. develop_end Mon Jun 24 pmiller 11:26:53 2002 review_pass Mon Jun 24 pmiller 11:26:57 2002 Project "tardy.1.8", Change 17 Page 2 Change Details Tue Aug 27 20:33:31 2002 What When Who Comment ------ ------ ----- --------- integrate_begin Mon Jun 24 pmiller 11:26:59 2002 integrate_pass Mon Jun 24 pmiller 11:27:49 2002 Project "tardy.1.8", Change 18 Page 1 Change Details Tue Aug 27 20:33:31 2002 NAME Project "tardy.1.8", Delta 11, Change 18. SUMMARY debian fix DESCRIPTION This change fixes some problem which occur on Debian. My thanks to Matt Krai for this patch. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by external_bug. FILES Type Action Edit File Name ------- -------- ------- ----------- source remove 1 debian/control source remove 1 debian/copyright source remove 1 debian/postinst source remove 1 debian/prerm source remove 1 debian/rules source modify 6 -> 7 etc/archive.cook source modify 8 -> 9 tardy/tardy.cc HISTORY What When Who Comment ------ ------ ----- --------- new_change Mon Aug 12 pmiller 16:53:17 2002 develop_begin Mon Aug 12 pmiller Elapsed time: 11.101 16:53:18 2002 days. develop_end Tue Aug 27 pmiller Elapsed time: 0.340 17:38:34 2002 days. review_pass Tue Aug 27 pmiller 20:11:23 2002 integrate_begin Tue Aug 27 pmiller 20:11:25 2002 integrate_pass Tue Aug 27 pmiller 20:14:45 2002 Project "tardy.1.8", Change 19 Page 1 Change Details Tue Aug 27 20:33:31 2002 NAME Project "tardy.1.8", Delta 9, Change 19. SUMMARY debian DESCRIPTION This change adds support for the Debian Linux distribution. My thanks to Matt Kraai for this patch. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by external_bug. FILES Type Action Edit File Name ------- -------- ------- ----------- source create 1 debian/changelog source create 1 debian/control source create 1 debian/copyright source create 1 debian/postinst source create 1 debian/prerm source create 1 debian/rules source modify 1 -> 2 etc/Makefile.head HISTORY What When Who Comment ------ ------ ----- --------- new_change Mon Aug 12 pmiller 16:54:19 2002 develop_begin Mon Aug 12 pmiller Elapsed time: 0.035 16:54:19 2002 days. develop_end Mon Aug 12 pmiller 17:10:08 2002 review_pass Mon Aug 12 pmiller 17:10:28 2002 integrate_begin Mon Aug 12 pmiller 17:10:30 2002 integrate_pass Mon Aug 12 pmiller 17:10:53 2002 Project "tardy.1.8", Change 20 Page 1 Change Details Tue Aug 27 20:33:32 2002 NAME Project "tardy.1.8", Delta 10, Change 20. SUMMARY debian, again DESCRIPTION This change gets the debian/changelong file right. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- -------- ------- ----------- source remove 1 debian/changelog source modify 5 -> 6 etc/archive.cook HISTORY What When Who Comment ------ ------ ----- --------- new_change Mon Aug 12 pmiller 17:19:18 2002 develop_begin Mon Aug 12 pmiller 17:19:18 2002 develop_end Mon Aug 12 pmiller 17:25:41 2002 review_pass Mon Aug 12 pmiller 17:25:44 2002 integrate_begin Mon Aug 12 pmiller 17:25:46 2002 integrate_pass Mon Aug 12 pmiller 17:27:49 2002 tardy-1.28/etc/CHANGES.1.9 644 0 0 3130112163037023 131310ustar PeterMiller Project "tardy.1.9" Page 1 List of Changes Wed Oct 16 21:42:48 2002 Change State Description ------- ------- ------------- 10 completed prepare for release 11 completed more gcc 3 build issues 12 completed rename class string to rcstring 13 completed typos 14 completed man page error Project "tardy.1.9", Change 10 Page 1 Change Details Wed Oct 16 21:42:48 2002 NAME Project "tardy.1.9", Delta 1, Change 10. SUMMARY prepare for release DESCRIPTION This change prepares Tardy for the next public release. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_enhancement. FILES Type Action Edit File Name ------- -------- ------- ----------- source create 1 etc/CHANGES.1.8 source modify 1 -> 2 etc/new.1.8.so source create 1 etc/new.1.9.so HISTORY What When Who Comment ------ ------ ----- --------- new_change Tue Aug 27 pmiller 20:32:40 2002 develop_begin Tue Aug 27 pmiller Elapsed time: 0.037 20:32:40 2002 days. develop_end Tue Aug 27 pmiller 20:49:21 2002 review_pass Tue Aug 27 pmiller 20:49:24 2002 integrate_begin Tue Aug 27 pmiller 20:49:26 2002 integrate_pass Tue Aug 27 pmiller 20:52:23 2002 Project "tardy.1.9", Change 11 Page 1 Change Details Wed Oct 16 21:42:49 2002 NAME Project "tardy.1.9", Delta 2, Change 11. SUMMARY more gcc 3 build issues DESCRIPTION This change fixed yet anothe rproblem with building tardy on gcc 3. My thanks to Matt Kraai for reporting this problem. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by external_bug. FILES Type Action Edit File Name ------- -------- ------- ----------- source modify 1 -> 2 common/filenamelist/filter/ progress.h HISTORY What When Who Comment ------ ------ ----- --------- new_change Fri Sep 27 pmiller 08:45:41 2002 develop_begin Fri Sep 27 pmiller 08:45:41 2002 develop_end Fri Sep 27 pmiller 08:50:42 2002 review_pass Fri Sep 27 pmiller 08:50:44 2002 integrate_begin Fri Sep 27 pmiller 08:50:46 2002 integrate_pass Fri Sep 27 pmiller 08:51:47 2002 Project "tardy.1.9", Change 12 Page 1 Change Details Wed Oct 16 21:42:49 2002 NAME Project "tardy.1.9", Delta 3, Change 12. SUMMARY rename class string to rcstring DESCRIPTION This change renames the string class to rcstring. This allows it to avoid conflicts with the C++ standard class fo the same name. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by internal_bug. FILES Type Action Edit File Name ------- -------- ------- ----------- source modify 2 -> 3 common/arglex.cc source modify 2 -> 3 common/cannonical.cc source modify 2 -> 3 common/cannonical.h source modify 2 -> 3 common/file/input/normal.h source modify 3 -> 4 common/file/output/normal.h source modify 1 -> 2 common/filenamelist.h source modify 2 -> 3 common/filenamelist/file.cc source modify 1 -> 2 common/filenamelist/file.h source modify 1 -> 2 common/filenamelist/filter.cc source modify 1 -> 2 common/filenamelist/filter.h source modify 2 -> 3 common/filenamelist/filter/ progress.cc source modify 2 -> 3 common/filenamelist/filter/ progress.h source modify 4 -> 5 common/mprintf.cc source create 1 common/rcstring.cc Moved from common/str.cc source create 1 common/rcstring.h Moved from common/str.h source remove 5 common/str.cc Moved to common/rcstring.cc source remove 5 common/str.h Moved to common/rcstring.h source modify 2 -> 3 common/symtab.cc source modify 2 -> 3 common/symtab.h source modify 5 -> 6 common/tar/format.cc source modify 5 -> 6 common/tar/format.h source modify 3 -> 4 common/tar/header.h source modify 3 -> 4 common/tar/input/clean.cc source modify 3 -> 4 common/tar/input/filename.cc source modify 1 -> 2 common/tar/input/filename.h source modify 1 -> 2 common/tar/input/filenamelist.cc Project "tardy.1.9", Change 12 Page 2 Change Details Wed Oct 16 21:42:49 2002 Type Action Edit File Name ------- -------- ------- ----------- source modify 3 -> 4 common/tar/input/group_name.cc source modify 3 -> 4 common/tar/input/group_name.h source modify 3 -> 4 common/tar/input/prefix.cc source modify 3 -> 4 common/tar/input/prefix.h source modify 4 -> 5 common/tar/input/remov_prefi.cc source modify 3 -> 4 common/tar/input/remov_prefi.h source modify 8 -> 9 common/tar/input/tar.cc source modify 3 -> 4 common/tar/input/user_name.cc source modify 3 -> 4 common/tar/input/user_name.h source modify 3 -> 4 common/tar/output/list.cc source modify 4 -> 5 common/tar/output/tar/posix.cc source modify 4 -> 5 common/trace.cc source modify 3 -> 4 common/version.cc source modify 2 -> 3 tardy/ifmt.cc source modify 4 -> 5 tardy/ofmt.cc source modify 9 -> 10 tardy/tardy.cc HISTORY What When Who Comment ------ ------ ----- --------- new_change Fri Sep 27 pmiller 08:53:10 2002 develop_begin Fri Sep 27 pmiller Elapsed time: 0.058 08:53:10 2002 days. develop_end Fri Sep 27 pmiller 09:19:16 2002 review_pass Fri Sep 27 pmiller 09:19:21 2002 integrate_begin Fri Sep 27 pmiller 09:19:23 2002 integrate_pass Fri Sep 27 pmiller 09:20:05 2002 Project "tardy.1.9", Change 13 Page 1 Change Details Wed Oct 16 21:42:49 2002 NAME Project "tardy.1.9", Delta 4, Change 13. SUMMARY typos DESCRIPTION This change fixes a typo in the README file, and also converst to use the assert macro from the file, because STL is anyway and things are getting messy. My thanks to Matt Kraai for reporting these problems. This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by external_bug. FILES Type Action Edit File Name ------- -------- ------- ----------- source create 1 common/ac/assert.h source create 1 common/ac/ctype.h source modify 3 -> 4 common/arglex.cc source modify 3 -> 4 common/cannonical.cc source modify 4 -> 5 common/error.cc source modify 4 -> 5 common/error.h source modify 2 -> 3 common/fstrcmp.cc source modify 6 -> 7 common/help.cc source modify 5 -> 6 common/mprintf.cc source modify 3 -> 4 common/progname.cc source modify 1 -> 2 common/rcstring.cc source modify 4 -> 5 common/tar/input/clean.cc source modify 2 -> 3 common/tar/input/filter_base.cc source modify 5 -> 6 common/tar/input/remov_prefi.cc source modify 4 -> 5 common/tar/input/suppr_direc.cc source modify 3 -> 4 common/tar/output/tar_base.cc source modify 3 -> 4 etc/README.man HISTORY What When Who Comment ------ ------ ----- --------- new_change Tue Oct 15 pmiller 20:36:11 2002 develop_begin Tue Oct 15 pmiller Elapsed time: 0.094 20:36:12 2002 days. develop_end Tue Oct 15 pmiller 21:18:17 2002 Project "tardy.1.9", Change 13 Page 2 Change Details Wed Oct 16 21:42:49 2002 What When Who Comment ------ ------ ----- --------- review_pass Tue Oct 15 pmiller 21:18:21 2002 integrate_begin Tue Oct 15 pmiller 21:18:23 2002 integrate_pass Tue Oct 15 pmiller 21:21:16 2002 Project "tardy.1.9", Change 14 Page 1 Change Details Wed Oct 16 21:42:49 2002 NAME Project "tardy.1.9", Delta 5, Change 14. SUMMARY man page error DESCRIPTION This change fixes the old cpio ascii format name on thr man page. My thanks to Yann Dirson for reporting this problem. This change fixes Debian Bug#162216 This change must pass a full regression test. This change is exempt from testing against the development directory. This change is exempt from testing against the baseline. ARCHITECTURE This change must build and test in the "linux-i486" architecture. CAUSE This change was caused by external_bug. FILES Type Action Edit File Name ------- -------- ------- ----------- source modify 4 -> 5 man1/tardy.1 HISTORY What When Who Comment ------ ------ ----- --------- new_change Wed Oct 16 pmiller 21:20:12 2002 develop_begin Wed Oct 16 pmiller 21:20:12 2002 develop_end Wed Oct 16 pmiller 21:28:44 2002 review_pass Wed Oct 16 pmiller 21:28:48 2002 integrate_begin Wed Oct 16 pmiller 21:28:51 2002 integrate_pass Wed Oct 16 pmiller 21:31:34 2002 tardy-1.28/etc/CHANGES.sh 644 0 0 225512163037023 132220ustar PeterMiller#! /bin/sh # # tardy - a tar post-processor # Copyright (C) 1993, 1999, 2000, 2008 Peter Miller # # 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 3 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, see # . # case $# in 1) project=$1 ;; *) echo "usage: $0 " 1>&2 exit 1 ;; esac set -e aegis -l changes -p $project -v -pl 66 -pw 72 < /dev/null changes=`aegis -list changes -terse -project $project` for n in $changes do echo "" | tr '\12' '\14' aegis -l change_details -p $project -c $n -v -pl 66 -pw 72 < /dev/null done exit 0 tardy-1.28/etc/Makefi.file.sh 644 0 0 562112163037023 142640ustar PeterMiller#! /bin/sh # # tardy - a tar post-processor # Copyright (C) 1993-1995, 1998-2001, 2008 Peter Miller # # 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 3 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, see # . # case $# in 3) depfile="$3" ;; 2) depfile=/dev/null ;; *) echo "usage: $0 filename resolved-filename" 1>&2 exit 1 ;; esac file="$1" rfn="$2" TAB=`awk 'BEGIN{printf("%c",9)}' /dev/null` case $file in */*.y) root=`basename $file .y` stem=`echo $file | sed 's/\.y$//'` dir=`echo $file | sed 's|/.*||'` numconf="no" echo "" echo "${stem}.gen.cc ${stem}.gen.h: $file" echo "${TAB}@echo Expect $numconf conflicts." echo "${TAB}\$(YACC) -d $file" echo "${TAB}sed -e 's/[yY][yY]/${root}_/g' y.tab.c > ${stem}.gen.cc" echo "${TAB}sed -e 's/[yY][yY]/${root}_/g' y.tab.h > ${stem}.gen.h" echo "${TAB}rm y.tab.c y.tab.h" depfile=`echo $file | sed 's/\.y$/.gen.cc.d/'` if [ -r $depfile ]; then dep=`sed -e '1d' -e '$d' -e 's_.arch]/__' $depfile` else depfile=`echo $rfn | sed 's/\.y$/.gen.cc.d/'` if [ -r $depfile ]; then dep=`sed -e '1d' -e '$d' -e 's_.arch]/__' $depfile` fi fi echo "" echo "${stem}.gen.o: ${stem}.gen.cc" $dep echo "${TAB}\$(CXX) \$(CFLAGS) -I$dir -Icommon -c ${stem}.gen.cc" echo "${TAB}mv ${root}.gen.o ${stem}.gen.o" ;; */*.cc) root=`basename $file .cc` stem=`echo $file | sed 's/\.cc$//'` dir=`echo $file | sed 's|/.*||'` dep=`cat $depfile` echo "" echo "${stem}.o: $file" $dep echo "${TAB}\$(CXX) \$(CFLAGS)" "-I$dir -Icommon -c $file" echo "${TAB}mv ${root}.o ${stem}.o" ;; man1/*.1) root=`basename $file .1` echo "" echo "man1/$root.h: $file etc/txt2c.awk" echo "${TAB}awk -f etc/txt2c.awk $file > man1/$root.h" echo "" echo "\$(mandir)/$file: $file .man1dir" echo "${TAB}(cd man1; soelim $root.1) > tmp" echo "${TAB}\$(INSTALL_DATA) tmp \$(mandir)/$file" echo "${TAB}@rm -f tmp" ;; man1/*.so) root=`basename $file .so` echo "" echo "man1/$root.h: $file etc/txt2c.awk" echo "${TAB}awk -f etc/txt2c.awk $file > man1/$root.h" ;; test/*/*.sh) root=`basename $file .sh` echo "" echo "$root: $file all" echo "${TAB}\$(SH) $file" ;; *) ;; esac exit 0 tardy-1.28/etc/Makefile.awk 644 0 0 240112163037023 140300ustar PeterMiller# # tardy - a tar post-processor # Copyright (C) 1993, 1999, 2000, 2008 Peter Miller # # 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 3 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, see # . # length <= 72 length > 72 { if (substr($0, 1, 1) == "\t") { printf "\t" pos = 8 } else pos = 0 for (j = 1; j <= NF; ++j) { if (pos + 1 + length($j) > 72) { printf "\\\n\t\t" pos = 16 } printf "%s ", $j pos += length($j) + 1 } printf "\n" } tardy-1.28/etc/Makefile.head 644 0 0 355412163037023 141610ustar PeterMiller# # tardy - a tar post-processor # Copyright (C) 1993-1995, 1998-2000, 2002, 2008 Peter Miller # # 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 3 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, see # . # # @configure_input@ # # # directory containing the source # srcdir = @srcdir@ VPATH = @srcdir@ # # the name of the install program to use # INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ # # the name of the compiler to use # CXX = @CXX@ # # The compiler flags to use # CFLAGS = -O # # The linker flags to use # LDFLAGS = -s # # prefix for installation path # prefix = @prefix@ exec_prefix = @exec_prefix@ # # Leave RPM_BUILD_RROT undefined. # It is used when building the RPM package. # # # where to put the executables # bindir = $(RPM_BUILD_ROOT)@bindir@ # # where to put the manuals # mandir = $(RPM_BUILD_ROOT)@mandir@ # # Which yacc to use # YACC = @YACC@ # # extra libraries required for your system # LIBS = @LIBS@ # # shell to use to run tests and commands # SH = @SH@ # # command used to construct libraries # AR = ar # # program used to place index within libraries # RANLIB = @RANLIB@ # # You should not need to alter anything below this point. #------------------------------------------------------------ all: bin/tardy tardy-1.28/etc/Makefile.sh 644 0 0 642112163037023 136660ustar PeterMiller#!/bin/sh # # tardy - a tar post-processor # Copyright (C) 1993-1995, 1998-2000, 2008, 2011 Peter Miller # # 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 3 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, see # . # TAB=`awk 'BEGIN{printf("%c",9)}' /dev/null` man1_files= test_files= common_files= clean_files="core common/lib.a .bin .bindir .man1dir" for file in $* do case $file in tardy/*.y) stem=`echo $file | sed 's/\.y$//'` clean_files="$clean_files ${stem}.gen.cc ${stem}.gen.h" tardy_files="$tardy_files ${stem}.gen.o" clean_files="$clean_files ${stem}.gen.o" ;; tardy/*.cc) stem=`echo $file | sed 's/\.cc$//'` tardy_files="$tardy_files ${stem}.o" clean_files="$clean_files ${stem}.o" ;; common/*.cc) root=`echo $file | sed 's|\.cc$||'` common_files="$common_files ${root}.o" clean_files="$clean_files ${root}.o" ;; man1/*.1) root=`basename $file .1` clean_files="$clean_files man1/${root}.h" man1_files="$man1_files \$(mandir)/$file" ;; man1/*.so) root=`basename $file .so` clean_files="$clean_files man1/${root}.h" ;; test/*/*) root=`basename $file .sh` test_files="$test_files $root" ;; *) ;; esac done echo echo "TardyFiles =" $tardy_files echo echo "CommonFiles =" $common_files echo echo "Man1Files =" $man1_files echo echo "TestFiles =" $test_files # # clean up the area # (make sure command lines do not get too long) # echo '' echo 'clean-obj:' echo $clean_files | tr ' ' '\12' | gawk '{ if (pos > 0 && pos + length($1) > 71) { printf("\n"); pos = 0; } if (pos == 0) { printf "\trm -f"; pos = 13; } printf " %s", $1 pos += 1 + length($1); } END { if (pos) printf "\n"; }' cat << fubar clean: clean-obj ${TAB}rm -f bin/tardy distclean: clean ${TAB}rm -f config.status config.cache config.log ${TAB}rm -f Makefile common/config.h etc/howto.conf .bin: ${TAB}-mkdir bin ${TAB}@touch .bin common/lib.a: \$(CommonFiles) ${TAB}rm -f common/lib.a ${TAB}\$(AR) qc common/lib.a \$(CommonFiles) ${TAB}\$(RANLIB) common/lib.a bin/tardy: \$(TardyFiles) common/lib.a .bin ${TAB}@sleep 1 ${TAB}\$(CXX) -o bin/tardy \$(TardyFiles) common/lib.a \$(LIBS) ${TAB}@sleep 1 sure: \$(TestFiles) ${TAB}@echo Passed All Tests .bindir: ${TAB}-\$(INSTALL) -m 0755 -d \$(bindir) ${TAB}@touch \$@ ${TAB}@sleep 1 .man1dir: ${TAB}-\$(INSTALL) -m 0755 -d \$(mandir)/man1 ${TAB}@touch \$@ ${TAB}@sleep 1 \$(bindir)/tardy: bin/tardy .bindir ${TAB}\$(INSTALL_PROGRAM) bin/tardy \$@ install-bin: \$(bindir)/tardy install-man: \$(Man1Files) install: install-bin install-man fubar exit 0 tardy-1.28/etc/README.man 644 0 0 607512163037023 132540ustar PeterMiller'\" t .\" tardy - a tar post-processor .\" Copyright (C) 1993, 1995, 1998-2000, 2002, 2008, 2010, 2011 Peter Miller .\" .\" 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 3 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, see . .\" .TH readme tardy .so etc/version.so .SH NAME tardy version \*(v) \- a tar post-processor .XX "" "The README file" .br .if t .ds C) \(co .if n .ds C) (C) Copyright \*(C) \*(Y) Peter Miller .br .PP The .I tardy program is distributed under the terms of the GNU General Public License. See the LICENSE section, below, for more details. .PP .B tardy .I a., slow to act, behind time. .SH DESCRIPTION The .I tardy program is a .IR tar (1) post-processor. It may be used to manipulate the file headers in .IR tar (5) archive files in various ways. .PP The reason the .I tardy program was written was because the author wanted to "spruce up" his tar files before posting them to the net, mostly to remove artefacts of the development environment, without introducing more. .PP The .I tardy program was designed to allow you to alter certain characteristics of files AFTER they have been included in the TAR file. Among them are: .PP .if n * .if t \(bu change file owner (by NUMBER or NAME) .br .if n * .if t \(bu change file group (by NUMBER or NAME) .br .if n * .if t \(bu add directory prefix (dot is a really useful prefix) .br .if n * .if t \(bu change file protections (for example from 600 to 644) .PP Note that all of these affect ALL files in the archive. .br .ne 1i .br .ne 1i .SH BUILDING Instructions on how to build and test the .I tardy program are to be found in the .I BUILDING file included in this distribution. .br .ne 1i .SH LICENSE The .I tardy 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 3 of the License, or (at your option) any later version. .PP The .I tardy 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. .PP You should have received a copy of the GNU General Public License along with this program. If not, see . .PP It should be in the .I LICENSE file included in this distribution. .br .ne 1i .SH AUTHOR .TS tab(;); l r l. Peter Miller;EMail:;pmiller@opensource.org.au \f(CW/\e/\e*\fR;WWW:;http://miller.emu.id.au/pmiller/ .TE .bp .SH RELEASE NOTES .XX "" "Release Notes" .so etc/new.so tardy-1.28/etc/apt-get-depends.cook 644 0 0 555012163037023 154550ustar PeterMiller/* * tardy - a tar post-processor * Copyright (C) 2012, 2013 Peter Miller * * 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 3 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, see . */ dpkg-arch = [collect dpkg-architecture -qDEB_BUILD_ARCH]; apt-package-list = ; function apt-get-package = { if [matches lib%-dev [@1]] then { local vp = [fromto lib%-dev lib%-.*-dev [@1]]; if [not [collect dpkg -l | grep "'^ii "[vp]" '" | wc -l || true]] then if [not [collect dpkg -l | grep "'^ii "[vp]":"[dpkg-arch]" '" | wc -l || true]] then if [not [collect dpkg -l | grep "'^ii "[@1]" '" | wc -l || true]] then if [not [collect dpkg -l | grep "'^ii "[@1]":"[dpkg-arch]" '" | wc -l || true]] then apt-package-list += [@1]; } else { if [not [collect dpkg -l | grep "'^ii "[@1]" '" | wc -l || true]] then apt-package-list += [@1]; } } /* * Make sure the packages we need are present. */ if [matches %1C%2 [version]] then { if [find_command apt-get] then { function apt-get-package autoconf; function apt-get-package automake; function apt-get-package build-essential; function apt-get-package coreutils; /* ptx, md5sum */ function apt-get-package cpio; function apt-get-package debhelper; function apt-get-package devscripts; /* debuild cmd */ function apt-get-package doxygen; function apt-get-package dpkg-dev; /* dpkg-buildpackage cmd */ function apt-get-package exuberant-ctags; /* ctags cmd */ function apt-get-package gawk; function apt-get-package ghostscript; /* ps2pdf */ function apt-get-package groff; function apt-get-package libboost-dev; function apt-get-package libbz2-dev; function apt-get-package libexplain-dev; function apt-get-package liblzma-dev; function apt-get-package lintian; function apt-get-package tar; function apt-get-package zlib1g-dev; if [count [apt-package-list]] then { sudo apt-get install -y --allow-unauthenticated [apt-package-list] < /dev/tty > /dev/tty 2>&1 || true set no-silent; } } } /* vim: set ts=8 sw=4 et : */ tardy-1.28/etc/archive.cook 644 0 0 3040712163037023 141340ustar PeterMiller/* * tardy - a tar post-processor * Copyright (C) 1998-2002, 2004, 2008-2013 Peter Miller * * 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 3 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, see . */ /* * some earlier versions of groff don't grok the -c (compatibility) option, * but the ones that do, also grok this environment variable. */ setenv GROFF_NO_SGR = -c; version_shorter = [split "." [version_short]] _ _; version_shorter = [unsplit "." [wordlist 1 2 [version_shorter]]]; project_short = [fromto %.[version_short] % [project]]; project_minus = [project_short]-[version_short]; /* * Integration builds also make the shar files for distribution. */ if [not [defined baseline]] then all += integration-build-targets; integration-build-targets: [integration-build-targets]; integration-build-targets = archive/[project_short]-[version].tar.gz archive/[project_minus].spec archive/[project_short]-[version].README archive/[project_short].png [fromto web.src/%0%.roff archive/%0%.html [match_mask web.src/%0%.roff [source_files]] ] archive/changelog.txt [fromto web.src/%.uue archive/% [match_mask web.src/%.uue [source_files]] ] ; Makefile.in: etc/Makefile.head etc/Makefile.sh etc/Makefile.awk [vs_file] { if [quiet] then function print Generate [target]; aemakegen --project\=[project] --change\=[change] --target\=makefile --output\=[target] ; } changes_file = etc/CHANGES.[version_short]; source_file_order = README [sort [stringset [changes_file] [source_files] [project_short].spec BUILDING LICENSE Makefile.in libtardy/config.h.in libtardy/patchlevel.h configure etc/version.so etc/new.so etc/ref-parts.so etc/ref-index.so debian/watch install-sh [fromto %0%.1 %0%.h [match_mask man/man1/%.1 [source_files]]] [fromto %0%.so %0%.h [match_mask man/man1/%.so [source_files]]] - README ] ]; LICENSE: man/cat1/tardy_license.1 { cp [resolve man/cat1/tardy_license.1] [target]; } debian-aemakegen-files = debian/changelog debian/compat debian/control debian/rules debian/source/format debian/tardy.install debian/tardy-doc.install ; debian-built-files = [debian-aemakegen-files] debian/copyright debian/watch ; archive/%.tar.gz: [source_file_order] [arch]/bin/tardy [debian-built-files] aegis.conf.d/aemakegen /* for contents of control file */ set shallow { if [quiet] then function print Tar [target]; tar cf - [resolve [source_file_order]] [debian-built-files] | [resolve [arch]/bin/tardy] -una Peter -gna Miller -unu 0 -gnu 0 -ms 0644 -mc 07022 -now --prefix\=[project_minus] [prepost "-rp=" "" [search_list]] - [target] ; } [changes_file]: etc/CHANGES.sh [vs_file] { if [quiet] then function print Generate [target]; sh [resolve etc/CHANGES.sh] [project] > [target]; } archive/%.html: web.src/%.roff: [vs_file] set shallow { if [quiet] then function print Groff [target]; roffpp [prepost "-I" "/etc" [search_list]] [resolve web.src/%.roff] | groff -Tascii -t -P-bhu | cat -s > [target]; } archive/[project_short].html: etc/version.so; /* FIXME: use aemakegen instead */ [project_short].spec: etc/spec.sh set shallow { if [quiet] then function print Generate [target]; version\=[version_short] sh [resolve etc/spec.sh] [source_files] > [target]; } archive/%.spec: [project_short].spec set shallow { if [quiet] then function print Copy [target]; cat [resolve [need]] > [target]; } archive/%.README: README set shallow { if [quiet] then function print Generate [target]; cat [resolve [need]] > [target]; } icon-num = 03; archive/[project_short].png: archive/icon-[icon-num]-64.png set shallow { if [quiet] then function print Copy [target]; cp [resolve [need]] [target]; } archive/%: web.src/%.uue { if [quiet] then function print Generate [target]; uudecode -o [target] [resolve [need]]; } %0%1-%2.png: %0%1.png { if [quiet] then function print Generate [target]; convert %0%1.png -scale %2 [target]; } archive/changelog.txt: [vs_file] { if [quiet] then function print Generate [target]; aereport change-log -p tardy -c 1 -pl\=66 -pw\=80 -tw\=1 | cat -s > [target]; } if [find_command convert] then { integration-build-targets += archive/[project_short].ico; archive/[project_short].ico: archive/icon-[icon-num].ico set shallow { if [quiet] then function print Copy [target]; cp [resolve [need]] [target]; } integration-build-targets += [fromto web.src/%.png.uue archive/%.ico [match_mask web.src/%.png.uue [source_files]] ]; %0%1.ico: %0%1-16.png %0%1-32.png %0%1-48.png %0%1-64.png %0%1-96.png %0%1-128.png set shallow { if [quiet] then function print Generate [target]; convert [resolve %0%1-16.png %0%1-32.png %0%1-48.png %0%1-64.png %0%1-96.png %0%1-128.png] -colors 256 [target]; } } tarball = archive/[project_short]-[version].tar.gz; check-tarball: [tarball] { sh [resolve etc/check-tarball.sh] [resolve archive/[project_short]-[version].tar.gz]; } [debian-aemakegen-files]: [source_files] set shallow { if [quiet] then function print Generate [target]; aemakegen -project\=[project] -change\=[change] --target\=debian ; } /* if [in [fromto %1D%2 %2 [version]] 001 002 003 004] then */ { integration-build-targets += debian-package; } debian/watch: set shallow { if [quiet] then function print Generate [target]; echo "'version=3'" > [target]; echo '"http://tardy.sourceforge.net/debian/tardy_(.+).tar.gz"' >> [target]; } debian-aemakegen-files = debian/changelog debian/compat debian/control debian/rules debian/source/format debian/tardy.install debian/tardy-doc.install ; debian-built-files = [debian-aemakegen-files] debian/copyright debian/watch ; archive/%.tar.gz: [source_file_order] [arch]/bin/tardy [debian-built-files] aegis.conf.d/aemakegen /* for contents of control file */ set shallow { if [quiet] then function print Tar [target]; tar cf - [resolve [source_file_order]] [debian-built-files] | [resolve [arch]/bin/tardy] -una Peter -gna Miller -unu 0 -gnu 0 -ms 0644 -mc 07022 -now --prefix\=[project_minus] [prepost "-rp=" "" [search_list]] - [target] ; } [changes_file]: etc/CHANGES.sh [vs_file] { if [quiet] then function print Generate [target]; sh [resolve etc/CHANGES.sh] [project] > [target]; } archive/%.html: web.src/%.roff: [vs_file] set shallow { if [quiet] then function print Groff [target]; roffpp [prepost "-I" "/etc" [search_list]] [resolve web.src/%.roff] | groff -Tascii -t -P-bhu | cat -s > [target]; } archive/[project_short].html: etc/version.so; /* FIXME: use aemakegen instead */ [project_short].spec: etc/spec.sh set shallow { if [quiet] then function print Generate [target]; version\=[version_short] sh [resolve etc/spec.sh] [source_files] > [target]; } archive/%.spec: [project_short].spec set shallow { if [quiet] then function print Copy [target]; cat [resolve [need]] > [target]; } archive/%.README: README set shallow { if [quiet] then function print Generate [target]; cat [resolve [need]] > [target]; } icon-num = 03; archive/[project_short].png: archive/icon-[icon-num]-64.png set shallow { if [quiet] then function print Copy [target]; cp [resolve [need]] [target]; } archive/%: web.src/%.uue { if [quiet] then function print Generate [target]; uudecode -o [target] [resolve [need]]; } %0%1-%2.png: %0%1.png { if [quiet] then function print Generate [target]; convert %0%1.png -scale %2 [target]; } archive/changelog.txt: [vs_file] { if [quiet] then function print Generate [target]; aereport change-log -p tardy -c 1 -pl\=66 -pw\=80 -tw\=1 | cat -s > [target]; } if [find_command convert] then { integration-build-targets += archive/[project_short].ico; archive/[project_short].ico: archive/icon-[icon-num].ico set shallow { if [quiet] then function print Copy [target]; cp [resolve [need]] [target]; } integration-build-targets += [fromto web.src/%.png.uue archive/%.ico [match_mask web.src/%.png.uue [source_files]] ]; %0%1.ico: %0%1-16.png %0%1-32.png %0%1-48.png %0%1-64.png %0%1-96.png %0%1-128.png set shallow { if [quiet] then function print Generate [target]; convert [resolve %0%1-16.png %0%1-32.png %0%1-48.png %0%1-64.png %0%1-96.png %0%1-128.png] -colors 256 [target]; } } check-tarball: [tarball] { sh [resolve [need]]; } [debian-aemakegen-files]: [source_files] set shallow { if [quiet] then function print Generate [target]; aemakegen -project\=[project] -change\=[change] --target\=debian ; } if [in [fromto %1D%2 %2 [version]] 001 002 003 004] then { integration-build-targets += debian-package; } debian/watch: set shallow { if [quiet] then function print Generate [target]; echo "'version=3'" > [target]; echo '"http://tardy.sourceforge.net/debian/tardy_(.+).tar.gz"' >> [target]; } debian/copyright: [source_files] set shallow { function print [target]; licensecheck "--check='[.]cc$|[.][chy]$'" "`cat`" | sed "'s|^bl\\(bl\\)*/||'" | /usr/lib/cdbs/licensecheck2dep5 | awk -f [resolve etc/deb-cop-fix.awk] > [target] ; data [unsplit "\n" [resolve [need]]] dataend } debian-package: [tarball] debian/changelog { function print Generate [target]; local vsn = [collect head -1 [resolve debian/changelog] | sed "'s|.*(\\([^()]*\\).*|\\1|'" ]; vsn = [fromto %-1 % [vsn]]; function print "vsn = '"[vsn]"'"; if [not [in [count [vsn]] 1]] then fail "debian version not right"; local neutered_tarball = [project_short]_[vsn].orig.tar.gz; local user = [collect id -un]; local key = ; if [in [user] archives] then key = -k19CEC7D5; else key = -us -uc; /* * We fake the .orig.tar.gz file to not have a debian/ directory, * by filtering it out with tardy. This silences a PITA lintian * warning, for no real benefit. */ "set" -x && unset GPG_AGENT_INFO && rm -rf archive/debian && mkdir -p archive/debian && cd archive/debian && echo Options Indexes > .htaccess && tardy -exclude "'"[project_short]-[version_short]"/debian/*'" ../[notdir [tarball]] [neutered_tarball] && tar xzf ../[notdir [tarball]] && cd [project_short]-[version_short] && #if 0 dpkg-buildpackage -sgpg [key] -sa #else debuild [key] -sa --changes-option\=-DDistribution\=[collect gawk -F\= "'/CODENAME/{print $2}'" /etc/lsb-release] #endif && cd .. && rm -rf [project_short]-[version_short] && lintian -iIv --pedantic *.changes ; } /* vim: set ts=8 sw=4 et : */ tardy-1.28/etc/check-tarball.sh 644 0 0 164212163037023 146450ustar PeterMiller#!/bin/sh # # tardy - a tar post-processor # Copyright (C) 2008 Peter Miller # # 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 3 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, see # . # set -e set -x base=`basename $1 .tar.gz` tar xzf $1 cd $base ./configure make make sure cd .. rm -rf $base exit 0 # vim:ts=8:sw=4:et tardy-1.28/etc/configure.ac 644 0 0 2063012163037023 141210ustar PeterMillerdnl dnl aegis - a project change supervisor dnl Copyright (C) 1994-2000, 2002, 2003, 2008, 2009, 2011, 2012 Peter Miller dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 3 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program. If not, see dnl . dnl AC_INIT(libtardy/patchlevel.h) AC_CONFIG_HEADER(libtardy/config.h) AC_USE_SYSTEM_EXTENSIONS AC_PROG_CXX dnl AC_PROG_CPP AC_PROG_INSTALL AC_PROG_YACC AC_PROG_RANLIB AC_CHECK_PROGS(GROFF, groff roff) AC_CHECK_PROGS(SOELIM, gsoelim soelim) AC_CHECK_PROGS(AR, ar) AC_AIX AC_MINIX AC_SYS_LARGEFILE AC_CHECK_LIB(socket, main) AC_CHECK_LIB(z, main) dnl! dnl! If the libz.h is not present, Tardy will fail to compile. dnl! If the -lz is not present, Tardy will fail to link. dnl! if test "$ac_cv_lib_z_main" != "yes" then AC_MSG_RESULT([ You must to install the zlib compression library to compile Tardy. Homepage: http://zlib.net/]) OK=no if apt-get --version > /dev/null 2> /dev/null then AC_MSG_RESULT([ The following command may be used to install it: sudo apt-get install zlib1g-dev ]) OK=yes fi if yum --version > /dev/null 2> /dev/null then AC_MSG_RESULT([ The following command may be used to install it: sudo yum install zlib-devel ]) OK=yes fi if test "$OK" != "yes" then AC_MSG_RESULT([ If you are using a package based install, you will need the zlib-dev or zlib-devel package, or similar. ]) fi exit 1 fi dnl! dnl! The bz2 library is for the bzip2 compression and decompression dnl! used by the "tar -j" option. dnl! AC_CHECK_LIB(bz2, BZ2_bzopen, , [ AC_MSG_RESULT([ You must have the BZip2 compression library installed in order to build Tardy. Please install the bzip2 library, and then re-run this ./configure script. Homepage: http://www.bzip.org/]) OK=no if apt-get --version > /dev/null 2> /dev/null; then AC_MSG_RESULT([ The following command may be used to install it: sudo apt-get install libbz2-dev bzip2 ]) OK=yes fi if yum --version > /dev/null 2> /dev/null; then AC_MSG_RESULT([ The following command may be used to install it: sudo yum install libbz2-devel bzip2 ]) OK=yes fi if test "$OK" != "yes"; then AC_MSG_RESULT([ If you are using a package based install, you will need the bzip2-devel package in addition to the bzip package. ]) fi exit 1 ] ) dnl! dnl! The lzma library is for the xz compression and decompression dnl! used by the "tar -J" option. dnl! AC_CHECK_LIB(lzma, main, , [ AC_MSG_RESULT([ You must have the lzma compression library installed in order to build Tardy. Please install the lzma library, and then re-run this ./configure script. Homepage: http://tukaani.org/xz/]) OK=no if apt-get --version > /dev/null 2> /dev/null; then AC_MSG_RESULT([ The following command may be used to install it: sudo apt-get install liblzma-dev ]) OK=yes fi if yum --version > /dev/null 2> /dev/null; then AC_MSG_RESULT([ The following command may be used to install it: sudo yum install liblzma-devel ]) OK=yes fi if test "$OK" != "yes"; then AC_MSG_RESULT([ If you are using a package based install, you will need the liblzma-devel package. ]) fi exit 1 ] ) AC_CHECK_LIB(explain, explain_open_or_die) dnl! dnl! If the libexplain library is not present, Tardy will fail to compile. dnl! if test "$ac_cv_lib_explain_explain_open_or_die" != "yes" then AC_MSG_RESULT([ You must to install the libexplain error library to compile Tardy. Homepage: http://libexplain.sourceforge.net/]) OK=no if apt-get --version > /dev/null 2> /dev/null then AC_MSG_RESULT([ The following command may be used to install it: sudo apt-get install libexplain-dev ]) OK=yes fi if yum --version > /dev/null 2> /dev/null then AC_MSG_RESULT([ The following command may be used to install it: sudo yum install libexplain-devel ]) OK=yes fi if test "$OK" != "yes" then AC_MSG_RESULT([ If you are using a package based install, you will need the libexplain-dev or libexplain-devel package, or similar. ]) fi exit 1 fi dnl dnl Test to see if stdarg.h is available *and* works. dnl AC_MSG_CHECKING([for working stdarg.h]) AC_TEST_PROGRAM([ #include char *foo = "test"; #if defined(__STDC__) && __STDC__ int test(char*,...); #endif int test(fmt)char*fmt;{va_list ap;char*a;int x; va_start(ap,fmt);a=va_arg(ap,char*);x=(a!=foo);va_end(ap);return x;} int main(argc,argv)int argc;char**argv;{ exit(test("",foo));}] , AC_DEFINE(HAVE_STDARG_H,1, [Define this symbol of your system has AND it works.]) AC_MSG_RESULT(yes), AC_MSG_RESULT(no), AC_MSG_RESULT(cross))dnl AC_HAVE_HEADERS( \ bzlib.h \ fcntl.h \ limits.h \ memory.h \ stddef.h \ stdlib.h \ string.h \ sys/types.h \ sys/param.h \ sys/resource.h \ sys/stat.h \ sys/sysmacros.h \ unistd.h \ zlib.h \ ) AC_HEADER_DIRENT AC_RETSIGTYPE AC_SIZE_T AC_TIME_WITH_SYS_TIME AC_CONST AC_LONG_FILE_NAMES AC_HAVE_FUNCS( \ BZ2_strerror \ getpgrp \ memmem \ snprintf \ strcasecmp \ strerror \ strftime \ strverscmp \ tcgetpgrp \ vsnprintf \ ) dnl dnl Test to see if getpgrp() or getpgrp(0) should be used to dnl discover the process group of the current process. dnl AC_MSG_CHECKING([for appropriate getpgrp argument]) AC_TEST_PROGRAM([ int main(argc, argv) int argc; char **argv; { #ifdef HAVE_GETPGRP if (getpgrp(32767) == getpgrp(0)) exit(2); #endif exit(0); }] , AC_DEFINE(CONF_getpgrp_arg, 0, [Set this to a suitable argument for the getpgrp function to discover the process group of the current process.]) AC_MSG_RESULT(zero), AC_DEFINE(CONF_getpgrp_arg, []) AC_MSG_RESULT(empty), AC_MSG_RESULT(cross))dnl dnl! dnl! Check that several symbols are declared. dnl! AC_CHECK_DECLS([strcasecmp, strverscmp, memmem], [], [], [[#include ]]) dnl dnl Test to find a Bourne shell which understands functions dnl AC_MSG_CHECKING([for a Bourne shell which understands functions]) if test "z$SH" = "z"; then if test -f /bin/sh5; then SH=/bin/sh5 else SH=/bin/sh fi fi AC_SUBST(SH) AC_DEFINE_UNQUOTED(CONF_SHELL, ["$SH"], [Set this to be the absolute path of a Bourne shell which understands functions.]) AC_MSG_RESULT($SH) AH_TOP([/* * tardy - tar postprocessor * Copyright (C) 1994-2003, 2008, 2009, 2011, 2012 Peter Miller * * 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 3 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, see * . */ #ifndef COMMON_CONFIG_H #define COMMON_CONFIG_H ]) AH_BOTTOM([ #endif /* COMMON_CONFIG_H */ ]) AC_OUTPUT(Makefile etc/howto.conf) dnl! vim: set ts=8 sw=4 et : tardy-1.28/etc/deb-cop-fix.awk 644 0 0 365512163037023 144240ustar PeterMiller# # tardy - a tar post-processor # Copyright (C) 2013 Peter Miller # # 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 3 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, see . # BEGIN { prev_was_license = "" } /^Upstream-Name: / { print "Upstream-Name: tardy" next } /^Upstream-Contact: / { print "Upstream-Contact: Peter Miller " next } /^Source: / { print "Source: http://tardy.sourceforge.net/" next } /^License: / { prev_was_license = $2; print next } /^Disclaimer: Autogenerated/ { next } /^ FIXME$/ { name = prev_was_license; if (substr(name, length(name), 1) == "+") { name = substr(name, 1, length(name) - 1); } name2 = ""; idx = match(name, /-[0-9][0-9.]*/); if (idx != 0) { name2 = substr(name, idx, length(name) - idx + 1); name = substr(name, 1, idx - 1); } if (name == "GPL" || name == "LGPL" || name == "GFDL" || name == "BSD") { print " On Debian systems, the complete text of the GNU" print " General Public License, version 3, can be found in" print " /usr/share/common-licenses/" name name2 "." } else if (prev_was_license != "") { print " The licenses covering these files are unknown." } else { print $0 } prev_was_license = "" next } { print prev_was_license = "" } # vim: set ts=8 sw=4 et : tardy-1.28/etc/doxygen.cfg 644 0 0 7147012163037023 140010ustar PeterMiller# # tardy - a tar post-processor # Copyright (C) 2002, 2004, 2008 Peter Miller # # 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 3 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, see # . # # This file describes the settings to be used by doxygen for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # General configuration options #--------------------------------------------------------------------------- # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = Tardy # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. #Set by Cook at build time. #PROJECT_NUMBER = 1.6 # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Dutch, French, Italian, Czech, Swedish, German, Finnish, Japanese, # Korean, Hungarian, Norwegian, Spanish, Romanian, Russian, Croatian, # Polish, Portuguese and Slovene. OUTPUT_LANGUAGE = English # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = YES # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these class will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = YES # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = YES # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. It is allowed to use relative paths in the argument list. STRIP_FROM_PATH = bl/ # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = YES # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a class diagram (in Html and LaTeX) for classes with base or # super classes. Setting the tag to NO turns the diagrams off. CLASS_DIAGRAMS = YES # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower case letters. If set to YES upper case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # users are adviced to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like the Qt-style comments (thus requiring an # explict @brief command for a brief description. JAVADOC_AUTOBRIEF = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # reimplements. INHERIT_DOCS = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # The ENABLE_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consist of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. # For instance some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. # supplied by Cook at build time #INPUT = # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. FILE_PATTERNS = # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. EXCLUDE_PATTERNS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. INPUT_FILTER = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse. FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set YES to add extra items for group members # to the contents of the Html help documentation and to the tree view. TOC_EXPAND = NO # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be # generated containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript and frames is required (for instance Netscape 4.0+ # or Internet explorer 4.0+). GENERATE_TREEVIEW = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimised for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using a WORD or other. # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assigments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = YES # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_PREDEFINED tags. EXPAND_ONLY_PREDEF = YES # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. PREDEFINED = "ATTR_PRINTF(x, y)=" # If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = #--------------------------------------------------------------------------- # Configuration::addtions related to external references #--------------------------------------------------------------------------- # The TAGFILES tag can be used to specify one or more tagfiles. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the ENABLE_PREPROCESSING, INCLUDE_GRAPH, and HAVE_DOT tags are set to # YES then doxygen will generate a graph for each documented file showing # the direct and indirect include dependencies of the file with other # documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, INCLUDED_BY_GRAPH, and HAVE_DOT tags are set to # YES then doxygen will generate a graph for each documented header file showing # the documented files that directly or indirectly include this file INCLUDED_BY_GRAPH = YES # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found on the path. DOT_PATH = # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermedate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::addtions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO tardy-1.28/etc/doxygen.cook 644 0 0 471012163037023 141460ustar PeterMiller/* * tardy - a tar post-processor * Copyright (C) 2002, 2008, 2011, 2012 Peter Miller * * 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 3 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, see . */ doxygen = [find_command doxygen]; if [doxygen] then all += doxygen/index.html; doxygen/index.html: [match_mask %0%.h [source_files]] etc/doxygen.cfg { if [quiet] then function print Doxygen [target]; cat [resolve etc/doxygen.cfg] - > Doxyfile; data # The OUTPUT_DIRECTORY tag is used to specify the (relative or # absolute) base path where the generated documentation will be # put. If a relative path is entered, it will be relative to the # location where doxygen was started. If left blank the current # directory will be used. OUTPUT_DIRECTORY = doxygen-tmp # documented source files. You may enter file names like "myfile.cpp" # or directories like "/usr/src/myproject". Separate the files or # directories with spaces. INPUT = [unsplit " \\\n" [resolve [stringset [need] - etc/doxygen.cfg]]] # The PROJECT_NUMBER tag can be used to enter a project or revision # number. This could be handy for archiving the generated # documentation or if some version control system is used. PROJECT_NUMBER = [version] dataend [doxygen] Doxyfile -d doxygen [resolve [stringset [need] - etc/doxygen.cfg]] 2>&1 | tee doxygen.output.tmp /* * have Cook tell us how long * it takes to cook. */ set meter ; /* * Test file exists and has a size of zero, otherwise fail this * build step. This is to cope with the fact that Doxygen exists * with an exit status of zero even if it finds errors. */ test ! -s doxygen.output.tmp; rm -rf doxygen doxygen.output.tmp set silent errok; mv doxygen-tmp/html doxygen; rm -rf Doxyfile doxygen-tmp set errok silent; } /* vim: set ts=8 sw=4 et : */ tardy-1.28/etc/freecode.roff 644 0 0 317712163037023 142540ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2011, 2012 Peter Miller .\" .\" 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 3 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, see . .\" .\" .\" The idea is that the output of this file can bse used as .\" .\" freecode-submit < etc/freecode.txt .\" .\" to update the Freecode record for Tardy, each release. .\" .so etc/version.so .hy 0 .ad l .nf Project: Tardy Summary: A tar(1) post-processor. .fi Description: 'in +4n The tardy program is a tar(1) post-processor. It may be used to manipulate the file headers in tar(5) archive files in various ways. .in -4n .nf License-List: GPL Project-Tag-List: Archiving Tar/GZ-URL: http://tardy.sourceforge.net/tardy-\*(v).tar.gz Mailinglist-URL: http://sourceforge.net/mailarchive/forum.php?forum=tardy-users Changelog-URL: http://tardy.sourceforge.net/changelog.txt Website-URL: http://tardy.sourceforge.net/ Version: \*(v) .\" Tag-List: Hide: N .\" This section is limited to 600 bytes. See the web siet for the changelog: http://tardy.sourceforge.net/changelog.txt .\" vim: set ts=8 sw=4 et : tardy-1.28/etc/groff.sh 644 0 0 155612163037023 132600ustar PeterMiller#!/bin/sh # # tardy - a tar post-processor # Copyright (C) 2011 Peter Miller # # 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 3 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, see . # groff "$@" 2>groff.log es=$? cat groff.log 1>&2 test $es = 0 || exit $es if grep "can't open" groff.log 2>/dev/null then exit 1 fi exit 0 # vim:ts=8:sw=4:et tardy-1.28/etc/howto.conf.in 644 0 0 203112163037023 142220ustar PeterMiller/* * tardy - a tar post-processor * Copyright (C) 1994, 1995, 1998-2000, 2008, 2011 Peter Miller * * 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 3 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, see . * * @configure_input@ */ /* * the name of the compiler to use */ cc = @CC@; c++ = @CXX@; /* * prefix for installation path */ prefix = @prefix@ ; /* exec_prefix = @exec_prefix@ ; */ /* * Which yacc to use */ yacc = @YACC@; /* * extra libraries required for your system */ libs = @LIBS@; tardy-1.28/etc/howto.cook 644 0 0 4563112163037023 136600ustar PeterMiller/* * tardy - a tar post-processor * Copyright (C) 1993, 1995, 1998-2003, 2008-2013 Peter Miller * * 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 3 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, see . */ /* * By default, the build does NOT echo all commands. If you need to see * complete commands, put verbose=1 on the build command line. */ if [not [defined verbose]] then verbose = 0; quiet = [not [verbose]]; if [verbose] then set star; else set silent; /* * Turn on updating to ensure mod-time * consistency on fast machines. */ set time-adjust; /* * make sure targets are removed before the recipe body is run, * and make sure that directories are created then too. */ set mkdir unlink; /* * You may want to change some of these options. * ([debug] must be defined, even if empty, use comments.) * * Change "main.h" to add the DEBUG define. * All files reference this file, so this will cause recompilation * of all files, both in the change and in the baseline. */ debug = -g ; /* * Make sure the [project], [change] and [version] variables are set. */ #ifndef project echo "The [project] variable was not set from the command line." set silent; echo "If you want to do a build with is not a development build" set silent; echo "or an integration build, use the make command, not cook." set silent; fail; #endif #ifndef change echo "The [change] variable was not set from the command line." set silent; echo "If you want to do a build with is not a development build" set silent; echo "or an integration build, use the make command, not cook." set silent; fail; #endif #ifndef version echo "The [version] variable was not set from the command line." set silent; echo "If you want to do a build with is not a development build" set silent; echo "or an integration build, use the make command, not cook." set silent; fail; #endif #ifndef arch echo "The [arch] variable was not set from the command line." set silent; echo "If you want to do a build with is not a development build" set silent; echo "or an integration build, use the make command, not cook." set silent; fail; #endif /* * The build command will seat c "search path" variable, this is the * heirachy of aegis branch baseline and the currect change directory. * Split the colon separated search path into a list of strings. The * first item in search list should be the absolute path of the current * directory, assume that it is. */ search_list = .; search_tmp = [tail [split ':' [search_path]]]; /* * Try to shorten the search path in command lines, too. * * This takes a little getting used to.... * 1. For development builds, the search path is dev dir, then branch bl, * then ... project bl. Thus, bl in a dev dir winds up pointing to * the branch reporitory. * 2. For integration builds, aegis deliberately omits the branch * baseline from the path, but include's the branch's parents and * ancestors. Thus, bl in an int dir winds up pointing to the * branch's parent's reporitory. * The idea is that integration builds in a branch are like a * development build of the branch's dev dir. */ search_name = bl; loop { search_dir = [head [search_tmp]]; if [not [search_dir]] then loopstop; search_tmp = [tail [search_tmp]]; if [not [exists [search_name]]] then ln -s [search_dir] [search_name] set clearstat; search_list = [search_list] [search_name]; search_name = [search_name]bl; } #include-cooked etc/apt-get-depends.cook /* * If this is a development build, the version will be x.y.Czzz, * so look to see if there is a C in the version string. * Include the baseline in the search path if this is * a development build. */ if [match_mask %1C%2 [version]] then { /* * The develop_begin_command in the config file * always creates the "bl" symbolic link. */ baseline = bl; } if [defined baseline] then { /* * Use finigerprints in development builds. */ set fingerprint; } else { /* * Turn on aggressive updating to ensure the smallest possible * range of mod times at aeipass. This also ensures mod time * consistency on fast machines. */ set time-adjust-back; } /* * use GNU awk */ awk = gawk; version_short = [fromto %1.C%2 %1 [subst D C [version]]]; /* * This file is generated by autoconf. * It is architecture specific. * If it is not found (not cooked yet) the following * symbols will be undefined. * * Must be included *after* the search_list is defined. */ #include-cooked-nowarn [arch]/etc/howto.conf if [not [defined prefix]] then prefix = /usr/local; if [not [defined exec_prefix]] then exec_prefix = [prefix]; if [not [defined yacc]] then yacc = yacc; if [not [defined libs]] then libs = ; if [not [defined c++]] then c++ = ['if' [find_command g++] 'then' g++ 'else' c++]; /* * The source files. * This is given to us by aegis. */ vs_file = libtardy/patchlevel.h; change_files = [collect aegis -l chafil -ter -p [project] -c [change]] [vs_file] ; project_files = [collect aegis -l profil -ter -p [project] -c [change]] ; source_files = [sort [stringset [project_files] [change_files]]] ; common_obj = [arch]/libtardy/libtardy.a [arch]/libtardy/versi_stamp.o ; common_lib_obj = [stringset [fromto libtardy/%0%.cc [arch]/libtardy/%0%.o [match_mask libtardy/%0%.cc [source_files]] ] [fromto libtardy/%.c [arch]/libtardy/%.o [match_mask libtardy/%.c [source_files]] ] - [common_obj] ] ; tardy_obj = [fromto tardy/%0%.cc [arch]/tardy/%0%.o [match_mask tardy/%0%.cc [source_files]] ] [common_obj] ; /* * There is a special list of files you must use, in preference to the * standard C files. This ensures appropriate operating system insulation * is always in place. */ c_incl_excludes = [fromto libtardy/ac/%0%.h -ex\=%0%.h [match_mask libtardy/ac/%0%.h [source_files]] ]; /* * The default recipe */ all = [arch]/libtardy/config.h [arch]/bin/tardy [arch]/bin/test_prelude doc.targets ; all: [all]; /* * how to compile C sources */ c++_flags = -O [debug]; c++_include_flags = ; /* * this next section is for gcc * comment it out if you don't have gcc * * The gcc include files MUST be first. */ c++_flags += -Wall -Wextra -Wshadow -Werror; /* * include search path */ c++_include_flags = [c++_include_flags] [prepost "-I" "/"[arch] [search_list]] [addprefix "-I" [search_list]] ; /* * Build %1/%2.o from %1/%2.cc */ [arch]/%1/%0%2.o: %1/%0%2.cc { if [quiet] then function print Compile [target]; if [defined %2_flags] then extra = [%2_flags]; else extra = ; [c++] [c++_flags] [extra] [c++_include_flags] -c [resolve %1/%0%2.cc] ['if' [in gcc [c++]] 'then' -o [target]]; if [not [in gcc [c++]]] then mv %2.o [target]; } %1/%0%2.cc.d: %1/%0%2.cc set nocascade { if [quiet] then function print Depends [target]; c_incl -nc -ns -eia -nrec [c++_include_flags] -prefix "'cascade %1/%0%2.cc ='" -suffix "';'" [resolve %1/%0%2.cc] [addprefix '-rlp=' [search_list]] -slp [arch] "'[arch]'" ['if' [not [filter libtardy/ac/%%0%% %1/%0%2.cc]] 'then' [c_incl_excludes]] > [target]; } %1/%0%2.h.d: %1/%0%2.h set nocascade { if [quiet] then function print Depends [target]; c_incl -nc -ns -eia -nrec [c++_include_flags] -prefix "'cascade %1/%0%2.h ='" -suffix "';'" [resolve %1/%0%2.h] [addprefix '-rlp=' [search_list]] -slp [arch] "'[arch]'" ['if' [not [filter libtardy/ac/%%0%% %1/%0%2.h]] 'then' [c_incl_excludes]] > [target]; } /* * Build %1/%2.o from %1/%2.c */ [arch]/%1/%0%2.o: %1/%0%2.c { if [quiet] then function print Compile [target]; if [defined %2_flags] then extra = [%2_flags]; else extra = ; [c++] [c++_flags] [extra] [c++_include_flags] -c [resolve %1/%0%2.c] ['if' [in gcc [c++]] 'then' -o [target]]; if [not [in gcc [c++]]] then mv %2.o [target]; } %1/%0%2.c.d: %1/%0%2.c set nocascade { if [quiet] then function print Depends [target]; c_incl -nc -ns -eia -nrec [c++_include_flags] -prefix "'cascade %1/%0%2.c ='" -suffix "';'" [resolve %1/%0%2.c] [addprefix '-rlp=' [search_list]] -slp [arch] "'[arch]'" ['if' [not [filter libtardy/ac/%%0%% %1/%0%2.c]] 'then' [c_incl_excludes]] > [target]; } c-dep-files = [addsuffix ".d" [match_mask %1/%0%2.c [source_files]] [match_mask %1/%0%2.cc [source_files]] [match_mask %1/%0%2.h [source_files]] ] [fromto %1/%0%2.y %1/%0%2.gen.c.d [match_mask %1/%0%2.y [source_files]] ] [fromto man1/%.so man1/%.h.d [match_mask man1/%.so [source_files]] ] ; #include-cooked-nowarn [c-dep-files] /* * A few explicit things, to make sure the .d files * are constructed correctly. Sigh. */ cascade [match_mask libtardy/ac/%0%.h [source_files]] = [arch]/libtardy/config.h ; cascade etc/README.man = etc/new.so etc/version.so ; cascade tardy/main.cc = man/man1/tardy.h; cascade libtardy/roff.cc = man/man1/o__rules.h; cascade libtardy/roff.cc = man/man1/o_help.h; cascade libtardy/roff.cc = man/man1/z_exit.h; cascade libtardy/version.cc = man/man1/tardy_license.h; /* * How to use yacc sources. */ yacc = yacc; yacc_flags = ; %1/%2.gen.c %1/%2.gen.h: %1/%2.y single-thread yy.tab.c yy.tab.h { if [quiet] then function print Yacc [target]; if [exists %1/%2.list] then rm %1/%2.list set clearstat; if [exists y.output] then rm y.output set clearstat; [yacc] -d [yacc_flags] [resolve %1/%2.y]; sed "'s/[yY][yY]/%2_/g'" < y.tab.c > %1/%2.gen.c; rm y.tab.c; sed "'s/[yY][yY]/%2_/g'" < y.tab.h > %1/%2.gen.h; rm y.tab.h; if [exists y.output] then mv y.output %1/%2.list set clearstat; } /* * building things which require txt2c to build * * Build %.h from %.1 */ man/man1/%.h: man/man1/%.1: etc/txt2c.awk { if [quiet] then function print Generate [target]; [awk] -f [resolve etc/txt2c.awk] [resolve man/man1/%.1] > [target]; } man/man1/%.h: man/man1/%.so: etc/txt2c.awk { if [quiet] then function print Generate [target]; [awk] -f [resolve etc/txt2c.awk] [resolve man/man1/%.so] > [target]; } ranlib = [find_command ranlib]; [arch]/libtardy/libtardy.a: [common_lib_obj] { if [quiet] then function print Link [target]; ar qc [target] [resolve [common_lib_obj]]; if [ranlib] then [ranlib] [target]; } /* * build the programs from their objects */ [arch]/bin/%: [%_obj] set gate-first shallow if [defined %_obj] { if [quiet] then function print Link [target]; [c++] -o [target] [resolve [%_obj]] [libs]; chmod og\=u-w [target]; } /* * The version stamp is to be updated for every * integration and development build. * * The file is deleted by the integrate_begin_command in the project config file */ copyright_years = [collect aegis -list version -p [project] -c [change] | [awk] "-F'[[\\\\]]'" "'/^copyright_years/{print $2}'" ]; [vs_file]: set shallow { if [quiet] then function print Generate [vs_file]; echo "'#define PATCHLEVEL \""[version]"\"'" > [vs_file] set clearstat; echo "'#define COPYRIGHT_YEARS \""[copyright_years]"\"'" >> [vs_file]; } etc/version.so: set shallow { if [quiet] then function print Generate [target]; echo "'.ds V) "[version]"'" > [target]; echo "'.ds v) "[version_short]"'" >> [target]; aegis -list version -p [project] -c [change] | [awk] -F'\'"\'' "'/previous/{print $2}'" | [awk] -F. "'{print \".ds w) \"$1\".\"$2}'" >> [target]; echo "'.ds Y) "[copyright_years]"'" >> [target]; aesub ".ds W '${change debian-version}'" >> [target]; } etc/new.so: [match_mask etc/new.%.so [source_files]] etc/so.sh { if [quiet] then function print Generate [target]; sh [resolve etc/so.sh] /* DO NOT resolve these next arguments... */ [match_mask etc/new.%.so [source_files]] > [target]; } etc/newest.so: etc/new.so { if [quiet] then function print Generate [target]; head -6 [resolve etc/new.so] > [target]; } /* * formatting documents and manual entries */ doc.targets: cat txt special; /* * manual entries */ cat = [fromto man/man%1/%2.%1 man/cat%1/%2.%1 [match_mask man/man%1/%2.%1 [source_files]] ]; cat: [cat]; man/cat%1/%2.%1: man/man%1/%2.%1 { if [quiet] then function print Groff [target]; roffpp [addprefix "-I" [search_list]] [resolve man/man%1/%2.%1] | groff -Tascii -P-h -t -man > [target]; } man/man%1/%2.%1.d: man/man%1/%2.%1 set nocascade { if [quiet] then function print Depends [target]; c_incl -nc -ns -eia -r -nrec [stringset [c++_include_flags] [addprefix "-I" [search_list]]] -prefix "'cascade man/man%1/%2.%1 ='" -suffix "';'" [resolve man/man%1/%2.%1] [addprefix '-rlp=' [search_list]] -slp [arch] "'[arch]'" > [target]; } man-dep-files = [addsuffix ".d" [match_mask man/man%1/%2.%1 [source_files]]]; #include-cooked-nowarn [man-dep-files] /* * user manuals */ txt = [fromto doc/%.ms doc/%.ps.gz [match_mask doc/%.ms [source_files]]]; txt: [txt]; doc/%.ps.gz: doc/%.ms { if [quiet] then function print Groff [target]; roffpp [addprefix "-I" [search_list]] [resolve doc/%.ms] | groff -p -t -ms | gzip > [target]; } /* * specials */ special: [fromto etc/%.man % [match_mask etc/%.man [source_files]]] ; %: etc/%.man { if [quiet] then function print Groff [target]; roffpp [addprefix "-I" [search_list]] [resolve etc/%.man] | groff -Tascii -P-hub -t -man > [target]; } etc/%.d: etc/%.man set nocascade { if [quiet] then function print Depends [target]; c_incl -nc -ns -eia -r [stringset [c++_include_flags] [prepost "-I" "/etc" [search_list]]] -prefix "'cascade etc/%.man ='" -suffix "';'" [resolve etc/%.man] [addprefix '-rlp=' [search_list]] -slp [arch] "'[arch]'" > [target]; } etc/%.txt: etc/%.roff set shallow { if [quiet] then function print Groff [target]; groff [addprefix "-I" [search_list]] -Tascii -P-hub -t [resolve etc/%.roff] | cat -s > [target]; } etc/%.roff.d: etc/%.roff set nocascade { if [quiet] then function print Depends [target]; c_incl -nc -ns -eia -r -nrec [stringset [c++_include_flags] [prepost "-I" "/etc" [search_list]]] -prefix "'cascade etc/%.roff ='" -suffix "';'" [resolve etc/%.man] [addprefix '-rlp=' [search_list]] -slp [arch] "'[arch]'" > [target]; } etc/%.so.d: etc/%.so set nocascade { if [quiet] then function print Depends [target]; c_incl -nc -ns -eia -r -nrec [stringset [c++_include_flags] [prepost "-I" "/etc" [search_list]]] -prefix "'cascade etc/%.so ='" -suffix "';'" [resolve etc/%.so] [addprefix '-rlp=' [search_list]] -slp [arch] "'[arch]'" > [target]; } etc-dep-files = [fromto etc/%.man etc/%.d [match_mask etc/%.man [source_files]]] [addsuffix ".d" [match_mask etc/%.roff [source_files]]] etc/new.so.d etc/newest.so.d ; #include-cooked-nowarn [etc-dep-files] configure: etc/configure.ac install-sh { if [quiet] then function print Generate [target]; /* * unfortunately, * install-sh must be in the current directory */ if [not [exists install-sh]] then cat [resolve install-sh] > install-sh set clearstat; autoconf [resolve etc/configure.ac] > [target]; chmod 755 [target]; } /* * Different Linux install methods put the packages in different places. * We need to find the autoconf package to get the linstall-sh script. */ loop install-sh-maybe = /usr/share/autoconf/install-sh [glob /usr/share/automake*/install-sh] /usr/local/share/autoconf/install-sh [glob /usr/local/share/automake*/install-sh] { if [exists [install-sh-maybe]] then { install-sh = [install-sh-maybe]; loopstop; } } if [not [install-sh]] then fail "Can't locate the "install-sh" script from GNU automake"; install-sh: [install-sh] { if [quiet] then function print Copy [target]; cp [need] [target]; chmod 755 [target]; } [arch]/config.status: configure install-sh { if [quiet] then function print Generate [target]; /* * unfortunately, * install-sh must be in the current directory */ if [not [exists install-sh]] then cp [resolve install-sh] install-sh set clearstat; ./[resolve configure] --cache-file\=/dev/null --verbose --no-create ['if' [quiet] 'then' --quiet] ; mv config.status [arch]/config.status; } libtardy/config.h.in: etc/configure.ac { if [quiet] then function print Generate [target]; autoheader [resolve etc/configure.ac] > [target]; } [arch]/%0%.h: %0%.h.in [arch]/config.status single-thread conftest.subs { if [quiet] then function print Generate [target]; CONFIG_FILES\= CONFIG_HEADERS\=[target]\:[resolve %0%.h.in] [resolve [arch]/config.status]; } [arch]/%0%: %0%.in [arch]/config.status single-thread conftest.subs { if [quiet] then function print Generate [target]; CONFIG_FILES\=[target]\:[resolve %0%.in] CONFIG_HEADERS\= [resolve [arch]/config.status]; } /* * Make sure this directory is here, * otherwise the "../man1/?????.h" include files will * be found in the baseline. */ #ifdef baseline if [not [exists [arch]/libtardy]] then mkdir -p [arch]/libtardy set clearstat; #endif [arch]/bin/%: [arch]/script/%.sh if [not [defined %_obj]] { if [quiet] then function print Copy [target]; cat [resolve [need]] > [target]; chmod 0755 [target]; } all += etc/freecode.txt; #include [resolve etc/archive.cook] #include [resolve etc/doxygen.cook] #include [resolve etc/tags.cook] #include-cooked [resolve etc/refman.cook] /* vim: set ts=8 sw=4 et : */ tardy-1.28/etc/new.1.10.so 644 0 0 205012163037023 133210ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2002, 2004, 2008, 2010 Peter Miller .\" .\" 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 3 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, see .\" . .\" .PP .if n * .if t \(bu .\" change NN A bug has been fixed with the processing of very long directory names. .\" ------------------------------------------------------------------------ .\" Place new next above this line. .SS Version 1.10 (2002-Oct-16) tardy-1.28/etc/new.1.11.so 644 0 0 333012163037023 133240ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2002, 2004, 2008, 2010 Peter Miller .\" .\" 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 3 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, see .\" . .\" .PP .if n * .if t \(bu .\" change 23 Tardy has a new home page, http://tardy.sourceforge.net/ .PP .if n * .if t \(bu .\" change 21 The tardy --remove-prefix option has been extended to accept a numeric argument, giving the count of directories to be removed. .PP .if n * .if t \(bu .\" change 20 A bug has been fixed in the tardy --reomve-prefix option. If there is a directory named exactly for the prefix being removed, it is now renamed to "." rather than being left unaltered. .PP .if n * .if t \(bu .\" change 19, 16 The tar output has been altered to be consistent with GNU Tar 1.14 and later. As of GNU Tar 1.14, it warns if the block size on input is not what it expects. Tardy now uses the same default block size as GNU Tar when writing tarballs, which silences the GNU Tar warning. .\" ------------------------------------------------------------------------ .\" Place new next above this line. .SS Version 1.11 (2002-Oct-20) tardy-1.28/etc/new.1.12.so 644 0 0 201612163037023 133250ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2004, 2008, 2010 Peter Miller .\" .\" 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 3 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, see .\" . .\" .PP .if n * .if t \(bu .\" Change 25 The license has been updated to GNU GPL version 3. .\" ------------------------------------------------------------------------ .\" Place new next above this line. .SS Version 1.12 (2004-Aug-17) tardy-1.28/etc/new.1.15.so 644 0 0 203412163037023 133300ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2008, 2010 Peter Miller .\" .\" 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 3 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, see . .\" .\" ------------------------------------------------------------------------ .PP .if n * .if t \(bu .\" Change 12 The tabs in the Makefile.in file have been fixed. .\" ------------------------------------------------------------------------ .\" Place new next above this line. .SS Version 1.15 (2008-Apr-14) tardy-1.28/etc/new.1.16.so 644 0 0 173612163037023 133410ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2008, 2010 Peter Miller .\" .\" 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 3 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, see . .\" .PP .if n * .if t \(bu .\" Change 12 A build problem with GCC 4.3 has been fixed [Gentoo Bug 226861]. .\" ------------------------------------------------------------------------ .\" Place new next above this line. .SS Version 1.16 (2008-Apr-29) tardy-1.28/etc/new.1.17.so 644 0 0 240012163037023 133270ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2008-2010 Peter Miller .\" .\" 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 3 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, see . .\" .\" ------------------------------------------------------------------------ .PP .if n * .if t \(bu .\" Change 20, 18, 16, 12 Numerous build glitches and warnings have been fixed. .PP .if n * .if t \(bu .\" tardy.1.17.D004 .\" Change 17, 15 .\" pmiller, Tue Jun 23 10:33:11 2009, tardy -exclude There is a new tardy -exclude option that may be used to exclude (remove) files from the archive. .\" ------------------------------------------------------------------------ .\" Place new next above this line. .SS Version 1.17 (2008-Jun-23) tardy-1.28/etc/new.1.18.so 644 0 0 216412163037023 133370ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2009, 2010 Peter Miller .\" .\" 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 3 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, see . .\" .\" ------------------------------------------------------------------------ .PP .if n * .if t \(bu .\" Change 15 The Makefile.in file has been fixed so the package now builds correctly. Additional support for building Debian packages has been added. .\" ------------------------------------------------------------------------ .\" Place new next above this line. .SS Version 1.18 (2009-Nov-29) tardy-1.28/etc/new.1.19.so 644 0 0 262012163037023 133350ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2010 Peter Miller .\" .\" 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 3 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, see . .\" .\" ------------------------------------------------------------------------ .\" .\" you can create the initial cut of this file using the .\" aereport -f /usr/local/share/aegis/report/chan_so.rpt \ .\" -p tardy.1 -c 19 -unf .\" command, and then editing it to be more appropriate. .\" .\" ------------------------------------------------------------------------ .PP .if n * .if t \(bu .\" Change 12, 15 A build problem on FreeBSD has been fixed. .PP .if n * .if t \(bu .\" Change 11 A build problem on Debian has been fixed. .\" ------------------------------------------------------------------------ .\" Place new next above this line. .SS Version 1.19 (2010-Mar-10) tardy-1.28/etc/new.1.2.so 644 0 0 171112163037023 132450ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 1995, 1999, 2000, 2008 Peter Miller .\" .\" 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 3 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, see .\" . .\" .SS Version 1.2 .if n * .if t \(bu This version of tardy now uses a GNU autoconf generated .I configure script to automatically configure the tardy program. tardy-1.28/etc/new.1.20.so 644 0 0 502312163037023 133250ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2010, 2011 Peter Miller .\" .\" 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 3 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, see . .\" .\" ------------------------------------------------------------------------ .TP 2n .if n * .if t \(bu .\" Change 56 .\" Change 55 Tardy is now able to automatically \f[I]gunzip\fP(1) input files \f[I]gzip\fP(1) output files. .TP 2n .if n * .if t \(bu .\" Change 95 .\" Change 93 .\" Change 80 .\" Change 88 .\" Change 82 .\" Change 83 .\" Change 87 .\" Change 85 .\" Change 86 .\" Change 39 .\" Change 50 Tardy is now able to read and write several \f[I]ar\fP(1) file formats. .TP 2n .if n * .if t \(bu .\" Change 61 .\" Change 76 .\" Change 60 .\" Change 59 .\" Change 58 .\" Change 77 .\" Change 21 Tardy is now able to read and write several \f[I]cpio\fP(1) file formats. .TP 2n .if n * .if t \(bu .\" Change 53 There is a new tardy \fB\-relative\-paths\fP filter, it may be used to ensure that all file names in the archive are relative (do not start with a '/' slash character). This is tidier that the \[lq]\fB\-prefix .\fP\[rq] alternative. .TP 2n .if n * .if t \(bu .\" Change 73 Tardy now uses \f[B]libexplain\fP for improved error messages. .br http://libexplain.sourceforge.net/ .TP 2n .if n * .if t \(bu .\" Change 52 There is a new Tardy \fB\-extract\fP option, that may be used to extract the contents of an archive, in any format that Tardy understands. .\" .......... .......... .......... .......... .......... .......... .......... .TP 2n .if n * .if t \(bu .\" tardy.1.20.D021 .\" Change 32 .\" Change 17 Thomas submitted a patch that added better output support for the USTAR archive format on. .TP 2n .if n * .if t \(bu .\" Change 11 Jari Aalto reported several spelling errors im the man page, these have been corrected. .\" ------------------------------------------------------------------------ .\" Place new next above this line. .SS Version 1.20 (2010-May-22) tardy-1.28/etc/new.1.21.so 644 0 0 334712163037023 133350ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2011 Peter Miller .\" .\" 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 3 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, see . .\" .\" ------------------------------------------------------------------------ .TP 2n .if n * .if t \(bu .\" Change 26 Thomas contributed a patch to detect reading from a terminal, or writing to a terminal. These are usually indications that the user has failed to supply a command line argument. .TP 2n .if n * .if t \(bu .\" Change 20, 21, 25, 102, 103 Tardy is now able to read and write long file names in \f[I]ar\fP(1) archives. .TP 2n .if n * .if t \(bu .\" Change 19 A bug has been fixed in the BSD ar(1) format archives, the file padding has been corrected to 2-byte boundaries. .TP 2n .if n * .if t \(bu .\" Change 18 The \f[I]ar\fP(1) padding now uses newlines, to be compatible with GNU binutils. .TP 2n .if n * .if t \(bu .\" Change 12 The ./configure script will now fail if libexplain has not been installed, rather than failing later in the build. .\" ------------------------------------------------------------------------ .\" Place new next above this line. .SS Version 1.21 (2011-Mar-21) tardy-1.28/etc/new.1.22.so 644 0 0 307512163037023 133340ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2011 Peter Miller .\" .\" 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 3 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, see . .\" .\" ------------------------------------------------------------------------ .TP 2n .if n * .if t \(bu .\" Change 12 Thomas discovered that the V7 tar output was using an incorrect link flag when writing file headers for directories, causing \f[I]pax\fP(1) and \f[I]star\fP(1) to complain. .TP 2n .if n * .if t \(bu .\" Change 15 Thomas discovered that the BSD tar output was using an incorrect link flag when writing file headers for directories, causing \f[I]mc\fP(1) and \f[I]Xarchiver\fP(1) to complain. .TP 2n .if n * .if t \(bu .\" Change 11 Dagobert Michelsen discovered a build problem on systems without the \f[I]strverscmp\fP(3) function. .\" ------------------------------------------------------------------------ .\" Place new next above this line. .SS Version 1.22 (2011-May-14) tardy-1.28/etc/new.1.23.so 644 0 0 224612163037023 133340ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2011 Peter Miller .\" .\" 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 3 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, see . .\" .\" ------------------------------------------------------------------------ .TP 2n .if n * .if t \(bu .\" Change 17 The \f[I]tardy\fP(1) command is now more tolerant of \f[I]tar\fP(5) archives that contain regular files labeled LD_DIRECTORY instead of LD_NORMAL. .\" ------------------------------------------------------------------------ .\" Add new entries above this line. .ne 2i .SS Version 1.23 (2011\[hy]Sep\[hy]09) .\" vim: set ts=8 sw=4 et : tardy-1.28/etc/new.1.24.so 644 0 0 235312163037023 133340ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2011 Peter Miller .\" .\" 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 3 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, see . .\" .\" ------------------------------------------------------------------------ .TP 2n .if n * .if t \(bu .\" Change 16 Dagobert Michelsen discovered that several string functions were undeclared on Solaris, causing build problems; and that there was no replacement memmem() function for systems that didn't have one. .\" ------------------------------------------------------------------------ .\" Add new entries above this line. .ne 2i .SS Version 1.24 (2011\[hy]Oct\[hy]03) .\" vim: set ts=8 sw=4 et : tardy-1.28/etc/new.1.25.so 644 0 0 403512163037023 133340ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2011, 2012 Peter Miller .\" .\" 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 3 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, see . .\" .\" ------------------------------------------------------------------------ .TP 2n .if n * .if t \(bu .\" Change 28, 29 The tardy(1) command now understands ZX compression for both reading and writing, symmetric with how it handles gzip comporession. .TP 2n .if n * .if t \(bu .\" Change 26 A memory scribble deep within the string code has been fixed. It was related to how it split the hash table when growing the size. .TP 2n .if n * .if t \(bu .\" Change 23 Tardy now uses 64-bit file sizes consistently. .TP 2n .if n * .if t \(bu .\" Change 17, 21, 26 (partial) The tardy(1) command is now able to use bzip2 compression on input and output, symmetric with its gzip compression handling. .TP 2n .if n * .if t \(bu .\" Change 15 Emanuel Haupt discovered an incorrect function prototype, that caused build problems on some 32-bit systems. .TP 2n .if n * .if t \(bu .\" Change 12 Dagobert Michelsen discovered that Solaris needs more #include lines. .TP 2n .if n * .if t \(bu .\" Change 11 Dagobert Michelsen discovered a build problem with the memmem replacement function. .\" ------------------------------------------------------------------------ .\" Add new entries above this line. .ne 2i .SS Version 1.25 (2011\[hy]Nov\[hy]07) .\" vim: set ts=8 sw=4 et : tardy-1.28/etc/new.1.26.so 644 0 0 333612163037023 133400ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2012, 2013 Peter Miller .\" .\" 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 3 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, see . .\" .\" ------------------------------------------------------------------------ .\" .\" you can create the initial cut of this file using the .\" .\" aereport -f /usr/local/share/aegis/report/chan_so.rpt \ .\" -p tardy.1 -c 26 -unf .\" .\" command, and then editing it to be more appropriate. .\" .\" ------------------------------------------------------------------------ .TP 2n .if n * .if t \(bu .\" Change 15 .\" Change 17 .\" Change 19 There is now a tarball on the web site with no debian/ directory, to make it easier for downstream packagers. .TP 2n .if n * .if t \(bu .\" Change 18 There is now a debian/watch file, in main tarball. .TP 2n .if n * .if t \(bu .\" tardy.1.26.D004 .\" Change 16 There is now a test tarballs > 2GB. This was fixed back in i1.25.D012 (12-Jun-2012). Debian: Closes: #659630 .\" ------------------------------------------------------------------------ .\" Add new entries above this line. .ne 2i .SS Version 1.26 (2012\[hy]Jul\[hy]09) .\" vim: set ts=8 sw=4 et : tardy-1.28/etc/new.1.27.so 644 0 0 270512163037023 133400ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2013 Peter Miller .\" .\" 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 3 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, see . .\" .\" ------------------------------------------------------------------------ .PP .if n * .if t \(bu .\" Change 15 jari discovered a false negative from test/00/t0075a.sh, causd by a difference in time zones. .PP .if n * .if t \(bu .\" Change 11 jari discovered that three files were mysteriously absent from the tarball causing FTBFS. .PP .if n * .if t \(bu .\" Change 12 jari discovered a problem in the download pages, causing the debian-less orig.tar.gz to be improperly linked. .\" ------------------------------------------------------------------------ .\" Add new entries above this line. .ne 2i .SS Version 1.27 (2013\[hy]May\[hy]28) .\" vim: set ts=8 sw=4 et : tardy-1.28/etc/new.1.28.so 644 0 0 232512163037023 133370ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2013 Peter Miller .\" .\" 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 3 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, see . .\" .\" ------------------------------------------------------------------------ .\" .\" you can create the initial cut of this file using the .\" .\" aereport -f /usr/local/share/aegis/report/chan_so.rpt \ .\" -p tardy.1 -c 28 -unf .\" .\" command, and then editing it to be more appropriate. .\" .\" ------------------------------------------------------------------------ .\" Add new entries above this line. .ne 2i .SS Version 1.28 (2013\[hy]Jun\[hy]27) .\" vim: set ts=8 sw=4 et : tardy-1.28/etc/new.1.4.so 644 0 0 242012163037023 132450ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2000, 2001, 2004, 2008, 2010 Peter Miller .\" .\" 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 3 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, see .\" . .\" .PP .if n * .if t \(bu .\" change 11 Tardy has been entirely re-written in C++. .PP .if n * .if t \(bu .\" change 13, 15 Tardy now understands cpio formats in addition to tar formats. .PP .if n * .if t \(bu .\" change 14 Tardy now comes with an RPM package spec. .\" ------------------------------------------------------------------------ .\" Place new next above this line. .SS Version 1.4 (1998-Jan-25) Never had a public release. .SS Version 1.3 Never had a public release. tardy-1.28/etc/new.1.5.so 644 0 0 205212163037023 132470ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2000, 2001, 2004, 2008 Peter Miller .\" .\" 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 3 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, see .\" . .\" .PP .if n * .if t \(bu .\" change 11 Build and test problems caused by the recent RH7 release have been fixed. .\" ------------------------------------------------------------------------ .\" Place new next above this line. .SS Version 1.5 (13-Sep-2000) tardy-1.28/etc/new.1.6.so 644 0 0 204712163037023 132540ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2001, 2004, 2008 Peter Miller .\" .\" 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 3 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, see .\" . .\" .PP .if n * .if t \(bu .\" change 11, 12 A number of files were missing from the tarball. These have been added. .\" ------------------------------------------------------------------------ .\" Place new next above this line. .SS Version 1.6 (23-Oct-2001) tardy-1.28/etc/new.1.7.so 644 0 0 206312163037023 132530ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2001, 2004, 2008 Peter Miller .\" .\" 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 3 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, see .\" . .\" .PP .if n * .if t \(bu .\" change 11 The generated \fIMakefile.in\fP file was missing some dependencies. This has been fixed. .\" ------------------------------------------------------------------------ .\" Place new next above this line. .SS Version 1.7 (23-Oct-2001) tardy-1.28/etc/new.1.8.so 644 0 0 214612163037023 132560ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2001, 2004, 2008 Peter Miller .\" .\" 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 3 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, see .\" . .\" .PP .if n * .if t \(bu .\" change 20, 19, 18, 17, 11 A number fo build problems have been fixed. .PP .if n * .if t \(bu .\" change 16, 15 Support has been added for long names. .\" ------------------------------------------------------------------------ .\" Place new next above this line. .SS Version 1.8 (24-Oct-2001) tardy-1.28/etc/new.1.9.so 644 0 0 213712163037023 132570ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2002, 2004, 2008 Peter Miller .\" .\" 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 3 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, see .\" . .\" .PP .if n * .if t \(bu .\" Change 13, 14 Some documentation errors have been corrected. .PP .if n * .if t \(bu .\" Change 11, 12, 13 Some build problems have been fixed. .\" ------------------------------------------------------------------------ .\" Place new next above this line. .SS Version 1.9 (27-Aug-2001) tardy-1.28/etc/new.so 644 0 0 134112163037023 127450ustar PeterMiller.br .ne 1i .so etc/new.1.28.so .br .ne 1i .so etc/new.1.27.so .br .ne 1i .so etc/new.1.26.so .br .ne 1i .so etc/new.1.25.so .br .ne 1i .so etc/new.1.24.so .br .ne 1i .so etc/new.1.23.so .br .ne 1i .so etc/new.1.22.so .br .ne 1i .so etc/new.1.21.so .br .ne 1i .so etc/new.1.20.so .br .ne 1i .so etc/new.1.19.so .br .ne 1i .so etc/new.1.18.so .br .ne 1i .so etc/new.1.17.so .br .ne 1i .so etc/new.1.16.so .br .ne 1i .so etc/new.1.15.so .br .ne 1i .so etc/new.1.12.so .br .ne 1i .so etc/new.1.11.so .br .ne 1i .so etc/new.1.10.so .br .ne 1i .so etc/new.1.9.so .br .ne 1i .so etc/new.1.8.so .br .ne 1i .so etc/new.1.7.so .br .ne 1i .so etc/new.1.6.so .br .ne 1i .so etc/new.1.5.so .br .ne 1i .so etc/new.1.4.so .br .ne 1i .so etc/new.1.2.so tardy-1.28/etc/page-list.awk 644 0 0 326412163037023 142100ustar PeterMiller#!/bin/awk -f # # tardy - a tar post-processor # Copyright (C) 2011 Peter Miller # # 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 3 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, see . # function output_end() { if (start == 0) return; if (middle != 0) printf(",") middle = 1 printf("%d", start); if (start != finish) printf("-%d", finish); start = 0; finish = 0; } function output(n) { if (start == 0) { start = n finish = n return } if (n == finish + 1) { finish = n; return } output_end(); start = n; finish = n; } function output_even() { if ((page[finish] % 2) != 0) { output_end(); printf(",_"); } } /Page:/ { page[$3] = $2 if ($3 > max) max = $3 } END { output(1); output(2); numtoc = 0 for (j = 3; j <= max; ++j) { if (page[j] > 1000) { output(j); numtoc++ } } output_even(); for (j = 3; j <= max; ++j) { if (page[j] < 1000) output(j); } output_even(); output_end(); printf("\n"); } tardy-1.28/etc/patch.file.sh 644 0 0 220312163037023 141600ustar PeterMiller#!/bin/sh # # tardy - a tar post-processor #!/bin/sh # # aegis - project change supervisor # Copyright (C) 1993, 1995, 1999, 2000, 2008 Peter Miller # # 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 3 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, see # . # orig=$1 path=$2 name=$3 tmp=/tmp/$$ trap "rm $tmp; exit 1" 1 2 3 15 echo diff -c $orig $path 1>&2 diff -c $orig $path > $tmp case $? in 0) ;; 1) echo "Index: $name" sed '1,2d' < $tmp ;; *) rm $tmp exit 1 ;; esac rm $tmp exit 0 tardy-1.28/etc/patches.sh 644 0 0 226312163037023 136000ustar PeterMiller#!/bin/sh # # tardy - a tar post-processor # Copyright (C) 1992, 1993, 1995, 1999, 2000, 2008 Peter Miller # # 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 3 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, see # . # # # Emit some blurb about the patch file # echo "#! /bin/sh" echo "#" echo "# This is a self-applying patch in a shell script." echo "#" echo "# Change directory to the appropriate place" echo "# before applying running this shell script." echo "#" echo "# Don't forget the -p0 option if you apply this patch manually." echo "#" echo echo "patch -p0 << 'fubar'" cat $* exit 0 tardy-1.28/etc/ppa-upload.sh 644 0 0 342212163037023 142110ustar PeterMiller#!/bin/sh # # tardy - a tar post-processor # Copyright (C) 2010-2012 Peter Miller # # 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 3 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, see . # set -e project=tardy wwwdir=archive AEGIS_PROJECT=${project}.cur export AEGIS_PROJECT RELEASES="$*" if [ -z "$RELEASES" ] then RELEASES="`cat /home/archives/ubuntu.release.names`" if [ -z "$RELEASES" ] then RELEASES="lucid precise" fi fi PPA=ppa:pmiller-opensource/ppa #find the project baseline bl=`aegis -cd -bl` dir=$bl/$wwwdir f=`( cd $dir && ls *.tar.gz | sort -V ) | tail -1` if [ -z "$f" ] then echo "can't find tarball" 1>&2 exit 1 fi tgz=$dir/$f tdir=/tmp/${project}-ppa-$$ for release in $RELEASES do cd /tmp rm -rf $tdir mkdir $tdir cd $tdir tar xzf $tgz cd ${project}-* PACKAGE=`head -1 debian/changelog | awk '{print $1}'` VERSION=`head -1 debian/changelog | awk '{print $2}' | sed -r -e 's/^\(//;s/\)$//'` sed -i -r -e "1s/\) [^;]+; /~pm~${release}) ${release}; /" debian/changelog head -1 debian/changelog dpkg-buildpackage -S -sa ls -lho .. dput $PPA ../${PACKAGE}_${VERSION}~pm~${release}_source.changes cd /tmp rm -rf $tdir done exit 0 # vim: set ts=8 sw=4 et : tardy-1.28/etc/ref-index.so 644 0 0 61112163037023 140140ustar PeterMiller.hy 0 .de TH .. .TS H l r lw(2.5i) lw(2.5i). .TH tardy(1) \*[Page*Of*tardy(1)] T{ .ad r tardy - a tar T} T{ .ad l post-processor T} tardy(1) \*[Page*Of*tardy(1)] T{ .ad r tardy - a tar post- T} T{ .ad l processor T} tardy(1) \*[Page*Of*tardy(1)] T{ .ad r T} T{ .ad l tardy - a tar post-processor T} tardy(1) \*[Page*Of*tardy(1)] T{ .ad r tardy - a T} T{ .ad l tar post-processor T} .TE .ad b tardy-1.28/etc/ref-parts.so 644 0 0 6212163037023 140160ustar PeterMiller.so man/man1/tardy.1 .so man/man1/tardy_license.1 tardy-1.28/etc/ref-ptx.ignore 644 0 0 133112163037023 144020ustar PeterMiller# # tardy - a tar post-processor # Copyright (C) 2011 Peter Miller # # 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 3 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, see . # a as and be by of the to tardy-1.28/etc/ref-ptx.sh 644 0 0 142712163037023 135370ustar PeterMiller#!/bin/sh # # tardy - a tar post-processor # Copyright (C) 2011 Peter Miller # # 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 3 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, see . # echo $* | tr ' ' '\12' | sort | while read f do echo .so $f done exit 0 tardy-1.28/etc/ref-ptx1.awk 644 0 0 606712163037023 137750ustar PeterMiller# # tardy - a tar post-processor # Copyright (C) 2011 Peter Miller # # 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 3 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, see . # function getc() { getc_tmp = substr(getc_buf, getc_pos, 1) if (getc_tmp != "") ++getc_pos return getc_tmp } BEGIN { th_name = "none" th_section = "none" active = 0 } /^\.TH/ { # watch out for the quotes getc_buf = $0 getc_pos = 4 argc = 0 for (;;) { c = getc() while (c == " " || c == "\t") c = getc() if (c == "") break quoted = 0 arg = "" for (;;) { if (c == "\"") quoted = !quoted else if (c == "") break else if (!quoted && (c == " " || c == "\t")) break else arg = arg c c = getc() } argv[++argc] = arg } # th_name = argv[1] # gsub(/\\\*\(n\)/, "Tardy", th_name) # th_section = argv[2] th_name = FILENAME sub(/^.*\//, "", th_name) sub(/\.[0-9]$/, "", th_name) th_section = FILENAME sub(/^.*\./, "", th_section) active = 0 next } /^\.SH/ { active = ($2 == "NAME") next } /^['.]\\"/ { # ignore comments next } /^['.]XX/ { # ignore indexing next } /^['.]if/ { # ignore conditional (around indexing) next } /^['.]\\}/ { # ignore conditional (around indexing) next } /^['.]/ { if (active) { sub(/^.[a-zA-Z][a-zA-Z]*[ ]*/, "") print th_name "(" th_section ") " $0 } next } { if (active) { gsub(/ /, " ") # Translate tabs to spaces gsub(/__*/, " ") # Collapse underscores gsub(/ +/, " ") # Collapse spaces gsub(/ *, */, ", ") # Fix comma spacings sub(/^ /, "") # Kill initial spaces sub(/ $/, "") # Kill trailing spaces gsub(/\\f\(../, "") # Kill font changes gsub(/\\f./, "") # Kill font changes gsub(/\\s[-+0-9]*/, "") # Kill size changes gsub(/\\&/, "") # Kill \& gsub(/\\\((ru|ul)/, "_") # Translate gsub(/\\\[(mi|hy|em)]/, "-") # Translate gsub(/\\\((mi|hy|em)/, "-") # Translate gsub(/\\\*\(n\)/, "Tardy") gsub(/\\\*\(../, "") # Kill troff strings gsub(/\\/, "") # Kill all backslashes print th_name "(" th_section ") " $0 } } tardy-1.28/etc/ref-ptx2.awk 644 0 0 177412163037023 137760ustar PeterMiller# # tardy - a tar post-processor # Copyright (C) 2011 Peter Miller # # 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 3 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, see . # BEGIN { print ".hy 0" print ".de TH" print ".." print ".TS H" print "l r lw(2.5i) lw(2.5i)." print ".TH" } { print $10 "\t\\*[Page*Of*" $10 "]\tT{" print ".ad r" print $4 print "T}\tT{" print ".ad l" print $6 print "T}" } END { print ".TE" print ".ad b" } tardy-1.28/etc/ref-toc.so 644 0 0 276112163037023 135220ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 2011 Peter Miller .\" .\" 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 3 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, see . .\" .\" ---------- XX ----------------------------------------------------------- .\" .\" The XX macro accumulates table of contents entries. It takes two .\" arguments, first is the page title, the second is the page .\" description. The current page number in the \n% register is .\" consulted to obtain the page number. .\" .de XX .ds Page*Of*\\$1 \\n% .da toc*div .ev h .ds toc*num \\n% .ll -8n .in 0 \\$1\\t\\$2 \\a\\t\\*[toc*num] .br .ll +8n .rm toc*num .ev .di .. .\" ---------- TC ----------------------------------------------------------- .\" .\" The TC macro prints the table of contents collected by uses of the .\" XX macro. .\" .de TC .nf .char \[toc*leader-char] .\h'1m' .lc \[toc*leader-char] .ta 2i (u;\\n[.l]-\\n[.i]-\w'000') (u;\\n[.l]-\\n[.i])R .toc*div .fi .. tardy-1.28/etc/reference.man 644 0 0 1031512163037023 142650ustar PeterMiller'\" t .\" tardy - a tar post-processor .\" Copyright (C) 2011 Peter Miller .\" .\" 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 3 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, see . .\" .\" ------------------------------------------------------------------------ .\" .\" Format and print this file using the GNU groff command .\" .\" groff -s -p -t -ms -I. -I../man/man1 -I../man/man5 main.man | lpr .\" .\" Some of the formatting constructs used in this document assume GNU groff. .\" .pn -1 \" the first (unnumbered) is -1, second is 0, .\" the third is 1, just like I wanted. Sheesh! .so etc/ref-toc.so \"from the etc directory .so etc/version.so \"from the etc directory .if n .ftr CB B .if n .ftr CI I .if n .ftr CW R .if n .ftr C R .\" --------------------------------------------------------------------------- .\" enable the .XX macro .nr equire_index 1 .\" --------------------------------------------------------------------------- .\" stuff for figuring dates .\" .lg 0 .ds MONTH1 January .ds MONTH2 February .ds MONTH3 March .ds MONTH4 April .ds MONTH5 May .ds MONTH6 June .ds MONTH7 July .ds MONTH8 August .ds MONTH9 September .ds MONTH10 October .ds MONTH11 November .ds MONTH12 December .ds MO \\*[MONTH\n[mo]] .nr *year \n[yr]+1900 .ds DY \n[dy] \*[MO] \n[*year] .\" --------------------------------------------------------------------------- \&. .sp 2i .ps 36 .vs 38 .ce 2 Tardy .sp 0.5i .ps 28 .vs 30 .ce 1 Reference Manual .sp 1i .ps 18 .vs 20 .ce 1 Peter Miller .ft I .ce 1 pmiller@opensource.org.au .ft P .\" --------------------------------------------------------------------------- .bp .ps 12 .vs 14 \&. .sp 2i This document describes Tardy version \*(v) .br and was prepared \*(DY. .br .sp 1i .if n .ds C) (C) .if t .ds C) \(co This document describing the Tardy program, and the Tardy program itself, are .br Copyright \*(C) \*(Y) Peter Miller .sp 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 3 of the License, or (at your option) any later version. .sp 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. .sp You should have received a copy of the GNU General Public License along with this program. If not, see . .\" .\" ---------- Include the Other Stuff -------------------------------------- .\" .nr C 1 \"continuous page numbers (see GNU groff tmac.an) .so etc/README.man .so etc/BUILDING.man .\" .\" ---------- Include the Manual Pages ------------------------------------- .\" .so etc/ref-parts.so .\" .\" ---------- Include the Table of Contents -------------------------------- .\" .if o .bp \" because .TH is going to throw another one .nr % 1000 .TH "Table of Contents" "Tardy" "Tardy" "Reference Manual" .\" .\" ----- .\" This next section redefines the page footer to use roman numbering .\" from "iii" onwards. It is overly GNU Groff specific. .\" Fortunately, the page number does not appear in the page header. .\" .nr an-page-origin \n%-3 .af an-page-letter i .de an-p-footer .ev 1 .nr an-page-letter \\n%-\\n[an-page-origin] .ds an-page-string \\n[an-page-letter] .ie \\nD \{\ . if o .tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]' . if e .tl '\\*[an-page-string]'\\*[an-extra1]'\\*[an-extra2]' .\} .el .tl '\\*[an-extra2]'\\*[an-extra1]'\\*[an-page-string]' .ev .. .\" ----- .in 0 .TC .\" .\" ---------- Include the Permuted Index ----------------------------------- .\" .bp .in 0 .so etc/ref-index.so tardy-1.28/etc/refman.cook 644 0 0 601012163037023 137340ustar PeterMiller/* * tardy - a tar post-processor * Copyright (C) 2011, 2012 Peter Miller * * 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 3 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, see . */ all += etc/reference.pdf; integration-build-targets += archive/[project_minus].pdf; etc/%.so.d: etc/%.so set no-cascade { if [quiet] then function print Depends [target]; c_incl -nc -ns -api -nrec --lang\=roff [addprefix "-I" [search_list]] [resolve etc/%.so] -prefix "'cascade etc/%.so ='" -suffix "';'" [addprefix "-rlp=" [search_list]] -o [target]; } etc/%.man.d: etc/%.man set no-cascade { if [quiet] then function print Depends [target]; c_incl -nc -ns -api -nrec --lang\=roff [addprefix "-I" [search_list]] [resolve etc/%.man] -prefix "'cascade etc/%.man ='" -suffix "';'" [addprefix "-rlp=" [search_list]] -o [target]; } #include-cooked [addsuffix ".d" [match_mask etc/%.man [source_files]]] etc/%.pdf: etc/%.man etc/page-list.awk etc/groff.sh { if [quiet] then function print Groff [target]; sh [resolve etc/groff.sh] [addprefix "-I" [search_list]] -t -man [resolve etc/%.man] > %.ps.tmp; psselect -p`awk -f [resolve etc/page-list.awk] %.ps.tmp` ['if' [quiet] 'then' -q ] %.ps.tmp > %.ps; rm %.ps.tmp set silent; ps2pdf %.ps [target]; rm %.ps set silent; } cascade etc/reference.man = etc/ref-index.so etc/ref-parts.so; etc/ref-index.so: [match_mask man/man%1/%2.%1 [source_files]] etc/ref-ptx1.awk etc/ref-ptx.ignore etc/ref-ptx2.awk { if [quiet] then function print Generate [target]; [awk] -f [resolve etc/ref-ptx1.awk] [resolve [match_mask man/man%1/%2.%1 [source_files]]] | ptx -O -r -w1000 -i[resolve etc/ref-ptx.ignore] | sort -t'\'"\'' -f -d +5 -6 +3 -4 | [awk] -F'\'"\'' -f [resolve etc/ref-ptx2.awk] > [target]; } #include-cooked etc/ref-index.so.d etc/ref-parts.so: [match_mask man/man%1/%2.%1 [source_files]] etc/ref-ptx.sh { if [quiet] then function print Generate [target]; sh -f [resolve etc/ref-ptx.sh] [match_mask man/man%1/%2.%1 [source_files]] > [target]; } #include-cooked etc/ref-parts.so.d archive/[project_minus].pdf: etc/reference.pdf set shallow { if [quiet] then function print Copy [target]; cp [need] [target]; } /* vim: set ts=8 sw=4 et : */ tardy-1.28/etc/so.sh 644 0 0 164712163037023 125770ustar PeterMiller#!/bin/sh # # tardy - a tar post-processor # Copyright (C) 2002, 2008, 2009 Peter Miller # # 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 3 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, see # . # echo $* | tr ' ' '\12' | sort -V -r | while read f do echo ".br" echo ".ne 1i" echo ".so $f" done exit 0 tardy-1.28/etc/spec.sh 644 0 0 645512163037023 131120ustar PeterMiller#!/bin/sh # # tardy - a tar post-processor # Copyright (C) 1998, 2000, 2001, 2004, 2008 Peter Miller # # 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 3 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, see # . # version=${version-0.0.0} echo 'Summary: a tar post-processor' echo 'Name: tardy' echo "Version: ${version}" echo 'Release: 1' echo 'Copyright: GPL' echo 'Group: System/Tape' echo "Source: http://tardy.sourceforge.net/tardy-${version}.tar.gz" echo 'URL: http://tardy.sourceforge.net/' echo 'BuildRoot: /tmp/tardy-build-root' prefix=/usr # # RPM only has install-time relocatable packages. It has no support for # build-time relocatable packages. Therefore, we must NOT specify a Spec # prefix, or the installed locations will not match the built locations. # #echo "Prefix: $prefix" echo '' cat << 'fubar' %description The tardy program is a tar(1) post-processor. It may be used to manipulate the file headers tar(5) archive files in various ways. The reason the tardy program was written was because the author wanted to "spruce up" tar files before posting them to the net, mostly to remove artefacts of the development environment, without introducing more. The tardy program was designed to allow you to alter certain atrributes of files after they have been included in the tar file. Among them are: * change file owner (by number or name) * change file group (by number or name) * add directory prefix (for example, dot) * change file protections (for example, from 600 to 644) Note that all of these affect ALL files in the archive. %prep fubar # # set the prefix here # echo '%setup' echo "./configure --prefix=$prefix" echo '' echo '%build' echo 'make' echo '' echo '%install' echo 'make RPM_BUILD_ROOT=$RPM_BUILD_ROOT install' # # remember things for the %files section # files= psdocs= dvidocs= remember_prog() { if eval "test \"\${prog_${1}-no}\" != yes" then eval "prog_${1}=yes" files="$files $prefix/bin/${1}" fi } for file in $* do case $file in common/*) ;; etc/*) ;; */main.cc) dir=`echo $file | sed 's|/.*||'` remember_prog $dir ;; test/*/*) ;; lib/*/LC_MESSAGES/common.po) ;; lib/*.po) stem=`echo $file | sed 's|^lib/\(.*\)\.po$|\1|'` dst="$prefix/lib/tardy/$stem.mo" files="$files $dst" ;; man[0-9]/*.[0-9]) files="$files $prefix/man/${file}*" ;; *) ;; esac done echo '' echo '%files' for file in $files do echo "$file" done | sort tardy-1.28/etc/tags.cook 644 0 0 653012163037023 134310ustar PeterMiller/* * tardy - a tar post-processor * Copyright (C) 2004, 2008, 2012 Peter Miller * * 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 3 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, see * . */ if [find_command ctags] then { /* * There are three different versions of these commands, * and they take completely different command line options. We * assume minimal posix syntax if nothing better is available. * (What were they thinking? Were they even thinking?) */ ctags-variant = posix; /* * The '|| true' is needed because if ctags fails the build stops. */ ctags-version = [collect ctags --version || true]; if [in Exuberant [ctags-version]] then { ctags-variant = exuberant; } else if [in Emacs [ctags-version]] then { ctags-variant = emacs; } all += tags; if [find_command etags] then { etags = etags; all += TAGS; } /* * xargs can invoke ctags/etags more than once if the underling * shell does not handle so much arguments. In order to not * truncate the target the '-a' options must be used. It is posix * compliant and should be supported by different ctags variant. */ ctags-opts = -a; if [in posix [ctags-variant]] then ctags-opts += -f; if [in exuberant [ctags-variant]] then { ctags-opts += --c-types\=+px -f; etags = ctags -e; all += TAGS; } /* * The (GNU) Emacs variant of ctags (based an Exuberant) use -o * to set the output file name. */ if [in emacs [ctags-variant]] then ctags-opts += --declarations /* --defines */ /* --globals */ --members /* --typedefs */ /* --no-warn (the man page says the --no-warn option exists, but is doesn't, really) */ -o ; } tags: [change_files] set shallow no-cascade { if [quiet] then function print Generate [target]; xargs ctags [ctags-opts] [target] set meter; data [unsplit "\n" [resolve [stringset [source_files] - [match_mask %0%.h [source_files]]] [match_mask %0%.h [source_files]] [fromto %0%.def %0%.cc [match_mask %0%.def [source_files]]] [fromto %0%.def %0%.h [match_mask %0%.def [source_files]]] ] ] dataend } TAGS: [change_files] set shallow no-cascade { if [quiet] then function print Generate [target]; xargs [etags] [ctags-opts] [target] set meter; data [unsplit "\n" [resolve [source_files] [fromto %0%.def %0%.cc [match_mask %0%.def [source_files]]] [fromto %0%.def %0%.h [match_mask %0%.def [source_files]]] ] ] dataend } /* vim: set ts=8 sw=4 et : */ tardy-1.28/etc/template/ac_h 644 0 0 176512163037023 142530ustar PeterMiller// // ${project trunk_name} - ${project trunk_description} // Copyright (C) ${date %Y} ${copyright-owner} // // 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 3 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, see . // #ifndef ${id ${upcase $fn}} #define ${id ${upcase $fn}} #include #ifdef HAVE_${upcase ${identifier ${trim_dir ${trim_dir $fn}}}} #include <${trim_dir ${trim_dir $fn}}> #endif // vim: set ts=8 sw=4 et : #endif // ${id ${upcase $fn}} tardy-1.28/etc/template/c 644 0 0 343312163037023 135750ustar PeterMiller// // ${project trunk_name} - ${project trunk_description} // Copyright (C) ${date %Y} ${copyright-owner} // // 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 3 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, see . // #include <${trim_ext $fn}.h> ${id ${trim_dir ${trim_ext $fn}}}::~${id ${trim_dir ${trim_ext $fn}}}() { } ${id ${trim_dir ${trim_ext $fn}}}::${id ${trim_dir ${trim_ext $fn}}}() : ${id ${trim_dir ${dirname_rel $fn}}}() { } ${id ${trim_dir ${trim_ext $fn}}}::pointer ${id ${trim_dir ${trim_ext $fn}}}::create(void) { return pointer(new ${id ${trim_dir ${trim_ext $fn}}}()); } ${id ${trim_dir ${trim_ext $fn}}}::${id ${trim_dir ${trim_ext $fn}}}(const ${id ${trim_dir ${trim_ext $fn}}} &rhs) : ${id ${trim_dir ${dirname_rel $fn}}}(rhs) { } ${id ${trim_dir ${trim_ext $fn}}}::pointer ${id ${trim_dir ${trim_ext $fn}}}::create(const ${id ${trim_dir ${trim_ext $fn}}} &rhs) { return pointer(new ${id ${trim_dir ${trim_ext $fn}}}(rhs)); } ${id ${trim_dir ${trim_ext $fn}}} & ${id ${trim_dir ${trim_ext $fn}}}::operator=(const ${id ${trim_dir ${trim_ext $fn}}} &rhs) { if (this != &rhs) { ${id ${trim_dir ${dirname_rel $fn}}}::operator=(rhs); ... } return *this; } // vim: set ts=8 sw=4 et : tardy-1.28/etc/template/etc_so 644 0 0 260112163037023 146230ustar PeterMiller.\" .\" ${project trunk_name} - ${project trunk_description} .\" Copyright (C) ${date %Y} ${user name} .\" .\" 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 3 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, see . .\" .\" ------------------------------------------------------------------------ .\" .\" you can create the initial cut of this file using the .\" .\" aereport -f /usr/local/share/aegis/report/chan_so.rpt \ .\" -p ${project trunk_name}.${trim_ext ${project version} } -c ${substring ${project version} ${length ${trim-ext ${project version}}. } 9} -unf .\" .\" command, and then editing it to be more appropriate. .\" .\" ------------------------------------------------------------------------ .\" Add new entries above this line. .ne 2i .SS Version ${project version} (${date %Y\\[hy]%b\\[hy]%d}) .\" vim: set ts=8 sw=4 et : tardy-1.28/etc/template/generic 644 0 0 137712163037023 147740ustar PeterMiller# # ${project trunk_name} - ${project trunk_description} # Copyright (C) ${date %Y} ${copyright-owner} # # 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 3 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, see . # # vim: set ts=8 sw=4 et : tardy-1.28/etc/template/h 644 0 0 477612163037023 136150ustar PeterMiller// // ${project trunk_name} - ${project trunk_description} // Copyright (C) ${date %Y} ${copyright-owner} // // 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 3 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, see . // #ifndef ${id ${upcase $fn}} #define ${id ${upcase $fn}} #include <${dirname_rel $fn}.h> /** * The ${id ${trim_dir ${trim_ext $fn}}} class is used to represent * #fillmein */ class ${id ${trim_dir ${trim_ext $fn}}}: public ${id ${trim_dir ${dirname_rel $fn}}} { public: typedef boost::shared_ptr<${id ${trim_dir ${trim_ext $fn}}}> pointer; /** * The destructor. */ virtual ~${id ${trim_dir ${trim_ext $fn}}}(); private: /** * The default constructor. * It is private on purpose, use a #create class method instead. */ ${id ${trim_dir ${trim_ext $fn}}}(); public: /** * The create class method is used to create new dynamically * allocated instances of this class. */ static pointer create(void); private: /** * The fubar instance variable is used to remember * #fillmein */ int fubar; private: /** * The copy constructor. * It is private on purpose, use a #create class method instead. * * @param rhs * The right hand side of the initialisation. */ ${id ${trim_dir ${trim_ext $fn}}}(const ${id ${trim_dir ${trim_ext $fn}}} &rhs); public: /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param rhs * The right hand side of the initialisation. */ static pointer create(const ${id ${trim_dir ${trim_ext $fn}}} &rhs); public: /** * The assignment operator. * * @param rhs * The right hand side of the initialisation. */ ${id ${trim_dir ${trim_ext $fn}}} &operator=(const ${id ${trim_dir ${trim_ext $fn}}} &rhs); }; // vim: set ts=8 sw=4 et : #endif // ${id ${upcase $fn}} tardy-1.28/etc/template/man 644 0 0 221112163037023 141170ustar PeterMiller'\" t .\" ${project trunk_name} - ${project trunk_description} .\" Copyright (C) ${date %Y} ${copyright-owner} .\" .\" 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 3 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, see . .\" .so z_name.so .TH \*(n) 1 .if n .ad l .if n .hy 0 .SH NAME \*(n) \- project change supervisor .SH SYNOPSIS .B \*(n) [ .IR option \&... ] .IR filename \&... .br .B \*(n) .B -Help .br .B \*(n) .B -VERSion .SH DESCRIPTION The .I \*(n) program is used to .SH OPTIONS The following options are understood: .so o_help.so .so o__rules.so .so z_exit.so .so z_cr.so .\" vim: set ts=8 sw=4 et : tardy-1.28/etc/template/ms 644 0 0 144312163037023 137710ustar PeterMiller.\" .\" ${project trunk_name} - ${project trunk_description} .\" Copyright (C) ${date %Y} ${copyright-owner} .\" .\" 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 3 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, see . .\" .\" vim: set ts=8 sw=4 et : tardy-1.28/etc/template/report 644 0 0 142512163037023 146650ustar PeterMiller/* * ${project trunk_name} - ${project trunk_description} * Copyright (C) ${date %Y} ${copyright-owner} * * 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 3 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, see . */ /* vim: set ts=8 sw=4 et : */ tardy-1.28/etc/template/sh 644 0 0 142012163037023 137570ustar PeterMiller#!/bin/sh # # ${project trunk_name} - ${project trunk_description} # Copyright (C) ${date %Y} ${copyright-owner} # # 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 3 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, see . # exit 0 # vim: set ts=8 sw=4 et : tardy-1.28/etc/template/test 644 0 0 224412163037023 143310ustar PeterMiller#!/bin/sh # # ${project trunk_name} - ${project trunk_description} # Copyright (C) ${date %Y} ${copyright-owner} # # 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 3 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, see . # TEST_SUBJECT="fill me in" . test_prelude cat > test.ok << 'fubar' eek fubar if test $$? -ne 0 ; then no_result; fi # run the command tardy -fill_me_in > test.out if test $$? -ne 0 ; then fail; fi # make sure we get the expected results diff test.ok test.out || fail # # Only definite negatives are possible. # The functionality exercised by this test appears to work, # no other guarantees are made. # pass # vim: set ts=8 sw=4 et : tardy-1.28/etc/txt2c.awk 644 0 0 246712163037023 133730ustar PeterMiller# # tardy - a tar post-processor # Copyright (C) 1996, 1999, 2000, 2008 Peter Miller # # 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 3 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, see # . # # This could be done much more simply using GNU awk's gsub function, but # we can't expect the installing site to have already installed it. # So, do it the slow way. # /^['.]\\"/ { next } { len = length($0) result = "" for (j = 1; j <= len; ++j) { c = substr($0, j, 1) if (c == "\\") c = "\\\\" else if (c == "\"") c = "\\\"" result = result c } print "\"" result "\"," } tardy-1.28/etc/version.so 644 0 0 23712163037023 136240ustar PeterMiller.ds V) 1.28.D001 .ds v) 1.28 .ds Y) 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2008, 2009, 2010, 2011, 2012, 2013 .ds W 1.28.D001 tardy-1.28/install-sh 755 0 0 3325612163037023 130740ustar PeterMiller#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-01-19.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # 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. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for `test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # 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 $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: tardy-1.28/libtardy/ac/assert.h 644 0 0 164212163037023 147110ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_AC_ASSERT_H #define LIBTARDY_AC_ASSERT_H #include #undef NDEBUG #ifndef DEBUG #define NDEBUG #endif #include #endif // LIBTARDY_AC_ASSERT_H tardy-1.28/libtardy/ac/bzlib.cc 644 0 0 354312163037023 146520ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include #ifndef HAVE_BZ2_STRERROR const char * BZ2_strerror(int n) { switch (n) { case BZ_OK: return "OK"; case BZ_RUN_OK: return "RUN_OK"; case BZ_FLUSH_OK: return "FLUSH_OK"; case BZ_FINISH_OK: return "FINISH_OK"; case BZ_STREAM_END: return "STREAM_END"; case BZ_SEQUENCE_ERROR: return "Sequence error"; case BZ_PARAM_ERROR: return "Parameter error"; case BZ_MEM_ERROR: return "Memory allocation error"; case BZ_DATA_ERROR: return "Data error"; case BZ_DATA_ERROR_MAGIC: return "Wrong magic number"; case BZ_IO_ERROR: // Maybe we should call strerror(errno) in this case? // However, not all instances of BZ2_IO_ERROR being used have a // 1:1 correlation with errno being set. return "I/O error"; case BZ_UNEXPECTED_EOF: return "Unexpected end-of-file"; case BZ_OUTBUFF_FULL: return "Output buffer full"; case BZ_CONFIG_ERROR: return "Configuration error"; } return "Unknown error"; } // vim: set ts=8 sw=4 et : #endif tardy-1.28/libtardy/ac/bzlib.h 644 0 0 203312163037023 145050ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_AC_BZLIB_H #define LIBTARDY_AC_BZLIB_H #include #ifdef HAVE_BZLIB_H #include #else #error "You must have libbz2 installed in order to build Tardy." #endif #ifndef HAVE_BZ2_STRERROR const char *BZ2_strerror(int n); #endif // vim: set ts=8 sw=4 et : #endif // LIBTARDY_AC_BZLIB_H tardy-1.28/libtardy/ac/ctype.h 644 0 0 155512163037023 145370ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_AC_CTYPE_H #define LIBTARDY_AC_CTYPE_H #include #include #endif // LIBTARDY_AC_CTYPE_H tardy-1.28/libtardy/ac/dirent.h 644 0 0 250512163037023 146740ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1994, 1995, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_AC_DIRENT_H #define LIBTARDY_AC_DIRENT_H #include // unistd.h defines _POSIX_VERSION on POSIX.1 systems. #if defined(DIRENT) || defined(_POSIX_VERSION) #include #define NLENGTH(dirent) (strlen((dirent)->d_name)) #else // not (DIRENT or _POSIX_VERSION) #define dirent direct #define NLENGTH(dirent) ((dirent)->d_namlen) #ifdef SYSNDIR #include #endif // SYSNDIR #ifdef SYSDIR #include #endif // SYSDIR #ifdef NDIR #include #endif // NDIR #endif // not (DIRENT or _POSIX_VERSION) #endif // LIBTARDY_AC_DIRENT_H tardy-1.28/libtardy/ac/errno.h 644 0 0 155412163037023 145370ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2001, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_AC_ERRNO_H #define LIBTARDY_AC_ERRNO_H #include #include #endif // LIBTARDY_AC_ERRNO_H tardy-1.28/libtardy/ac/fcntl.h 644 0 0 164412163037023 145200ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_AC_FCNTL_H #define LIBTARDY_AC_FCNTL_H #include #ifdef HAVE_FCNTL_H #include #else #include #endif #endif // LIBTARDY_AC_FCNTL_H tardy-1.28/libtardy/ac/grp.h 644 0 0 166612163037023 142060ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2003, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_AC_GRP_H #define LIBTARDY_AC_GRP_H #include // need for grp.h on OSF/1 #include // need for grp.h on FreeBSD #include #endif // LIBTARDY_AC_GRP_H tardy-1.28/libtardy/ac/limits.h 644 0 0 336712163037023 147170ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1994, 1995, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_AC_LIMITS_H #define LIBTARDY_AC_LIMITS_H #include #ifdef HAVE_LIMITS_H #include #else // // fake a few of the values // (the *_MIN things only work on 2s compliment machines, // the *SHRT* things do not work on non-compliant compilers) // #ifndef USHRT_MAX #define USHRT_MAX ((unsigned short)~(unsigned)0) #endif #ifndef SHRT_MAX #define SHRT_MAX ((short)(USHRT_MAX >> 1)) #endif #ifndef SHRT_MIN #define SHRT_MIN ((short)(~(unsigned short)SHRT_MAX)) #endif #ifndef UINT_MAX #define UINT_MAX (~(unsigned)0) #endif #ifndef INT_MAX #define INT_MAX ((int)(UINT_MAX >> 1)) #endif #ifndef INT_MIN #define INT_MIN ((int)(~(unsigned)INT_MAX)) #endif #ifndef ULONG_MAX #define ULONG_MAX (~(unsigned long)0) #endif #ifndef LONG_MAX #define LONG_MAX ((long)(ULONG_MAX >> 1)) #endif #ifndef LONG_MIN #define LONG_MIN ((long)(~(unsigned long)LONG_MAX)) #endif #endif // !HAVE_LIMITS_H #endif // LIBTARDY_AC_LIMITS_H tardy-1.28/libtardy/ac/lzma.cc 644 0 0 401212163037023 145030ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include #include const char * lzma_strerror(int x) { switch (x) { case LZMA_OK: return "success (LZMA_OK)"; case LZMA_STREAM_END: return "End of stream was reached (LZMA_STREAM_END)"; case LZMA_NO_CHECK: return "Input stream has no integrity check (LZMA_NO_CHECK)"; case LZMA_UNSUPPORTED_CHECK: return "Cannot calculate the integrity check (LZMA_UNSUPPORTED_CHECK)"; case LZMA_GET_CHECK: return "Integrity check type is now available (LZMA_GET_CHECK)"; case LZMA_MEM_ERROR: return "Cannot allocate memory (LZMA_MEM_ERROR)"; case LZMA_MEMLIMIT_ERROR: return "Memory usage limit was reached (LZMA_MEMLIMIT_ERROR)"; case LZMA_FORMAT_ERROR: return "File format not recognized (LZMA_FORMAT_ERROR)"; case LZMA_OPTIONS_ERROR: return "Invalid or unsupported options (LZMA_OPTIONS_ERROR)"; case LZMA_DATA_ERROR: return "Data is corrupt (LZMA_DATA_ERROR)"; case LZMA_BUF_ERROR: return "No progress is possible (LZMA_BUF_ERROR)"; case LZMA_PROG_ERROR: return "Programming error (LZMA_PROG_ERROR)"; } static char buf[30]; snprintf(buf, sizeof(buf), "Unknown lzma error (%d)", x); return buf; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/ac/lzma.h 644 0 0 162212163037023 143510ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_AC_LZMA_H #define LIBTARDY_AC_LZMA_H #include #include const char *lzma_strerror(int); // vim: set ts=8 sw=4 et : #endif // LIBTARDY_AC_LZMA_H tardy-1.28/libtardy/ac/pwd.h 644 0 0 163212163037023 142010ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2003, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_AC_PWD_H #define LIBTARDY_AC_PWD_H #include // for OSF/1 #include // for FreeBSD #include #endif // LIBTARDY_AC_PWD_H tardy-1.28/libtardy/ac/stdarg.h 644 0 0 160012163037023 146660ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1992-1995, 1999, 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_AC_STDARG_H #define LIBTARDY_AC_STDARG_H #include #include #endif // LIBTARDY_AC_STDARG_H tardy-1.28/libtardy/ac/stddef.h 644 0 0 176712163037023 146710ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1994, 1995, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_AC_STDDEF_H #define LIBTARDY_AC_STDDEF_H #include #ifdef HAVE_STDDEF_H #include #endif #ifndef offsetof #define offsetof(a, b) ((size_t)((char *)&((a *)0)->b - (char *)0)) #endif #endif // LIBTARDY_AC_STDDEF_H tardy-1.28/libtardy/ac/stdio.cc 644 0 0 231112163037023 146620ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2002, 2008, 2009 Peter Miller // // 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 3 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, see // . // #include #include #ifndef HAVE_VSNPRINTF int vsnprintf(char *buffer, size_t, const char *fmt, va_list ap) { return vsprintf(buffer, fmt, ap); } #endif #ifndef HAVE_SNPRINTF int snprintf(char *buffer, size_t bufsize, const char *fmt, ...) { va_liat ap; va_start(ap, fmt); int n = vsnprintf(buffer, bufsize, fmt, ap); va_end(ap); return n; } #endif tardy-1.28/libtardy/ac/stdio.h 644 0 0 241412163037023 145300ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_AC_STDIO_H #define LIBTARDY_AC_STDIO_H // // Need to define _POSIX_SOURCE on Linux, in order to get the fdopen, // fileno, popen and pclose function prototypes. // // Need to define _GNU_SOURCE on Linux, in order to get snprintf. // #ifdef __linux__ #ifndef _POSIX_SOURCE #define _POSIX_SOURCE 1 #endif #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #endif #include // // Ancient pre-ANSI-C systems (e.g. SunOS 4.1.2) fail to define this. // #ifndef SEEK_SET #define SEEK_SET 0 #endif #endif // LIBTARDY_AC_STDIO_H tardy-1.28/libtardy/ac/stdlib.h 644 0 0 163112163037023 146670ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1994, 1995, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_AC_STDLIB_H #define LIBTARDY_AC_STDLIB_H #include #ifdef HAVE_STDLIB_H #include #endif #endif // LIBTARDY_AC_STDLIB_H tardy-1.28/libtardy/ac/string.cc 644 0 0 624512163037023 150600ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1993-1999, 2001, 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see // . // #include #include #include #include // // NAME // strerror - string for error number // // SYNOPSIS // char *strerror(int errnum); // // DESCRIPTION // The strerror function maps the error number in errnum to an error // message string. // // RETURNS // The strerror function returns a pointer to the string, the contents of // which are implementation-defined. The array pointed to shall not be // modified by the program, but may be overwritten by a subsequent call to // the strerror function. // // CAVEAT // Unknown errors will be rendered in the form "Error %d", where %d will // be replaced by a decimal representation of the error number. // #ifndef HAVE_STRERROR char * strerror(in n) { extern int sys_nerr; if (n < 1 || n > sys_nerr) { static char buffer[16]; snprintf(buffer, sizeof(buffer), "Error %d", n); return buffer; } extern char *sys_errlist[]; return sys_errlist[n]; } #endif // HAVE_STRERROR #ifndef HAVE_STRVERSCMP int strverscmp(const char *lhs, const char *rhs) { return strcmp(lhs, rhs); } #endif // HAVE_STRVERSCMP #ifndef HAVE_MEMMEM void * memmem(const void *haystack_v, size_t haystack_size, const void *needle_v, size_t needle_size) { if (!haystack_size) return 0; if (!needle_size) return (void *)haystack_v; if (needle_size > haystack_size) return 0; if (needle_size == haystack_size) { if (0 == memcmp(haystack_v, needle_v, needle_size)) return (void *)haystack_v; return 0; } const unsigned char *needle = (const unsigned char *)needle_v; if (needle_size == 1) return (void *)memchr(haystack_v, needle[0], haystack_size); const unsigned char *haystack = (const unsigned char *)haystack_v; const unsigned char *haystack_end = haystack + haystack_size - needle_size + 1; while (haystack < haystack_end) { const unsigned char *first = (const unsigned char *) memchr(haystack, needle[0], haystack_end - haystack); if (!first) break; if (0 == memcmp(first + 1, needle + 1, needle_size - 1)) return (void *)first; haystack = first + 1; } return 0; } #endif // HAVE_MEMMEM tardy-1.28/libtardy/ac/string.h 644 0 0 264512163037023 147220ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1994, 1995, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_AC_STRING_H #define LIBTARDY_AC_STRING_H #include #if STDC_HEADERS || HAVE_STRING_H # include // An ANSI string.h and pre-ANSI memory.h might conflict. # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif #else // memory.h and strings.h conflict on some systems. # include #endif #if !HAVE_DECL_STRCASECMP int strcasecmp(const char *, const char *); #endif #if !HAVE_DECL_STRVERSCMP int strverscmp(const char *lhs, const char *rhs); #endif #if !HAVE_DECL_MEMMEM void *memmem(const void *haystack, size_t haystack_size, const void *needle, size_t needle_size); #endif #endif // LIBTARDY_AC_STRING_H tardy-1.28/libtardy/ac/sys/param.h 644 0 0 161212163037023 153230ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_AC_SYS_PARAM_H #define LIBTARDY_AC_SYS_PARAM_H #include #ifdef HAVE_SYS_PARAM_H #include #endif #endif // LIBTARDY_AC_SYS_PARAM_H tardy-1.28/libtardy/ac/sys/resource.h 644 0 0 166412163037023 160610ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_AC_SYS_RESOURCE_H #define LIBTARDY_AC_SYS_RESOURCE_H #include #ifdef HAVE_SYS_RESOURCE_H #include #endif // vim: set ts=8 sw=4 et : #endif // LIBTARDY_AC_SYS_RESOURCE_H tardy-1.28/libtardy/ac/sys/stat.h 644 0 0 162012163037023 151750ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2004, 2008-2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_AC_SYS_STAT_H #define LIBTARDY_AC_SYS_STAT_H #include #ifdef HAVE_SYS_STAT_H #include #endif #endif // LIBTARDY_AC_SYS_STAT_H tardy-1.28/libtardy/ac/sys/sysmacros.h 644 0 0 165112163037023 162510ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2004, 2008-2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_AC_SYS_SYSMACROS_H #define LIBTARDY_AC_SYS_SYSMACROS_H #include #ifdef HAVE_SYS_SYSMACROS_H #include #endif #endif // LIBTARDY_AC_SYS_SYSMACROS_H tardy-1.28/libtardy/ac/sys/types.h 644 0 0 162512163037023 153730ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2004, 2008-2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_AC_SYS_TYPES_H #define LIBTARDY_AC_SYS_TYPES_H #include #ifdef HAVE_SYS_TYPES_H #include #endif #endif // LIBTARDY_AC_SYS_TYPES_H tardy-1.28/libtardy/ac/termios.h 644 0 0 204112163037023 150640ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1994, 1995, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_AC_TERMIOS_H #define LIBTARDY_AC_TERMIOS_H #include #ifdef HAVE_winsize_SYS_IOCTL_H #include #else #ifdef HAVE_winsize_TERMIOS_H #include #endif // HAVE_winsize_TERMIOS_H #endif // !HAVE_winsize_SYS_IOCTL_H #endif // LIBTARDY_AC_TERMIOS_H tardy-1.28/libtardy/ac/time.h 644 0 0 177612163037023 143560ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1994, 1995, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_AC_TIME_H #define LIBTARDY_AC_TIME_H #include #ifdef TIME_WITH_SYS_TIME #include #include #else #ifdef HAVE_SYS_TIME_H #include #else #include #endif #endif #endif // LIBTARDY_AC_TIME_H tardy-1.28/libtardy/ac/unistd.h 644 0 0 166012163037023 147160ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1994, 1995, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_AC_UNISTD_H #define LIBTARDY_AC_UNISTD_H #include #ifdef HAVE_UNISTD_H #include #include #endif #endif // LIBTARDY_AC_UNISTD_H tardy-1.28/libtardy/ac/zlib.cc 644 0 0 265712163037023 145150ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2003, 2008, 2009 Peter Miller // // 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 3 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, see // . // #include #include #include const char * z_error(int err) { switch (err) { case Z_OK: return "no error"; case Z_STREAM_END: return "stream end"; case Z_NEED_DICT: return "need dict"; case Z_ERRNO: return strerror(errno); case Z_STREAM_ERROR: return "stream error"; case Z_DATA_ERROR: return "data error"; case Z_MEM_ERROR: return "memory error"; case Z_BUF_ERROR: return "buffer error"; case Z_VERSION_ERROR: return "version error"; } return "unknown zlib error"; } tardy-1.28/libtardy/ac/zlib.h 644 0 0 331712163037023 143510ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2003, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_AC_ZLIB_H #define LIBTARDY_AC_ZLIB_H #include #ifdef HAVE_ZLIB_H #include #else #error "You must have zlib installed in order to build Tardy." #endif // there is ERR_MSG in zutil.h, but we aren't allowed to see it. const char *z_error(int); #ifndef DEF_MEM_LEVEL #define DEF_MEM_LEVEL 8 // in zutil.h, but we aren't allowed to see it. #endif #ifndef Z_BUFSIZE # ifdef MAXSEG_64K # define Z_BUFSIZE 4096 // minimize memory usage for 16-bit DOS # else # define Z_BUFSIZE 16384 # endif #endif // gzip flag byte #define Z_FLAG_ASCII 0x01 // bit 0 set: file probably ascii text #define Z_FLAG_HEAD_CRC 0x02 // bit 1 set: header CRC present #define Z_FLAG_EXTRA_FIELD 0x04 // bit 2 set: extra field present #define Z_FLAG_ORIG_NAME 0x08 // bit 3 set: original file name present #define Z_FLAG_COMMENT 0x10 // bit 4 set: file comment present #define Z_FLAG_RESERVED 0xE0 // bits 5..7: reserved #endif // LIBTARDY_AC_ZLIB_H tardy-1.28/libtardy/arglex.cc 644 0 0 2275412163037023 144740ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1991-1999, 2002, 2004, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include #include #include #include #include #include #include arglex::~arglex() { } static arglex::table_t table[] = { { "-", arglex::token_stdio }, { "-Help", arglex::token_help }, { "-VERSion", arglex::token_version }, { "-TRace", arglex::token_trace }, }; arglex::arglex(int ac, char **av, const table_t *tp) : token(token_eoln), argc(ac - 1), argv(av + 1), utable(tp), partial(0), pushback(0) { explain_program_name_set(av[0]); explain_option_hanging_indent_set(4); } bool arglex::compare(const char *formal, const char *actual) { trace(("arglex_compare(formal = \"%s\", actual = \"%s\")\n{\n", formal, actual)); bool result = false; for (;;) { trace_string(formal); trace_string(actual); char ac = *actual++; if (isupper(ac)) ac = tolower(ac); char fc = *formal++; switch (fc) { case 0: result = !ac; goto done; case '_': if (ac == '-') break; // fall through... case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': // // optional characters // if (ac == fc && compare(formal, actual)) { result = true; goto done; } // // skip forward to next // mandatory character, or after '_' // while (islower(*formal)) ++formal; if (*formal == '_') { ++formal; if (ac == '_' || ac == '-') ++actual; } --actual; break; case '*': // // This is a hack, it should really // check for a match match the stuff after // the '*', too, a la glob. // if (!ac) { result = false; goto done; } partial = actual - 1; result = true; goto done; case '\\': if (actual[-1] != *formal++) { result = false; goto done; } break; case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': fc = tolower(fc); // fall through... default: // // mandatory characters // if (fc != ac) { result = false; goto done; } break; } } done: trace(("return %s;\n}\n", (result ? "true" : "false"))); return result; } bool arglex::is_a_number(const char *s) { char *ep = 0; long n = strtol(s, &ep, 0); if (ep == s || *ep) return false; value.number = n; return true; } arglex::token_t arglex::lex(void) { trace(("arglex()\n{\n")); const char *arg = 0; if (pushback) { // // the second half of a "-foo=bar" style argument. // arg = pushback; pushback = 0; } else { if (argc <= 0) { token = token_eoln; static char empty[1]; arg = empty; goto done; } arg = argv[0]; argc--; argv++; // // See if it looks like a GNU "-foo=bar" option. // Split it at the '=' to make it something the // rest of the code understands. // if (arg[0] == '-' && arg[1] != '=') { char *eqp = (char *)strchr(arg, '='); if (eqp) { pushback = eqp + 1; *eqp = 0; } } // // Turn the GNU-style leading "--" // into "-" if necessary. // if ( arg[0] == '-' && arg[1] == '-' && arg[2] && !is_a_number(arg + 1) ) ++arg; } // // see if it is a number // if (is_a_number(arg)) { token = token_number; goto done; } // // scan the tables to see what it matches // { const table_t *hit[20]; int nhit = 0; partial = 0; for (const table_t *tp = table; tp < ENDOF(table); tp++) { if (compare(tp->name, arg)) hit[nhit++] = tp; } if (utable) { for (const table_t *tp = utable; tp->name; tp++) { if (compare(tp->name, arg)) hit[nhit++] = tp; } } // // deal with unknown or ambiguous options // switch (nhit) { case 0: // // not found in the tables // if (*arg == '-') token = token_option; else token = token_string; break; case 1: one: token = hit[0]->token; if (partial) arg = partial; else arg = hit[0]->name; break; default: { // // not an error if they are all the same // e.g. due to cultural spelling differences // with the same abbreviation. // int j = 1; for (j = 1; j < nhit; ++j) if (hit[0]->token != hit[j]->token) break; if (j >= nhit) goto one; // // build a list of the names // and complain that it is ambiguous // rcstring s(hit[0]->name); for (j = 1; j < nhit; ++j) { s = s + ", " + hit[j]->name; } explain_output_error_and_die ( "option %s abmiguous (%s)", rcstring(arg).quote_c().c_str(), s.c_str() ); } } } // // here for all exits // done: value.string = arg; trace(("return %d; /* %s */\n", token, value.string)); trace(("}\n")); return token; } void arglex::help_f(const char **text, size_t text_len) { // // collect the rest of thge command line, // if necessary // trace(("help(text = %p, text_len = %d, usage = %p)\n{\n", text, text_len, usage)); lex(); while (token != token_eoln) generic_argument(); roff().interpret(text, text_len); trace(("}\n")); } void arglex::generic_argument(void) { trace(("generic_argument()\n{\n")); switch (token) { default: bad_argument(); // NOTREACHED case token_trace: if (lex() != token_string) usage(); for (;;) { trace_enable(value.string); if (lex() != token_string) break; } #ifndef DEBUG explain_output_error ( "Warning: the -TRace option is only effective when the %s program \ is compiled using the DEBUG define in the common/main.h include file.", explain_program_name_get() ); #endif break; } trace(("}\n")); } void arglex::bad_argument(void) { trace(("bad_argument()\n{\n")); switch (token) { case token_string: explain_output_error("misplaced file name (\"%s\")", value.string); break; case token_number: explain_output_error("misplaced number (%s)", value.string); break; case token_option: explain_output_error("unknown \"%s\" option", value.string); break; case token_eoln: explain_output_error("command line too short"); break; default: explain_output_error("misplaced \"%s\" option", value.string); break; } usage(); trace(("}\n")); exit(EXIT_FAILURE); // NOTREACHED } tardy-1.28/libtardy/arglex.h 644 0 0 1405212163037023 143260ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1991-1993, 1995, 1998, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_ARGLEX_H #define LIBTARDY_ARGLEX_H #include /** * The arglex class represemts the processing necessary to perform * lexical analysis on command line arguments. */ class arglex { public: /** * The destructor. */ virtual ~arglex(); enum { token_eoln = -20, token_help, token_number, token_option, token_stdio, token_string, token_trace, token_version }; typedef int token_t; /** * The table_t struct is used to hold mapping tables, from strings * to token numbers. */ struct table_t { const char *name; int token; }; /** * The lex method is used to perfom lexical analysis on the command * line arguments. * * Unrecognised options are returned as arglex_token_option for * anything starting with a '-', or arglex_token_string otherwise. * * @returns * The next token in the token stream. When the end is * reached, arglex::token_eoln is returned forever. */ token_t lex(void); /** * The compare method is used to compare a command line * string with a formal spec of the option, to see if they compare * equal. * * The actual is case-insensitive. Uppercase in the formal means * a mandatory character, while lower case means optional. Any * number of consecutive optional characters may be supplied by * actual, but none may be skipped, unless all are skipped to the * next non-lower-case letter. * * The underscore (_) is like a lower-case minus, it matches "", * "-" and "_". * * The "*" in a pattern matches everything to the end of the * argument, anything after the "*" is ignored. The rest of * the argument is pointed to by the "partial" variable as a * side-effect (else it will be 0). This rather ugly feature is to * support "-I./dir" type options. * * A backslash in a pattern nominates an exact match required, * case must match excatly here. This rather ugly feature is to * support "-I./dir" type options. * * For example: "-project" and "-P' both match "-Project", as does * "-proJ", but "-prj" does not. * * For example: "-devDir" and "-d_d' both match * "-Development_Directory", but "-dvlpmnt_drctry" does not. * * For example: to match include path specifications, use a pattern * such as "-\\I*", and the partial global variable will have the * path in it on return. * * The gnu --arg=value convention is understood. In essence, the * extra minus character is discarded. * * @param formal * The pattern to match against. * @param actual * The candidate string to be matched. * @returns * true if the actual string matchs the formal pattern */ bool compare(const char *formal, const char *actual); virtual void usage(void) const = 0; virtual void help(void) = 0; void version(void); token_t get_token(void) const { return token; } long get_value_number(void) const { return value.number; } const char *get_value_string(void) const { return value.string; } protected: /** * The constructor. * Only for use by derived classes. * * @param ac * argument count, from main * @param av * argument values, from main * @param tp * pointer to table of options */ arglex(int ac, char **av, const table_t *tp); void help_f(const char **text, size_t text_size); private: /** * The value_t struct is used to hold the value associated with a token. */ struct value_t { const char *string; long number; value_t() : string(0), number(0) { } }; token_t token; value_t value; int argc; char **argv; const table_t *utable; const char *partial; const char *pushback; /** * The is_a_number function is used to determine if the argument is * a number. * * The value is placed in arglex::value.number as a side effect. * * Negative and positive signs are accepted. The C conventions for * decimal, octal and hexadecimal are understood. * * There may be no white space anywhere in the string, and the * string must end after the last digit. Trailing garbage will be * interpreted to mean it is not a string. * * @param text * string to be tested and evaluated * @returns * bool; false if not a number, true if is a number. */ bool is_a_number(const char *text); void generic_argument(void); void bad_argument(void); void version_main(void); void version_help(void); /** * The default constructor. Do not use. */ arglex(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ arglex(const arglex &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ arglex &operator=(const arglex &rhs); }; #endif // LIBTARDY_ARGLEX_H tardy-1.28/libtardy/cannonical.cc 644 0 0 655512163037023 153000ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2008, 2009, 2011, 2012 Peter Miller // // 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 3 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, see . // #include #include rcstring cannonicalize(const rcstring &in) { rcstring out; rcstring path_text; const char *path_pos = in.c_str(); enum path_token_ty { path_dot, path_slash, path_name, path_end }; path_token_ty path_token; int state = 0; while (state >= 0) { // // figure the next token in the path // switch (*path_pos) { case 0: path_text = ""; path_token = path_end; break; case '/': ++path_pos; while (*path_pos == '/') ++path_pos; path_text = "/"; path_token = path_slash; break; default: const char *cp = path_pos; for (;;) { ++path_pos; if (!*path_pos || *path_pos == '/') break; } path_text = rcstring(cp, path_pos - cp); static rcstring dot("."); if (path_text == dot) path_token = path_dot; else path_token = path_name; break; } // // do something with the token // switch (path_token) { case path_dot: switch (state) { case 0: case 2: ++state; break; default: assert(0); state = -1; break; } break; case path_name: switch (state) { case 0: out += path_text; state = 4; break; case 2: out += "/"; out += path_text; state = 4; break; default: assert(0); state = -1; break; } break; case path_slash: switch (state) { case 0: case 3: case 4: state = 2; break; case 1: state = 0; break; default: assert(0); state = -1; break; } break; case path_end: switch (state) { case 0: case 1: out += "."; break; } state = -1; break; } } return out; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/cannonical.h 644 0 0 163012163037023 151270ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_CANNONICAL_H #define LIBTARDY_CANNONICAL_H #include rcstring cannonicalize(const rcstring &); #endif // LIBTARDY_CANNONICAL_H tardy-1.28/libtardy/config.h.in 644 0 0 1472412163037023 147240ustar PeterMiller/* libtardy/config.h.in. Generated from etc/configure.ac by autoheader. */ /* * tardy - tar postprocessor * Copyright (C) 1994-2003, 2008, 2009, 2011, 2012 Peter Miller * * 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 3 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, see * . */ #ifndef COMMON_CONFIG_H #define COMMON_CONFIG_H /* Set this to be the absolute path of a Bourne shell which understands functions. */ #undef CONF_SHELL /* Set this to a suitable argument for the getpgrp function to discover the process group of the current process. */ #undef CONF_getpgrp_arg /* Define to 1 if you have the `BZ2_strerror' function. */ #undef HAVE_BZ2_STRERROR /* Define to 1 if you have the header file. */ #undef HAVE_BZLIB_H /* Define to 1 if you have the declaration of `memmem', and to 0 if you don't. */ #undef HAVE_DECL_MEMMEM /* Define to 1 if you have the declaration of `strcasecmp', and to 0 if you don't. */ #undef HAVE_DECL_STRCASECMP /* Define to 1 if you have the declaration of `strverscmp', and to 0 if you don't. */ #undef HAVE_DECL_STRVERSCMP /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `getpgrp' function. */ #undef HAVE_GETPGRP /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `bz2' library (-lbz2). */ #undef HAVE_LIBBZ2 /* Define to 1 if you have the `explain' library (-lexplain). */ #undef HAVE_LIBEXPLAIN /* Define to 1 if you have the `lzma' library (-llzma). */ #undef HAVE_LIBLZMA /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Define to 1 if you have the `z' library (-lz). */ #undef HAVE_LIBZ /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you support file names longer than 14 characters. */ #undef HAVE_LONG_FILE_NAMES /* Define to 1 if you have the `memmem' function. */ #undef HAVE_MEMMEM /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* Define this symbol of your system has AND it works. */ #undef HAVE_STDARG_H /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the `strftime' function. */ #undef HAVE_STRFTIME /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strverscmp' function. */ #undef HAVE_STRVERSCMP /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_RESOURCE_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SYSMACROS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the `tcgetpgrp' function. */ #undef HAVE_TCGETPGRP /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF /* Define to 1 if you have the header file. */ #undef HAVE_ZLIB_H /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `unsigned int' if does not define. */ #undef size_t #endif /* COMMON_CONFIG_H */ tardy-1.28/libtardy/endian.cc 644 0 0 637412163037023 144300ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include const char * endian_name(endian_t value) { return (value == endian_little ? "little-endian" : "big-endian"); } unsigned endian_get2(const void *data, endian_t endian) { if (endian == endian_little) return endian_get2le(data); else return endian_get2be(data); } unsigned endian_get2le(const void *data) { const unsigned char *p = (const unsigned char *)data; return (p[0] | (p[1] << 8)); } unsigned endian_get2be(const void *data) { const unsigned char *p = (const unsigned char *)data; return ((p[0] << 8) | p[1]); } void endian_set2(void *data, unsigned value, endian_t endian) { if (endian == endian_little) endian_set2le(data, value); else endian_set2be(data, value); } void endian_set2le(void *data, unsigned value) { unsigned char *p = (unsigned char *)data; p[0] = value; p[1] = value >> 8; } void endian_set2be(void *data, unsigned value) { unsigned char *p = (unsigned char *)data; p[0] = value >> 8; p[1] = value; } endian_t endian_native(void) { union u { char c[2]; short s; } u; u.s = 1; return (u.c[0] == 1 ? endian_little : endian_big); } unsigned long endian_get4(const void *data, endian_t endian) { if (endian == endian_little) return endian_get4le(data); else return endian_get4be(data); } unsigned long endian_get4le(const void *data) { const unsigned char *p = (const unsigned char *)data; return ( (unsigned long)p[0] | ((unsigned long)p[1] << 8) | ((unsigned long)p[2] << 16) | ((unsigned long)p[3] << 24) ); } unsigned long endian_get4be(const void *data) { const unsigned char *p = (const unsigned char *)data; return ( ((unsigned long)p[0] << 24) | ((unsigned long)p[1] << 16) | ((unsigned long)p[2] << 8) | (unsigned long)p[3] ); } void endian_set4(void *data, unsigned long value, endian_t endian) { if (endian == endian_little) endian_set4le(data, value); else endian_set4be(data, value); } void endian_set4le(void *data, unsigned long value) { unsigned char *p = (unsigned char *)data; p[0] = value; p[1] = value >> 8; p[2] = value >> 16; p[3] = value >> 24; } void endian_set4be(void *data, unsigned long value) { unsigned char *p = (unsigned char *)data; p[0] = value >> 24; p[1] = value >> 16; p[2] = value >> 8; p[3] = value; } tardy-1.28/libtardy/endian.h 644 0 0 1202312163037023 142760ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_ENDIAN_H #define LIBTARDY_ENDIAN_H /** * The endian_t type is used to represent a byte ordering. */ enum endian_t { /** * Least significant byte first. */ endian_little, /** * Most significant byte first. */ endian_big }; /** * The endian_name function may be used to obtain a human-readable name * from a byte ordering value. */ const char *endian_name(endian_t value); /** * The endian_native function i sused to obtain the byte order of the * host executing this program. */ endian_t endian_native(void); /** * The endian_get2 function is used to decode two bytes of binary into * a 16-bit value, using the byte order given. * * @param data * Pointer to the base of an array of two bytes to be decoded. * @param endian * The byte order to be used. */ unsigned endian_get2(const void *data, endian_t endian); /** * The endian_get2le function is used to decode two bytes of binary * into a 16-bit value, using little-endian byte order. * * @param data * Pointer to the base of an array of two bytes to be decoded. */ unsigned endian_get2le(const void *data); /** * The endian_get2be function is used to decode two bytes of binary * into a 16-bit value, using big-endian byte order. * * @param data * Pointer to the base of an array of two bytes to be decoded. */ unsigned endian_get2be(const void *data); /** * The endian_set2 function is used to encode 16-bit value into two * bytes of binary, using the byte order given. * * @param data * Pointer to the base of an array of two bytes to be encoded. * @param value * The value to be encoded. * @param endian * The byte order to be used. */ void endian_set2(void *data, unsigned value, endian_t endian); /** * The endian_set2le function is used to encode 16-bit value into two * bytes of binary, using the little-endian byte order. * * @param data * Pointer to the base of an array of two bytes to be encoded. * @param value * The value to be encoded. */ void endian_set2le(void *data, unsigned value); /** * The endian_set2be function is used to encode 16-bit value into two * bytes of binary, using the big-endian byte order. * * @param data * Pointer to the base of an array of two bytes to be encoded. * @param value * The value to be encoded. */ void endian_set2be(void *data, unsigned value); /** * The endian_get4 function is used to decode four bytes of binary into * a 32-bit value, using the byte order given. * * @param data * Pointer to the base of an array of four bytes to be decoded. * @param endian * The byte order to be used. */ unsigned long endian_get4(const void *data, endian_t endian); /** * The endian_get4le function is used to decode four bytes of binary * into a 32-bit value, using little-endian byte order. * * @param data * Pointer to the base of an array of four bytes to be decoded. */ unsigned long endian_get4le(const void *data); /** * The endian_get4be function is used to decode four bytes of binary * into a 32-bit value, using big-endian byte order. * * @param data * Pointer to the base of an array of four bytes to be decoded. */ unsigned long endian_get4be(const void *data); /** * The endian_set4 function is used to encode 32-bit value into four * bytes of binary, using the byte order given. * * @param data * Pointer to the base of an array of four bytes to be encoded. * @param value * The value to be encoded. * @param endian * The byte order to be used. */ void endian_set4(void *data, unsigned long value, endian_t endian); /** * The endian_set4le function is used to encode 32-bit value into four * bytes of binary, using little-endian byte order. * * @param data * Pointer to the base of an array of four bytes to be encoded. * @param value * The value to be encoded. */ void endian_set4le(void *data, unsigned long value); /** * The endian_set4le function is used to encode 32-bit value into four * bytes of binary, using big-endian byte order. * * @param data * Pointer to the base of an array of four bytes to be encoded. * @param value * The value to be encoded. */ void endian_set4be(void *data, unsigned long value); #endif // LIBTARDY_ENDIAN_H tardy-1.28/libtardy/file/input.cc 644 0 0 1066512163037023 152660ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998-2002, 2004, 2008, 2009, 2011, 2012 Peter Miller // // 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 3 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, see . // #include #include #include #include #include #include file_input::~file_input() { assert(valid()); delete [] read_ahead_buffer; } file_input::file_input() : read_ahead_buffer(0), read_ahead_size(0), read_ahead_pos(0) { assert(valid()); } void file_input::fatal(const char *fmt, ...) const { va_list ap; va_start(ap, fmt); char buffer[2000]; vsnprintf(buffer, sizeof(buffer), fmt, ap); va_end(ap); explain_output_error_and_die("%s: %s", filename().c_str(), buffer); } bool file_input::valid(void) const { if (!read_ahead_buffer) { return (read_ahead_pos == 0 && read_ahead_size == 0); } else { return (read_ahead_size > 0 && read_ahead_pos <= read_ahead_size); } } size_t file_input::read(void *data, size_t data_size) { assert(valid()); int return_value = 0; if (!read_ahead_empty()) { size_t nbytes = read_ahead_size - read_ahead_pos; if (nbytes > data_size) nbytes = data_size; memcpy(data, read_ahead_buffer + read_ahead_pos, nbytes); read_ahead_pos += nbytes; return_value += nbytes; data = (void *)((char *)data + nbytes); data_size -= nbytes; assert(valid()); } if (data_size > 0) return_value += read_inner(data, data_size); assert(valid()); return return_value; } void file_input::unread(const void *data, size_t data_size) { assert(valid()); // This is tricky: data is unread *backwards* so we have to put // the data at the *front* of the buffer. if (data_size > read_ahead_pos) { size_t new_size = (read_ahead_size ? read_ahead_size * 2 : 1024); while (new_size < data_size) new_size *= 2; char *new_buffer = new char [new_size]; size_t sz = read_ahead_size - read_ahead_pos; assert(sz <= new_size); size_t new_pos = new_size - sz; memcpy(new_buffer + new_pos, read_ahead_buffer + read_ahead_pos, sz); delete [] read_ahead_buffer; read_ahead_buffer = new_buffer; read_ahead_size = new_size; read_ahead_pos = new_pos; assert(valid()); } read_ahead_pos -= data_size; memcpy(read_ahead_buffer + read_ahead_pos, data, data_size); assert(valid()); } size_t file_input::peek(void *data, size_t data_size) { int nbytes = read(data, data_size); unread(data, nbytes); return nbytes; } void file_input::skip(off_t nbytes) { off_t tot = 0; while (nbytes > 0) { char dummy[512]; size_t n = nbytes; if (n > sizeof(dummy)) n = sizeof(dummy); size_t n2 = read(dummy, n); if (n != n2) { if (sizeof(off_t) > sizeof(long)) { fatal ( "short padding read (requested %llu, got %llu)", (unsigned long long)(tot + n), (unsigned long long)(tot + n2) ); } else { fatal ( "short padding read (requested %lu, got %lu)", (unsigned long)(tot + n), (unsigned long)(tot + n2) ); } } nbytes -= n; tot += n; } } off_t file_input::get_position(void) const { size_t read_ahead_available = read_ahead_size - read_ahead_pos; off_t pos = get_position_inner(); assert(pos >= (off_t)read_ahead_available); return (pos - read_ahead_available); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/input.h 644 0 0 1557112163037023 151310ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2004, 2008, 2009, 2011-2013 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_FILE_INPUT_H #define LIBTARDY_FILE_INPUT_H #include #include #include /** * The file_input class represents an abstract base class for input * data sources. It shall be derived from before it can be used. */ class file_input { public: typedef boost::shared_ptr pointer; /** * The destructor. */ virtual ~file_input(); /** * The factory method is used to create a new file_input instance, * based on the file name. * * @param filename * The name of the file to open for writing. If the NULL * pointer is upplied, or the empty string is upplied, or the * special name "-" is upplied, it will read from the standard * input; otherwise, it will read from the named file. */ static pointer factory(const char *filename); /** * The fatal method is used to report fatal errors occurring when * operating on this output stream. The program name and the file * name are prepended. It exits with an exit status of one. It * does not return. * * @param fmt * The message format to print. See printf(3) for a * description of the format and its arguments. */ void fatal(const char *fmt, ...) const ATTR_PRINTF(2, 3); /** * The read method is used to read data from the file. It only * returns if there is no error. * * @param data * The location to write the data read from the file. * @param data_size * The maximum number of bytes read into the buffer from the file. * @returns * The number of bytes read into the buffer, or 0 for end of file. */ size_t read(void *data, size_t data_size); /** * The peek method is used to read data from the file, without * moving the file read position. It only returns if there is no * error, and the exact number of bytes were available. * * @param data * The location to write the data read from the file. * @param data_size * The number of bytes read into the buffer from the file. * @returns * The number of bytes read (and returned) */ size_t peek(void *data, size_t data_size); /** * The filename method is used to determine the name of the file. */ virtual rcstring filename(void) const = 0; /** * The unread method is used to "push back" unused input. * * @param data * The datat to be returned. * @param data_size * The amount of data to be returned, in bytes. * * @note * While you are at liberty to "return" bytes that weren't * actually read (although why you would lie to yourself like * that is a mystery) you shall not return more bytes than were * read, otherwise the value reported by the #get_position * method will be incorrect. */ void unread(const void *data, size_t data_size); /** * The skip method is used to discard input data. * * @param nbytes * The number of bytes of input data to discard. It will be an error * if the input does not contain at least this many bytes. */ void skip(off_t nbytes); /** * The get_position method may be used to obtain the current file * position, in bytes from the start of the file. Any "unread" * bytes will be taken into account. */ off_t get_position(void) const; protected: /** * The default constructor. * Only derived classes may use this constructor. */ file_input(); /** * The read_inner method is supplied by derived classes, to * implement the actual machinery of reading data. * * @param data * where to place sthe data read in. * @param data_size * the maximum number of bytes to read in. * @returns * The number of bytes read. Does not return if there is an * error (which is why return value is unsigned); */ virtual size_t read_inner(void *data, size_t data_size) = 0; /** * The get_position_inner method may be used to obtain the current * file position, in bytes from the start of the file. * * @returns * the current file read position. It may exceed 2GB which is * why we must use off_t (for example, tarballs of .avi files). */ virtual off_t get_position_inner(void) const = 0; private: /** * The read_ahead_buffer instance variable is used to remember the * dynamically allocated array for any read-ahead data that may * have been unread (or peek()ed) previously. */ char *read_ahead_buffer; /** * The read_ahead_size instance variable is used to remember * the size in bytes of the dynamically allocated array for any * read-ahead data. */ size_t read_ahead_size; /** * The read_ahead_pos instance variable is used to remember how * much of the read-ahead buffer has been used. The used data lies * between read_ahead_pos and read_ahead_size; that is, the array * is used from back to front. * * (Position within memory buff, so size_t; it is NOT a file * positon, which is why it isn't off_t). */ size_t read_ahead_pos; /** * The valid method is used to determine whether or not the read * ahead buffer is in a valid state. Used in combination with * assert(). */ bool valid(void) const; bool read_ahead_empty(void) const { return (read_ahead_pos == read_ahead_size); } /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ file_input(const file_input &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ file_input &operator=(const file_input &rhs); }; // vim: set ts=8 sw=4 et : #endif // LIBTARDY_FILE_INPUT_H tardy-1.28/libtardy/file/input/bunzip2.cc 644 0 0 734712163037023 166420ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include #include void file_input_bunzip2::bzlib_fatal_error(int err) { if (err >= 0) return; fatal("gunzip %s: %s", deeper->filename().c_str(), BZ2_strerror(err)); } file_input_bunzip2::~file_input_bunzip2() { // // Ask bzlib to free any stream resources it may be using. // int err = BZ2_bzDecompressEnd(&stream); if (err < 0) bzlib_fatal_error(err); // // Return unused input to the deeper stream. // if (stream.avail_in) { deeper->unread(stream.next_in, stream.avail_in); stream.next_in = 0; stream.avail_in = 0; } delete [] buf; buf = 0; } file_input_bunzip2::file_input_bunzip2(const file_input::pointer &a_deeper) : deeper(a_deeper), end_of_file(false), pos(0), buf(new char [BUFFER_SIZE]), deeper_at_end(false) { stream.bzalloc = 0; stream.bzfree = 0; stream.opaque = 0; int verbosity = 0; // // If we are running with limited resources we use a slower // algorithm that uses less memory. // int small = 0; #if defined(RLIMIT_AS) || defined(RLIM_INFINITY) struct rlimit memory_limit; getrlimit(RLIMIT_AS, &memory_limit); if (memory_limit.rlim_cur != RLIM_INFINITY) small = 1; #endif int err = BZ2_bzDecompressInit(&stream, verbosity, small); if (err != BZ_OK) bzlib_fatal_error(err); stream.avail_in = 0; stream.next_in = 0; } file_input_bunzip2::pointer file_input_bunzip2::create(const file_input::pointer &a_deeper) { return pointer(new file_input_bunzip2(a_deeper)); } size_t file_input_bunzip2::read_inner(void *data, size_t data_size) { if (end_of_file) return 0; if (!data) { bzlib_fatal_error(BZ_PARAM_ERROR); //NOTREACHED } if (data_size == 0) return 0; stream.avail_out = data_size; stream.next_out = (char *)data; for (;;) { if (stream.avail_in == 0) { long n = deeper->read(buf, BUFFER_SIZE); stream.avail_in = n; stream.next_in = buf; if (n == 0) deeper_at_end = true; } int err = BZ2_bzDecompress(&stream); switch (err) { case BZ_OK: if ( deeper_at_end && stream.avail_in == 0 && stream.avail_out > 0 ) { bzlib_fatal_error(BZ_UNEXPECTED_EOF); //NOTREACHED } break; case BZ_STREAM_END: { end_of_file = true; int nbytes = (data_size - stream.avail_out); pos += nbytes; return nbytes; } default: bzlib_fatal_error(err); //NOTREACHED } if (stream.avail_out == 0) { pos += data_size; return data_size; } } } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/input/bunzip2.h 644 0 0 1125712163037023 165170ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_FILE_INPUT_BUNZIP2_H #define LIBTARDY_FILE_INPUT_BUNZIP2_H #include #include /** * The file_input_bunzip2 class is used to represent an input stream which is * uncompressed on the fly. */ class file_input_bunzip2: public file_input { public: /** * The destructor. */ virtual ~file_input_bunzip2(); /** * The create class method is used to create new dynamically * allocated instance of this class. * * @param deeper * The deeper input which this filter reads from. */ static pointer create(const file_input::pointer &deeper); /** * The create_if_candidate class method is used to sniff at the * input file, to see if it is compressed. If it is compressed, * the #create class method will be called, otherwise the deeper * file will be returned unfiltered. * * @param deeper * The deeper input which is to be filtered (conditionally). */ static pointer create_if_candidate(const file_input::pointer &deeper); /** * The remove_filename_suffix class method is used to examine a * filename, and if it ends with a gzip-style file extension, * remove the file extension, otherwise return the file name * unaltered. */ static rcstring remove_filename_suffix(const rcstring &filename); protected: // See base class for documentation. rcstring filename(void) const; // See base class for documentation. size_t read_inner(void *data, size_t data_size); // See base class for documentation. off_t get_position_inner(void) const; /** * The candidate class method is used to check the magic number of a * bzip2ed file. All of the bytes read are unread before this method * returns. */ static bool candidate(const file_input::pointer &deeper); private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param deeper * The deeper input which this filter reads from. */ file_input_bunzip2(const file_input::pointer &deeper); /** * The deeper instance variable is used to remember the deeper * input which this filter reads from. */ file_input::pointer deeper; /** * The stream instance variable is used to remember the data * private to the bzip2 library. */ bz_stream stream; /** * The end_of_file instance variable is used to remember whether or * not this input stream has reached the end of input. */ bool end_of_file; /** * the pos instance variable is used to remember the current read * position, in bytes, relative to the start of this stream. * It could be greater than 2GB, which is why we must use off_t. */ off_t pos; /** * The buf instance variable is used to remember the base address * of a dynamically allocated array of bytes, of size #BUFFER_SIZE * bytes. */ char *buf; static const int BUFFER_SIZE = ((size_t)1u << 14); /** * The bzlib_fatal_error method is used to report fatal error from * the bunzip2 engine. * * @param err * The error code returned by a deeper bzlib function. * @note * This method does not return. */ void bzlib_fatal_error(int err); /** * The deeper_at_end instance variable is used to remember whether * or not the deeper input stream has reached end of file. */ bool deeper_at_end; /** * The default constructor. Do not use. */ file_input_bunzip2(); /** * The copy constructor. Do not use. */ file_input_bunzip2(const file_input_bunzip2 &rhs); /** * The assignment operator. Do not use. */ file_input_bunzip2 &operator=(const file_input_bunzip2 &rhs); }; // vim: set ts=8 sw=4 et : #endif // LIBTARDY_FILE_INPUT_BUNZIP2_H tardy-1.28/libtardy/file/input/bunzip2/candidate.cc 644 0 0 230212163037023 205400ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include bool file_input_bunzip2::candidate(const file_input::pointer &a_deeper) { // // Check for the magic number. // unsigned char buf[4]; long n = a_deeper->peek(buf, 4); return ( n == 4 && buf[0] == 'B' && buf[1] == 'Z' && buf[2] == 'h' && buf[3] >= '1' && buf[3] <= '9' ); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/input/bunzip2/create_if_candidate.cc 644 0 0 173712163037023 225540ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include file_input::pointer file_input_bunzip2::create_if_candidate(const file_input::pointer &a_deeper) { if (candidate(a_deeper)) return create(a_deeper); else return a_deeper; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/input/bunzip2/filename.cc 644 0 0 161312163037023 204100ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include rcstring file_input_bunzip2::filename(void) const { return remove_filename_suffix(deeper->filename()); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/input/bunzip2/get_position_inner.cc 644 0 0 155312163037023 225310ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include off_t file_input_bunzip2::get_position_inner(void) const { return pos; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/input/bunzip2/remove_filename_suffix.cc 644 0 0 264612163037023 233600ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include // // This method is in a separate file so that the file_output_bzip2 // class's methods can access it without dragging in all of the rest of // the file_input_bunzip2 class's methods. // rcstring file_input_bunzip2::remove_filename_suffix(const rcstring &fn) { rcstring fn_lc = fn.basename().downcase(); if (fn_lc.ends_with(".bz")) return fn.substr(0, fn.size() - 3); if (fn_lc.ends_with(".bz2")) return fn.substr(0, fn.size() - 4); if (fn_lc.ends_with(".tbz")) return fn.substr(0, fn.size() - 4) + ".tar"; if (fn_lc.ends_with(".tbz2")) return fn.substr(0, fn.size() - 5) + ".tar"; return fn; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/input/factory.cc 644 0 0 310712163037023 167060ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include #include #include #include #include static bool looks_like_stdin(const char *filename) { return ( !filename || *filename == '\0' || (filename[0] == '-' && filename[1] == '\0') ); } file_input::pointer file_input::factory(const char *filename) { file_input::pointer ip = ( looks_like_stdin(filename) ? file_input_stdin::create() : file_input_normal::create(filename) ); ip = file_input_gunzip::create_if_candidate(ip); ip = file_input_bunzip2::create_if_candidate(ip); ip = file_input_xz::create_if_candidate(ip); return ip; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/input/gunzip.cc 644 0 0 2207512163037023 166000ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include #include #include #include #ifndef Z_BUFSIZE # ifdef MAXSEG_64K # define Z_BUFSIZE 4096 // minimize memory usage for 16-bit DOS # else # define Z_BUFSIZE 16384 # endif #endif // gzip flag byte #define ASCII_FLAG 0x01 // bit 0 set: file probably ascii text #define HEAD_CRC 0x02 // bit 1 set: header CRC present #define EXTRA_FIELD 0x04 // bit 2 set: extra field present #define ORIG_NAME 0x08 // bit 3 set: original file name present #define COMMENT 0x10 // bit 4 set: file comment present #define RESERVED 0xE0 // bits 5..7: reserved file_input_gunzip::~file_input_gunzip() { int err = inflateEnd(&stream); if (err < 0) zlib_fatal_error(err); delete [] buf; buf = 0; } file_input_gunzip::file_input_gunzip(const file_input::pointer &a_deeper) : deeper(a_deeper), z_eof(false), crc(crc32(0L, Z_NULL, 0)), pos(0), buf(new Byte [Z_BUFSIZE]) { stream.zalloc = (alloc_func)0; stream.zfree = (free_func)0; stream.opaque = (voidpf)0; stream.next_in = Z_NULL; stream.avail_in = 0; stream.next_out = Z_NULL; stream.avail_out = 0; // // windowBits is passed < 0 to tell that there is no zlib header. // Note that in this case inflate *requires* an extra "dummy" byte // after the compressed stream in order to complete decompression // and return Z_STREAM_END. Here the gzip CRC32 ensures that 4 // bytes are present after the compressed stream. // int err = inflateInit2(&stream, -MAX_WBITS); if (err < 0) zlib_fatal_error(err); // // Now read the file header. // read_header(); } file_input::pointer file_input_gunzip::create(const file_input::pointer &a_deeper) { return pointer(new file_input_gunzip(a_deeper)); } file_input::pointer file_input_gunzip::create_if_candidate(const file_input::pointer &deeper) { if (!file_input_gunzip::candidate(deeper)) { // // If it is not actually a compressed file, // simply return the deeper file. This will // give much better performance. // return deeper; } return file_input_gunzip::create(deeper); } void file_input_gunzip::zlib_fatal_error(int err) { if (err >= 0) return; if (stream.msg) { fatal ( "gunzip %s: %s (%s)", deeper->filename().quote_c().c_str(), z_error(err), stream.msg ); } else { fatal ( "gunzip %s: %s", deeper->filename().quote_c().c_str(), z_error(err) ); } } unsigned long file_input_gunzip::get_long(void) { unsigned char buffer[4]; size_t nbytes = deeper->read(buffer, sizeof(buffer)); if (nbytes != sizeof(buffer)) fatal("gunzip: premature end of file"); return endian_get4le(buffer); } unsigned file_input_gunzip::get_short(void) { unsigned char buffer[2]; size_t nbytes = deeper->read(buffer, sizeof(buffer)); if (nbytes != sizeof(buffer)) fatal("gunzip: premature end of file"); return endian_get2le(buffer); } size_t file_input_gunzip::read_inner(void *data, size_t data_size) { if (z_eof) return 0; Bytef *start = (Bytef *)data; // starting point for crc computation stream.next_out = (Bytef *)data; stream.avail_out = data_size; while (stream.avail_out > 0) { if (stream.avail_in == 0) { stream.next_in = buf; stream.avail_in = deeper->read(buf, Z_BUFSIZE); // // There should always be something left on the // input, because we have the CRC and Length // to follow. Fatal error if not. // if (stream.avail_in <= 0) { deeper->fatal("gunzip: premature end of file"); } } int err = inflate(&stream, Z_PARTIAL_FLUSH); if (err < 0) zlib_fatal_error(err); if (err == Z_STREAM_END) { z_eof = true; // // Push back the unused portion of the input stream. // (The way we wrote it, there shouldn't be much.) // while (stream.avail_in > 0) { deeper->unread(stream.next_in, stream.avail_in); stream.avail_in = 0; } // // Fall out of the loop. // break; } } // // Calculate the running CRC // long result = stream.next_out - start; crc = crc32(crc, start, (uInt)result); // // Update the file position. // pos += result; // // At end-of-file we need to do some checking. // if (z_eof) { // // Check CRC // // Watch out for 64-bit machines. This is what // those aparrently redundant 0xFFFFFFFF are for. // if ((get_long() & 0xFFFFFFFF) != (crc & 0xFFFFFFFF)) fatal("gunzip: checksum mismatch"); // // The uncompressed length here may be different from pos in // case of concatenated .gz files. But we don't write them that // way, so give an error if it happens. // // In the 64-bit case, we only have the lower 32 bits to compare. // Recall that pos is of type off_t, so it can be larger than 2GB. // if ((get_long() & 0xFFFFFFFF) != (unsigned long)(pos & 0xFFFFFFFF)) fatal("gunzip: length mismatch"); } // // Return success (failure always goes via input_format_error, // or zlib_fatal_error). // return result; } off_t file_input_gunzip::get_position_inner(void) const { return pos; } rcstring file_input_gunzip::filename(void) const { return remove_filename_suffix(deeper->filename()); } // // Check the gzip header of a gz_stream opened for reading. Set the // stream mode to transparent if the gzip magic header is not present; // set err to Z_DATA_ERROR if the magic header is present but the // rest of the header is incorrect. // // IN assertion: the stream this has already been created sucessfully; // stream.avail_in is zero for the first time, but may be non-zero // for concatenated .gz files. // static unsigned char gz_magic[2] = {0x1f, 0x8b}; // gzip magic header bool file_input_gunzip::candidate(const file_input::pointer &a_deeper) { // // Check for the magic number. // If it isn't present, assume transparent mode. // unsigned char buffer[sizeof(gz_magic)]; if (a_deeper->peek(buffer, sizeof(buffer)) != sizeof(buffer)) return false; return (0 == memcmp(buffer, gz_magic, sizeof(buffer))); } void file_input_gunzip::read_header(void) { // // Check for the magic number. // If it isn't present, assume transparent mode. // unsigned char buffer[10]; if (deeper->read(buffer, sizeof(buffer)) != sizeof(buffer)) deeper->fatal("gunzip: short header read"); if (0 != memcmp(buffer, gz_magic, sizeof(gz_magic))) deeper->fatal("gunzip: wrong magic number"); // // Magic number present, now we require the rest of the header // to be present and correctly formed. // int method = buffer[2]; if (method != Z_DEFLATED) deeper->fatal("gunzip: not deflated encoding"); int flags = buffer[3]; if ((flags & RESERVED) != 0) deeper->fatal("gunzip: unknown flags"); if (flags & EXTRA_FIELD) { // skip the extra field unsigned elen = get_short(); deeper->skip(elen); } if (flags & ORIG_NAME) { // skip the original file name skip_string(); } if (flags & COMMENT) { // skip the .gz file comment skip_string(); } if (flags & HEAD_CRC) { // skip the header crc get_short(); } } void file_input_gunzip::skip_string(void) { for (;;) { char buffer[256]; unsigned nbytes = deeper->read(buffer, sizeof(buffer)); if (nbytes == 0) deeper->fatal("gunzip: premature end of file"); char *p = (char *)memchr(buffer, 0, nbytes); if (p) { // we have found the end ++p; deeper->unread(p, buffer + sizeof(buffer) - p); return; } } } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/input/gunzip.h 644 0 0 1232112163037023 164330ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_FILE_INPUT_GUNZIP_H #define LIBTARDY_FILE_INPUT_GUNZIP_H #include #include /** * The file_input_gunzip class is used to represent an input stream which is * uncompressed on the fly. */ class file_input_gunzip: public file_input { public: /** * The destructor. */ virtual ~file_input_gunzip(); /** * The create class method is used to create new dynamically * allocated instance of this class. * * @param deeper * The deeper input which this filter reads from. */ static pointer create(const file_input::pointer &deeper); /** * The create_if_candidate class method is used to sniff at the * input file, to see if it is compressed. If it is compressed, * the #create class method will be called, otherwise the deeper * file will be returned unfiltered. * * @param deeper * The deeper input which is to be filtered (conditionally). */ static pointer create_if_candidate(const file_input::pointer &deeper); /** * The remove_filename_suffix class method is used to examine a * filename, and if it ends with a gzip-style file extension, * remove the file extension, otherwise return the file name * unaltered. */ static rcstring remove_filename_suffix(const rcstring &filename); protected: // See base class for documentation. rcstring filename(void) const; // See base class for documentation. size_t read_inner(void *data, size_t data_size); // See base class for documentation. off_t get_position_inner(void) const; /** * The candidate class method is used to check the magic number of a * gzipped file. All of the bytes read are unread before this method * returns. */ static bool candidate(const file_input::pointer &deeper); private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param deeper * The deeper input which this filter reads from. */ file_input_gunzip(const file_input::pointer &deeper); /** * The deeper instance variable is used to remember the deeper * input which this filter reads from. */ file_input::pointer deeper; /** * The steam instance variable is used to remember remmebr the * opaque blob of data used by the zlib1g library. */ z_stream stream; /** * The z_eof instance variable is used to remember whether or not * we have reached the end of the compressed data stream. */ bool z_eof; /** * The crc instance variable is used to remember the running * checksum of the decompressed data. Used for input validation at * the end of the file. */ uLong crc; /** * The pos instance variable is used to remember the current read * position, in bytes, relative to the start of this stream. * It could be greater than 2GB, which is why we must use off_t. */ off_t pos; /** * The buf instance variable is used to remember the base address * of a dynamically allocated array of bytes. */ Byte *buf; /** * The zlib_fatal_error method is used to print errors reported by * the zlib1g library, and then exit. * * @param err * The error reported by the zlib1g library. */ void zlib_fatal_error(int err); /** * The get_long method is used to extract a 4-byte little-endian * value from the deeper input stream. */ unsigned long get_long(void); /** * The get_short method is used to extract a 2-byte little-endian * value from the deeper input stream. */ unsigned get_short(void); /** * The get_header method is used to read and check the GZIP file * header in the input stream. */ void read_header(void); /** * The skip_string method is sued to advance the deeper file * position past a NUL-terminated string in the deeper input. */ void skip_string(void); /** * The default constructor. Do not use. */ file_input_gunzip(); /** * The copy constructor. Do not use. */ file_input_gunzip(const file_input_gunzip &arg); /** * The assignment operator. Do not use. */ file_input_gunzip &operator=(const file_input_gunzip &arg); }; // vim: set ts=8 sw=4 et : #endif // LIBTARDY_FILE_INPUT_GUNZIP_H tardy-1.28/libtardy/file/input/gunzip/remove_filename_suffix.cc 644 0 0 247612163037023 233040ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include // // This method is in a separate file so that the file_output_gzip // class's methods can access it without dragging in all of the rest of // the file_input_gunzip class's methods. // rcstring file_input_gunzip::remove_filename_suffix(const rcstring &fn) { rcstring fn_lc = fn.downcase(); if (fn_lc.ends_with(".z")) return fn.substr(0, fn.size() - 2); if (fn_lc.ends_with(".gz")) return fn.substr(0, fn.size() - 3); if (fn_lc.ends_with(".tgz")) return fn.substr(0, fn.size() - 4) + ".tar"; return fn; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/input/normal.cc 644 0 0 425312163037023 165320ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2008, 2009, 2011, 2012 Peter Miller // // 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 3 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, see . // #include #include #include #include #include #include #include #include #include #include file_input_normal::~file_input_normal() { if (fd >= 0) explain_close_or_die(fd); } file_input_normal::file_input_normal(const rcstring &a_fn) : fn(a_fn), fd(-1) { fd = explain_open_or_die(fn.c_str(), O_RDONLY, 0); } file_input::pointer file_input_normal::create(const rcstring &a_fn) { typedef boost::shared_ptr ptr; ptr p = ptr(new file_input_normal(a_fn)); if (p->needs_position_filter()) return file_input_position::create(p); return p; } bool file_input_normal::needs_position_filter(void) const { struct stat st; explain_fstat_or_die(fd, &st); return !S_ISREG(st.st_mode); } size_t file_input_normal::read_inner(void *data, size_t data_size) { return explain_read_or_die(fd, data, data_size); } rcstring file_input_normal::filename(void) const { return fn; } off_t file_input_normal::get_position_inner(void) const { // This is why we sometimes need the position filter: pipes report // an EINVAL error for this system call. return explain_lseek_or_die(fd, 0, SEEK_CUR); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/input/normal.h 644 0 0 570712163037023 164010ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2004, 2008, 2009, 2011, 2012 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_FILE_INPUT_NORMAL_H #define LIBTARDY_FILE_INPUT_NORMAL_H #include #include /** * The file_input_normal class is used to represent input from a regular * file. */ class file_input_normal: public file_input { public: /** * The destructor. */ virtual ~file_input_normal(); /** * Thye create class method is used to create new dynamically * allocated instances of this class. * * @param filename * The name of the file to be opened. */ static pointer create(const rcstring &filename); protected: // See base class for documentation. virtual size_t read_inner(void *data, size_t data_size); // See base class for documentation. rcstring filename(void) const; // See base class for documentation. off_t get_position_inner(void) const; private: /** * The constructor. * It is private on purpose, the the #create class method instead. * * @param filename * The name of the file to be opened. */ file_input_normal(const rcstring &filename); /** * The fn instance variable is used to remember the name of the * input file. */ rcstring fn; /** * The fd instance variable is used to remember the file descriptor * of the open input file. */ int fd; /** * The needs_position_filter method is used by the #create class * method, to add a position filter to all files that are not regular * (seekable) files. For example, pipes need the position filter. */ bool needs_position_filter(void) const; /** * The default constructor. Do not use. */ file_input_normal(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ file_input_normal(const file_input_normal &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ file_input_normal &operator=(const file_input_normal &rhs); }; // vim: set ts=8 sw=4 et : #endif // LIBTARDY_FILE_INPUT_NORMAL_H tardy-1.28/libtardy/file/input/position.cc 644 0 0 277712163037023 171170ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include file_input_position::~file_input_position() { } file_input_position::file_input_position(const file_input::pointer &a_deeper) : deeper(a_deeper), position(0) { assert(deeper); } file_input_position::pointer file_input_position::create(const file_input::pointer &a_deeper) { return pointer(new file_input_position(a_deeper)); } rcstring file_input_position::filename(void) const { return deeper->filename(); } size_t file_input_position::read_inner(void *data, size_t data_size) { // only ever returns on success. size_t nbytes = deeper->read(data, data_size); position += nbytes; return nbytes; } off_t file_input_position::get_position_inner(void) const { return position; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/input/position.h 644 0 0 553512163037023 167540ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_FILE_INPUT_POSITION_H #define LIBTARDY_FILE_INPUT_POSITION_H #include /** * The file_input_position class is used to represent the processing * required to track the file position for non-seekable files (pipes, * for example). */ class file_input_position: public file_input { public: /** * The destructor. */ virtual ~file_input_position(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * The file inoput that is to be filtered. */ static pointer create(const file_input::pointer &deeper); protected: // See base class for documentation. rcstring filename(void) const; // See base class for documentation. size_t read_inner(void *data, size_t data_size); // See base class for documentation. off_t get_position_inner(void) const; private: /** * The constructor. * It is private on purpose, use a #create class method instead. * * @param deeper * The file inoput that is to be filtered. */ file_input_position(const file_input::pointer &deeper); /** * The deeper instance variable is used to remember the file input * to be filtered. */ file_input::pointer deeper; /** * The position instance variable is used to remember the current * read position within the file input being filtered. * It could be greater than 2GB, which is why we must use off_t. */ off_t position; /** * The default constructor. Do not use. */ file_input_position(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ file_input_position(const file_input_position &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ file_input_position &operator=(const file_input_position &rhs); }; // vim: set ts=8 sw=4 et : #endif // LIBTARDY_FILE_INPUT_POSITION_H tardy-1.28/libtardy/file/input/stdin.cc 644 0 0 367312163037023 163700ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2008, 2009, 2011, 2012 Peter Miller // // 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 3 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, see . // #include #include #include #include #include #include #include file_input_stdin::~file_input_stdin() { // nothing to do } file_input_stdin::file_input_stdin() { // nothing to do } file_input::pointer file_input_stdin::create(void) { typedef boost::shared_ptr ptr; ptr p(new file_input_stdin()); if (p->needs_position_filter()) return file_input_position::create(p); return p; } bool file_input_stdin::needs_position_filter(void) const { int fd = 0; struct stat st; explain_fstat_or_die(fd, &st); if (!S_ISREG(st.st_mode)) return true; return (lseek(fd, 0, SEEK_CUR) != 0); } size_t file_input_stdin::read_inner(void *data, size_t data_size) { int fd = 0; return explain_read_or_die(fd, data, data_size); } rcstring file_input_stdin::filename(void) const { return "standard input"; } off_t file_input_stdin::get_position_inner(void) const { int fd = 0; return explain_lseek_or_die(fd, 0, SEEK_CUR); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/input/stdin.h 644 0 0 457712163037023 162360ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2004, 2008, 2009, 2011, 2012 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_FILE_INPUT_STDIN_H #define LIBTARDY_FILE_INPUT_STDIN_H #include /** * The file_input_stdin is used to represent input from the process's * standard input stream. */ class file_input_stdin: public file_input { public: /** * The destructor. */ ~file_input_stdin(); /** * The create class method is used to create new dynamically * allocated instances of this class. */ static pointer create(void); protected: // See base class for documentation. virtual size_t read_inner(void *data, size_t data_size); // See base class for documentation. rcstring filename(void) const; // See base class for documentation. off_t get_position_inner(void) const; private: /** * The needs_position_filter method is used by the #create class * method, to add a position filter to all files that are not regular * (seekable) files. For example, pipes need the position filter. */ bool needs_position_filter(void) const; /** * The default constructor. * It is private on purpose, the the #create class method instead. */ file_input_stdin(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ file_input_stdin(const file_input_stdin &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ file_input_stdin &operator=(const file_input_stdin &rhs); }; // vim: set ts=8 sw=4 et : #endif // LIBTARDY_FILE_INPUT_STDIN_H tardy-1.28/libtardy/file/input/xz.cc 644 0 0 566612163037023 157140ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include file_input_xz::~file_input_xz() { delete [] buf; lzma_end(&strm); } static lzma_stream strm_zero = LZMA_STREAM_INIT; file_input_xz::file_input_xz(const file_input::pointer &a_deeper) : deeper(a_deeper), strm(strm_zero), end_of_file(false), pos(0), buf(new char [BUFFER_SIZE]), deeper_at_end(false) { uint64_t memlimit = UINT64_MAX; uint32_t flags = 0; lzma_ret err = lzma_auto_decoder(&strm, memlimit, flags); if (err != LZMA_OK) drop_dead("lzma_auto_decoder", err); } file_input_xz::pointer file_input_xz::create(const file_input::pointer &a_deeper) { return pointer(new file_input_xz(a_deeper)); } size_t file_input_xz::read_inner(void *data, size_t data_size) { if (end_of_file) return 0; if (!data) return 0; if (data_size == 0) return 0; strm.avail_out = data_size; strm.next_out = (uint8_t *)data; for (;;) { if (strm.avail_in == 0) { size_t n = deeper->read(buf, BUFFER_SIZE); strm.avail_in = n; strm.next_in = (uint8_t *)buf; if (n == 0) deeper_at_end = true; } lzma_action action = deeper_at_end ? LZMA_FINISH : LZMA_RUN; lzma_ret err = lzma_code(&strm, action); switch (err) { case LZMA_OK: if ( deeper_at_end && strm.avail_in == 0 && strm.avail_out > 0 ) { drop_dead("lzma_code", LZMA_BUF_ERROR); //NOTREACHED } break; case LZMA_STREAM_END: { end_of_file = true; int nbytes = (data_size - strm.avail_out); pos += nbytes; return nbytes; } default: drop_dead("lzma-code", err); //NOTREACHED } if (strm.avail_out == 0) { pos += data_size; return data_size; } } } void file_input_xz::drop_dead(const char *caption, lzma_ret err) { fatal("%s: %s", caption, lzma_strerror(err)); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/input/xz.h 644 0 0 1131612163037023 155630ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_FILE_INPUT_XZ_H #define LIBTARDY_FILE_INPUT_XZ_H #include #include /** * The file_input_xz class is used to represent an LZMA input stream * which is uncompressed on the fly. */ class file_input_xz: public file_input { public: /** * The destructor. */ virtual ~file_input_xz(); /** * The create class method is used to create new dynamically * allocated instance of this class. * * @param deeper * The deeper input which this filter reads from. */ static pointer create(const file_input::pointer &deeper); /** * The create_if_candidate class method is used to sniff at the * input file, to see if it is compressed. If it is compressed, * the #create class method will be called, otherwise the deeper * file will be returned unfiltered. * * @param deeper * The deeper input which is to be filtered (conditionally). */ static pointer create_if_candidate(const file_input::pointer &deeper); /** * The remove_filename_suffix class method is used to examine a * filename, and if it ends with a xz-style file extension, * remove the file extension, otherwise return the file name * unaltered. */ static rcstring remove_filename_suffix(const rcstring &filename); protected: // See base class for documentation. rcstring filename(void) const; // See base class for documentation. size_t read_inner(void *data, size_t data_size); // See base class for documentation. off_t get_position_inner(void) const; /** * The candidate class method is used to check the magic number of a * xz'ed file. All of the bytes read are unread before this method * returns. */ static bool candidate(const file_input::pointer &deeper); private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param deeper * The deeper input which this filter reads from. */ file_input_xz(const file_input::pointer &deeper); /** * The deeper instance variable is used to remember the deeper * input which this filter reads from. */ file_input::pointer deeper; /** * The stream instance variable is used to remember the data * private to the lzma library. */ lzma_stream strm; /** * The end_of_file instance variable is used to remember whether or * not this input stream has reached the end of input. */ bool end_of_file; /** * the pos instance variable is used to remember the current read * position, in bytes, relative to the start of this stream. * It could be greater than 2GB, which is why we must use off_t. */ off_t pos; /** * The buf instance variable is used to remember the base address * of a dynamically allocated array of bytes, of size #BUFFER_SIZE * bytes. */ char *buf; static const size_t BUFFER_SIZE = ((size_t)1u << 14); /** * The drop_dead method is used to report fatal error from * the xz engine. * * @param caption * more explanatory text, usually the function name * @param err * The error code returned by a deeper bzlib function. * @note * This method does not return. */ void drop_dead(const char *caption, lzma_ret err); /** * The deeper_at_end instance variable is used to remember whether * or not the deeper input stream has reached end of file. */ bool deeper_at_end; /** * The default constructor. Do not use. */ file_input_xz(); /** * The copy constructor. Do not use. */ file_input_xz(const file_input_xz &rhs); /** * The assignment operator. Do not use. */ file_input_xz &operator=(const file_input_xz &rhs); }; // vim: set ts=8 sw=4 et : #endif // LIBTARDY_FILE_INPUT_XZ_H tardy-1.28/libtardy/file/input/xz/candidate.cc 644 0 0 356112163037023 176200ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include #include #if 0 static bool is_lzma(const file_input::pointer &a_deeper) { // // This brain-dead format doesn't HAVE a magic number, // so any random 13-byte sequence will test as OK. // unsigned char magic[13]; size_t n = a_deeper->peek(magic, 13); if (n != 13) return false; lzma_filter filter; filter.id = LZMA_FILTER_LZMA1; if (LZMA_OK != lzma_properties_decode(&filter, NULL, magic, 5)) return false; lzma_options_lzma *opt = (lzma_options_lzma *)filter.options; if (!opt) return false; bool ok = (opt->lc == 3 && opt->lp == 0 && opt->pb == 2); free(opt); return ok; } #endif static bool is_xz(const file_input::pointer &a_deeper) { static unsigned char magic[6] = { 0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00 }; unsigned char buf[sizeof(magic)]; size_t n = a_deeper->peek(buf, sizeof(buf)); if (n != sizeof(buf)) return false; return (0 == memcmp(magic, buf, sizeof(magic))); } bool file_input_xz::candidate(const file_input::pointer &a_deeper) { return is_xz(a_deeper); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/input/xz/create_if_candidate.cc 644 0 0 166512163037023 216240ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include file_input::pointer file_input_xz::create_if_candidate(const file_input::pointer &a_deeper) { return (candidate(a_deeper) ? create(a_deeper) : a_deeper); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/input/xz/filename.cc 644 0 0 160112163037023 174550ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include rcstring file_input_xz::filename(void) const { return remove_filename_suffix(deeper->filename()); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/input/xz/get_position_inner.cc 644 0 0 154112163037023 215760ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include off_t file_input_xz::get_position_inner(void) const { return pos; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/input/xz/remove_filename_suffix.cc 644 0 0 274412163037023 224270ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include // // This method is in a separate file so that the file_output_bzip2 // class's methods can access it without dragging in all of the rest of // the file_input_xz class's methods. // rcstring file_input_xz::remove_filename_suffix(const rcstring &fn) { rcstring fn_lc = fn.basename().downcase(); if (fn_lc.ends_with(".xz")) return fn.substr(0, fn.size() - 3); if (fn_lc.ends_with(".lz")) return fn.substr(0, fn.size() - 3); if (fn_lc.ends_with(".lzma")) return fn.substr(0, fn.size() - 5); if (fn_lc.ends_with(".txz")) return fn.substr(0, fn.size() - 4) + ".tar"; if (fn_lc.ends_with(".tlz")) return fn.substr(0, fn.size() - 4) + ".tar"; return fn; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/output.cc 644 0 0 277112163037023 154460ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2001-2003, 2008, 2009, 2011, 2012 Peter Miller // // 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 3 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, see . // #include #include #include #include #include #include file_output::~file_output() { // nothing to do } file_output::file_output() { // nothing to do } file_output::file_output(const file_output &) { // nothing to do } file_output & file_output::operator=(const file_output &) { // nothing to do return *this; } void file_output::fatal(const char *fmt, ...) const { va_list ap; va_start(ap, fmt); char buffer[2000]; vsnprintf(buffer, sizeof(buffer), fmt, ap); va_end(ap); explain_output_error_and_die("%s: %s", filename().c_str(), buffer); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/output.h 644 0 0 631312163037023 153040ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2003, 2004, 2008, 2009, 2011, 2012 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_FILE_OUTPUT_H #define LIBTARDY_FILE_OUTPUT_H #include #include #include /** * The file_output class is used to represent an abstract form of binary * file output. Shall be derived from before it can be used. */ class file_output { public: typedef boost::shared_ptr pointer; /** * The destructor. */ virtual ~file_output(); /** * The factory method is used to create a new file_output instance, * based on the file name. * * @param filename * The name of the file to open for writing. If the NULL * pointer is upplied, or the empty string is upplied, or the * special name "-" is upplied, it will write to the standard * output; otherwise, it will write to the named file. */ static pointer factory(const char *filename); /** * The fatal method is used to report fatal errors occurring when * operating on this output stream. The program name and the file * name are prepended. It exits with an exit status of one. It * does not return. * * @param fmt * The message format to print. See printf(3) for a * description of the format and its arguments. */ void fatal(const char *fmt, ...) const ATTR_PRINTF(2, 3); /** * The filename method is used to obtain the name of the file * being written. */ virtual rcstring filename(void) const = 0; /** * The write method is used to write data to the output stream. * * @param data * This argument points to a data structure to be written. * Usually an array of bytes. * @param data_size * This argument indicates the number fo bytes to be written. */ virtual void write(const void *data, size_t data_size) = 0; protected: /** * The default constructor. * May only be used by derived classes. */ file_output(); protected: /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ file_output(const file_output &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ file_output &operator=(const file_output &rhs); }; // vim: set ts=8 sw=4 et : #endif // LIBTARDY_FILE_OUTPUT_H tardy-1.28/libtardy/file/output/buffer.cc 644 0 0 521512163037023 167130ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2003, 2008, 2009, 2011, 2012 Peter Miller // // 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 3 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, see // . // #include #include file_output_buffer::~file_output_buffer() { if (pos > 0) { deeper->write(buffer, pos); pos = 0; } delete buffer; buffer = 0; } file_output_buffer::file_output_buffer( const file_output::pointer &a_deeper, int a_blocksize ) : deeper(a_deeper), blocksize(a_blocksize > 0 ? a_blocksize : 512), buffer(0), pos(0) { assert(deeper); assert((blocksize % 512) == 0); } file_output::pointer file_output_buffer::create(const file_output::pointer &a_deeper, size_t a_blocksize) { return pointer(new file_output_buffer(a_deeper, a_blocksize)); } rcstring file_output_buffer::filename(void) const { return deeper->filename(); } void file_output_buffer::write(const void *data, size_t data_size) { while (data_size > 0) { // // Don't double handle the data if we can avoid it. // (But only write `blocksize' bytes at a time.) // if (pos == 0 && data_size >= blocksize) { deeper->write(data, blocksize); data = (char *)data + blocksize; data_size -= blocksize; continue; } // // Add the data to the end of the buffer. // assert(blocksize >= pos); size_t len = blocksize - pos; if (len > data_size) len = data_size; if (!buffer) buffer = new char[blocksize]; memcpy(buffer + pos, data, len); pos += len; if (pos >= blocksize) { // // If the buffer is full, // write it out and start again. // deeper->write(buffer, pos); pos = 0; } data = (char *)data + len; data_size -= len; } } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/output/buffer.h 644 0 0 707112163037023 165570ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2003, 2004, 2008, 2009, 2011, 2012 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_FILE_OUTPUT_BUFFER_H #define LIBTARDY_FILE_OUTPUT_BUFFER_H #include /** * The file_output_buffer class is used to represent a buffered output * stream. The data is passed through unchanged, however it is * buffered before delivery to the deeper output stream. */ class file_output_buffer: public file_output { public: /** * The destructor. */ virtual ~file_output_buffer(); /** * The create class method is used to create new dynmically * allocated instances of this class. * * @param deeper * This argument is used to specify the output stream to write * the data to once it has been buffered. * @param blocksize * This argument my be used to specify the block size, in bytes. * It defaults to 512 bytes if zero. */ static pointer create(const file_output::pointer &deeper, size_t blocksize = 0); protected: // See base class for documentation. rcstring filename(void) const; // See base class for documentation. void write(const void *data, size_t data_size); private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param deeper * This argument is used to specify the output stream to write * the data to once it has been buffered. * @param blocksize * This argument my be used to specify the block size, in bytes. */ file_output_buffer(const file_output::pointer &deeper, int blocksize); /** * The deeper instance variable is used to remember the output file * to write the output to, once it has been buffered. */ file_output::pointer deeper; /** * The blocksize instance variable is used to remember the size of * blocks to be wrutten to the deeper output. */ size_t blocksize; /** * The buffer instance variable is used to remember whe the buffer * of blocksize byte has been allocated in the heap. */ char *buffer; /** * The pos instance variable is used to remember how many bytes * have been buffered into `buffer'. * * Invariant: assert(pos >= 0 && pos < blocksize); */ size_t pos; /** * The default constructor. Do not use. */ file_output_buffer(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ file_output_buffer(const file_output_buffer &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ file_output_buffer &operator=(const file_output_buffer &rhs); }; // vim: set ts=8 sw=4 et : #endif // LIBTARDY_FILE_OUTPUT_BUFFER_H tardy-1.28/libtardy/file/output/bzip2.cc 644 0 0 1204412163037023 165060ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include void file_output_bzip2::bzlib_fatal_error(int err) { fatal("bzip2 %s: %s", filename().c_str(), BZ2_strerror(err)); } #if 0 #define trace(fmt, ...) \ fprintf(stderr, "%s: %d: " fmt "\n", __FILE__, __LINE__, __VA_ARGS__) #define trace1(fmt) \ fprintf(stderr, "%s: %d: " fmt "\n", __FILE__, __LINE__) #define trace0() \ fprintf(stderr, "%s: %d:\n", __FILE__, __LINE__) #else #define trace(fmt, ...) #define trace1(fmt) #define trace0() #endif file_output_bzip2::~file_output_bzip2() { trace("file_output_bzip2::~file_output_bzip2(this = %p) {", this); // // finish sending the compressed stream // for (;;) { trace1("Before call to BZ2_bzCompress FIN:"); trace("stream.avail_in = %d", stream.avail_in); trace("stream.next_in = %p", stream.next_in); trace("stream.avail_out = %d", stream.avail_out); trace("stream.next_out = %p", stream.next_out); int err = BZ2_bzCompress(&stream, BZ_FINISH); if (err != BZ_FINISH_OK && err != BZ_STREAM_END) bzlib_fatal_error(err); trace1("After call to BZ2_bzCompress FIN:"); trace("stream.avail_in = %d", stream.avail_in); trace("stream.next_in = %p", stream.next_in); trace("stream.avail_out = %d", stream.avail_out); trace("stream.next_out = %p", stream.next_out); if (stream.avail_out < BUFFER_SIZE) { int n = BUFFER_SIZE - stream.avail_out; deeper->write(buf, n); stream.avail_out = BUFFER_SIZE; stream.next_out = buf; } if (err == BZ_STREAM_END) break; } // // Clean up any resources we were using. // delete [] buf; buf = 0; trace1("}"); } file_output_bzip2::file_output_bzip2(const file_output::pointer &a_deeper) : deeper(a_deeper), buf(new char [BUFFER_SIZE]) { trace("file_output_bzip2::file_output_bzip2(this = %p) {", this); stream.bzalloc = 0; stream.bzfree = 0; stream.opaque = 0; stream.avail_in = 0; stream.next_in = 0; stream.avail_out = BUFFER_SIZE; stream.next_out = buf; int block_size_100k = 3; int verbosity = 0; int work_factor = 30; int err = BZ2_bzCompressInit(&stream, block_size_100k, verbosity, work_factor); if (err != BZ_OK) bzlib_fatal_error(err); trace("stream.avail_in = %d", stream.avail_in); trace("stream.next_in = %p", stream.next_in); trace("stream.avail_out = %d", stream.avail_out); trace("stream.next_out = %p", stream.next_out); trace1("}"); } file_output::pointer file_output_bzip2::create(const file_output::pointer &a_deeper) { return pointer(new file_output_bzip2(a_deeper)); } file_output::pointer file_output_bzip2::create_if_candidate(const file_output::pointer &a_deeper) { if (candidate(a_deeper->filename())) return create(a_deeper); else return a_deeper; } void file_output_bzip2::write(const void *data, size_t data_size) { trace("file_output_bzip2::write_inner(this = %p, data = %p, " "data_size = %ld) {", this, data, (long)data_size); if (!data) bzlib_fatal_error(BZ_PARAM_ERROR); if (data_size == 0) { trace1("}"); return; } stream.avail_in = data_size; stream.next_in = (char *)data; for (;;) { trace1("Before call to BZ2_bzCompress:"); trace("stream.avail_in = %d", stream.avail_in); trace("stream.next_in = %p", stream.next_in); trace("stream.avail_out = %d", stream.avail_out); trace("stream.next_out = %p", stream.next_out); int err = BZ2_bzCompress(&stream, BZ_RUN); if (err != BZ_RUN_OK) bzlib_fatal_error(err); trace1("After call to BZ2_bzCompress:"); trace("stream.avail_in = %d", stream.avail_in); trace("stream.next_in = %p", stream.next_in); trace("stream.avail_out = %d", stream.avail_out); trace("stream.next_out = %p", stream.next_out); if (stream.avail_out < BUFFER_SIZE) { int n = BUFFER_SIZE - stream.avail_out; deeper->write(buf, n); stream.avail_out = BUFFER_SIZE; stream.next_out = buf; } if (stream.avail_in == 0) { trace1("}"); return; } } } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/output/bzip2.h 644 0 0 732512163037023 163360ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_FILE_OUTPUT_BZIP2_H #define LIBTARDY_FILE_OUTPUT_BZIP2_H #include #include /** * The file_output_bzip2 class is used to represent output filter which * compresses the data (using bzip2 algorithm) before writing it to * the deeper output stream. */ class file_output_bzip2: public file_output { public: /** * The destructor. */ virtual ~file_output_bzip2(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * the output stream this filter will write its output to. */ static pointer create(const file_output::pointer &deeper); /** * The candidate class method is used to examine the given file * name to determine whether or not it looks like a bzip2 file. * * @param filename * The file name to be examined. * @returns * true if looks like a bzip2 filename, false if not */ static bool candidate(const rcstring &filename); /** * The create_if_candidate class method is used to create new * dynamically allocated instances of this class, if the deeper * file's name looks like a bzip2 candidate, otherwite the deeper * file is simple passed through. * * @param deeper * the output stream this filter will write its output to. */ static pointer create_if_candidate(const file_output::pointer &deeper); protected: // See base class for documentation. rcstring filename(void) const; // See base class for documentation. void write(const void *data, size_t data_size); private: /** * The constructor. It is private on purpose, use the #create * class method instead. * * @param deeper * the output stream this filter will write its output to. */ file_output_bzip2(const file_output::pointer &deeper); /** * The deeper instance variable is used to remember the output * stream this filter will write its output to. */ file_output::pointer deeper; /** * The stream instance variable is used to remember somthign that * the bzip2 code wants to remember. It is opaque to us. */ bz_stream stream; static const unsigned BUFFER_SIZE = 1 << 14; /** * The outbuf instance variable is used to remember the buffered * output data. */ char *buf; /** * The drop_dead method is used to report a fatal error from the * bzip2 engine. */ void bzlib_fatal_error(int err); /** * The default constructor. Do not use. */ file_output_bzip2(); /** * The copy constructor. Do not use. */ file_output_bzip2(const file_output_bzip2 &rhs); /** * The assignment operator. Do not use. */ file_output_bzip2 &operator=(const file_output_bzip2 &rhs); }; // vim: set ts=8 sw=4 et : #endif // LIBTARDY_FILE_OUTPUT_BZIP2_H tardy-1.28/libtardy/file/output/bzip2/candidate.cc 644 0 0 167712163037023 204140ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include #include bool file_output_bzip2::candidate(const rcstring &fn) { return (fn != file_input_bunzip2::remove_filename_suffix(fn)); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/output/bzip2/filename.cc 644 0 0 170612163037023 202510ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include #include rcstring file_output_bzip2::filename(void) const { return file_input_bunzip2::remove_filename_suffix(deeper->filename()); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/output/factory.cc 644 0 0 211112163037023 171010ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include file_output::pointer file_output::factory(const char *filename) { if ( !filename || *filename == '\0' || (filename[0] == '-' && filename[1] == '\0') ) return file_output_stdout::create(); return file_output_normal::create(filename); } tardy-1.28/libtardy/file/output/gzip.cc 644 0 0 1116312163037023 164320ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include #include #include #ifndef Z_BUFSIZE #ifdef MAXSEG_64K #define Z_BUFSIZE 4096 // minimize memory usage for 16-bit DOS #else #define Z_BUFSIZE 16384 #endif #endif static unsigned char gzip_magic[2] = { 0x1F, 0x8B }; // gzip magic header file_output_gzip::~file_output_gzip() { // // finish sending the compressed stream // stream.avail_in = 0; // should be zero already anyway if (stream.avail_out == 0) { deeper->write(outbuf, Z_BUFSIZE); stream.next_out = outbuf; stream.avail_out = Z_BUFSIZE; } for (;;) { int err = deflate(&stream, Z_FINISH); if (err < 0) drop_dead(err); uInt len = Z_BUFSIZE - stream.avail_out; if (!len) break; deeper->write(outbuf, len); stream.next_out = outbuf; stream.avail_out = Z_BUFSIZE; } // // and the trailer // put4(crc); put4(stream.total_in); // // Clean up any resources we were using. // if (stream.state != NULL) deflateEnd(&stream); delete [] outbuf; outbuf = 0; } void file_output_gzip::put4(unsigned long x) { unsigned char buffer[4]; endian_set4le(buffer, x); deeper->write(buffer, sizeof(buffer)); } file_output_gzip::file_output_gzip(const file_output::pointer &a_deeper) : deeper(a_deeper), outbuf(new Byte [Z_BUFSIZE]), crc(0) { crc = crc32(0L, Z_NULL, 0); stream.avail_in = 0; stream.avail_out = 0; stream.next_in = NULL; stream.next_out = NULL; stream.opaque = (voidpf)0; stream.zalloc = (alloc_func)0; stream.zfree = (free_func)0; // // Set the parameters for the compression. // Note: windowBits is passed < 0 to suppress zlib header. // int err = deflateInit2 ( &stream, Z_BEST_COMPRESSION, // level Z_DEFLATED, // method -MAX_WBITS, // windowBits DEF_MEM_LEVEL, // memLevel Z_DEFAULT_STRATEGY // strategy ); if (err != Z_OK) drop_dead(err); stream.next_out = outbuf; stream.avail_out = Z_BUFSIZE; // // Write a very simple .gz header: // unsigned char header[10]; memcpy(header, gzip_magic, sizeof(gzip_magic)); header[2] = Z_DEFLATED; header[3] = 0; // flags endian_set4le(header + 4, 0); // time header[8] = 0; // xflags header[9] = 3; // always use unix OS_CODE deeper->write(header, sizeof(header)); } file_output::pointer file_output_gzip::create(const file_output::pointer &a_deeper) { return pointer(new file_output_gzip(a_deeper)); } file_output::pointer file_output_gzip::create_if_candidate(const file_output::pointer &a_deeper) { if (candidate(a_deeper->filename())) return create(a_deeper); else return a_deeper; } void file_output_gzip::drop_dead(int err) { deeper->fatal("gzip: %s", z_error(err)); } rcstring file_output_gzip::filename(void) const { rcstring fn = deeper->filename(); rcstring fn_lc = fn.downcase(); if (fn_lc.ends_with(".z")) return fn.substr(0, fn.size() - 2); if (fn_lc.ends_with(".gz")) return fn.substr(0, fn.size() - 3); if (fn_lc.ends_with(".tgz")) return fn.substr(0, fn.size() - 4) + ".tar"; return fn; } void file_output_gzip::write(const void *data, size_t data_size) { stream.next_in = (Bytef *)data; stream.avail_in = data_size; while (stream.avail_in != 0) { if (stream.avail_out == 0) { deeper->write(outbuf, Z_BUFSIZE); stream.next_out = outbuf; stream.avail_out = Z_BUFSIZE; } int err = deflate(&stream, Z_NO_FLUSH); if (err != Z_OK) drop_dead(err); } crc = crc32(crc, (Bytef *)data, data_size); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/output/gzip.h 644 0 0 746212163037023 162630ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_FILE_OUTPUT_GZIP_H #define LIBTARDY_FILE_OUTPUT_GZIP_H #include #include /** * The file_output_gzip class is used to represent output filter which * compresses the data (using gzip algorithm) before writing it to the * deeper output stream. */ class file_output_gzip: public file_output { public: /** * The destructor. */ virtual ~file_output_gzip(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * the output stream this filter will write its output to. */ static pointer create(const file_output::pointer &deeper); /** * The candidate class method is used to examine the given file * name to determine whether or not it looks like a gzip file. * * @param filename * The file name to be examined. * @returns * true if looks like a gzip filename, false if not */ static bool candidate(const rcstring &filename); /** * The create_if_candidate class method is used to create new * dynamically allocated instances of this class, if the deeper * file's name looks like a gzip candidate, otherwite the deeper * file is simple passed through. * * @param deeper * the output stream this filter will write its output to. */ static pointer create_if_candidate(const file_output::pointer &deeper); protected: // See base class for documentation. rcstring filename(void) const; // See base class for documentation. void write(const void *data, size_t data_size); private: /** * The constructor. It is private on purpose, use the #create * class method instead. * * @param deeper * the output stream this filter will write its output to. */ file_output_gzip(const file_output::pointer &deeper); /** * The deeper instance variable is used to remember the output * stream this filter will write its output to. */ file_output::pointer deeper; /** * The stream instance variable is used to remember somthign that * the gzip code wants to remember. It is opaque to us. */ z_stream stream; /** * The outbuf instance variable is used to remember the buffered * output data. */ Byte *outbuf; /** * The crc instance variable is used to remember the crc32 of the * uncompressed data. */ uLong crc; /** * The drop_dead method is used to report a fatal error from the * gzip engine. */ void drop_dead(int err); void put4(unsigned long value); /** * The default constructor. Do not use. */ file_output_gzip(); /** * The copy constructor. Do not use. */ file_output_gzip(const file_output_gzip &); /** * The assignment operator. Do not use. */ file_output_gzip &operator=(const file_output_gzip &); }; // vim: set ts=8 sw=4 et : #endif // LIBTARDY_FILE_OUTPUT_GZIP_H tardy-1.28/libtardy/file/output/gzip/candidate.cc 644 0 0 167312163037023 203330ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include #include bool file_output_gzip::candidate(const rcstring &fn) { return (fn != file_input_gunzip::remove_filename_suffix(fn)); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/output/gzip/filename.cc 644 0 0 170212163037023 201700ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include #include rcstring file_output_gzip::filename(void) const { return file_input_gunzip::remove_filename_suffix(deeper->filename()); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/output/hexdump.cc 644 0 0 556112163037023 171200ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include #include #include #include file_output_hexdump::~file_output_hexdump() { if (address & 15) { deeper->write(buffer, sizeof(buffer)); address = 0; } } file_output_hexdump::file_output_hexdump(const file_output::pointer &a_deeper) : deeper(a_deeper), address(0) { } file_output_hexdump::pointer file_output_hexdump::create(const file_output::pointer &a_deeper) { return pointer(new file_output_hexdump(a_deeper)); } static void hex(char *buffer, unsigned long value, size_t buffer_size) { while (buffer_size > 0) { --buffer_size; buffer[buffer_size] = "0123456789ABCDEF"[value & 15]; value >>= 4; } } void file_output_hexdump::write(const void *vdata, size_t data_size) { unsigned char *data = (unsigned char*)vdata; while (data_size > 0) { unsigned char c = *data; ++data; --data_size; unsigned pos = address & 15; if (pos == 0) { if ( sizeof(off_t) * CHAR_BIT > 32 && address >= ((off_t)1 << 32) ) { assert(sizeof(buffer) >= 18); hex(buffer, address >> 32, 8); buffer[8] = ' '; hex(buffer + 9, address & 0xFFFFFFFFuL, 8); buffer[17] = ':'; deeper->write(buffer, 18); } else { assert(sizeof(buffer) >= 9); hex(buffer, address, 8); buffer[8] = ':'; deeper->write(buffer, 9); } memset(buffer, ' ', sizeof(buffer) - 1); buffer[sizeof(buffer) - 1] = '\n'; } hex(buffer + 1 + 3 * pos, c, 2); c &= 0x7F; if (!isprint(c)) c = '.'; buffer[50 + pos] = c; if (pos == 15) deeper->write(buffer, sizeof(buffer)); ++address; } } rcstring file_output_hexdump::filename(void) const { return deeper->filename(); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/output/hexdump.h 644 0 0 607312163037023 167610ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_FILE_OUTPUT_HEXDUMP_H #define LIBTARDY_FILE_OUTPUT_HEXDUMP_H #include /** * The file_output_hexdump class is used to represent a filter that * converts binary data into a text hexadecimal hex dump. * This of most use when debugging and testing. */ class file_output_hexdump: public file_output { public: typedef boost::shared_ptr pointer; /** * The destructor. */ virtual ~file_output_hexdump(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * The deeper output to receive our output. */ static pointer create(const file_output::pointer &deeper); protected: // See base class for documentation. void write(const void *data, size_t data_size); // See base class for documentation. rcstring filename(void) const; private: /** * The constructor. * It is private on purpose, use a #create class method instead. * * @param deeper * The deeper output to receive our output. */ file_output_hexdump(const file_output::pointer &deeper); /** * The deeper instance variable is used to remember the deeper * output stream to receive our output. */ file_output::pointer deeper; /** * The address instance variable is used to remember the current * position within the file. This controls when and how the * #buffer is constructed and printed. * It could be greater than 2GB, which is why we must use off_t. */ off_t address; /** * The buffer instance variable is used to remember the * output line being constructed. */ char buffer[3 * 16 + 2 + 16 + 1]; /** * The default constructor. Do not use. */ file_output_hexdump(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ file_output_hexdump(const file_output_hexdump &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ file_output_hexdump &operator=(const file_output_hexdump &rhs); }; // vim: set ts=8 sw=4 et : #endif // LIBTARDY_FILE_OUTPUT_HEXDUMP_H tardy-1.28/libtardy/file/output/normal.cc 644 0 0 352112163037023 167300ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2003, 2008, 2009, 2011, 2012 Peter Miller // // 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 3 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, see . // #include #include #include #include #include #include #include file_output_normal::~file_output_normal() { if (fd >= 0) explain_close_or_die(fd); } file_output_normal::file_output_normal(const char *a_fn) : fn(a_fn), fd(-1) { fd = explain_creat_or_die(fn.c_str(), 0666); } file_output::pointer file_output_normal::create(const char *a_fn) { return pointer(new file_output_normal(a_fn)); } void file_output_normal::write(const void *buffer, size_t nbytes) { ssize_t count = explain_write_or_die(fd, buffer, nbytes); assert(count >= 0); // it would be nice to use %zu but backwards compatibility prevents if ((size_t)count != nbytes) { fatal ( "short write (gave %lu, got %lu)", (unsigned long)nbytes, (unsigned long)count ); } } rcstring file_output_normal::filename(void) const { return fn; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/output/normal.h 644 0 0 520612163037023 165740ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002-2004, 2008, 2009, 2011, 2012 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_FILE_OUTPUT_NORMAL_H #define LIBTARDY_FILE_OUTPUT_NORMAL_H #include #include /** * The file_output_normal class is used to represent an output stream * writing to a normal file. */ class file_output_normal: public file_output { public: /** * The destructor. */ virtual ~file_output_normal(); /** * The create class method is used to create new dynmically * allocated instances of this class. * * @param filename * The name of the file to write the output to. */ static pointer create(const char *filename); protected: // See base class for documentation. virtual void write(const void *data, size_t data_size); // See base class for documentation. rcstring filename(void) const; private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param filename * The name of the file to write the output to. */ file_output_normal(const char *filename); /** * The fn instance variable is used to remember the name of the * file being written. */ rcstring fn; /** * The fd instance variable is used to remember the file descriptor * of the open file. */ int fd; /** * The default constructor. Do not use. */ file_output_normal(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ file_output_normal(const file_output_normal &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ file_output_normal &operator = (const file_output_normal &rhs); }; // vim: set ts=8 sw=4 et : #endif // LIBTARDY_FILE_OUTPUT_NORMAL_H tardy-1.28/libtardy/file/output/stdout.cc 644 0 0 320512163037023 167610ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2003, 2008, 2009, 2011, 2012 Peter Miller // // 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 3 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, see // . // #include #include #include file_output_stdout::~file_output_stdout() { // nothing to do } file_output_stdout::file_output_stdout() { // nothing to do } file_output::pointer file_output_stdout::create(void) { return pointer(new file_output_stdout()); } void file_output_stdout::write(const void *data, size_t data_size) { int fd = 1; ssize_t count = explain_write_or_die(fd, data, data_size); assert(count >= 0); if ((size_t)count != data_size) { fatal ( "short write (gave %lu, got %lu)", (unsigned long)data_size, (unsigned long)count ); } } rcstring file_output_stdout::filename(void) const { return "standard output"; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/output/stdout.h 644 0 0 407712163037023 166330ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2003, 2004, 2008, 2009, 2011, 2012 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_FILE_OUTPUT_STDOUT_H #define LIBTARDY_FILE_OUTPUT_STDOUT_H #include /** * The file_output_normal class is used to represent an output stream * writing to the standard output. */ class file_output_stdout: public file_output { public: /** * The destructor. */ virtual ~file_output_stdout(); /** * The create class method is used to create new dynmically * allocated instances of this class. */ static pointer create(void); protected: // See base class for documentation. virtual void write(const void *data, size_t data_size); // See base class for documentation. rcstring filename(void) const; private: /** * The default constructor. * It is private on purpose, use the #create class method instead. */ file_output_stdout(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ file_output_stdout(const file_output_stdout &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ file_output_stdout &operator=(const file_output_stdout &rhs); }; // vim: set ts=8 sw=4 et : #endif // LIBTARDY_FILE_OUTPUT_STDOUT_H tardy-1.28/libtardy/file/output/xz.cc 644 0 0 510112163037023 160750ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include file_output_xz::~file_output_xz() { strm.next_in = NULL; strm.avail_in = 0; for (;;) { const size_t OUT_BUF_MAX = (size_t)1 << 14; uint8_t out_buf[OUT_BUF_MAX]; strm.next_out = out_buf; strm.avail_out = OUT_BUF_MAX; lzma_ret err = lzma_code(&strm, LZMA_FINISH); if (err != LZMA_OK && err != LZMA_STREAM_END) drop_dead("lzma_code", err); size_t out_len = OUT_BUF_MAX - strm.avail_out; deeper->write(out_buf, out_len); if (strm.avail_out != 0) break; } lzma_end(&strm); } static lzma_stream strm_zero = LZMA_STREAM_INIT; file_output_xz::file_output_xz(const file_output::pointer &a_deeper) : deeper(a_deeper), strm(strm_zero) { uint32_t preset = 9 | LZMA_PRESET_EXTREME; lzma_check check = LZMA_CHECK_CRC64; lzma_ret err = lzma_easy_encoder(&strm, preset, check); if (err != LZMA_OK) drop_dead("lzma_easy_encoder", err); } file_output_xz::pointer file_output_xz::create(const file_output::pointer &a_deeper) { return pointer(new file_output_xz(a_deeper)); } void file_output_xz::write(const void *data, size_t data_size) { strm.next_in = (const uint8_t *)data; strm.avail_in = data_size; for (;;) { const size_t OUT_BUF_MAX = (size_t)1 << 14; uint8_t out_buf[OUT_BUF_MAX]; strm.next_out = out_buf; strm.avail_out = OUT_BUF_MAX; lzma_ret err = lzma_code(&strm, LZMA_RUN); if (err != LZMA_OK) drop_dead("lzma_code", err); size_t out_len = OUT_BUF_MAX - strm.avail_out; deeper->write(out_buf, out_len); if (strm.avail_out != 0) break; } } void file_output_xz::drop_dead(const char *caption, lzma_ret err) { fatal("%s: %s", caption, lzma_strerror(err)); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/output/xz.h 644 0 0 653312163037023 157510ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_FILE_OUTPUT_XZ_H #define LIBTARDY_FILE_OUTPUT_XZ_H #include #include /** * The file_output_xz class is used to represent the processing required to * compress output using the "xz" compression format (see liblzma-dev for more * info) before writing it to the deeper output stream. * * https://en.wikipedia.org/wiki/LZMA */ class file_output_xz: public file_output { public: /** * The destructor. */ virtual ~file_output_xz(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * the output stream this filter will write its output to. */ static pointer create(const file_output::pointer &deeper); /** * The candidate class method is used to examine the given file * name to determine whether or not it looks like a xz file. * * @param filename * The file name to be examined. * @returns * true if looks like a xz filename, false if not */ static bool candidate(const rcstring &filename); /** * The create_if_candidate class method is used to create new * dynamically allocated instances of this class, if the deeper * file's name looks like a xz candidate, otherwite the deeper * file is simply passed through. * * @param deeper * the output stream this filter will write its output to. */ static pointer create_if_candidate(const file_output::pointer &deeper); protected: // See base class for documentation. rcstring filename(void) const; // See base class for documentation. void write(const void *data, size_t data_size); private: /** * The constructor. It is private on purpose, use the #create * class method instead. * * @param deeper * the output stream this filter will write its output to. */ file_output_xz(const file_output::pointer &deeper); /** * The deeper instance variable is used to remember the output * stream this filter will write its output to. */ file_output::pointer deeper; lzma_stream strm; void drop_dead(const char *caption, lzma_ret); /** * The default constructor. Do not use. */ file_output_xz(); /** * The copy constructor. Do not use. */ file_output_xz(const file_output_xz &rhs); /** * The assignment operator. Do not use. */ file_output_xz &operator=(const file_output_xz &rhs); }; // vim: set ts=8 sw=4 et : #endif // LIBTARDY_FILE_OUTPUT_XZ_H tardy-1.28/libtardy/file/output/xz/candidate.cc 644 0 0 221112163037023 200100ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include #include bool file_output_xz::candidate(const rcstring &filename) { return (filename != file_input_xz::remove_filename_suffix(filename)); } file_output_xz::pointer file_output_xz::create_if_candidate(const file_output::pointer &a_deeper) { if (!candidate(a_deeper->filename())) return a_deeper; return create(a_deeper); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/file/output/xz/filename.cc 644 0 0 166612163037023 176710ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include #include rcstring file_output_xz::filename(void) const { return file_input_xz::remove_filename_suffix(deeper->filename()); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/filenamelist.cc 644 0 0 161412163037023 156360ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2002, 2008, 2009 Peter Miller // // 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 3 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, see // . // #include filenamelist::~filenamelist() { } filenamelist::filenamelist() { } tardy-1.28/libtardy/filenamelist.h 644 0 0 357412163037023 155070ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_FILENAMELIST_H #define LIBTARDY_FILENAMELIST_H #include #include #include /** * The filenamelist class is used to represent a list of file names, * usually but not always read from a file. */ class filenamelist { public: typedef boost::shared_ptr pointer; /** * The destructor. */ virtual ~filenamelist(); /** * The read_one_line method is used to read a file name from * the list of file names. */ virtual bool read_one_line(rcstring &result) = 0; /** * The `filename' method is used to get the name of the input * filename containing the list fo file names. */ virtual rcstring filename(void) const = 0; protected: /** * The default constructor. * For use by derived classes only. */ filenamelist(); private: /** * The copy constructor. Do not use. */ filenamelist(const filenamelist &); /** * The assignment operator. Do not use. */ filenamelist &operator=(const filenamelist &); }; #endif // LIBTARDY_FILENAMELIST_H tardy-1.28/libtardy/filenamelist/file.cc 644 0 0 427512163037023 165630ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2002, 2008, 2009, 2011, 2012 Peter Miller // // 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 3 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, see . // #include #include #include filenamelist_file::~filenamelist_file() { } filenamelist_file::filenamelist_file(const file_input::pointer &a_source) : source(a_source), position(0), length(0) { } filenamelist::pointer filenamelist_file::create(const file_input::pointer &a_source) { return pointer(new filenamelist_file(a_source)); } int filenamelist_file::read_one_char(void) { if (position >= length) { position = 0; length = source->read(buffer, sizeof(buffer)); if (length == 0) return -1; } return buffer[position++]; } bool filenamelist_file::read_one_line(rcstring &result) { static rcstring_accumulator acc; acc.clear(); for (;;) { int ic = read_one_char(); if (ic < 0) { if (!acc.empty()) { while (acc.back() == '/') acc.pop_back(); result = acc.mkstr(); return true; } return false; } unsigned char c = ic; if (c == '\n') { while (acc.back() == '/') acc.pop_back(); result = acc.mkstr(); return true; } acc.push_back((unsigned char)c); } } rcstring filenamelist_file::filename(void) const { return source->filename(); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/filenamelist/file.h 644 0 0 606212163037023 164210ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2002, 2008, 2009, 2011, 2012 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_FILENAMELIST_FILE_H #define LIBTARDY_FILENAMELIST_FILE_H #include #include /** * The filenamelist_file class is used to represent a file name list * sourced from a file, one file name per line. */ class filenamelist_file: public filenamelist { public: /** * The destructor. */ virtual ~filenamelist_file(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param ifp * The file to be read for file names, one per line. */ static pointer create(const file_input::pointer &ifp); protected: // see base class for documentation bool read_one_line(rcstring &result); // see base class for documentation rcstring filename(void) const; private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param ifp * The file to be read for file names, one per line. */ filenamelist_file(const file_input::pointer &ifp); private: /** * The source instance variable is used to remember where to * get the input from. */ file_input::pointer source; /** * The position instance variable is used to remember the * current position within the #buffer. */ size_t position; /** * The length instance variable is used to remember the number * of valid characters within the #buffer. */ size_t length; /** * The buffer instance variable is used to remember data read * from the source. The source is buffered for better efficiency. */ char buffer[512]; /** * The read_one_char method is used to read one character * from the input source, buffered using the the #buffer, * #position and #length instance variables. */ inline int read_one_char(void); /** * The default constructor. Do not use. */ filenamelist_file(); /** * The copy constructor. Do not use. */ filenamelist_file(const filenamelist_file &); /** * The assignment operator. Do not use. */ filenamelist_file &operator=(const filenamelist_file &); }; // vim: set ts=8 sw=4 et : #endif // LIBTARDY_FILENAMELIST_FILE_H tardy-1.28/libtardy/filenamelist/filter.cc 644 0 0 217312163037023 171240ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include filenamelist_filter::~filenamelist_filter() { } filenamelist_filter::filenamelist_filter( const filenamelist::pointer &a_deeper ) : deeper(a_deeper) { } bool filenamelist_filter::read_one_deeper(rcstring &result) { return deeper->read_one_line(result); } rcstring filenamelist_filter::filename(void) const { return deeper->filename(); } tardy-1.28/libtardy/filenamelist/filter.h 644 0 0 414412163037023 167660ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_FILENAMELIST_FILTER_H #define LIBTARDY_FILENAMELIST_FILTER_H #include /** * The filenamelist_filter class is used to represent an abstract * filtering operation on a list of file names. */ class filenamelist_filter: public filenamelist { public: /** * The destructor. */ virtual ~filenamelist_filter(); // see base class for documentation rcstring filename(void) const; protected: /** * The constructor. * For use by derived classes only. * * @param deeper * The list of file names tor be filtered. */ filenamelist_filter(const filenamelist::pointer &deeper); /** * The read_one_deeper method is used to read one line from * the deeper file name list. */ bool read_one_deeper(rcstring &result); private: /** * The deeper instance variable is used to remember the source * fo the filenamelist being filtered. */ filenamelist::pointer deeper; /** * The default constructor. Do not use. */ filenamelist_filter(); /** * The copy constructor. Do not use. */ filenamelist_filter(const filenamelist_filter &); /** * The assignment operator. Do not use. */ filenamelist_filter &operator=(const filenamelist_filter &); }; #endif // LIBTARDY_FILENAMELIST_FILTER_H tardy-1.28/libtardy/filenamelist/filter/progress.cc 644 0 0 1777712163037023 210300ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2002, 2008, 2009, 2011, 2012 Peter Miller // // 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 3 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, see . // #include #include #include #include #include #include #include filenamelist_filter_progress::~filenamelist_filter_progress() { } filenamelist_filter_progress::filenamelist_filter_progress( const filenamelist::pointer &a_deeper ) : filenamelist_filter(a_deeper), state(state_begin), position(0), start_time(0), next_time(0), size_total(0), size_position(0), spinner_state(0), show(isatty(2)) { } filenamelist::pointer filenamelist_filter_progress::create(const filenamelist::pointer &a_deeper) { return pointer(new filenamelist_filter_progress(a_deeper)); } static void format_size_inner(char *buffer, size_t sizeof_buffer, double d, char scale) { if (d < 10) { snprintf(buffer, sizeof_buffer, "%4.2f%c", d, scale); return; } if (d < 100) { snprintf(buffer, sizeof_buffer, "%4.1f%c", d, scale); return; } snprintf(buffer, sizeof(buffer), "%4.0f%c", d, scale); } static char * format_size(long long n) { static char buffer[10]; if (n < 10000) { snprintf(buffer, sizeof(buffer), "%4d ", (int)n); return buffer; } double d = n / 1024.; if (d < 10000) { format_size_inner(buffer, sizeof(buffer), d, 'K'); return buffer; } d /= 1024; if (d < 10000) { format_size_inner(buffer, sizeof(buffer), d, 'M'); return buffer; } d /= 1024; if (d < 10000) { format_size_inner(buffer, sizeof(buffer), d, 'G'); return buffer; } d /= 1024; if (d < 10000) { format_size_inner(buffer, sizeof(buffer), d, 'T'); return buffer; } d /= 1024; if (d < 10000) { format_size_inner(buffer, sizeof(buffer), d, 'P'); return buffer; } d /= 1024; format_size_inner(buffer, sizeof(buffer), d, 'E'); return buffer; } char filenamelist_filter_progress::spinner(void) { return ("|/-\\"[spinner_state++ & 3]); } void filenamelist_filter_progress::show_start_status(void) { if (!show) return; time_t now; time(&now); if (now < next_time) return; next_time = now + 1; char buffer[80]; strcpy(buffer, "\rReading file list: "); char *bp = buffer + strlen(buffer); snprintf(bp, buffer + sizeof(buffer) - bp, "%s files, ", format_size(items.size())); bp += strlen(bp); snprintf(bp, buffer + sizeof(buffer) - bp, "%sB ", format_size(size_total)); bp += strlen(bp); snprintf(bp, buffer + sizeof(buffer) - bp, "%c ", spinner()); if (::write(2, buffer, strlen(buffer)) < 0) show = 0; } static const char * format_time(long x) { static char buffer[20]; if (x < 60 * 60) { snprintf(buffer, sizeof(buffer), "%2dm%02ds", (int)(x / 60), (int)(x % 60)); return buffer; } x = (x + 30) / 60; if (x < 24 * 60) { snprintf(buffer, sizeof(buffer), "%2dh%02dm", (int)(x / 60), (int)(x % 60)); return buffer; } x = (x + 30) / 60; if (x < 100 * 24) { snprintf(buffer, sizeof(buffer), "%2dd%02dh", (int)(x / 24), (int)(x % 24)); return buffer; } return "forever"; } void filenamelist_filter_progress::show_middle_status(void) { if (!show) return; time_t now; time(&now); if (now < next_time) return; next_time = now + 1; char buffer[80]; char *bp = buffer; *bp++ = '\r'; snprintf(bp, buffer + sizeof(buffer) - bp, "%s of ", format_size(position)); bp += strlen(bp); snprintf(bp, buffer + sizeof(buffer) - bp, "%s files, ", format_size(items.size())); bp += strlen(bp); snprintf(bp, buffer + sizeof(buffer) - bp, "%sB of ", format_size(size_position)); bp += strlen(bp); snprintf(bp, buffer + sizeof(buffer) - bp, "%sB, ", format_size(size_total)); bp += strlen(bp); time_t elapsed = now - start_time; if (elapsed > 5 && size_total) { long long rate = size_position / elapsed; snprintf(bp, buffer + sizeof(buffer) - bp, "%sB/sec, ", format_size(rate)); bp += strlen(bp); double frac = (double)size_position / (double)size_total; time_t total_time = time_t(elapsed / frac); time_t remaining_time = total_time - elapsed; snprintf(bp, buffer + sizeof(buffer) - bp, "ETA %s ", format_time(remaining_time)); bp += strlen(bp); } snprintf(bp, buffer + sizeof(buffer) - bp, "%c ", spinner()); if (::write(2, buffer, strlen(buffer)) < 0) show = 0; } void filenamelist_filter_progress::show_end_status(void) { if (!show) return; time_t now; time(&now); char buffer[80]; char *bp = buffer; *bp++ = '\r'; snprintf(bp, buffer + sizeof(buffer) - bp, "%s files, ", format_size(items.size())); bp += strlen(bp); snprintf(bp, buffer + sizeof(buffer) - bp, "%sB, ", format_size(size_total)); bp += strlen(bp); time_t elapsed = now - start_time; if (elapsed < 1) elapsed = 1; long long rate = size_position / elapsed; snprintf(bp, buffer + sizeof(buffer) - bp, "%sB/sec, ", format_size(rate)); bp += strlen(bp); snprintf(bp, buffer + sizeof(buffer) - bp, "%s ", format_time(elapsed)); bp += strlen(bp); while (bp < buffer + sizeof(buffer) - 1) *bp++ = ' '; *bp++ = '\n'; if (::write(2, buffer, sizeof(buffer)) < 0) show = 0; } bool filenamelist_filter_progress::read_one_line(rcstring &result) { switch (state) { case state_begin: { rcstring temp; while (read_one_deeper(temp)) { show_start_status(); struct stat st; if (lstat(temp.c_str(), &st)) memset(&st, 0, sizeof(st)); off_t size = S_ISREG(st.st_mode) ? st.st_size : 0; // round up size = ((size + 511) & ~511) + 512; items.push_back(item_t(temp, size)); size_total += size; } state = state_middle; time(&start_time); } // fall through... case state_middle: if (position < items.size()) { show_middle_status(); item_t item = items[position++]; result = item.name; size_position += item.size; return true; } show_end_status(); state = state_end; // fall through... case state_end: break; } return false; } filenamelist_filter_progress::item_t::~item_t() { } filenamelist_filter_progress::item_t::item_t( const rcstring &a_name, off_t a_size ) : name(a_name), size(a_size) { } filenamelist_filter_progress::item_t::item_t(const item_t &rhs) : name(rhs.name), size(rhs.size) { } filenamelist_filter_progress::item_t & filenamelist_filter_progress::item_t::operator=(const item_t &rhs) { if (this != &rhs) { name = rhs.name; size = rhs.size; } return *this; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/filenamelist/filter/progress.h 644 0 0 1177312163037023 206600ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2002, 2008, 2009, 2011, 2012 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_FILENAMELIST_FILTER_PROGRESS_H #define LIBTARDY_FILENAMELIST_FILTER_PROGRESS_H #include #include #include /** * The filenamelist_filter_progress class is used to filter a name * list source, not to modify the name list in any way, but to report * progress against itfilter a name list source, not to modify the name * list in any way, but to report progress against it. */ class filenamelist_filter_progress: public filenamelist_filter { public: /** * The destructor. */ virtual ~filenamelist_filter_progress(); /** * The create class method iss used to create new dynamically * allocated instances of this class. * * @param deeper * The file name list to be filtered. */ static pointer create(const filenamelist::pointer &deeper); protected: // see base class for documentation bool read_one_line(rcstring &result); private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param deeper * The file name list to be filtered. */ filenamelist_filter_progress(const filenamelist::pointer &deeper); enum state_t { state_begin, state_middle, state_end }; /** * The state instance variable is used to remember what state * we are up to. */ state_t state; struct item_t { ~item_t(); item_t(const rcstring &name, off_t size); item_t(const item_t &rhs); item_t &operator=(const item_t &rhs); rcstring name; off_t size; }; typedef std::deque items_t; /** * The items instance variable is used to keep track of the * name and size of each file. */ items_t items; /** * The position instance variable is used to remember where * we are up to working through the list. */ size_t position; /** * The start_time instance variable is used to remember * when we started to transfer data (well, file names, anyway) * to the classes upstream of us. This is used to predict the ETA. */ time_t start_time; /** * The next_time instance variable is used to remember when * we should next emit another progress report. */ time_t next_time; /** * The size_total instance variable is used to remember the * total size of all the files. This is used to predict the ETA. */ off_t size_total; /** * The size_position instance variable is used to remember * how much data has been transferred so far. This is used to * predict the ETA. */ off_t size_position; /** * The spinner_state instance variable is used to remember * what position the spinner is in. */ int spinner_state; /** * The show instance variable is used to remember whether * or not we are showing progress. It is set to true if the * standard error stream is a tty, false otherwise. */ bool show; /** * The spinner method is used to draw the next spinner indicator * character. */ char spinner(void); /** * The show_start_status method is used to show how many fiels * have been read in to date. */ void show_start_status(void); /** * The spinner method is used to show how far along with readin * gthe file list we are. This indirectly indicates how long * it will be before we finish (ETA). */ void show_middle_status(void); /** * The show_end_status method is used to shwo the number of * files, number of bytes, effective data transfer rate, and * elapsed time. */ void show_end_status(void); /** * The default constructor. Do not use. */ filenamelist_filter_progress(); /** * The copy constructor. Do not use. */ filenamelist_filter_progress(const filenamelist_filter_progress &); /** * The assignment operator. Do not use. */ filenamelist_filter_progress &operator=( const filenamelist_filter_progress &); }; // vim: set ts=8 sw=4 et : #endif // LIBTARDY_FILENAMELIST_FILTER_PROGRESS_H tardy-1.28/libtardy/format_family.cc 644 0 0 271612163037023 160170ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include #include #include format_family_t format_family_from_filename(const rcstring &filename) { if (filename.empty() || filename == "standard output") return format_family_other; rcstring fn2 = filename.basename().downcase(); fn2 = file_input_gunzip::remove_filename_suffix(fn2); fn2 = file_input_bunzip2::remove_filename_suffix(fn2); if (fn2.ends_with(".tar")) return format_family_tar; if (fn2.ends_with(".cpio")) return format_family_cpio; if (fn2.ends_with(".ar") || fn2.ends_with(".a") || fn2.ends_with(".deb")) return format_family_ar; return format_family_other; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/format_family.h 644 0 0 264012163037023 156550ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_FORMAT_FAMILY_H #define LIBTARDY_FORMAT_FAMILY_H #include /** * A format family is a broad indication as to which archive format is * in use. */ enum format_family_t { format_family_tar, format_family_cpio, format_family_ar, format_family_other, }; /** * The format_family_from_filename function is used to guess a file's * format family from the file's extension. * * @param filename * The file name to sniff at. * @returns * The corresponding fformat familiy, or fornat_family_other if it * can't be determined. */ format_family_t format_family_from_filename(const rcstring &filename); #endif // LIBTARDY_FORMAT_FAMILY_H tardy-1.28/libtardy/fstrcmp.cc 644 0 0 2560212163037023 146630ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include typedef struct snake_t snake_t; struct snake_t { long line1; long line2; long count; snake_t *next; }; static long tablesize; // needed table size static long tablesize_max; // allocated table size static long *V1; // the row containing the last d static long *V1_table; static long *V2; // another row static long *V2_table; static snake_t *nextsnake; // next allocable snake structure static snake_t *snake_table; // allocable snake structures typedef struct file file; struct file { const char *f_lines; long f_linecount; }; typedef struct fc_t fc_t; struct fc_t { file fileA; file fileB; long maxlines; long minlines; long inserts; long deletes; long matches; }; static fc_t fc; // // Routine to find the middle snake of an optimial D-path spanning // lines A to A+N in file A to lines B to B+N in file B. Returns the // length D of the D-path as a return value, and the upper left and // lower right relative coordinates of a snake midway through the D-path. // static long midsnake(long A, long N, long B, long M, long *ulx, long *uly, long *lrx, long *lry) { long x; long y; long k; long oldx; const char *lp1; const char *lp2; long DELTA; long odd; long MAXD; long changes; long D; trace(("midsnake(A = %ld, N = %ld, B = %ld, M = %ld)\n{\n" //} , A, N, B, M)); trace(("searching: %ld,%ld to %ld,%ld\n", A, B, A + N, B + M)); DELTA = N - M; odd = DELTA & 1; MAXD = (M + N + 1) / 2; V1[1] = 0; V2[-1] = 0; changes = -odd - 2; // // This is the main loop for searching for the snake. // D is the distance off the diagonals, and is the number // of changes needed to get from the upper left to the // lower right corner of the region. // for (D = 0; D <= MAXD; D++) { changes += 2; // // Examine all diagonals within current distance. // First search from upper left to lower right, // and then search from lower right to upper left. // for (k = -D; k <= D; k += 2) { // // Find the end of the furthest forward D-path // in diagonal k. // if (k == -D || (k != D && (V1[k-1] < V1[k+1]))) x = V1[k+1]; else x = V1[k-1] + 1; y = x - k; lp1 = &fc.fileA.f_lines[A+x]; lp2 = &fc.fileB.f_lines[B+y]; oldx = x; while (x < N && y < M && *lp1 == *lp2) { x++; y++; lp1++; lp2++; } V1[k] = x; // // See if path overlaps furthest reverse D-path. // If so, then we have found the snake. // if (odd && (k >= (DELTA - (D-1))) && (k <= (DELTA + (D-1)))) { if ((x + V2[k-DELTA]) >= N) { *ulx = oldx; *uly = oldx - k; *lrx = x; *lry = y; trace(("midsnake: %ld,%ld to %ld,%ld (odd)\n", *ulx, *uly, *lrx, *lry)); trace(("return %ld;\n", changes)); trace((//{ "}\n")); return changes; } } } for (k = -D; k <= D; k += 2) { // // Find the end of the furthest reaching reverse // path in diagonal k+DELTA. // if (k == D || (k != -D && (V2[k+1] < V2[k-1]))) x = V2[k-1]; else x = V2[k+1] + 1; y = x + k; lp1 = &fc.fileA.f_lines[A+N-x-1]; lp2 = &fc.fileB.f_lines[B+M-y-1]; oldx = x; while (x < N && y < M && *lp1 == *lp2) { x++; y++; lp1--; lp2--; } V2[k] = x; // // See if path overlaps furthest forward D-path. // If so, then we have found the snake. // if (!odd && (k <= D-DELTA) && (k >= -D-DELTA)) { if ((x + V1[k+DELTA]) >= N) { *ulx = N - x; *uly = M - y; *lrx = N - oldx; *lry = *lrx + *uly - *ulx; trace(("midsnake: %ld,%ld to %ld,%ld (even)\n", *ulx, *uly, *lrx, *lry)); trace(("return %ld;\n", changes)); trace((//{ "}\n")); return changes; } } } } // // Middle snake procedure failed! // assert(0); return 0; } // // Recursive routine to find a minimal D-path through the edit graph // of the two input files. Arguments are the beginning line numbers in // the files, and the number of lines to examine. This is basically a // divide-and-conquer routine which finds the middle snake of an optimal // D-path, then calls itself to find the remainder of the path before the // snake and after the snake. // static void findsnake(int depth, long A, long N, long B, long M) { snake_t *sp; long ulx = 0; long uly = 0; long lrx = 0; long lry; long D; long count; trace(("findsnake(depth = %d, A = %ld, N = %ld, B = %ld, M = %ld)\n{\n" //} , depth, A, N, B, M)); // // If more than one change needed, then call ourself for each part. // D = midsnake(A, N, B, M, &ulx, &uly, &lrx, &lry); if (D > 1) { if (ulx > 0 && uly > 0) findsnake(depth + 1, A, ulx, B, uly); count = lrx - ulx; sp = nextsnake++; sp->line1 = A + ulx; sp->line2 = B + uly; sp->count = count; N -= lrx; M -= lry; if (N > 0 && M > 0) findsnake(depth + 1, A + lrx, N, B + lry, M); trace((//{ "}\n")); return; } // // Only 0 or 1 change needed, so we can compute the result directly. // First compute the snake coming from the upper left corner if any. // if (N > M) count = uly; else count = ulx; sp = nextsnake++; sp->line1 = A; sp->line2 = B; sp->count = count; // // Finally compute the snake coming from the lower right corner if any. // count = lrx - ulx; sp = nextsnake++; sp->line1 = A + ulx; sp->line2 = B + uly; sp->count = count; trace((//{ "}\n")); } double fmemcmp(const void *s1, long s1len, const void *s2, long s2len) { double result; snake_t *sp; // current snake element long line1; // current line in file A long line2; // current line in file B trace(("fstrcmp(s1 = %p, s2 = %p)\n{\n"//} , s1, s2)); trace(("s1 = \"%.*s\";\n", int(s1len), (const char *)s1)); trace(("s2 = \"%.*s\";\n", int(s2len), (const char *)s2)); fc.fileA.f_lines = (const char *)s1; fc.fileA.f_linecount = s1len; fc.fileB.f_lines = (const char *)s2; fc.fileB.f_linecount = s2len; // // Check for trivial case of two empty strings. // This also avoids a division by zero at the end of is function. // if (!fc.fileA.f_linecount && !fc.fileB.f_linecount) { trace(("return 1;\n")); trace((//{ "}\n")); return 1; } if (fc.fileA.f_linecount < fc.fileB.f_linecount) { fc.minlines = fc.fileA.f_linecount; fc.maxlines = fc.fileB.f_linecount; } else { fc.minlines = fc.fileB.f_linecount; fc.maxlines = fc.fileA.f_linecount; } tablesize = fc.maxlines * 2 + 1; if (tablesize > tablesize_max) { tablesize_max = tablesize; delete [] V1_table; V1_table = new long [tablesize_max]; delete [] V2_table; V2_table = new long [tablesize_max]; delete [] snake_table; snake_table = new snake_t [tablesize_max]; } V1 = V1_table + fc.maxlines; V2 = V2_table + fc.maxlines; nextsnake = snake_table; if (fc.fileA.f_linecount > 0 && fc.fileB.f_linecount > 0) { findsnake ( 0, 0L, fc.fileA.f_linecount, 0L, fc.fileB.f_linecount ); } // // End the list with the lower right endpoint // sp = nextsnake++; sp->line1 = fc.fileA.f_linecount; sp->line2 = fc.fileB.f_linecount; sp->count = 0; // // print out the snake list // #ifdef DEBUG for (sp = snake_table; sp < nextsnake; sp++) { trace (( "%d: line1 = %ld; line2 = %ld; count = %ld;\n", sp - snake_table, sp->line1, sp->line2, sp->count )); } #endif // // Scan the snake list and calculate the number of inserted, // deleted, and matching lines. // line1 = 0; line2 = 0; fc.deletes = 0; fc.inserts = 0; fc.matches = 0; for (sp = snake_table; sp < nextsnake; sp++) { fc.deletes += (sp->line1 - line1); fc.inserts += (sp->line2 - line2); fc.matches += sp->count; line1 = sp->line1 + sp->count; line2 = sp->line2 + sp->count; } // // the result is 0 if the strings are entirely unalike, // and 1 if the strings are identical, and somewhere in between // if the are in any way similar. // result = ( 1 - (double)(fc.inserts + fc.deletes) / (fc.fileA.f_linecount + fc.fileB.f_linecount) ); trace(("return %.6f;\n", result)); trace((//{ "}\n")); return result; } double fstrcmp(const char *s1, const char *s2) { trace(("s1 = \"%s\";\n", s1)); trace(("s2 = \"%s\";\n", s2)); return fmemcmp(s1, strlen(s1), s2, strlen(s2)); } tardy-1.28/libtardy/fstrcmp.h 644 0 0 164312163037023 145040ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_FSTRCMP_H #define LIBTARDY_FSTRCMP_H double fmemcmp(const void *, long, const void *, long); double fstrcmp(const char *, const char *); #endif // LIBTARDY_FSTRCMP_H tardy-1.28/libtardy/gmatch.cc 644 0 0 2227012163037023 144460ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include static void missing_closing_bracket(void) { explain_output_error_and_die("pattern missing closing ']'"); } /** * NAME * gmatch - match entryname pattern * * SYNOPSIS * int gmatch(char *formal, char *formal_end, char *actual); * * DESCRIPTION * The formal strings is used as a template to match the given actual * string against. * * The pattern elements understood are * * match zero or more of any character * ? match any single character * [^xxx] match any single character not in the set given. * [xxx] match any single character not in the set given. * The - character is understood to be a range indicator. * If the ] character is the first of the set it is considered * as part of the set, not the terminator. * * RETURNS * the gmatch function returns zero if they do not match, * and nonzero if they do. Returns -1 on error. * * CAVEAT * This is a limited set of the sh(1) patterns. * Assumes that the `original' global variable has been initialized, it is * used for error reporting. */ static bool gmatch_inner(const char *formal, const char *formal_end, const char *actual, const char *actual_end) { trace(("gmatch_inner(formal = %8.8lX, formal_end = %8.8lX, " "actual = %8.8lX, actual_end = %8.8lX)\n{\n", (long)formal, (long)formal_end, (long)actual, (long)actual_end)); bool result = false; while (formal < formal_end) { trace(("formal = \"%.*s\";\n", formal_end - formal, formal)); trace(("actual = \"%.*s\";\n", actual_end - actual, actual)); switch (*formal) { default: if (*actual++ != *formal++) { result = false; goto ret; } break; case '?': if (actual >= actual_end) { result = 0; goto ret; } ++actual; ++formal; break; case '*': ++formal; // // Look for additional wild-cards or single // character wilds, and accumulate them. No // sense recursing twice. This takes care of // weird patterns like "**" or "*?" etc, and // allows us to use the trailing wild-card // optimization. // while (formal < formal_end) { if (*formal == '*') ++formal; else if (*formal == '?') { ++formal; if (actual >= actual_end) { result = false; goto ret; } ++actual; } else break; } // // If we are at the end of the formal pattern, // then we have a trailing wild-card. This // matches anything, so return success no matter // how much actual is left. // if (formal >= formal_end) { result = true; goto ret; } // // Try to find the longest match possible for // the wild-card, so start from the right hand // end of the actual string. // for (const char *cp = actual_end;;) { if (gmatch_inner(formal, formal_end, cp, actual_end)) { result = true; goto ret; } --cp; if (cp < actual) { result = false; goto ret; } } case '[': ++formal; if (*formal == '^') { ++formal; for (;;) { if (formal >= formal_end) { no_close: missing_closing_bracket(); result = false; goto ret; } // // Note: this allows leading // ']' elegantly. // if ( formal_end >= formal + 3 && formal[1] == '-' && formal[2] != ']' ) { char c1; char c2; c1 = formal[0]; c2 = formal[2]; formal += 3; if ( c1 <= c2 ? (c1 <= *actual && *actual <= c2) : (c2 <= *actual && *actual <= c1) ) { result = false; goto ret; } } else if (*actual == *formal++) { result = false; goto ret; } if (*formal == ']') break; } ++formal; } else { for (;;) { if (formal >= formal_end) goto no_close; // // Note: this allows leading // ']' elegantly. // trace(("formal == \"%.*s\";\n", formal_end - formal, formal)); trace(("actual = \"%.*s\";\n", actual_end - actual, actual)); if ( formal_end >= formal + 3 && formal[1] == '-' && formal[2] != ']' ) { char c1; char c2; c1 = formal[0]; c2 = formal[2]; formal += 3; if ( c1 <= c2 ? (c1 <= *actual && *actual <= c2) : (c2 <= *actual && *actual <= c1) ) break; } else if (*actual == *formal++) break; if (*formal == ']') { result = false; goto ret; } } for (;;) { if (formal >= formal_end) goto no_close; trace(("formal == \"%.*s\";\n", formal_end - formal, formal)); trace(("actual = \"%.*s\";\n", actual_end - actual, actual)); if (*formal++ == ']') break; } } ++actual; break; } } result = (actual >= actual_end); ret: trace(("return %d;\n", result)); trace(("}\n")); return result; } bool gmatch2(const char *formal, const char *formal_end, const char *actual) { return gmatch_inner(formal, formal_end, actual, actual + strlen(actual)); } bool gmatch(const char *formal, const char *actual) { return gmatch_inner ( formal, formal + strlen(formal), actual, actual + strlen(actual) ); } bool gmatch(const rcstring &formal, const rcstring &actual) { return gmatch_inner ( formal.c_str(), formal.c_str() + formal.size(), actual.c_str(), actual.c_str() + actual.size() ); } tardy-1.28/libtardy/gmatch.h 644 0 0 442712163037023 142740ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_GMATCH_H #define LIBTARDY_GMATCH_H #include /** * The gmatch function is used to match a file name agains a filename * "glob" pattern. * * @param formal * The file name pattern, the usual shell patterns. * @param actual * The actual strng to be matched against the pattern. * @returns * bool; true of matches, false if does not. * Reports a fatal error and exits of there is a bug in the pattern. */ bool gmatch(const rcstring &formal, const rcstring &actual); /** * The gmatch function is used to match a file name agains a filename * "glob" pattern. * * @param formal * The file name pattern, the usual shell patterns. * @param actual * The actual strng to be matched against the pattern. * @returns * bool; true of matches, false if does not. * Reports a fatal error and exits of there is a bug in the pattern. */ bool gmatch(const char *formal, const char *actual); /** * The gmatch function is used to match a file name agains a filename * "glob" pattern. This function is for matching sub-patterns. * * @param formal * The file name pattern, the usual shell patterns. * @param formal_end * The end of the file name pattern. * @param actual * The actual strng to be matched against the pattern. * @returns * bool; true of matches, false if does not. * Reports a fatal error and exits of there is a bug in the pattern. */ bool gmatch2(const char *formal, const char *formal_end, const char *actual); #endif // LIBTARDY_GMATCH_H tardy-1.28/libtardy/main.h 644 0 0 245412163037023 137530ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1993, 1998, 1999, 2004, 2008, 2009, 2011 Peter Miller // // 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 3 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, see // . // #ifndef MAIN_H #define MAIN_H // // array manipulation // #define SIZEOF(a) (sizeof(a) / sizeof(a[0])) #define ENDOF(a) ((a) + SIZEOF(a)) // // Printf formatting attributes. // #ifdef __GNUC__ #define ATTR_PRINTF(x, y) __attribute__((__format__(printf, x, y))) #define DEPRECATED __attribute__((__deprecated__)) #else #define ATTR_PRINTF(x, y) #define DEPRECATED #endif // // Take the define out of comments to // enable the debugging the functionality. // // #define DEBUG // #endif // MAIN_H tardy-1.28/libtardy/mprintf.cc 644 0 0 3203312163037023 146600ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1991-2001, 2002, 2004, 2008, 2009, 2011, 2012 Peter Miller // // 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 3 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, see . // #include #include #include #include #include #include #include #include #include #include // // size to grow memory by // #define QUANTUM 200 // // maximum width for numbers // #define MAX_WIDTH (QUANTUM - 1) // // the buffer for storing results // static size_t tmplen; static size_t length; static char *tmp; // // NAME // bigger - grow dynamic memory buffer // // SYNOPSIS // int bigger(void); // // DESCRIPTION // The bigger function is used to grow the dynamic memory buffer // used by vmprintf to store the formatting results. // The buffer is increased by QUANTUM bytes. // // RETURNS // int; zero if failed to realloc memory, non-zero if successful. // // CAVEATS // The existing buffer is still valid after failure. // static int bigger(void) { size_t nbytes = tmplen + QUANTUM; char *hold = (char *)explain_realloc_or_die(tmp, nbytes); tmplen = nbytes; tmp = hold; return 1; } static void build_fake(char *fake, size_t fakesize, int flag, int width, int precision, int qualifier, int specifier) { char *fp = fake; *fp++ = '%'; if (flag) *fp++ = flag; if (width > 0) { snprintf(fp, fake + fakesize - fp, "%d", width); fp += strlen(fp); } *fp++ = '.'; snprintf(fp, fake + fakesize - fp, "%d", precision); fp += strlen(fp); if (qualifier) *fp++ = qualifier; *fp++ = specifier; *fp = 0; } char * vmprintf_errok(const char *fmt, va_list ap) { // // Build the result string in a temporary buffer. // Grow the temporary buffer as necessary. // // It is important to only make one pass across the variable argument // list. Behaviour is undefined for more than one pass. // if (!tmplen) { tmplen = 500; errno = ENOMEM; tmp = (char *)malloc(tmplen); if (!tmp) return 0; } length = 0; const char *s = fmt; while (*s) { int c = *s++; if (c != '%') { normal: if (length >= tmplen && !bigger()) return 0; tmp[length++] = c; continue; } c = *s++; // // get optional flag // int flag = 0; switch (c) { case '+': case '-': case '#': case '0': case ' ': flag = c; c = *s++; break; default: break; } // // get optional width // int width = 0; int width_set = 0; switch (c) { case '*': width = va_arg(ap, int); if (width < 0) { flag = '-'; width = -width; } c = *s++; width_set = 1; break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': for (;;) { width = width * 10 + c - '0'; c = *s++; switch (c) { default: break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': continue; } break; } width_set = 1; break; default: break; } // // get optional precision // int prec = 0; int prec_set = 0; if (c == '.') { c = *s++; switch (c) { default: prec_set = 1; break; case '*': c = *s++; prec = va_arg(ap, int); if (prec < 0) { prec = 0; break; } prec_set = 1; break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': for (;;) { prec = prec * 10 + c - '0'; c = *s++; switch (c) { default: break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': continue; } break; } prec_set = 1; break; } } // // get the optional qualifier // int qualifier = 0; switch (c) { default: break; case 'l': case 'h': case 'L': qualifier = c; c = *s++; break; } // // get conversion specifier // switch (c) { default: errno = EINVAL; return 0; case '%': goto normal; case 'c': { int a = (unsigned char)va_arg(ap, int); if (!prec_set) prec = 1; if (width > MAX_WIDTH) width = MAX_WIDTH; if (prec > MAX_WIDTH) prec = MAX_WIDTH; char fake[QUANTUM - 1]; build_fake(fake, sizeof(fake), flag, width, prec, 0, c); char num[MAX_WIDTH + 1]; snprintf(num, sizeof(num), fake, a); size_t len = strlen(num); assert(len < QUANTUM); if (length + len > tmplen && !bigger()) return 0; memcpy(tmp + length, num, len); length += len; } break; case 'd': case 'i': { long a = 0; switch (qualifier) { case 'l': a = va_arg(ap, long); break; case 'h': a = (short)va_arg(ap, int); break; default: a = va_arg(ap, int); break; } if (!prec_set) prec = 1; if (width > MAX_WIDTH) width = MAX_WIDTH; if (prec > MAX_WIDTH) prec = MAX_WIDTH; char fake[QUANTUM - 1]; build_fake(fake, sizeof(fake), flag, width, prec, 'l', c); char num[MAX_WIDTH + 1]; snprintf(num, sizeof(num), fake, a); size_t len = strlen(num); assert(len < QUANTUM); if (length + len > tmplen && !bigger()) return 0; memcpy(tmp + length, num, len); length += len; } break; case 'e': case 'f': case 'g': case 'E': case 'F': case 'G': { // // Ignore "long double" for now, // traditional implementations no grok. // double a = va_arg(ap, double); if (!prec_set) prec = 6; if (width > MAX_WIDTH) width = MAX_WIDTH; if (prec > MAX_WIDTH) prec = MAX_WIDTH; char fake[QUANTUM - 1]; build_fake(fake, sizeof(fake), flag, width, prec, 0, c); char num[MAX_WIDTH + 1]; snprintf(num, sizeof(num), fake, a); size_t len = strlen(num); assert(len < QUANTUM); if (length + len > tmplen && !bigger()) return 0; memcpy(tmp + length, num, len); length += len; } break; case 'n': switch (qualifier) { case 'l': { long *a = va_arg(ap, long *); *a = length; } break; case 'h': { short *a = va_arg(ap, short *); *a = length; } break; default: { int *a = va_arg(ap, int *); *a = length; } break; } break; case 'u': case 'o': case 'x': case 'X': { unsigned long a = 0; switch (qualifier) { case 'l': a = va_arg(ap, unsigned long); break; case 'h': a = (unsigned short)va_arg(ap, unsigned int); break; default: a = va_arg(ap, unsigned int); break; } if (!prec_set) prec = 1; if (prec > MAX_WIDTH) prec = MAX_WIDTH; if (width > MAX_WIDTH) width = MAX_WIDTH; char fake[QUANTUM - 1]; build_fake(fake, sizeof(fake), flag, width, prec, 'l', c); char num[MAX_WIDTH + 1]; snprintf(num, sizeof(num), fake, a); size_t len = strlen(num); assert(len < QUANTUM); if (length + len > tmplen && !bigger()) return 0; memcpy(tmp + length, num, len); length += len; } break; case 's': { char *a = va_arg(ap, char *); size_t len = 0; if (prec_set) { char *ep = (char *)memchr(a, 0, prec); if (ep) len = ep - a; else len = prec; } else len = strlen(a); if (!prec_set || (int)len < prec) prec = len; if (!width_set || width < prec) width = prec; len = width; while (length + len > tmplen) { if (!bigger()) return 0; } if (flag != '-') { while (width > prec) { tmp[length++] = ' '; width--; } } memcpy(tmp + length, a, prec); length += prec; width -= prec; if (flag == '-') { while (width > 0) { tmp[length++] = ' '; width--; } } } break; } } // // append a trailing NUL // if (length >= tmplen && !bigger()) return 0; tmp[length] = 0; // // return the temporary string // return tmp; } char * mprintf_errok(const char *fmt, ...) { va_list ap; va_start(ap, fmt); char *result = vmprintf_errok(fmt, ap); va_end(ap); return result; } char * vmprintf(const char *fmt, va_list ap) { char *result = vmprintf(fmt, ap); if (!result) explain_output_error_and_die("mprintf \"%s\"", fmt); return result; } char * mprintf(const char *fmt, ...) { va_list ap; va_start(ap, fmt); char *result = vmprintf(fmt, ap); va_end(ap); return result; } rcstring vmprintf_str(const char *fmt, va_list ap) { if (!vmprintf_errok(fmt, ap)) explain_output_error_and_die("mprintf \"%s\"", fmt); return rcstring(tmp, length); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/mprintf.h 644 0 0 562412163037023 145100ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1994-1998, 1999, 2004, 2008, 2009, 2011, 2012 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_MPRINTF_H #define LIBTARDY_MPRINTF_H #include #include #include /** * The mprintf function is used to format a string into memory. * * @param fmt * The mesaage format to use. See printf(3) for documentation of * the format and its arguments. * @returns * Pointer to NUL terminated string in synamic memory. * Do not use mem_free when you are done with it. */ char *mprintf(const char *fmt, ...) ATTR_PRINTF(1, 2); /** * The mprintf_errok function is used to format a string into memory. * Safe to call from error reporting functions. * * @param fmt * The mesaage format to use. See printf(3) for documentation of * the format and its arguments. * @returns * Pointer to NUL terminated string in synamic memory. * Do not use mem_free when you are done with it. */ char *mprintf_errok(const char *fmt, ...) ATTR_PRINTF(1, 2); /** * The mprintf function is used to format a string into memory. * * @param fmt * The mesaage format to use. See vprintf(3) for documentation of * the format and its arguments. * @param arglist * The arguments to be used for the format. * @returns * Pointer to NUL terminated string in synamic memory. * Do not use mem_free when you are done with it. */ char *vmprintf(const char *fmt, va_list arglist); /** * The mprintf function is used to format a string into memory. * Safe to call from error reporting functions. * * @param fmt * The mesaage format to use. See vprintf(3) for documentation of * the format and its arguments. * @param arglist * The arguments to be used for the format. * @returns * Pointer to NUL terminated string in synamic memory. * Do not use mem_free when you are done with it. */ char *vmprintf_errok(const char *fmt, va_list arglist); /** * The vmprintf_str function is just like the vmprintf function, except * that it constructs a string_ty value from it. */ rcstring vmprintf_str(const char *fmt, va_list); // vim: set ts=8 sw=4 et : #endif // LIBTARDY_MPRINTF_H tardy-1.28/libtardy/patchlevel.h 644 0 0 24412163037023 151310ustar PeterMiller#define PATCHLEVEL "1.28.D001" #define COPYRIGHT_YEARS "1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2008, 2009, 2010, 2011, 2012, 2013" tardy-1.28/libtardy/rcstring.cc 644 0 0 2710612163037023 150410ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1991-1999, 2001, 2002, 2008, 2009, 2011, 2012 Peter Miller // // 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 3 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, see . // // // A literal pool is maintained. Each string has a reference count. The // string stays in the literal pool for as long as it has a positive // reference count. To determine if a string is already in the literal pool, // linear dynamic hashing is used to guarantee an O(1) search. Making all equal // strings the same item in the literal pool means that string equality is // a pointer test, and thus very fast. // #include #include #include #include #include #include #include #include #include #include // // maximum conversion width for numbers // #define MAX_WIDTH 509 static string_t **hash_table; static str_hash_ty hash_modulus; static str_hash_ty hash_mask; static str_hash_ty hash_load; static int changed; #define MAX_HASH_LEN 20 // // NAME // hash_generate - hash string to number // // SYNOPSIS // str_hash_ty hash_generate(char *s, size_t n); // // DESCRIPTION // The hash_generate function is used to make a number from a string. // // RETURNS // str_hash_ty - the magic number // // CAVEAT // Only the last MAX_HASH_LEN characters are used. // It is important that str_hash_ty be unsigned (int or long). // static str_hash_ty hash_generate(const char *s, size_t n) { if (n > MAX_HASH_LEN) { s += n - MAX_HASH_LEN; n = MAX_HASH_LEN; } str_hash_ty retval = 0; while (n > 0) { unsigned char c = *s++; retval = (retval + (retval << 1)) ^ c; --n; } return retval; } // // NAME // str_initialize - start up string table // // SYNOPSIS // void str_initialize(void); // // DESCRIPTION // The str_initialize function is used to create the hash table and // initialize it to empty. // // RETURNS // void // // CAVEAT // This function must be called before any other defined in this file. // void str_initialize(void) { hash_modulus = 1<<8; // MUST be a power of 2 hash_mask = hash_modulus - 1; hash_load = 0; hash_table = new string_t * [hash_modulus]; for (str_hash_ty j = 0; j < hash_modulus; ++j) hash_table[j] = 0; } /** * The split function is used to reduce the load factor on the hash table. * * @note * A load factor of about 80% is suggested. */ static void split(void) { // // double the modulus // // This is subtle. If we only increase the modulus by one, the // load always hovers around 80%, so we have to do a split for // every insert. I.e. the malloc burden os O(n) for the lifetime of // the program. BUT if we double the modulus, the length of time // until the next split also doubles, making the probablity of a // split halve, and sigma(2**-n)=1, so the malloc burden becomes O(1) // for the lifetime of the program. // size_t new_hash_modulus = hash_modulus * 2; string_t **new_hash_table = new string_t * [new_hash_modulus]; size_t new_hash_mask = new_hash_modulus - 1; // // now redistribute the list elements // for (size_t idx = 0; idx < hash_modulus; ++idx) { new_hash_table[idx] = 0; new_hash_table[idx + hash_modulus] = 0; string_t *p = hash_table[idx]; while (p) { string_t *p2 = p; p = p->str_next; assert((p2->str_hash & hash_mask) == idx); str_hash_ty new_idx = p2->str_hash & new_hash_mask; p2->str_next = new_hash_table[new_idx]; new_hash_table[new_idx] = p2; } } // // replace old hash table with new one // delete [] hash_table; hash_table = new_hash_table; hash_modulus = new_hash_modulus; hash_mask = new_hash_mask; } // // NAME // str_from_c - make string from C string // // SYNOPSIS // string_t *str_from_c(char*); // // DESCRIPTION // The str_from_c function is used to make a string from a null terminated // C string. // // RETURNS // string_t* - a pointer to a string in dynamic memory. Use str_free when // finished with. // // CAVEAT // The contents of the structure pointed to MUST NOT be altered. // string_t * str_from_c(const char *s) { return str_n_from_c(s, strlen(s)); } // // NAME // str_n_from_c - make string // // SYNOPSIS // string_t *str_n_from_c(char *s, size_t n); // // DESCRIPTION // The str_n_from_c function is used to make a string from an array of // characters. No null terminator is assumed. // // RETURNS // string_t* - a pointer to a string in dynamic memory. Use str_free when // finished with. // // CAVEAT // The contents of the structure pointed to MUST NOT be altered. // string_t * str_n_from_c(const char *s, size_t length) { if (!hash_table) str_initialize(); str_hash_ty hash = hash_generate(s, length); str_hash_ty idx = hash & hash_mask; for (string_t *p = hash_table[idx]; p; p = p->str_next) { if ( p->str_hash == hash && p->str_length == length && !memcmp(p->str_text, s, length) ) { p->str_references++; return p; } } string_t *p = (string_t *)explain_malloc_or_die(sizeof(string_t) + length); p->str_hash = hash; p->str_length = length; p->str_references = 1; p->str_next = hash_table[idx]; hash_table[idx] = p; memcpy(p->str_text, s, length); p->str_text[length] = 0; hash_load++; if (hash_load * 10 > hash_modulus * 8) split(); ++changed; return p; } // // NAME // str_copy - make a copy of a string // // SYNOPSIS // string_t *str_copy(string_t *s); // // DESCRIPTION // The str_copy function is used to make a copy of a string. // // RETURNS // string_t* - a pointer to a string in dynamic memory. Use str_free when // finished with. // // CAVEAT // The contents of the structure pointed to MUST NOT be altered. // string_t * str_copy(string_t *s) { if (s) { assert(s->str_references > 0); s->str_references++; } return s; } // // NAME // str_free - release a string // // SYNOPSIS // void str_free(string_t *s); // // DESCRIPTION // The str_free function is used to indicate that a string hash been // finished with. // // RETURNS // void // // CAVEAT // This is the only way to release strings DO NOT use the free function. // void str_free(string_t *s) { if (!s) return; assert(s->str_references > 0); if (s->str_references > 1) { s->str_references--; return; } ++changed; // // find the hash bucket it was in, // and remove it // str_hash_ty idx = s->str_hash & hash_mask; for (string_t **spp = &hash_table[idx]; *spp; spp = &(*spp)->str_next) { if (*spp == s) { *spp = s->str_next; free(s); --hash_load; return; } } // // should never reach here! // #if 1 explain_output_error_and_die("attempted to free non-existent string (bug)"); #else explain_output_error ( "attempted to free non-existent string %p \"%.*s\" (bug)", s, (int)(s->str_length < 40 ? s->str_length : 40), s->str_text ); abort(); #endif } // // NAME // str_equal - test equality of strings // // SYNOPSIS // int str_equal(string_t *, string_t *); // // DESCRIPTION // The str_equal function is used to test if two strings are equal. // // RETURNS // int; zero if the strings are not equal, nonzero if the strings are // equal. // // CAVEAT // This function is implemented as a macro in strings.h // #if 0 // this one is inlined in common/str.h int str_equal(string_t *s1, string_t *s2) { return (s1 == s2); } #endif // // NAME // str_upcase - upcase a string // // SYNOPSIS // string_t *str_upcase(string_t *); // // DESCRIPTION // The str_upcase function is used to form a string which is an upper case // form of the supplied string. // // RETURNS // string_t* - a pointer to a string in dynamic memory. Use str_free when // finished with. // // CAVEAT // The contents of the structure pointed to MUST NOT be altered. // string_t * str_upcase(string_t *s) { static char *tmp; static size_t tmplen; if (tmplen < s->str_length) { delete [] tmp; tmplen = 16; while (tmplen < s->str_length) tmplen <<= 1; tmp = new char [tmplen]; } const char *cp1 = s->str_text; char *cp2 = tmp; for (;;) { unsigned char c = *cp1++; if (!c) break; if (c >= 'a' && c <= 'z') c += 'A' - 'a'; *cp2++ = c; } return str_n_from_c(tmp, s->str_length); } // // NAME // str_bool - get boolean value // // SYNOPSIS // int str_bool(string_t *s); // // DESCRIPTION // The str_bool function is used to determine the boolean value of the // given string. A "false" result is if the string is empty or // 0 or blank, and "true" otherwise. // // RETURNS // int: zero to indicate a "false" result, nonzero to indicate a "true" // result. // int str_bool(string_t *s) { const char *cp = s->str_text; while (*cp) { if (!isspace(*cp) && *cp != '0') return 1; ++cp; } return 0; } // // NAME // str_field - extract a field from a string // // SYNOPSIS // string_t *str_field(string_t *, char separator, int field_number); // // DESCRIPTION // The str_field functipon is used to erxtract a field from a string. // Fields of the string are separated by ``separator'' characters. // Fields are numbered from 0. // // RETURNS // Asking for a field off the end of the string will result in a null // pointer return. The null string is considered to have one empty field. // string_t * str_field(string_t *s, int sep, int fldnum) { const char *cp = s->str_text; while (fldnum > 0) { const char *ep = strchr(cp, sep); if (!ep) return 0; cp = ep + 1; --fldnum; } const char *ep = strchr(cp, sep); if (ep) return str_n_from_c(cp, ep - cp); return str_from_c(cp); } bool operator < (const rcstring &lhs, const rcstring &rhs) { return (strcmp(lhs.c_str(), rhs.c_str()) < 0); } bool operator <= (const rcstring &lhs, const rcstring &rhs) { return (strcmp(lhs.c_str(), rhs.c_str()) <= 0); } bool operator > (const rcstring &lhs, const rcstring &rhs) { return (strcmp(lhs.c_str(), rhs.c_str()) > 0); } bool operator >= (const rcstring &lhs, const rcstring &rhs) { return (strcmp(lhs.c_str(), rhs.c_str()) >= 0); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring.h 644 0 0 1616612163037023 147070ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1991-1999, 2002, 2004, 2008, 2009, 2011, 2012 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_RCSTRING_H #define LIBTARDY_RCSTRING_H #include #include #include typedef unsigned long str_hash_ty; struct string_t { str_hash_ty str_hash; string_t *str_next; long str_references; size_t str_length; char str_text[1]; }; void str_initialize(void); string_t *str_from_c(const char *); string_t *str_n_from_c(const char *, size_t); string_t *str_copy(string_t *); void str_free(string_t *); int str_bool(string_t *); void str_dump(void); string_t *str_field(string_t *str, int sep, int fldnum); bool str_equal(string_t *s1, string_t *s2); /** * The rcstring class is used to represent a reference counted string * class. It has optimal string equality time characterstics. */ class rcstring { public: ~rcstring() { str_free(p); p = 0; } rcstring() : p(0) { } rcstring(const rcstring &arg); rcstring(const char *arg); rcstring(const char *arg, size_t len); rcstring & operator=(const rcstring &rhs) { if (this != &rhs) { str_free(p); p = str_copy(rhs.p); } return *this; } const char *c_str(void) const { return (p ? p->str_text : ""); } size_t size(void) const { return (p ? p->str_length : 0); } bool empty(void) const { return (!p || p->str_length == 0); } str_hash_ty hash(void) const { return (p ? p->str_hash : 0); } int operator[](int n) const; rcstring operator+(const rcstring &arg) const; rcstring &operator+=(const rcstring &arg); friend bool operator == (const rcstring &, const rcstring &); friend bool operator != (const rcstring &, const rcstring &); friend bool operator < (const rcstring &, const rcstring &); friend bool operator <= (const rcstring &, const rcstring &); friend bool operator > (const rcstring &, const rcstring &); friend bool operator >= (const rcstring &, const rcstring &); /** * The downcase method may be used to create a new string, from * this string, with all upper case characters converted to lower * case. */ rcstring downcase(void) const; /** * The upcase method may be used to create a new string, from * this string, with all lower case characters converted to upper * case. */ rcstring upcase(void) const; /** * The ends_with method is used to determine whether or not this * strings ends with the given string. * * @param suffix * The suffix to search for. * @returns * true if the string ends with the given suffix, false if not. */ bool ends_with(const rcstring &suffix) const; /** * The substr method is used to create a new string by * extracting a substring fron this string. * * @param begin * The offset to begin from. * @param nbytes * The number of bytes (not characters) to extract. * Will be silently truncated if too long. */ rcstring substr(size_t begin, size_t nbytes) const; /** * The hexdump class method is sued to build a hexadecimal dump * from a data buffer. This is useful for debugging. * * @param data * Pointer to the base of the memory to be dumped. * @param data_size * The size of the memory to be dumpted, in bytes. */ static rcstring hexdump(const void *data, size_t data_size); /** * The dirname method is used to create a new string from this * string, treating it as a file name, and extracting the directory * components. */ rcstring dirname(void) const; /** * The basename method is used to create a new string from this * string, treating it as a file name, and extracting the final * component. */ rcstring basename(void) const; /** * The quote_c method is used to create a new string from this * string, quoting the string using C string quoting conventions. */ rcstring quote_c(void) const; /** * The clear method is used to replace the contents of this string * with the empty string. */ void clear(void); /** * The printf class method may be used to create a new string, * according to a format string. * * @param fmt * The text of the string, and it also controls the number and * types of the remaining arguments. See printf(3) for more * information. */ static rcstring printf(const char *fmt, ...) ATTR_PRINTF(1, 2); /** * The vprintf class method may be used to create a new string, * according to a format string. * * @param fmt * The text of the string, and it also controls the number and * types of the remaining arguments. See vprintf(3) for more * information. * @param ap * an opaque reference to the remaining arguments. */ static rcstring vprintf(const char *fmt, va_list ap) ATTR_PRINTF(1, 0); /** * The substitute method is used to create a new string from this * string, with all 'from' substrings replaced with 'to' substrings. * * @param from * The string to be substituted * @param to * The string to replace it with * @param how_many_times * The number of times to do this, from the left. * Defaults to "all of them". */ rcstring substitute(const rcstring &from, const rcstring &to, size_t how_many_times = -1) const; private: string_t *p; }; inline rcstring operator+(const char *lhs, const rcstring &rhs) { return (rcstring(lhs) + rhs); } inline bool operator == (const rcstring &lhs, const char *rhs) { return (lhs == rcstring(rhs)); } inline bool operator == (const char *lhs, const rcstring &rhs) { return (rcstring(lhs) == rhs); } inline bool operator != (const rcstring &lhs, const char *rhs) { return (lhs != rcstring(rhs)); } inline bool operator != (const char *lhs, const rcstring &rhs) { return (rcstring(lhs) != rhs); } bool operator < (const rcstring &, const rcstring &); bool operator <= (const rcstring &, const rcstring &); bool operator > (const rcstring &, const rcstring &); bool operator >= (const rcstring &, const rcstring &); // vim: set ts=8 sw=4 et : #endif // LIBTARDY_RCSTRING_H tardy-1.28/libtardy/rcstring/accumulator.cc 644 0 0 512512163037023 173350ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include rcstring_accumulator::~rcstring_accumulator() { delete [] buffer; buffer = 0; length = 0; maximum = 0; } rcstring_accumulator::rcstring_accumulator() : length(0), maximum(0), buffer(0) { } rcstring_accumulator::rcstring_accumulator(const rcstring_accumulator &arg) : length(0), maximum(0), buffer(0) { push_back(arg); } rcstring_accumulator & rcstring_accumulator::operator=(const rcstring_accumulator &arg) { if (this != &arg) { clear(); push_back(arg); } return *this; } rcstring rcstring_accumulator::mkstr() const { return rcstring(buffer, length); } void rcstring_accumulator::overflow(char c) { if (length >= maximum) { size_t new_maximum = maximum * 2 + 16; char *new_buffer = new char [new_maximum]; if (length) memcpy(new_buffer, buffer, length); delete [] buffer; buffer = new_buffer; maximum = new_maximum; } buffer[length++] = c; } void rcstring_accumulator::push_back(const rcstring_accumulator &arg) { push_back(arg.buffer, arg.length); } void rcstring_accumulator::push_back(const void *data, size_t n) { const char *cp = (const char *)data; if (!n) return; if (length + n > maximum) { size_t new_maximum = maximum; for (;;) { new_maximum = new_maximum * 2 + 16; if (length + n <= new_maximum) break; } char *new_buffer = new char [new_maximum]; if (length) memcpy(new_buffer, buffer, length); delete [] buffer; buffer = new_buffer; maximum = new_maximum; } memcpy(buffer + length, cp, n); length += n; } void rcstring_accumulator::push_back(const char *s) { push_back(s, strlen(s)); } tardy-1.28/libtardy/rcstring/accumulator.h 644 0 0 1411612163037023 172170ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_RCSTRING_ACCUMULATOR_H #define LIBTARDY_RCSTRING_ACCUMULATOR_H #include /** * The rcstring_accumulator class is used to accumulate strings into a buffer. */ class rcstring_accumulator { public: /** * The destructor. Thou shalt not derive from this class because * it isn't virtual. */ ~rcstring_accumulator(); /** * The default constructor. */ rcstring_accumulator(); /** * The copy constructor. */ rcstring_accumulator(const rcstring_accumulator &); /** * The assignment operator. */ rcstring_accumulator &operator=(const rcstring_accumulator &); /** * The mkstr method is used to take the current contents of the * accumulated buffer and turn it into a string. */ rcstring mkstr(void) const; /** * The push_back method is used to append another character to the * end of the accumulator. * * @param c * The character to be appended to the buffer. */ void push_back(char c) { // // The rcstring_accumulator::push_back(char) method shows up // in the profiles as occupying 10% of the time it takes to // parse the database files. By making it an inline, things go // measurably faster. // if (length < maximum) buffer[length++] = c; else overflow(c); } /** * The push_back method is used to append an array of characters to * the end of the accumulator. * * @param data * The data to be appended to the buffer. * @param len * The number of bytes of data. */ void push_back(const void *data, size_t len); /** * The push_back method is used to append a string to the end of * the accumulator. * * @param arg * The string to be appended to the buffer. */ void push_back(const rcstring &arg) { push_back(arg.c_str(), arg.size()); } /** * The push_back method is used to append a NUL terminated string * to the end of the accumulator. * * @param data * The string to be appended to the buffer. */ void push_back(const char *data); /** * The push_back method is used to append another string * accumulator to the end of this accumulator. * * @param data * The string to be appended to the buffer. */ void push_back(const rcstring_accumulator &data); /** * The clear method is used to reset the length of the accumulated * string to zero. */ void clear(void) { length = 0; } /** * The size method is used to obtain the current size of the buffer * in characters. */ size_t size(void) const { return length; } /** * The empty method is used to determine if the buffer is empty * (has a size of zero). */ bool empty(void) const { return (length == 0); } /** * The pop_back method is used to remove the last character from * the buffer. */ void pop_back(void) { if (length) --length; } /** * The pop_front method is used to discard the first character of * the buffer. * * @param nbytes * The number of bytes to pop. Defaults to one. * @note * This is very expensice. Use sparingly. */ void pop_front(size_t nbytes = 1); /** * The back method may be used to obtain the last character in the * buffer, or NUL if the buffer is empty. */ char back(void) const { return (length ? buffer[length - 1] : '\0'); } /** * The get_data method is used to obtain a pointer to the base of * the array of characters being accumulated. * * @note * The pointer is only garanteed to be valid until the next * push_back method call. * @note * Please use this methdo as little as possible. */ const char *get_data(void) const { return (buffer ? buffer : ""); } /** * The array index operator is used to obtain thr nth character in * the buffer. * * @note * No array bounds checking is performed. If you really stuff * up, it will segfault. Caveat emptor. */ char operator[](size_t n) { return buffer[n]; } /** * The printf method is used to appand a formatted string to the * buffer. See printf(3) for mor einformation. */ void printf(const char *fmt, ...) ATTR_PRINTF(2, 3); private: /** * The overflow method is used to append another character to the * end of the accumulator. It is called by the putch method when * it get too too hard (and a new buffer is needed). * * @param c * The character to be appended to the buffer. */ void overflow(char c); /** * The length instance variable is used to remember how many * characters in the buffer are significant. */ size_t length; /** * The length instance variable is used to remember the allocated * size of the buffer. */ size_t maximum; /** * The length instance variable is used to remember the base of an * array of characters in the heap. */ char *buffer; }; #endif // LIBTARDY_RCSTRING_ACCUMULATOR_H tardy-1.28/libtardy/rcstring/accumulator/pop_front.cc 644 0 0 201212163037023 213330ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include void rcstring_accumulator::pop_front(size_t nbytes) { if (nbytes == 0) return; if (nbytes > length) { length = 0; return; } length -= nbytes; memmove(buffer, buffer + nbytes, length); } tardy-1.28/libtardy/rcstring/accumulator/printf.cc 644 0 0 201312163037023 206300ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include void rcstring_accumulator::printf(const char *fmt, ...) { va_list ap; va_start(ap, fmt); char temp[1 << 11]; vsnprintf(temp, sizeof(temp), fmt, ap); va_end(ap); push_back(temp); } tardy-1.28/libtardy/rcstring/basename.cc 644 0 0 172512163037023 165730ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include rcstring rcstring::basename(void) const { const char *s = c_str(); const char *slash = strchr(s, '/'); if (!slash) return rcstring(s); return rcstring(slash + 1); } tardy-1.28/libtardy/rcstring/clear.cc 644 0 0 151512163037023 161030ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include void rcstring::clear(void) { if (p) { str_free(p); p = 0; } } tardy-1.28/libtardy/rcstring/constructor_1.cc 644 0 0 156212163037023 176240ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include rcstring::rcstring(const char *data, size_t data_size) : p(str_n_from_c(data, data_size)) { } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/constructor_2.cc 644 0 0 151512163037023 176230ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include rcstring::rcstring(const char *s) : p(str_from_c(s)) { } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/copy_constructor.cc 644 0 0 152512163037023 204350ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include rcstring::rcstring(const rcstring &rhs) : p(str_copy(rhs.p)) { } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/dirname.cc 644 0 0 177012163037023 164370ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include rcstring rcstring::dirname(void) const { const char *s = c_str(); const char *slash = strrchr(s, '/'); if (!slash) return "."; if (slash == s) return "/"; return rcstring(s, slash - s); } tardy-1.28/libtardy/rcstring/downcase.cc 644 0 0 253712163037023 166250ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include rcstring rcstring::downcase(void) const { if (!p) return rcstring(); static char *tmp = 0; static size_t tmplen = 0; size_t tmp_size = p->str_length; if (tmp_size < 16) tmp_size = 16; if (tmp_size > tmplen) { delete [] tmp; tmp = new char [tmp_size]; } const char *cp1 = p->str_text; char *cp2 = tmp; for (;;) { unsigned char c = *cp1++; if (!c) break; if (isupper(c)) c = tolower(c); *cp2++ = c; } return rcstring(tmp, p->str_length); } tardy-1.28/libtardy/rcstring/ends_with.cc 644 0 0 232712163037023 170030ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include bool rcstring::ends_with(const rcstring &suffix) const { if (!p) return (!suffix.p); if (!suffix.p) return true; size_t haystack_len = p->str_length; size_t needle_len = suffix.p->str_length; if (haystack_len < needle_len) return false; const char *haystack = p->str_text; const char *needle = suffix.p->str_text; return !memcmp(haystack + haystack_len - needle_len, needle, needle_len); } tardy-1.28/libtardy/rcstring/eq.cc 644 0 0 235112163037023 154210ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include bool str_equal(string_t *s1, string_t *s2) { return (s1 == s2); } bool operator == (const rcstring &lhs, const rcstring &rhs) { string_t *s1 = lhs.p ? lhs.p : str_from_c(""); string_t *s2 = rhs.p ? rhs.p : str_from_c(""); return str_equal(s1, s2); } bool operator != (const rcstring &lhs, const rcstring &rhs) { string_t *s1 = lhs.p ? lhs.p : str_from_c(""); string_t *s2 = rhs.p ? rhs.p : str_from_c(""); return !str_equal(s1, s2); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/hexdump.cc 644 0 0 313112163037023 164630ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include rcstring rcstring::hexdump(const void *data, size_t data_size) { rcstring_accumulator ac; const unsigned char *p = (const unsigned char *)data; for (size_t j = 0; j < data_size; j += 16) { ac.printf("%08lX:", (unsigned long)j); for (size_t k = 0; k < 16; ++k) { if (j + k < data_size) { unsigned char c = p[j + k]; ac.printf(" %02X", c); } else ac.push_back(" "); } ac.push_back(" "); for (size_t k = 0; k < 16 && j + k < data_size; ++k) { unsigned char c = p[j + k]; c &= 0x7F; if (!isprint(c)) c = '.'; ac.push_back(c); } ac.push_back('\n'); } return ac.mkstr(); } tardy-1.28/libtardy/rcstring/list.h 644 0 0 3407112163037023 156550ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_RCSTRING_LIST_H #define LIBTARDY_RCSTRING_LIST_H #include #include #include /** * The rcstring_list type is used to represent a list of rcstring * values. */ class rcstring_list { public: /** * The destructor. */ ~rcstring_list(); /** * The default constructor. This list will be initialised as * being empty. */ rcstring_list(); /** * The copy constructor. */ rcstring_list(const rcstring_list &); /** * The assignment operator. */ rcstring_list &operator=(const rcstring_list &); /** * The member method is used to test whether a given string value * is a member of the string list. * * @param arg * The string value to search for. * @returns * bool: true if the string is present, false if it is not. */ bool member(const rcstring &arg) const; /** * The member_nocase method is used to test whether a given string * value is a member of the string list. The conparison is * performed in a case-INsensitive way. * * @param arg * The string value to search for. * @returns * bool: true if the string is present, false if it is not. */ bool member_nocase(const rcstring &arg) const; /** * The size method is used to obtain the number of string in the * list. */ size_t size(void) const { return contents.size(); } /** * The empty method i used to determine if the list is empty * (contains no strings) or not. * * @returns * bool: true if the list contains no strings, false if the * list contains one or more strings. */ bool empty(void) const { return contents.empty(); } /** * The [] operator may be used to extract a list member. It may * only be used as an r-value. * * @note * No bounds checking is performed. */ const rcstring &operator[](size_t n) const { return contents[n]; } /** * The unsplit method is used to form a string from a word list. * * @param start * The first string in the list to start from. * @param finish * One past the last string in the list be be used. * @param sep * The seapator string between words. If you give NULL, it * will use a single space. * @returns * A pointer to the newly formed string in dynamic memory. * * @note * It is the responsibility of the caller to ensure that the * new string is freed when finished with, by a call to str_free(). */ rcstring unsplit(size_t start, size_t finish, const char *sep) const; /** * The unsplit method is used to form a string from a word list. * * @param sep * The seapator string between words. If yoy give NULL, it * will use a single space. * @returns * A pointer to the newly formed string in dynamic memory. * * @note * It is the responsibility of the caller to ensure that the * new string is freed when finished with, by a call to str_free(). */ rcstring unsplit(const char *sep = 0) const; /** * The push_front method is used to prepend a string to the list. * * @param arg * The string to be appended. * @note * This is not terribly efficient, try not to use it too often, * because it has to shuffle all of the string contents up by * one. */ void push_front(const rcstring &arg); /** * The push_front method is used to prepend a string to the list. * * @param arg * The list of string to be appended. * @note * This is not terribly efficient, try not to use it too often, * because it has to shuffle all of the string contents up first. */ void push_front(const rcstring_list &arg); /** * The push_back method is used to append a string to the list. * This has O(1) insert times. * * @param arg * The string to be appended. */ void push_back(const rcstring &arg); /** * The push_back method is used to append a string to the list, * but only if it isn't already in the list. * This has O(n) insert times. * * @param arg * The string to be appended. */ void push_back_unique(const rcstring &arg); /** * The push_back method is used to append all the strings string in * one list to the end of this list. This has O(1) insert times. * * @param arg * The strings to be appended. */ void push_back(const rcstring_list &arg); /** * The push_back method is used to append all the strings string in * one list to the end of this list. This has O(n*m) insert times. * * @param arg * The strings to be appended. */ void push_back_unique(const rcstring_list &arg); /** * The split method is used to convert a string to a word list. * The string list is cleared()ed before the string is split into it. * * @param arg * The string to be split into pieces. * @param sep * Separator characters; sequences of noe or more of these * characters seaprate each part. Defaults to " " if NULL is * given. * @param white * if true, supress extra white space around separators * @note * Quoting is not understood. */ void split(const rcstring &arg, const char *sep = 0, bool white = false); /** * The remove method is used to remove a string. It is not an * error if the string is not present. * This has O(n) behaviour. * * @param arg * The string value to be removed. */ void remove(const rcstring &arg); /** * The remove method is used to remove the string at the given * position in the list. Everything else shuffles down to fill the * gap, which is why this method has O(n) behaviour. */ void remove(size_t n); /** * The remove method is used to remove a set of string. It is not * an error if one or more of the strings are not present. * This has O(n*m) behaviour. * * @param arg * The string values to be removed. */ void remove(const rcstring_list &arg); /** * The clear method is used to remove all list elements. This has * O(n) behaviour. Afterwards, the list is once again empty. */ void clear(void); /** * The front method is used to obtain the first string value in the * list. If the string list is empty, the empty string is returned. */ const rcstring & front(void) { return (contents.empty() ? nothing : contents.front()); } /** * The back method is used to obtain the last string value in the * list. */ const rcstring & back(void) { return (contents.empty() ? nothing : contents.back()); } /** * The pop_front method is used to discard the first value in the list. * This has O(n) behaviour. */ void pop_front(void); /** * The pop_back method is used to discard the last value in the list. * This has O(1) behaviour. */ void pop_back(void); /** * The equal method is used to determine if this string list is * equal to another string list. Two lists are considered equal if * they both contains the same strings, regardless of order. * * @returns * bool: true if equal, false if not */ bool equal(const rcstring_list &arg) const; /** * The subset method is used to determine if this string list is * a subset of another string list, regardless of order. * * @param arg * strings list to test against, * i.e. that is (*this is-a-subset-of arg). * @returns * bool: true if subset, false if not * * @note * By subset, this also includes improper subsets (equality). */ bool subset(const rcstring_list &arg) const; /** * The sort method is used to perform an in situ sort the * string list values in a string list. The comparison function * used is strcmp. */ void sort(void); /** * The sort_nocase method is used to perform an in situ * sort the string list values in a string list. The comparison * function used is strcasecmp. */ void sort_nocase(void); /** * The sort_version method is used to perform an in situ * sort the string list values in a string list. The comparison * function used is strverscmp. */ void sort_version(void); /** * The sort_longest_to_shortest method is used to perform an in * situ sort the string list values in a string list, from the * longest string to the shortest string. */ void sort_longest_to_shortest(void); /** * The quote_c method is used to produce a new string list by * quoting the strings of this string list. */ rcstring_list quote_c(void) const; /** * The validate method is used to validate a string list. * Usually used for debugging, usually with assert. * * @returns * bool: true if the string list is valis, false if not. */ bool validate(void) const; /** * The intersection method is used to calculate the set * intersection between this set of strings and the rhs set of * strings. */ rcstring_list intersection(const rcstring_list &rhs) const; /** * The exclusive_or method is used to calculate the set of strings * on the left or on the right, but not both. Duplicates are * omitted. */ rcstring_list exclusive_or(const rcstring_list &rhs) const; private: typedef std::vector contents_t; contents_t contents; /** * The nothing class variable is used when we have to return a * reference to an empty string. */ static rcstring nothing; }; /** * The quality (==) operator is used to determine if two string lists * contain the same strings. The _ordering_ of the strings is not * considered. This is an O(n**2) operation. * * @return * Returns true if the two sets of strings are the same, * false if they are not. */ inline bool operator==(const rcstring_list &lhs, const rcstring_list &rhs) { return lhs.equal(rhs); } /** * The inquality (!=) operator is used to determine if two string lists * do not contain the same strings. The _ordering_ of the strings is * not considered. This is an O(n**2) operation. * * @return * Returns true if the two sets of strings are different, false if * they are the same. */ inline bool operator!=(const rcstring_list &lhs, const rcstring_list &rhs) { return !lhs.equal(rhs); } /** * The in situ addition operator is used to union values into a set of * strings. Duplicates on the right will be omitted. */ inline const rcstring_list & operator+=(rcstring_list &lhs, const rcstring_list &rhs) { lhs.push_back_unique(rhs); return lhs; } /** * The addition operator is used to union two sets of strings. * Duplicates will be omitted. */ inline rcstring_list operator+(const rcstring_list &lhs, const rcstring_list &rhs) { rcstring_list result; result.push_back_unique(lhs); result.push_back_unique(rhs); return result; } /** * The in situ subtract operator is used to difference two sets of * strings by removing strings from the left which appear in the right. */ inline const rcstring_list & operator-=(rcstring_list &lhs, const rcstring_list &rhs) { lhs.remove(rhs); return lhs; } /** * The subtract operator is used to create a new set of strings * by removing strings from the left which appear in the right. */ inline rcstring_list operator-(const rcstring_list &lhs, const rcstring_list &rhs) { rcstring_list result; result.push_back_unique(lhs); result.remove(rhs); return result; } /** * The in situ multiply operator is used to keep only those strings on * the left which also appear on the right. Duplicates are omitted. */ inline const rcstring_list & operator*=(rcstring_list &lhs, const rcstring_list &rhs) { lhs = lhs.intersection(rhs); return lhs; } /** * The multiply operator is used to calculate the set intersection of * the left and right. Duplicates are omitted. */ inline rcstring_list operator*(const rcstring_list &lhs, const rcstring_list &rhs) { return lhs.intersection(rhs); } /** * The in situ exclusive-or operator is used to keep only those strings * on the left or on the right, but not both. Duplicates are omitted. */ inline const rcstring_list & operator^=(rcstring_list &lhs, const rcstring_list &rhs) { lhs = lhs.exclusive_or(rhs); return lhs; } /** * The exclusive-or operator is used to calculate the set of strings on * the left or on the right, but not both. Duplicates are omitted. */ inline rcstring_list operator^(const rcstring_list &lhs, const rcstring_list &rhs) { return lhs.exclusive_or(rhs); } // vim: set ts=8 sw=4 et : #endif // LIBTARDY_RCSTRING_LIST_H tardy-1.28/libtardy/rcstring/list/appelistuniq.cc 644 0 0 161112163037023 205030ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include void rcstring_list::push_back_unique(const rcstring_list &arg) { for (size_t j = 0; j < arg.size(); ++j) push_back_unique(arg[j]); } tardy-1.28/libtardy/rcstring/list/append.cc 644 0 0 155312163037023 172410ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include void rcstring_list::push_back(const rcstring &w) { contents.push_back(w); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/list/append_list.cc 644 0 0 157312163037023 202760ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include void rcstring_list::push_back(const rcstring_list &arg) { for (size_t j = 0; j < arg.size(); ++j) push_back(arg[j]); } tardy-1.28/libtardy/rcstring/list/append_uniqu.cc 644 0 0 153612163037023 204630ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include void rcstring_list::push_back_unique(const rcstring &w) { if (!member(w)) push_back(w); } tardy-1.28/libtardy/rcstring/list/assign_op.cc 644 0 0 163412163037023 177540ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include rcstring_list & rcstring_list::operator=(const rcstring_list &arg) { if (this != &arg) { clear(); push_back(arg); } return *this; } tardy-1.28/libtardy/rcstring/list/clear.cc 644 0 0 152512163037023 170570ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include void rcstring_list::clear(void) { contents.clear(); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/list/constructor.cc 644 0 0 170112163037023 203520ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include // The nothing class variable is used when we have to return a // reference to an empty string. rcstring rcstring_list::nothing; rcstring_list::rcstring_list() { } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/list/copy.cc 644 0 0 155412163037023 167450ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include rcstring_list::rcstring_list(const rcstring_list &from) { push_back(from); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/list/destructor.cc 644 0 0 147712163037023 201750ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include rcstring_list::~rcstring_list() { } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/list/equal.cc 644 0 0 155112163037023 170770ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include bool rcstring_list::equal(const rcstring_list &arg) const { return (subset(arg) && arg.subset(*this)); } tardy-1.28/libtardy/rcstring/list/intersection.cc 644 0 0 214612163037023 204770ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include rcstring_list rcstring_list::intersection(const rcstring_list &rhs) const { rcstring_list result; for ( contents_t::const_iterator it = contents.begin(); it != contents.end(); ++it ) { if (rhs.member(*it)) result.push_back_unique(*it); } return result; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/list/member.cc 644 0 0 167312163037023 172440ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include #include bool rcstring_list::member(const rcstring &w) const { return (contents.end() != std::find(contents.begin(), contents.end(), w)); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/list/member_nocas.cc 644 0 0 214412163037023 204210ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include #include bool rcstring_list::member_nocase(const rcstring &s) const { for ( contents_t::const_iterator it = contents.begin(); it != contents.end(); ++it ) { if (0 == strcasecmp(it->c_str(), s.c_str())) return true; } return false; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/list/pop_back.cc 644 0 0 157212163037023 175510ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include void rcstring_list::pop_back(void) { if (!contents.empty()) contents.pop_back(); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/list/pop_front.cc 644 0 0 203012163037023 177670ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include void rcstring_list::pop_front(void) { if (contents.empty()) return; for ( contents_t::iterator it = contents.begin() + 1; it != contents.end(); ++it ) { it[-1] = it[0]; } pop_back(); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/list/prepend.cc 644 0 0 176212163037023 174310ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include void rcstring_list::push_front(const rcstring &w) { contents.push_back(rcstring()); for (size_t j = contents.size() - 1; j > 0; --j) { contents[j] = contents[j - 1]; } contents[0] = w; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/list/prepend_list.cc 644 0 0 200612163037023 204540ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include void rcstring_list::push_front(const rcstring_list &arg) { if (arg.empty()) return; if (empty()) { *this = arg; return; } rcstring_list tmp(arg); tmp.push_back(*this); *this = tmp; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/list/quote.cc 644 0 0 205712163037023 171270ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include rcstring_list rcstring_list::quote_c(void) const { rcstring_list result; for ( contents_t::const_iterator it = contents.begin(); it != contents.end(); ++it ) { result.push_back(it->quote_c()); } return result; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/list/remove.cc 644 0 0 263512163037023 172710ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include void rcstring_list::remove(const rcstring &w) { contents_t tmp; contents_t::iterator it = contents.begin(); while (it != contents.end()) { if (*it == w) { ++it; break; } tmp.push_back(*it); ++it; } while (it != contents.end()) { tmp.push_back(*it); ++it; } contents = tmp; } void rcstring_list::remove(size_t j) { if (j >= size()) return; contents_t tmp; for (size_t pos = 0; pos < contents.size(); ++pos) { if (j != pos) tmp.push_back(contents[pos]); } contents = tmp; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/list/remove_list.cc 644 0 0 156512163037023 203250ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include void rcstring_list::remove(const rcstring_list &arg) { for (size_t j = 0; j < arg.size(); ++j) remove(arg[j]); } tardy-1.28/libtardy/rcstring/list/sort.cc 644 0 0 160412163037023 167560ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include #include void rcstring_list::sort(void) { std::sort(contents.begin(), contents.end()); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/list/sort_long_short.cc 644 0 0 212212163037023 212100ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include #include static bool cmp(const rcstring &a, const rcstring &b) { if (a.size() > b.size()) return true; if (a.size() < b.size()) return false; return (a < b); } void rcstring_list::sort_longest_to_shortest(void) { std::sort(contents.begin(), contents.end(), cmp); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/list/sort_nocase.cc 644 0 0 206012163037023 203030ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include #include #include static bool cmp(const rcstring &a, const rcstring &b) { // C locale return (strcasecmp(a.c_str(), b.c_str()) < 0); } void rcstring_list::sort_nocase(void) { std::sort(contents.begin(), contents.end(), cmp); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/list/sort_vers.cc 644 0 0 206112163037023 200130ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include #include #include static bool cmp(const rcstring &a, const rcstring &b) { // C locale return (strverscmp(a.c_str(), b.c_str()) < 0); } void rcstring_list::sort_version(void) { std::sort(contents.begin(), contents.end(), cmp); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/list/str2wl.cc 644 0 0 314212163037023 172230ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include void rcstring_list::split(const rcstring &s, const char *sep, bool ewhite) { if (!sep) { sep = " \t\n\f\r"; ewhite = true; } clear(); const char *cp = s.c_str(); bool more = true; while (*cp || more) { if (ewhite) { while (isspace((unsigned char)*cp)) cp++; } if (!*cp && !more) break; more = false; const char *cp1 = cp; while (*cp && !strchr(sep, *cp)) cp++; const char *cp2 = cp; if (*cp) { cp2 = cp + 1; more = true; } if (ewhite) while (cp > cp1 && isspace((unsigned char)cp[-1])) cp--; push_back(rcstring(cp1, cp - cp1)); cp = cp2; } } tardy-1.28/libtardy/rcstring/list/subset.cc 644 0 0 215012163037023 172710ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include bool rcstring_list::subset(const rcstring_list &arg) const { // // test if "(*this) is a subset of (arg)" // for ( contents_t::const_iterator it = contents.begin(); it != contents.end(); ++it ) { if (!arg.member(*it)) return false; } return true; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/list/validate.cc 644 0 0 153512163037023 175630ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include bool rcstring_list::validate(void) const { return true; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/list/wl2str.cc 644 0 0 266412163037023 172330ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include #include #include rcstring rcstring_list::unsplit(const char *sep) const { return unsplit(0, size(), sep); } rcstring rcstring_list::unsplit(size_t start, size_t stop, const char *sep) const { if (start > size()) return rcstring(); if (stop > size()) stop = size(); if (!sep) sep = " "; size_t seplen = strlen(sep); static rcstring_accumulator tmp; tmp.clear(); for (size_t j = start; j < stop; j++) { if (j != start) tmp.push_back(sep, seplen); tmp.push_back(contents[j]); } return tmp.mkstr(); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/list/xor.cc 644 0 0 156612163037023 166060ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include rcstring_list rcstring_list::exclusive_or(const rcstring_list &rhs) const { return ((*this - rhs) + (rhs - *this)); } tardy-1.28/libtardy/rcstring/op_sq_br.cc 644 0 0 167412163037023 166270ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include int rcstring::operator[](int n) const { if (n < 0) return 0; if ((size_t)n >= size()) return 0; return (unsigned char)c_str()[(size_t)n]; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/operator_plus.cc 644 0 0 254412163037023 177160ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2012 Peter Miller // // 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 3 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, see . // #include #include rcstring rcstring::operator+(const rcstring &rhs) const { static char *tmp; static size_t tmplen; size_t length; length = size() + rhs.size(); if (tmplen < length) { delete [] tmp; tmplen = 16; while (tmplen < length) tmplen <<= 1; tmp = new char [tmplen]; } memcpy(tmp, c_str(), size()); memcpy(tmp + size(), rhs.c_str(), rhs.size()); return rcstring(tmp, length); } rcstring & rcstring::operator+=(const rcstring &rhs) { *this = operator+(rhs); return *this; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/printf.cc 644 0 0 213212163037023 163130ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include #include #include rcstring rcstring::printf(const char *fmt, ...) { va_list ap; va_start(ap, fmt); rcstring result(vprintf(fmt, ap)); va_end(ap); return result; } rcstring rcstring::vprintf(const char *fmt, va_list ap) { return vmprintf_str(fmt, ap); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/quote_c.cc 644 0 0 354612163037023 164620ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include rcstring rcstring::quote_c(void) const { static rcstring_accumulator ac; ac.clear(); const char *cp = c_str(); const char *ep = cp + size(); ac.push_back('"'); while (cp < ep) { unsigned char c = *cp++; switch (c) { case '"': case '\\': ac.push_back('\\'); ac.push_back(c); break; case '\a': ac.push_back('\\'); ac.push_back('a'); break; case '\b': ac.push_back('\\'); ac.push_back('b'); break; case '\f': ac.push_back('\\'); ac.push_back('f'); break; case '\n': ac.push_back('\\'); ac.push_back('n'); break; case '\r': ac.push_back('\\'); ac.push_back('r'); break; case '\t': ac.push_back('\\'); ac.push_back('t'); break; case '\v': ac.push_back('\\'); ac.push_back('v'); break; default: if (isprint(c)) ac.push_back(c); else ac.printf("\\%03o", c); break; } } ac.push_back('"'); return ac.mkstr(); } tardy-1.28/libtardy/rcstring/substitute.cc 644 0 0 357312163037023 172360ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include rcstring rcstring::substitute(const rcstring &from, const rcstring &to, size_t how_many_times) const { if (from.empty() || how_many_times == 0) { rcstring result; result.p = str_copy(p); return result; } if (how_many_times == (size_t)-1) how_many_times = size(); const char *cp = c_str(); const char *end = cp + size(); rcstring_accumulator ac; while (cp < end) { if (how_many_times == 0) { ac.push_back(cp, end - cp); break; } --how_many_times; // We could use strstr(3) instead, but it isn't as robust. // On the other hand, fewer implementations have bugs. #ifdef HAVE_MEMMEM const char *where = (const char *)memmem(cp, end - cp, from.c_str(), from.size()); #else const char *where = strstr(cp, from.c_str()); #endif if (!where) { ac.push_back(cp, end - cp); break; } cp = where + from.size(); ac.push_back(to); } return ac.mkstr(); } tardy-1.28/libtardy/rcstring/substring.cc 644 0 0 207512163037023 170370ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011, 2012 Peter Miller // // 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 3 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, see . // #include rcstring rcstring::substr(size_t begin, size_t nbytes) const { if (!p) return rcstring(); if (begin >= p->str_length) return rcstring(); if (begin + nbytes > p->str_length) nbytes = p->str_length - begin; return rcstring(p->str_text + begin, nbytes); } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/rcstring/upcase.cc 644 0 0 247012163037023 162760ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include rcstring rcstring::upcase(void) const { if (!p) return rcstring(); static char *tmp; static size_t tmplen; if (tmplen < p->str_length) { delete [] tmp; tmplen = 16; while (tmplen < p->str_length) tmplen <<= 1; tmp = new char [tmplen]; } const char *cp1 = p->str_text; char *cp2 = tmp; for (;;) { unsigned char c = *cp1++; if (islower(c)) c = toupper(c); *cp2++ = c; } return rcstring(tmp, p->str_length); } tardy-1.28/libtardy/read_whole_directory.cc 644 0 0 262712163037023 173640ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include #include void read_whole_directory(const rcstring &path, rcstring_list &result) { DIR *dp = explain_opendir_or_die(path.c_str()); for (;;) { struct dirent *dep = explain_readdir_or_die(dp); if (!dep) break; const char *name = dep->d_name; if ( !( name[0] == '.' && (name[1] == '\0' || (name[1] == '.' && name[2] == '\0')) ) ) result.push_back(name); } explain_closedir_or_die(dp); } tardy-1.28/libtardy/read_whole_directory.h 644 0 0 235212163037023 172210ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_READ_WHOLE_DIRECTORY_H #define LIBTARDY_READ_WHOLE_DIRECTORY_H #include /** * The read_whole_directory function is used to read all of the file * names in a given directory, all in one go. * * @param path * The path opf the directory to read. * @param result * where to place the names of the files in the directory (omitting * "." and "..") */ void read_whole_directory(const rcstring &path, rcstring_list &result); #endif // LIBTARDY_READ_WHOLE_DIRECTORY_H tardy-1.28/libtardy/roff.cc 644 0 0 4120412163037023 141350ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1991-1995, 1998-2002, 2008-2011 Peter Miller // // 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 3 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, see . // #include #include #include #include #include #include #include #include #include #include #include #include #include roff::~roff() { br(); explain_fflush_or_die(stdout); } roff::roff() : ocol(0), icol(0), fill(true), in(0), in_base(0), ll(79), roff_line(0), roff_file(0), TP_line(0) { ds_guts("n)", explain_program_name_get()); ds_guts("v)", version_stamp()); ds_guts("Y)", copyright_years()); ds_guts("lq", "\""); ds_guts("rq", "\""); ds_guts("co", "(C)"); ds_guts("bu", "*"); lf(0, 0); } #define PAIR(a, b) ((a) * 256 + (b)) static const char *cr[] = { "\\*(n) version \\*(v)", ".br", "Copyright (C) \\*(Y) Peter Miller", "", "The \\*(n) program comes with ABSOLUTELY NO WARRANTY;", "for details use the '\\*(n) -VERSion License' command.", "The \\*(n) program is free software, and you are welcome to", "redistribute it under certain conditions;", "for details use the '\\*(n) -VERSion License' command.", }; static const char *au[] = { ".nf", "Peter Miller EMail: pmiller@opensource.org.au", "/\\e/\\e* WWW: http://miller.emu.id.au/pmiller/", ".fi", }; static const char *so_o__rules[] = { #include }; static const char *so_o_help[] = { #include }; static const char *so_z_cr[] = { ".SH COPYRIGHT", ".so cr", ".SH AUTHOR", ".so au", }; static const char *so_z_exit[] = { #include }; struct so_list_ty { const char *name; const char **text; size_t length; }; static so_list_ty so_list[] = { { "man/man1/o__rules.so", so_o__rules, SIZEOF(so_o__rules) }, { "man/man1/o_help.so", so_o_help, SIZEOF(so_o_help) }, { "man/man1/z_cr.so", so_z_cr, SIZEOF(so_z_cr) }, { "man/man1/z_exit.so", so_z_exit, SIZEOF(so_z_exit) }, { "man/man1/z_name.so", 0, 0 }, { "etc/version.so", 0, 0 }, { "cr", cr, SIZEOF(cr), }, { "au", au, SIZEOF(au), }, }; static inline bool safe_isprint(char c) { return isprint((unsigned char)c); } void roff::emit(char c) { switch (c) { case ' ': icol++; break; case '\t': icol = ((icol / 8) + 1) * 8; break; case '\n': putchar('\n'); icol = 0; ocol = 0; break; default: if (!safe_isprint(c)) break; while (((ocol / 8) + 1) * 8 <= icol && ocol + 1 < icol) { putchar('\t'); ocol = ((ocol / 8) + 1) * 8; } while (ocol < icol) { putchar(' '); ++ocol; } putchar(c); ++icol; ++ocol; break; } explain_ferror_or_die(stdout); } void roff::emit_word(const char *buf, size_t len) { if (len <= 0) return; // // if this line is not yet indented, indent it // if (!ocol && !icol) icol = in; // // if there is already something on this line // and we are in "fill" mode // and this word would cause it to overflow // then wrap the line // if (ocol && fill && icol + len >= ll) { emit('\n'); icol = in; } if (ocol) emit(' '); while (len-- > 0) emit(*buf++); } void roff::br(void) { if (ocol) emit('\n'); } void roff::sp(void) { br(); emit('\n'); } void roff::interpret_line_of_words(const char *line) { // // if not filling, // pump the line out literrally. // if (!fill) { if (!ocol && !icol) icol = in; while (*line) emit(*line++); emit('\n'); return; } // // in fill mode, a blank line means // finish the paragraph and emit a blank line // if (!*line) { sp(); return; } // // break the line into space-separated words // and emit each individually // while (*line) { while (isspace(*line)) ++line; if (!*line) break; const char *start = line; while (*line && !isspace(*line)) ++line; emit_word(start, line - start); // // extra space at end of sentences // if ( (line[-1] == '.' || line[-1] == '?') && ( !line[0] || ( line[0] == ' ' && (!line[1] || line[1] == ' ') ) ) ) emit(' '); } } void roff::error(const char *s, ...) { va_list ap; va_start(ap, s); char buffer[1000]; vsnprintf(buffer, sizeof(buffer), s, ap); va_end(ap); #if 0 br(); if (roff_file) emit_word(roff_file, strlen(roff_file)); if (roff_line) { char line[20]; snprintf(line, sizeof(line), "%ld", roff_line); emit_word(line, strlen(line)); } interpret_line_of_words(buffer); br(); #else explain_output_error_and_die ( "%s: %ld: %s", (roff_file ? roff_file : "(noname)"), roff_line, buffer ); #endif } void roff::get_name(const char **lp, char *name) { const char *line = *lp; if (*line == '(') { ++line; if (*line) { name[0] = *line++; if (*line) { name[1] = *line++; name[2] = 0; } else name[1] = 0; } else name[0] = 0; } else if (*line == '[') { ++line; int n = 0; for (;;) { char c = *line; if (!c) break; ++line; if (c == ']') break; if (n < 3) name[n++] = c; } name[n] = 0; } else if (*line) { name[0] = *line++; name[1] = 0; } else name[0] = 0; *lp = line; } const char * roff::string_find(const char *name) { string_registers_t::iterator it = string_registers.find(rcstring(name)); if (it == string_registers.end()) return 0; return (*it).second.c_str(); } const char * roff::numreg_find(const char *) { return 0; } void roff::prepro(char *buffer, const char *line) { const char *value; char name[4]; char *bp = buffer; while (*line) { int c = *line++; if (c != '\\') { *bp++ = c; continue; } c = *line++; if (!c) { error("can't do escaped end-of-line"); break; } switch (c) { default: error("unknown \\%c inline directive", c); break; case '%': // word break info break; case '*': // inline string get_name(&line, name); value = string_find(name); if (value) { while (*value) *bp++ = *value++; } break; case 'n': // inline number register get_name(&line, name); value = numreg_find(name); if (value) { while (*value) *bp++ = *value++; } break; case 'e': case '\\': *bp++ = '\\'; break; case '-': *bp++ = '-'; break; case 'f': // ignore font directives get_name(&line, name); break; case '&': case '|': // ignore weird space directives break; case '(': case '[': // special characters // (not really strings) --line; get_name(&line, name); value = string_find(name); if (value) { while (*value) *bp++ = *value++; } break; } } *bp = 0; } void roff::interpret_text(const char *line) { char buffer[1000]; prepro(buffer, line); interpret_line_of_words(buffer); if (TP_line) { if (icol >= 15) br(); else icol = 15; TP_line = 0; in = in_base + 8; } } void roff::sub(char *buffer, int argc, const char **argv) { int j; char *bp; long len; bp = buffer; for (j = 0; j < argc; ++j) { len = strlen(argv[j]); if (j) *bp++ = ' '; memcpy(bp, argv[j], len); bp += len; } *bp = 0; } void roff::interpret_text_args(int argc, const char **argv) { char buffer[1000]; sub(buffer, argc, argv); interpret_text(buffer); } void roff::concat_text_args(int argc, const char **argv) { char buffer[1000]; char *bp = buffer; for (int j = 0; j < argc; ++j) { size_t len = strlen(argv[j]); if ((bp - buffer) + len + 1 >= sizeof(buffer)) break; memcpy(bp, argv[j], len); bp += len; } *bp = 0; interpret_text(buffer); } void roff::so(int argc, const char **argv) { so_list_ty *sop; if (argc != 1) { error(".so requires one argument"); return; } for (sop = so_list; sop < ENDOF(so_list); ++sop) { if (!strcmp(sop->name, argv[0])) { interpret(sop->text, sop->length); return; } } error("\".so %s\" not known", argv[0]); } void roff::lf(int argc, const char **argv) { if (roff_file) free(roff_file); if (argc >= 1) roff_line = atol(argv[0]) - 1; else roff_line = 0; if (argc >= 2) roff_file = explain_strdup_or_die(argv[1]); else roff_file = 0; } void roff::ds_guts(const rcstring &name, const rcstring &value) { string_registers_t::iterator it = string_registers.find(name); if (it == string_registers.end()) string_registers.insert(string_registers_t::value_type(name, value)); else (*it).second = rcstring(value); } void roff::ds(int argc, const char **argv) { char buf1[1000]; char buf2[1000]; if (!argc) return; sub(buf1, argc - 1, argv + 1); prepro(buf2, buf1); ds_guts(argv[0], buf2); } void roff::dot_in(int argc, const char **argv) { if (argc < 1) return; switch (argv[0][0]) { case '-': in -= atoi(argv[0] + 1); break; case '+': in += atoi(argv[0] + 1); break; default: in = atoi(argv[0] + 1); break; } if (in < 0) in = 0; } void roff::dot_br(int, const char **) { br(); } void roff::dot_ce(int argc, const char **argv) { br(); interpret_text_args(argc, argv); br(); } void roff::dot_fi(int, const char **) { br(); fill = 1; } void roff::dot_if(int argc, const char **argv) { if (argc > 1 && 0 == strcmp(argv[0], "n")) interpret_text_args(argc - 1, argv + 1); } void roff::dot_ip(int, const char **) { in = in_base; sp(); emit(' '); emit(' '); } void roff::dot_nf(int, const char **) { br(); fill = 0; } void roff::dot_pp(int, const char **) { in = in_base; sp(); } void roff::dot_r(int, const char **) { const char *cp = string_find("R)"); if (!cp) cp = ""; if (strcmp(cp, "no") != 0) { static const char *macro[] = { ".PP", "See also", ".IR \\*(n) (1)", "for options common to all \\*(n) commands.", }; interpret(macro, SIZEOF(macro)); } } void roff::dot_re(int, const char **) { in_base = 8; in = 8; br(); } void roff::dot_rs(int, const char **) { in_base = 16; in = 16; br(); } void roff::dot_sh(int argc, const char **argv) { in = 0; sp(); interpret_text_args(argc, argv); br(); in_base = 8; in = 8; } void roff::dot_sp(int, const char **) { sp(); } void roff::dot_tp(int, const char **) { in = in_base; sp(); TP_line = 1; } void roff::dot_ignore(int, const char **) { } void roff::interpret_control(const char *line) { struct directive_t { const char *name; void (roff::*perform)(int argc, const char **argv); }; static const directive_t directive[] = { { "\\\"", &roff::dot_ignore }, { "\"", &roff::dot_ignore }, { "B", &roff::concat_text_args }, { "BI", &roff::concat_text_args }, { "BR", &roff::concat_text_args }, { "br", &roff::dot_br }, { "ce", &roff::dot_ce }, { "ds", &roff::ds }, { "fi", &roff::dot_fi }, { "I", &roff::concat_text_args }, { "IB", &roff::concat_text_args }, { "if", &roff::dot_if }, { "in", &roff::dot_in }, { "IP", &roff::dot_ip }, { "IR", &roff::concat_text_args }, { "lf", &roff::lf }, { "ne", &roff::dot_ignore }, { "nf", &roff::dot_nf }, { "PP", &roff::dot_pp }, { "R", &roff::concat_text_args }, { "r)", &roff::dot_r }, { "RB", &roff::concat_text_args }, { "RE", &roff::dot_re }, { "RI", &roff::concat_text_args }, { "RS", &roff::dot_rs }, { "SH", &roff::dot_sh }, { "so", &roff::so }, { "sp", &roff::dot_sp }, { "ta", &roff::dot_ignore }, { "TH", &roff::dot_ignore }, { "TP", &roff::dot_tp }, { "XX", &roff::dot_ignore }, }; // // find the directive name // line++; for (;;) { unsigned char c = *line; if (c == 0) return; if (!isspace(c)) break; ++line; } char dot_name[10]; char *dnp = dot_name; for (;;) { unsigned char c = *line; if (!c) break; ++line; if (isspace(c)) break; if (dnp < dot_name + sizeof(dot_name) - 1) *dnp++ = c; } *dnp = 0; // // break the line into space-separated arguments // int argc = 0; char temp[1000]; char *cp1 = temp; const char *argv[20]; while (argc < (int)SIZEOF(argv)) { while (isspace(*line)) ++line; if (!*line) break; argv[argc++] = cp1; int quoting = 0; while (*line) { if (*line == '"') { quoting = !quoting; ++line; continue; } if (!quoting && isspace(*line)) break; *cp1++ = *line++; } *cp1++ = 0; if (!*line) break; } // // now do something with it // for (const directive_t *dp = directive; dp < ENDOF(directive); ++dp) { if (0 == strcmp(dot_name, dp->name)) { (this->*dp->perform)(argc, argv); return; } } error("formatting directive \".%s\" unknown", dot_name); } void roff::interpret(const char **text, size_t text_size) { // // save position // trace(("interpret()\n{\n")); long hold_line = roff_line; char *hold_file = roff_file ? explain_strdup_or_die(roff_file) : (char *)0; // // interpret the text // for (size_t j = 0; j < text_size; ++j) { const char *s = text[j]; if (*s == '.' || *s == '\'') interpret_control(s); else interpret_text(s); ++roff_line; explain_ferror_or_die(stdout); } // // restore position // if (roff_file) free(roff_file); roff_line = hold_line; roff_file = hold_file; trace(("}\n")); } tardy-1.28/libtardy/roff.h 644 0 0 1100112163037023 137670ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_ROFF_H #define LIBTARDY_ROFF_H #include #include /** * The roff class is used to represent the processing required to * simulate a portion of groff(1) functionality, for the purpose of * printing --help text. */ class roff { public: /** * The destructor. */ virtual ~roff(); /** * The default constructor. */ roff(); void interpret(const char **text, size_t text_size); private: /** * The ocol instance variable is used to remember the current * output column. * * assert(ocol <= icol); */ size_t ocol; /** * The icol instance variable is used to remember the current input * column. It differs from ocol when white space has been seen. * * assert(ocol <= icol); */ size_t icol; /** * The fill instance variable is used to remember whether or not * we are currently filling. */ bool fill; /** * The in instance variable is used to remember the current * indent. */ int in; /** * The in_base instance variable is used to remember the current * paragraph indent. */ int in_base; /** * The ll instance variable is used to remember the line length. */ size_t ll; /** * The roff_line instance variable is used to remember the input * line we are up to, in the input "file". */ long roff_line; /** * The roff_file instance variable is used to remember the input * file's name. */ char *roff_file; /** * The TP_line instance variable is used to remember * something */ int TP_line; typedef std::map string_registers_t; /** * The string_registers instance variable is used to remember the * values in the string registers. */ string_registers_t string_registers; void br(void); void sp(void); void ds_guts(const rcstring &name, const rcstring &value); void lf(int argc, const char **argv); void emit(char c); void emit_word(const char *buf, size_t len); void interpret_line_of_words(const char *line); void error(const char *s, ...); void get_name(const char **lp, char *name); const char *string_find(const char *name); const char *numreg_find(const char *name); void prepro(char *buffer, const char *line); void interpret_text(const char *line); void sub(char *buffer, int argc, const char **argv); void interpret_text_args(int argc, const char **argv); void interpret_control(const char *line); void concat_text_args(int argc, const char **argv); void so(int argc, const char **argv); void ds(int argc, const char **argv); void dot_in(int argc, const char **argv); void dot_br(int argc, const char **argv); void dot_ce(int argc, const char **argv); void dot_fi(int argc, const char **argv); void dot_if(int argc, const char **argv); void dot_ip(int argc, const char **argv); void dot_pp(int argc, const char **argv); void dot_nf(int argc, const char **argv); void dot_r(int argc, const char **argv); void dot_re(int argc, const char **argv); void dot_rs(int argc, const char **argv); void dot_sp(int argc, const char **argv); void dot_tp(int argc, const char **argv); void dot_ignore(int argc, const char **argv); void dot_sh(int argc, const char **argv); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ roff(const roff &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ roff &operator=(const roff &rhs); }; #endif // LIBTARDY_ROFF_H tardy-1.28/libtardy/symtab.cc 644 0 0 1502112163037023 144760ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2008, 2009, 2011, 2012 Peter Miller // // 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 3 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, see . // #include #include #include #include symtab::symtab() { chain = 0; reap = 0; hash_modulus = 1 << 4; // MUST be a power of 2 hash_load = 0; hash_table = new row * [hash_modulus]; for (str_hash_ty j = 0; j < hash_modulus; ++j) hash_table[j] = 0; } symtab::~symtab() { for (str_hash_ty j = 0; j < hash_modulus; ++j) { row **rpp = &hash_table[j]; while (*rpp) { row *rp = *rpp; *rpp = rp->overflow; if (reap) reap(rp->data); delete rp; } } delete [] hash_table; hash_table = 0; hash_modulus = 0; } // // NAME // split - reduce symbol table load // // SYNOPSIS // void split(symtab_ty); // // DESCRIPTION // The split function is used to split symbols in the bucket indicated by // the split point. The symbols are split between that bucket and the one // after the current end of the table. // // CAVEAT // It is only sensable to do this when the symbol table load exceeds some // reasonable threshold. A threshold of 80% is suggested. // void symtab::split(void) { size_t om = hash_modulus; // // increase the modulus by one order of 2-magnitude // sigma(2**-n) == 1 // { size_t new_hash_modulus = 2 * hash_modulus; row **new_hash_table = new row * [new_hash_modulus]; for (size_t j = 0; j < hash_modulus; ++j) new_hash_table[j] = hash_table[j]; for (size_t j = hash_modulus; j < new_hash_modulus; ++j) new_hash_table[j] = 0; delete [] hash_table; hash_table = new_hash_table; hash_modulus = new_hash_modulus; } // // now redistribute the list elements // // It is important to preserve the order of the links because // they can be push-down stacks, and to simply add them to the // head of the list will reverse the order of the stack! // size_t mask = hash_modulus - 1; for (size_t j = 0; j < om; ++j) { row *p = hash_table[j]; hash_table[j] = 0; while (p) { row *p2 = p; p = p2->overflow; p2->overflow = 0; str_hash_ty index = p2->key.hash() & mask; row **ipp = &hash_table[index]; for (; *ipp; ipp = &(*ipp)->overflow) ; *ipp = p2; } } } void * symtab::query(const rcstring &key) const { str_hash_ty mask = hash_modulus - 1; str_hash_ty index = key.hash() & mask; for (row *p = hash_table[index]; p; p = p->overflow) { if (key == p->key) return p->data; } return 0; } rcstring symtab::query_fuzzy(const rcstring &key) const { rcstring best_name; double best_weight = 0.6; for (str_hash_ty index = 0; index < hash_modulus; ++index) { for (row *p = hash_table[index]; p; p = p->overflow) { double weight = fmemcmp ( key.c_str(), key.size(), p->key.c_str(), p->key.size() ); if (weight > best_weight) best_name = p->key; } } return best_name; } void symtab::assign(const rcstring &key, void *data) { str_hash_ty mask = hash_modulus - 1; str_hash_ty index = key.hash() & mask; for (row *p = hash_table[index]; p; p = p->overflow) { if (key == p->key) { if (reap) reap(p->data); p->data = data; return; } } row *p = new row(); p->key = key; p->overflow = hash_table[index]; p->data = data; hash_table[index] = p; hash_load++; while (hash_load * 10 >= hash_modulus * 8) split(); } void symtab::assign_push(const rcstring &key, void *data) { str_hash_ty mask = hash_modulus - 1; str_hash_ty index = key.hash() & mask; row *p = new row(); p->key = key; p->overflow = hash_table[index]; p->data = data; hash_table[index] = p; hash_load++; while (hash_load * 10 >= hash_modulus * 8) split(); } void symtab::remove(const rcstring &key) { str_hash_ty mask = hash_modulus - 1; str_hash_ty index = key.hash() & mask; row **rpp = &hash_table[index]; for (;;) { row *rp = *rpp; if (!rp) break; if (key == rp->key) { if (reap) reap(rp->data); *rpp = rp->overflow; delete rp; hash_load--; break; } rpp = &rp->overflow; } } // // NAME // symtab_dump - dump id table // // SYNOPSIS // void symtab_dump(symtab_ty *stp, char *caption); // // DESCRIPTION // The symtab_dump function is used to dump the contents of the // symbol table. The caption will be used to indicate why the // symbol table was dumped. // // CAVEAT // This function is only available when symbol DEBUG is defined. // void symtab::dump(const char *caption) const { explain_output_error("symbol table %s = {", caption); for (str_hash_ty j = 0; j < hash_modulus; ++j) { for (row *p = hash_table[j]; p; p = p->overflow) { explain_output_error ( "key = \"%s\", data = %08lX", p->key.c_str(), (long)p->data ); } } explain_output_error("}"); } void symtab::walk(void (*func)(const symtab &, const rcstring &, void *, void *), void *arg) { for (str_hash_ty j = 0; j < hash_modulus; ++j) for (row *rp = hash_table[j]; rp; rp = rp->overflow) func(*this, rp->key, rp->data, arg); } tardy-1.28/libtardy/symtab.h 644 0 0 516512163037023 143300ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_SYMTAB_H #define LIBTARDY_SYMTAB_H #include class symtab { public: ~symtab(); symtab(); void *query(const rcstring &) const; rcstring query_fuzzy(const rcstring &) const; void assign(const rcstring &, void *); void assign_push(const rcstring &, void *); void remove(const rcstring &); void dump(const char *) const; void walk(void (*func)(const symtab &st, const rcstring &key, void *data, void *arg), void *arg); void reap_set(void (*)(void *)); private: symtab(const symtab &); symtab &operator = (const symtab &); void split(void); struct row { rcstring key; void *data; row *overflow; }; symtab *chain; void (*reap)(void *); row **hash_table; str_hash_ty hash_modulus; str_hash_ty hash_load; }; #if 0 template class symbol_table: private symtab { public: ~symbol_table() {} symbol_table : symtab() { reap_set(reaper); } void assign(const rcstring &key, const T &value) { symtab::assign(key, new T(arg)); } void remove(const rcstring &key) { symtab::remove(key); } bool contains(const rcstring &key) { return !!symtab::query(key); } T *query(const rcstring &key) { return (T *)symtab::query(key); } T &operator[](const rcstring &key) { void *tp = query(key); if (!tp) { tp = new T(); symtab::assign(key, tp); } return *tp; } private: symbol_table(const symbol_table &) { } symbol_table &operator = (const symbol_table &) { return *this; } static void reaper(void *p) { delete (T *)p; } }; #endif #endif // LIBTARDY_SYMTAB_H tardy-1.28/libtardy/tar/format.cc 644 0 0 1511112163037023 152550ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2001, 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include static long octal(const char *buf, long len) { errno = EINVAL; long value = 0; while (len > 0 && *buf == ' ') { ++buf; --len; } if (len <= 0) return -1; while (len > 0) { if (!*buf || *buf == ' ') break; if (*buf < '0' || *buf > '7') return -1; // // Limit the range to 0..2^31-1. // Must test for overflow *before* the shift. // if (value & 0xF0000000) { errno = ERANGE; return -1; } value = (value << 3) + (*buf++ & 7); --len; } errno = 0; return value; } static void padded_octal(char pad, char *buf, long len, long n) { assert(len >= 2); --len; buf[len] = 0; memset(buf, pad, len); while (len > 0) { buf[--len] = '0' + (n & 7); n >>= 3; if (!n) break; } } static void space_padded_octal(char *buf, long len, long n) { padded_octal(' ', buf, len, n); } static void zero_padded_octal(char *buf, long len, long n) { padded_octal('0', buf, len, n); } static size_t careful_strlen(const char *s, size_t n) { const char *ss = s; while (n > 0 && *s) { ++s; --n; } return (s - ss); } static void string_field_set(char *to_buf, int to_len, const rcstring &from) { int from_len = from.size(); const char *from_buf = from.c_str(); if (from_len > to_len - 1) from_len = to_len - 1; if (from_len) memcpy(to_buf, from_buf, from_len); if (from_len < to_len) memset(to_buf + from_len, 0, to_len - from_len); } rcstring header_ty::name_get(void) const { return rcstring(name, careful_strlen(name, sizeof(name))); } void header_ty::name_set(const rcstring &arg) { string_field_set(name, sizeof(name), arg); } long header_ty::mode_get(void) const { return (07777 & octal(mode, sizeof(mode))); } void header_ty::mode_set(long n) { space_padded_octal(mode, sizeof(mode), n); } void header_ty::mode_set_z(long n) { zero_padded_octal(mode, sizeof(mode), n); } long header_ty::uid_get(void) const { return octal(uid, sizeof(uid)); } void header_ty::uid_set(long n) { space_padded_octal(uid, sizeof(uid), n); } void header_ty::uid_set_z(long n) { zero_padded_octal(uid, sizeof(uid), n); } long header_ty::gid_get(void) const { return octal(gid, sizeof(gid)); } void header_ty::gid_set(long n) { space_padded_octal(gid, sizeof(gid), n); } void header_ty::gid_set_z(long n) { zero_padded_octal(gid, sizeof(gid), n); } long header_ty::size_get(void) const { return octal(size, sizeof(size)); } void header_ty::size_set(long n) { space_padded_octal(size, sizeof(size), n); } void header_ty::size_set_z(long n) { zero_padded_octal(size, sizeof(size), n); } long header_ty::mtime_get(void) const { return octal(mtime, sizeof(mtime)); } void header_ty::mtime_set(long n) { space_padded_octal(mtime, sizeof(mtime), n); } void header_ty::mtime_set_z(long n) { zero_padded_octal(mtime, sizeof(mtime), n); } long header_ty::chksum_get(void) const { return octal(chksum, sizeof(chksum)); } void header_ty::chksum_set(long n) { space_padded_octal(chksum, sizeof(chksum), n); } void header_ty::chksum_set_z(long n) { zero_padded_octal(chksum, sizeof(chksum), n); } int header_ty::linkflag_get(void) const { return (unsigned char)linkflag; } void header_ty::linkflag_set(int n) { linkflag = n; } rcstring header_ty::linkname_get(void) const { return rcstring(linkname, careful_strlen(linkname, sizeof(linkname))); } void header_ty::linkname_set(const rcstring &arg) { string_field_set(linkname, sizeof(linkname), arg); } rcstring header_ty::uname_get(void) const { return rcstring(uname, careful_strlen(uname, sizeof(uname))); } void header_ty::uname_set(const rcstring &arg) { string_field_set(uname, sizeof(uname), arg); } rcstring header_ty::gname_get(void) const { return rcstring(gname, careful_strlen(gname, sizeof(gname))); } void header_ty::gname_set(const rcstring &arg) { string_field_set(gname, sizeof(gname), arg); } long header_ty::devmajor_get(void) const { return octal(devmajor, sizeof(devmajor)); } void header_ty::devmajor_set(long n) { space_padded_octal(devmajor, sizeof(devmajor), n); } void header_ty::devmajor_set_z(long n) { zero_padded_octal(devmajor, sizeof(devmajor), n); } long header_ty::devminor_get(void) const { return octal(devminor, sizeof(devminor)); } void header_ty::devminor_set(long n) { space_padded_octal(devminor, sizeof(devminor), n); } void header_ty::devminor_set_z(long n) { zero_padded_octal(devminor, sizeof(devminor), n); } long header_ty::calculate_checksum(void) const { unsigned char *cp = (unsigned char *)this; unsigned char *ep = (unsigned char *)this->chksum; long sum = ((unsigned char)' ') * sizeof(this->chksum); while (cp < ep) sum += *cp++; cp = (unsigned char *)(this->chksum + sizeof(this->chksum)); ep = (unsigned char *)this + TBLOCK; while (cp < ep) sum += *cp++; return sum; } #include void header_ty::dump(void) const { unsigned char *cp = (unsigned char *)this; for (int j = 0; j < TBLOCK; j += 16) { fprintf(stderr, "%03X:", j); for (int k = 0; k < 16; ++k) fprintf(stderr, " %02X", cp[j + k]); fprintf(stderr, " "); for (int k = 0; k < 16; ++k) { unsigned char c = cp[j + k] & 0x7F; if (c < ' ' || c > '~') c = '.'; fputc(c, stderr); } fputc('\n', stderr); } } tardy-1.28/libtardy/tar/format.h 644 0 0 3042612163037023 151250ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2003, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_FORMAT_H #define LIBTARDY_TAR_FORMAT_H #include #define TBLOCK 512 #define NAMSIZ 100 // // The magic field is filled with this if uname and gname are valid. // #define TMAGIC "ustar \000" // 8 chars #define USTAR_MAGIC "ustar\000\060\060" // 8 chars // // The linkflag defines the type of file // #define LF_OLDNORMAL '\0' // Normal disk file, Unix compat #define LF_NORMAL '0' // Normal disk file #define LF_LINK '1' // Link to previously dumped file #define LF_SYMLINK '2' // Symbolic link #define LF_CHR '3' // Character special file #define LF_BLK '4' // Block special file #define LF_DIR '5' // Directory #define LF_FIFO '6' // FIFO special file #define LF_CONTIG '7' // Contiguous file #define LF_LONGNAME 'L' // File is actually long name // for next file in the archive. #define LF_LONGLINK 'K' // File is actually long link // for next file in the archive. #define LF_GZIPPED 'z' // Flags that the next file in the // archive is gzipped. // Further link types may be defined later. /** * The header_ty class is used to represent the set of information that * may be found in a tar(1) file header. This is typically overlayed * (type punned, aliased) onto a "unsigned char [TBLOCK]". * * DO NOT add any virtual method to this class, or it will cease * to be useful for overlaying. */ class header_ty { public: char name[NAMSIZ]; char mode[8]; char uid[8]; char gid[8]; char size[12]; char mtime[12]; char chksum[8]; char linkflag; char linkname[NAMSIZ]; char magic[8]; char uname[32]; char gname[32]; char devmajor[8]; char devminor[8]; /** * The get_name method is used to extract the file name from the * header block. */ rcstring name_get(void) const; /** * The name_set method is use to insert the file name into the * header block. * * @param name * The name to be inserted. If it is too long, it will be * silently truncated. */ void name_set(const rcstring &name); /** * The mode_get method is used to extract the file permission * modes form the header block. It will not include file type * information (above lower 12 bits). */ long mode_get(void) const; /** * The mode_set method is used to insert the file permission mlde * bits into the header, space padded. * * @param value * The value to be inserted. Only the lower 12 bits are used. */ void mode_set(long value); /** * The mode_set_z method is used to insert the file permission mlde * bits into the header, zero padded. * * @param value * The value to be inserted. Only the lower 12 bits are used. */ void mode_set_z(long value); /** * The uid_get method is used to extract the numeric user ID form * the header block. */ long uid_get(void) const; /** * The uid_set method is used to insert the numeric user ID into * the header block, space padded. * * @param value * The value to be inserted. */ void uid_set(long value); /** * The uid_set_z method is used to insert the numeric user ID into * the header block, zero padded. * * @param value * The value to be inserted. */ void uid_set_z(long value); /** * The gid_get method is used to extract the numeric user ID form * the header block. */ long gid_get(void) const; /** * The gid_set method is used to insert the numeric group ID into * the header block, space padded. * * @param value * The value to be inserted. */ void gid_set(long value); /** * The gid_set_z method is used to insert the numeric group ID into * the header block, zero padded. * * @param value * The value to be inserted. */ void gid_set_z(long value); /** * The size_get method is used to extract the file size, in bytes, * from the header block. */ long size_get(void) const; /** * The size_set method is used to insert the file size, in bytes, * into the header block, space padded. * * @param value * The value to be inserted. */ void size_set(long value); /** * The size_set_z method is used to insert the file size, in bytes, * into the header block, zero padded. * * @param value * The value to be inserted. */ void size_set_z(long value); /** * The mtime_get method is used to extract the file's last-modified * time, in seconds since 1-Jan-1970, from the header block. */ long mtime_get(void) const; /** * The mtime_set method is used to insert the file's last-modified * time, in seconds since 1-Jan-1970, into the header block, space * padded. * * @param value * The value to be inserted. */ void mtime_set(long value); /** * The mtime_set_z method is used to insert the file's last-modified * time, in seconds since 1-Jan-1970, into the header block, zero * padded. * * @param value * The value to be inserted. */ void mtime_set_z(long value); /** * The chksum_get method is used to extract the header block's * checksum field. * * @note * This method does not calculate the header block * checksum, see the #calculate_checksum method for that. This * method only extracts the value of the file header field. */ long chksum_get(void) const; /** * The chksum_set method is used to insert the checksum into the * header block, space padded. * * @param value * The value to be inserted. * * @note * This method does not calculate the header block checksum. * It only inserts the value info the file header field. */ void chksum_set(long value); /** * The chksum_set_z method is used to insert the checksum into the * header block, space padded. * * @param value * The value to be inserted. * * @note * This method does not calculate the header block checksum. * It only inserts the value info the file header field. */ void chksum_set_z(long value); /** * The linkflag_get method is used to extract the link flag from * the header block. */ int linkflag_get(void) const; /** * The linkflag_set method is used to insert the file's link flag * into the header block. * * @param value * The value to be inserted. */ void linkflag_set(int value); /** * The linkname_get method is used to extract the file's link * destination from the header block. * * @note * This is only a valid thing to do if the file's link type is * LF_LINK or LF_SYMLINK. */ rcstring linkname_get(void) const; /** * The linkname_set method is used to insert the file's link * destination into the header block. * * @param value * The link destination. If it is too long, it will be * silently truncated. */ void linkname_set(const rcstring &value); /** * The uname_get method is used to extract the file's user name * from the header block. * * @returns * The user name, or the empty string if it has not been set. * * @note * This is completely independent of the #uid_get method. */ rcstring uname_get(void) const; /** * The uname_set method is used to insert file's user name * into the header block. * * @param value * The name to be inserted, or the empty string to clear the field. * * @note * This is completely independent of the #uid_set method. */ void uname_set(const rcstring &value); /** * The gname_get method is used to extract the file's group name * from the header block. * * @returns * The group name, or the empty string if it has not been set. * * @note * This is completely independent of the #gid_get method. */ rcstring gname_get(void) const; /** * The gname_set method is used to insert file's group name * into the header block. * * @param value * The name to be inserted, or the empty string to clear the field. * * @note * This is completely independent of the #gid_set method. */ void gname_set(const rcstring &value); /** * The devmajor_get method is used to extract the file's major * device number from the header block. This is only a valid thing * to do if the file's link type is LF_CHR or LF_BLK. * * @note * This is likely to be particularly system specific, and * unlikely to be portable across differing POSIX-like system, * let alone any other kind of operating system. */ long devmajor_get(void) const; /** * The devmajor_set method is used to insert the file's majopr * device number into the header block, space padded. * * @param value * The value to be inserted. */ void devmajor_set(long value); /** * The devmajor_set_z method is used to insert the file's majopr * device number into the header block, zero padded. * * @param value * The value to be inserted. */ void devmajor_set_z(long value); /** * The devminor_get method is used to extract the file's minor * device number from the header block. This is only a valid thing * to do if the file's link type is LF_CHR or LF_BLK. * * @note * This is likely to be particularly system specific, and * unlikely to be portable across differing POSIX-like system, * let alone any other kind of operating system. */ long devminor_get(void) const; /** * The devminor_set method is used to insert the file's majopr * device number into the header block, space padded. * * @param value * The value to be inserted. */ void devminor_set(long value); /** * The devminor_set_z method is used to insert the file's majopr * device number into the header block, zero padded. * * @param value * The value to be inserted. */ void devminor_set_z(long value); /** * The calculate_checksum method may be used to calculate the * header block's checksum. * * @note * This method does not insert the checksum into the header * block, see the #chksum_set method for that. */ long calculate_checksum(void) const; /** * The dump method is used to dump a representation of the header block * onto the standard output. This is principally of use when debugging. */ void dump(void) const; }; #endif // LIBTARDY_TAR_FORMAT_H tardy-1.28/libtardy/tar/header.cc 644 0 0 475712163037023 152130ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2003, 2008, 2009 Peter Miller // // 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 3 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, see . // #include tar_header::~tar_header() { } tar_header::tar_header() : atime(0), ctime(0), device_major(0), device_minor(0), group_id(0), group_name(), inode_number(0), link_count(1), linkname(), mode(0), mtime(0), name(), rdevice_major(0), rdevice_minor(0), size(0), type(type_normal), user_id(0), user_name() { } tar_header::tar_header(const tar_header &arg) : atime(arg.atime), ctime(arg.ctime), device_major(arg.device_major), device_minor(arg.device_minor), group_id(arg.group_id), group_name(arg.group_name), inode_number(arg.inode_number), link_count(arg.link_count), linkname(arg.linkname), mode(arg.mode), mtime(arg.mtime), name(arg.name), rdevice_major(arg.rdevice_major), rdevice_minor(arg.rdevice_minor), size(arg.size), type(arg.type), user_id(arg.user_id), user_name(arg.user_name) { } tar_header & tar_header::operator = (const tar_header &arg) { atime = arg.atime; ctime = arg.ctime; device_major = arg.device_major; device_minor = arg.device_minor; group_id = arg.group_id; group_name = arg.group_name; inode_number = arg.inode_number; link_count = arg.link_count; linkname = arg.linkname; mode = arg.mode; mtime = arg.mtime; name = arg.name; rdevice_major = arg.rdevice_major; rdevice_minor = arg.rdevice_minor; size = arg.size; type = arg.type; user_id = arg.user_id; user_name = arg.user_name; return *this; } tardy-1.28/libtardy/tar/header.h 644 0 0 327212163037023 150440ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2003, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_HEADER_H #define LIBTARDY_TAR_HEADER_H #include #include class tar_header { public: enum type_ty { type_device_block, type_device_character, type_directory, type_fifo, type_link_hard, type_link_symbolic, type_normal, type_normal_contiguous, type_normal_gzipped, type_socket }; time_t atime; time_t ctime; long device_major; long device_minor; long group_id; rcstring group_name; long inode_number; long link_count; rcstring linkname; long mode; time_t mtime; rcstring name; long rdevice_major; long rdevice_minor; long size; type_ty type; long user_id; rcstring user_name; ~tar_header(); tar_header(); tar_header(const tar_header &); tar_header &operator = (const tar_header &); }; #endif // LIBTARDY_TAR_HEADER_H tardy-1.28/libtardy/tar/input.cc 644 0 0 510312163037023 151040ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include tar_input::tar_input() { } tar_input::~tar_input() { } void tar_input::fatal(const char *fmt, ...) const { va_list ap; va_start(ap, fmt); char buffer[2000]; vsnprintf(buffer, sizeof(buffer), fmt, ap); va_end(ap); explain_output_error_and_die ( "%s: %s {%s}", filename().c_str(), buffer, get_format_name() ); } void tar_input::warning(const char *fmt, ...) const { va_list ap; va_start(ap, fmt); char buffer[2000]; vsnprintf(buffer, sizeof(buffer), fmt, ap); va_end(ap); explain_output_error ( "%s: warning: %s {%s}", filename().c_str(), buffer, get_format_name() ); } void tar_input::read_data_padding(void) { // default is none } void tar_input::read_header_padding(void) { read_data_padding(); } tar_header::type_ty tar_input::type_from_mode(int mode) { // // Don't use the native UNIX defintions, because // (a) this may not be UNIX, and // (b) the vendor may have gratuitously changed things. // switch (mode >> 12) { case 014: return tar_header::type_socket; case 012: return tar_header::type_link_symbolic; case 010: return tar_header::type_normal; case 006: return tar_header::type_device_block; case 004: return tar_header::type_directory; case 002: return tar_header::type_device_character; case 001: return tar_header::type_fifo; default: return tar_header::type_normal; } } void tar_input::read_archive_begin(void) { } void tar_input::read_archive_end(void) { } size_t tar_input::get_maximum_name_length(void) const { return 0; } tardy-1.28/libtardy/tar/input.h 644 0 0 2411312163037023 147700ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2004, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_H #define LIBTARDY_TAR_INPUT_H #include #include #include #include #include #include #include /** * The tar_input class represents an abstract archive input source. * It was originally tar(5) formatted archives, but has since been * generalized to cpio(1) archives and even lists of file names. * * The expected sequence of operations is *
  *                 |
  *     +-----------------------+
  *     |   read_archive_begin  |
  *     +-----------------------+
  *                 |
  *                 | ,------------------<---------------.
  *                 |/                                    \
  *                 V                                      |
  *                 |                                      |
  *     +-----------------------+                          |
  *     |      read_header      |                          ^
  *     +-----------------------+                          |
  *                 |   \                                  |
  *                 |    `--- false ----->-------------------.
  *                 |                                      |  \
  *     +-----------------------+                          |   |
  *     |  read_header_padding  |                          ^   v
  *     +-----------------------+                          |   |
  *                 |                                      |   |
  *                 *------->-------.                      |   |
  *                 |                \                     |   |
  *                 |                 |                    |   |
  *                 |                 | ,------<-----.     |   |
  *                 |                 |/              \    |   |
  *                 |                 V                |   |   |
  *                 |                 |                |   |   |
  *                 |     +-----------------------+    |   |   |
  *                 |     |       read_data       |    ^   ^   v
  *                 |     +-----------------------+    |   |   |
  *                 |                 |               /    |   |
  *                 |                 *-------->-----'     |   |
  *                 |                 |                    |   |
  *                 |                /                     |   |
  *                 | ,-----<-------'                      ^   v
  *                 |/                                     |   |
  *                 V                                      |   |
  *                 |                                      |   |
  *                 |                                      |   |
  *     +-----------------------+                          |   |
  *     |   read_data_padding   |                          |   |
  *     +-----------------------+                          |   |
  *                 |                                     /    |
  *                 `-------------------->---------------'     |
  *                                                           /
  *                 .----------------------------------------'
  *                 |
  *     +-----------------------+
  *     |    read_archive_end   |
  *     +-----------------------+
  *                 |
  *                                                                   
*/ class tar_input { public: /** * The pointer type should be used for all pointers to input * instances, as it does reference counting a resource clean up at * the appropriate time. */ typedef boost::shared_ptr pointer; /** * The destructor. */ virtual ~tar_input(); /** * The factory class method is used to sniff at a file to determine * its format, and then create the appropriate instance. * * @param ifp * The file to be read and parsed into archive members. * @returns * A pointer to an open archive reader instance. */ static pointer factory(const file_input::pointer &ifp); /** * The tar_output_factory method is used to manufactore a new * tar_output instance, based on the present input format, but to * the file specified. * * This will allow the tardy(1) command to write the same kind of * archive as seen on the input, by default. * * The default implementation returns a new tar_output_tar_posix * instance, for backwards compatibility and sanity. * * Derived classes may override this with something more specific, * but should strive to meet user perceptions and expectations as * the what "the same" means, when creating a corresponding * output format instance. */ virtual tar_output::pointer tar_output_factory( const file_output::pointer &ofp) const; /** * The read_data method is used to read a block of data from * the input. The buffer_length argument specifies the * maximum number of bytes in the buffer. Returns the number * of bytes read, or 0 at end of file. * * @param data * Pointer to the base of an array of char in which to place * the data. * @param data_size * The number of bytes opf data to read, maximum size of the * data array. */ virtual int read_data(void *data, int data_size) = 0; /** * The read_data_padding is used to read any extra data between * files. By default, this method does nothing. */ virtual void read_data_padding(void); /** * The read_header method is used to read file information from * the input. Returns 0 at end of input. * * @param hdr * The header variable to place the result into. * @returns * true if something was read, false if we have reached the end * of the input. */ virtual bool read_header(tar_header &hdr) = 0; /** * The read_header_padding is used to read any extra data between * headers. By default, this method does nothing. */ virtual void read_header_padding(void); /** * The filename method is used to obtain the name of the * input file (not the current archiove member file name). */ virtual rcstring filename(void) const = 0; /** * The fatal method is used to print a fatal error message. * This method does not return. * * @param fmt * The format of the output, see printf(3) for more * information. */ void fatal(const char *fmt, ...) const ATTR_PRINTF(2, 3); /** * The warning method is used to print a warning message. * * @param fmt * The format of the output, see printf(3) for more * information. */ void warning(const char *fmt, ...) const ATTR_PRINTF(2, 3); /** * The get_format_name method may be used to obtain the name of the * file format in use. * * Derived classes shall make every attempt to return strings that * can be used with the tardy -ifmt command line option. */ virtual const char *get_format_name(void) const = 0; /** * The get_format_family method is used to obtain an indication of * which format family the format belongs to. This may be used to * inform default output formt selection. */ virtual format_family_t get_format_family(void) const = 0; /** * The read_archive_begin method is used to read in any magic * numbers or fixed archive header before the archive members * start. The default implementation does nothing. */ virtual void read_archive_begin(void); /** * The read_archive_end method is used to read in any magic * numbers or fixed archive footer after the archive members * are done. The default implementation does nothing. */ virtual void read_archive_end(void); /** * The get_maximum_name_length method may be used to obtain the * longest name that may be stored in the archive (as opposed to * the longest name actually present in the archive). * * @returns * The longest filename that may be present in the archive in * bytes (not characters). * A value of zero means "effectively infinite", or more * accurately "how much memory do you have?". */ virtual size_t get_maximum_name_length(void) const; protected: /** * The default constructor. * For use by derived classes only. */ tar_input(); /** * The type_from_mode class method is used to map cpio(5) and ar(5) * mode bits into tar_header::type_ty values. * * @param mode * file permission modes */ static tar_header::type_ty type_from_mode(int mode); private: /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_input(const tar_input &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_input &operator=(const tar_input &rhs); }; #endif // LIBTARDY_TAR_INPUT_H tardy-1.28/libtardy/tar/input/ar.cc 644 0 0 324312163037023 155110ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include tar_input_ar::~tar_input_ar() { } tar_input_ar::tar_input_ar(const file_input::pointer &a_ifp, int a_padding) : ifp(a_ifp), padding(a_padding >= 2 ? a_padding : 0) { assert(ifp); } format_family_t tar_input_ar::get_format_family(void) const { return format_family_ar; } rcstring tar_input_ar::filename(void) const { return ifp->filename(); } int tar_input_ar::read_data(void *data, int data_size) { assert(data_size >= 0); return read_deeper(data, data_size); } void tar_input_ar::read_header_padding(void) { read_padding(); } size_t tar_input_ar::read_deeper(void *data, size_t data_size) { return ifp->read(data, data_size); } void tar_input_ar::read_data_padding(void) { read_padding(); } void tar_input_ar::read_padding(void) { if (padding <= 0) return; unsigned n = ifp->get_position() % padding; if (!n) return; ifp->skip(padding - n); } tardy-1.28/libtardy/tar/input/ar.h 644 0 0 1060512163037023 153730ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_AR_H #define LIBTARDY_TAR_INPUT_AR_H #include /** * The tar_input_ar class is used to represent the process of parsing an input * file, in one of the ar(1) formats, into a series of archive members. */ class tar_input_ar: public tar_input { public: /** * The destructor. */ virtual ~tar_input_ar(); /** * The factory class method is used to create new dynamically * allocated instances of this class. * * The file provided is non-destructively examined to determine * which ar(1) format is actually present, and then the appropriate * class' create method is called. * * @param ifp * The file to be read and parsed. */ static tar_input::pointer factory(const file_input::pointer &ifp); /** * The candidate class method is used to sniff at an input file * (without moving the file position) to see if it looks like a * ar(1) archive. * * @param ifp * The file to be examined. * @returns * true if the #factory class method could open it, false otherwise. */ static bool candidate(const file_input::pointer &ifp); protected: /** * The constructor. * For use by derived classes only. * * @param ifp * The input file to read and parse into archive members. * @param padding * The alignment boundary required for header and data, * negative or zero means none. */ tar_input_ar(const file_input::pointer &ifp, int padding); // See base class for documentation. void read_header_padding(void); // See base class for documentation. int read_data(void *data, int data_size); // See base class for documentation. void read_data_padding(void); // See base class for documentation. rcstring filename(void) const; // See base class for documentation. format_family_t get_format_family(void) const; /** * The read_deeper method is used by derived classes to read * underlying file contents. The file position is tracked, for * alignment purposes. * * @param data * Pointer to the base of an array of char in which to place * the data. * @param data_size * The number of bytes of data to read, maximum size of the * data array. * @returns * the number of bytes read * @note * If there is an error, this function will not return, but * will exit with a fatal error message. */ size_t read_deeper(void *data, size_t data_size); private: /** * The ifp instance variable is used to remember the file to be * read and parsed. */ file_input::pointer ifp; /** * The padding instance variable is used to remember the padding * multiple to be used, in bytes. */ unsigned padding; /** * The read_padding method is used to advance the file position to * the next padding boundary. The actual contents of the bytes are * ignored (although they should all be NUL characters). */ void read_padding(void); /** * The default constructor. Do not use. */ tar_input_ar(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_ar(const tar_input_ar &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_ar &operator=(const tar_input_ar &rhs); }; #endif // LIBTARDY_TAR_INPUT_AR_H tardy-1.28/libtardy/tar/input/ar/bsd.cc 644 0 0 1071012163037023 162760ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include #include tar_input_ar_bsd::~tar_input_ar_bsd() { } tar_input_ar_bsd::tar_input_ar_bsd(const file_input::pointer &a_ifp) : tar_input_ar(a_ifp, 2) { } tar_input::pointer tar_input_ar_bsd::create(const file_input::pointer &a_ifp) { pointer p(new tar_input_ar_bsd(a_ifp)); p = tar_input_filter_ar_long_names2::create(p); return tar_input_filter_ar_long_names::create(p); } bool tar_input_ar_bsd::candidate(const file_input::pointer &a_ifp) { char buffer[8]; return (a_ifp->peek(buffer, 8) == 8 && 0 == memcmp(buffer, "!\n", 8)); } const char * tar_input_ar_bsd::get_format_name(void) const { return "ar-bsd"; } void tar_input_ar_bsd::read_archive_begin(void) { char buffer[8]; if ( read_deeper(buffer, sizeof(buffer)) != sizeof(buffer) || 0 != memcmp(buffer, "!\n", 8) ) fatal("bad magic number"); } static rcstring slurp(const char *data, size_t data_size) { while (data_size > 0 && data[data_size - 1] == ' ') --data_size; if (data_size > 0 && data[data_size - 1] == '/') --data_size; return rcstring(data, data_size); } static unsigned long dec(const char *data, size_t data_size) { unsigned long result = 0; while (data_size > 0 && *data == ' ') { ++data; --data_size; } while (data_size > 0) { --data_size; unsigned char c = *data++; switch (c) { case ' ': return result; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': result = result * 10 + c - '0'; break; default: return -1; } } return result; } static unsigned long oct(const char *data, size_t data_size) { unsigned long result = 0; while (data_size > 0 && *data == ' ') { ++data; --data_size; } while (data_size > 0) { --data_size; unsigned char c = *data++; switch (c) { case ' ': return result; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': result = (result << 3) + (c & 7); break; default: return -1; } } return result; } bool tar_input_ar_bsd::read_header(tar_header &hdr) { // // Name Size Offset // ---- ---- ------ // name 16 0 // date 12 16 // uid 6 28 // gid 6 34 // mode 8 40 // size 10 48 // fmag 2 58 // ---- ---- ------ // Total: 60 char buffer[60]; size_t nbytes = read_deeper(buffer, sizeof(buffer)); if (nbytes == 0) return false; if (nbytes != sizeof(buffer)) { fatal ( "short header read (expected %u, got %u)", (int)sizeof(buffer), (int)nbytes ); } if (buffer[58] != '`' || buffer[59] != '\n') fatal("header format error"); hdr.name = slurp(buffer, 16); hdr.mtime = dec(buffer + 16, 12); hdr.user_id = dec(buffer + 28, 6); hdr.group_id = dec(buffer + 34, 6); unsigned mode = oct(buffer + 40, 8); hdr.mode = mode & 07777; hdr.type = type_from_mode(mode); hdr.size = dec(buffer + 48, 10); return true; } tar_output::pointer tar_input_ar_bsd::tar_output_factory(const file_output::pointer &ofp) const { return tar_output_ar_bsd::create(ofp); } size_t tar_input_ar_bsd::get_maximum_name_length(void) const { return 16; } tardy-1.28/libtardy/tar/input/ar/bsd.h 644 0 0 573112163037023 161270ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_AR_BSD_H #define LIBTARDY_TAR_INPUT_AR_BSD_H #include /** * The tar_input_ar_bsd class is used to represent the processing * required to read and parse a ar(1) archive, in BSD format. */ class tar_input_ar_bsd: public tar_input_ar { public: /** * The destructor. */ virtual ~tar_input_ar_bsd(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param ifp * The file to be read and parsed. */ static pointer create(const file_input::pointer &ifp); /** * The candidate class method is used to sniff at an input file * (without moving the file position) to see if it looks like a * ar(1) archive, in standard format. * * @param ifp * The file to be examined. * @returns * true if the #create class method could open it, false otherwise. */ static bool candidate(const file_input::pointer &ifp); protected: // See base class for documentation. void read_archive_begin(void); // See base class for documentation. bool read_header(tar_header &hdr); // See base class for documentation. const char *get_format_name(void) const; // See base class for documentation. tar_output::pointer tar_output_factory(const file_output::pointer &ofp) const; // See base class for documentation. size_t get_maximum_name_length(void) const; private: /** * The constructor. * It is private on purpose, use a #create class method instead. * * @param ifp * The file to be read and parsed. */ tar_input_ar_bsd(const file_input::pointer &ifp); /** * The default constructor. Do not use. */ tar_input_ar_bsd(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_ar_bsd(const tar_input_ar_bsd &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_ar_bsd &operator=(const tar_input_ar_bsd &rhs); }; #endif // LIBTARDY_TAR_INPUT_AR_BSD_H tardy-1.28/libtardy/tar/input/ar/factory.cc 644 0 0 261312163037023 171600ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include tar_input_ar::pointer tar_input_ar::factory(const file_input::pointer &a_ifp) { if (tar_input_ar_pdp11::candidate(a_ifp)) return tar_input_ar_pdp11::create(a_ifp); if (tar_input_ar_v7::candidate(a_ifp)) return tar_input_ar_v7::create(a_ifp); return tar_input_ar_bsd::create(a_ifp); } bool tar_input_ar::candidate(const file_input::pointer &a_ifp) { return ( tar_input_ar_pdp11::candidate(a_ifp) || tar_input_ar_v7::candidate(a_ifp) || tar_input_ar_bsd::candidate(a_ifp) ); } tardy-1.28/libtardy/tar/input/ar/pdp11.cc 644 0 0 1024512163037023 164560ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include #include tar_input_ar_pdp11::~tar_input_ar_pdp11() { } tar_input_ar_pdp11::tar_input_ar_pdp11( const file_input::pointer &a_ifp, endian_t a_endian ) : tar_input_ar(a_ifp, 2), endian(a_endian) { } tar_input_ar_pdp11::pointer tar_input_ar_pdp11::create(const file_input::pointer &a_ifp, endian_t a_endian) { pointer p(new tar_input_ar_pdp11(a_ifp, a_endian)); p = tar_input_filter_ar_long_names2::create(p); return tar_input_filter_ar_long_names::create(p); } static const unsigned MAGIC = 0177555; tar_input_ar_pdp11::pointer tar_input_ar_pdp11::create(const file_input::pointer &a_ifp) { endian_t a_endian = endian_little; unsigned char buffer[2]; if ( a_ifp->peek(buffer, sizeof(buffer)) == sizeof(buffer) && endian_get2be(buffer) == MAGIC ) a_endian = endian_big; return create(a_ifp, a_endian); } bool tar_input_ar_pdp11::candidate(const file_input::pointer &a_ifp) { unsigned char buffer[2]; return ( 2 == a_ifp->peek(buffer, 2) && (endian_get2le(buffer) == MAGIC || endian_get2be(buffer) == MAGIC) ); } tar_input_ar_pdp11::pointer tar_input_ar_pdp11::create_le(const file_input::pointer &a_ifp) { return create(a_ifp, endian_little); } tar_input_ar_pdp11::pointer tar_input_ar_pdp11::create_be(const file_input::pointer &a_ifp) { return create(a_ifp, endian_big); } const char * tar_input_ar_pdp11::get_format_name(void) const { return (endian == endian_little ? "ar-pdp11-le" : "ar-pdp11-be"); } void tar_input_ar_pdp11::read_archive_begin(void) { unsigned char buffer[2]; if (read_deeper(buffer, sizeof(buffer)) != sizeof(buffer)) fatal("short magic number read"); unsigned n = get2(buffer); if (n != MAGIC) fatal("bad magic number (expected %#o, read %#o)", MAGIC, n); } bool tar_input_ar_pdp11::read_header(tar_header &hdr) { // // Name Offset Size // ---- ------ ---- // name 0 8 // date 8 4 // uid 12 1 // gid 13 1 // mode 14 2 // size 16 2 // ---- ------ ---- // Total: 18 // unsigned char buffer[18]; size_t nbytes = read_deeper(buffer, sizeof(buffer)); if (nbytes == 0) return false; if (nbytes != sizeof(buffer)) fatal("short header read"); unsigned char *end = (unsigned char *)memchr(buffer, '\0', 8); if (!end) end = buffer + 8; hdr.name = rcstring((char *)buffer, end - buffer); hdr.type = tar_header::type_normal; hdr.mtime = get4(buffer + 8); hdr.user_id = buffer[12]; hdr.group_id = buffer[13]; hdr.mode = get2(buffer + 14); hdr.size = get2(buffer + 16); return true; } unsigned tar_input_ar_pdp11::get2(unsigned char *data) const { return endian_get2(data, endian); } unsigned long tar_input_ar_pdp11::get4(unsigned char *data) const { unsigned n1 = get2(data); unsigned n2 = get2(data + 2); return (((unsigned long)n1 << 16) | n2); } tar_output::pointer tar_input_ar_pdp11::tar_output_factory(const file_output::pointer &ofp) const { return tar_output_ar_pdp11::create(ofp, endian); } size_t tar_input_ar_pdp11::get_maximum_name_length(void) const { return 8; } tardy-1.28/libtardy/tar/input/ar/pdp11.h 644 0 0 1160312163037023 163170ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_AR_PDP11_H #define LIBTARDY_TAR_INPUT_AR_PDP11_H #include #include /** * The tar_input_ar_pdp11 class is used to represent the processing * required to read and parse an ar(1) archive, in the ancient pre-V7 * format. */ class tar_input_ar_pdp11: public tar_input_ar { public: /** * The destructor. */ virtual ~tar_input_ar_pdp11(); /** * The candidate class method is used to sniff at an input file * (without moving the file position) to see if it looks like a * ar(1) archive, in pre-V7 format. * * @param ifp * The file to be examined. * @returns * true if the #create class method could open it, false otherwise. */ static bool candidate(const file_input::pointer &ifp); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param ifp * The file to be read and parsed. * @param endian * The byte order to be used. */ static pointer create(const file_input::pointer &ifp, endian_t endian); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param ifp * The file to be read and parsed. The byte order will be * determined from the magic number in the file. */ static pointer create(const file_input::pointer &ifp); /** * The create_le class method is used to create new dynamically * allocated instances of this class, using little-endian byte * order. The PDP11 was a little-endian machine, so this is the * authentic byte order. * * @param ifp * The file to be read and parsed. */ static pointer create_le(const file_input::pointer &ifp); /** * The create_be class method is used to create new dynamically allocated * instances of this class, using big-endian byte order. * * @param ifp * The file to be read and parsed. */ static pointer create_be(const file_input::pointer &ifp); protected: // See base class for documentation. void read_archive_begin(void); // See base class for documentation. bool read_header(tar_header &hdr); // See base class for documentation. const char *get_format_name(void) const; // See base class for documentation. tar_output::pointer tar_output_factory(const file_output::pointer &ofp) const; // See base class for documentation. size_t get_maximum_name_length(void) const; private: /** * The constructor. * It is private on purpose, use a #create class method instead. * * @param ifp * The file to be read and parsed. * @param endian * The byte order to be used. */ tar_input_ar_pdp11(const file_input::pointer &ifp, endian_t endian); /** * The endian instance variable is used to remember the byte order * to be used. */ endian_t endian; /** * The get2 method is used to convert a byte array (length 2) into * an unsigned value, using the current byte ordering. * * @param data * Pointer to the array of two bytes to be converted. */ unsigned get2(unsigned char *data) const; /** * The get4 method is used to convert a byte array (length 4) into * an unsigned long value, using the current byte ordering. * * @param data * Pointer to the array of four bytes to be converted. */ unsigned long get4(unsigned char *data) const; /** * The default constructor. Do not use. */ tar_input_ar_pdp11(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_ar_pdp11(const tar_input_ar_pdp11 &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_ar_pdp11 &operator=(const tar_input_ar_pdp11 &rhs); }; #endif // LIBTARDY_TAR_INPUT_AR_PDP11_H tardy-1.28/libtardy/tar/input/ar/v7.cc 644 0 0 1014212163037023 160610ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include #include tar_input_ar_v7::~tar_input_ar_v7() { } tar_input_ar_v7::tar_input_ar_v7( const file_input::pointer &a_ifp, endian_t a_endian ) : tar_input_ar(a_ifp, 0), endian(a_endian) { } tar_input_ar_v7::pointer tar_input_ar_v7::create(const file_input::pointer &a_ifp, endian_t a_endian) { pointer p(new tar_input_ar_v7(a_ifp, a_endian)); p = tar_input_filter_ar_long_names2::create(p); return tar_input_filter_ar_long_names::create(p); } static const unsigned MAGIC = 0177545; tar_input_ar_v7::pointer tar_input_ar_v7::create(const file_input::pointer &a_ifp) { char buffer[2]; endian_t a_endian = endian_little; if (2 == a_ifp->peek(buffer, 2) && endian_get2be(buffer) == MAGIC) a_endian = endian_big; return create(a_ifp, a_endian); } bool tar_input_ar_v7::candidate(const file_input::pointer &a_ifp) { char buffer[2]; return ( 2 == a_ifp->peek(buffer, 2) && (endian_get2le(buffer) == MAGIC || endian_get2be(buffer) == MAGIC) ); } tar_input_ar_v7::pointer tar_input_ar_v7::create_le(const file_input::pointer &a_ifp) { // version 7 was developed on a PDP11, which is little-endian. return create(a_ifp, endian_little); } tar_input_ar_v7::pointer tar_input_ar_v7::create_be(const file_input::pointer &a_ifp) { return create(a_ifp, endian_big); } tar_output::pointer tar_input_ar_v7::tar_output_factory(const file_output::pointer &ofp) const { return tar_output_ar_v7::create(ofp, endian); } void tar_input_ar_v7::read_archive_begin(void) { unsigned char buffer[2]; if (2 != read_deeper(buffer, 2)) fatal("short magic number read"); if (get2(buffer) != MAGIC) fatal("bad magic number"); } bool tar_input_ar_v7::read_header(tar_header &hdr) { // // Name Offset Size // ---- ------ ---- // name 0 14 // date 14 4 // long in byte order 2 3 1 0 // uid 18 1 // gid 19 1 // mode 20 2 // short in byte order 0 1 // size 22 4 // long in byte order 2 3 1 0 // ---- ------ ---- // Total: 26 // unsigned char buffer[26]; size_t nbytes = read_deeper(buffer, sizeof(buffer)); if (nbytes == 0) return false; if (nbytes != sizeof(buffer)) fatal("short header read"); unsigned char *ep = (unsigned char *)memchr(buffer, '\0', 14); size_t name_size = (ep ? ep - buffer : 14); hdr.name = rcstring((char *)buffer, name_size); hdr.mtime = get4(buffer + 14); hdr.user_id = buffer[18]; hdr.group_id = buffer[19]; hdr.mode = get2(buffer + 20); hdr.type = tar_header::type_normal; hdr.size = get4(buffer + 22); return true; } const char * tar_input_ar_v7::get_format_name(void) const { return (endian == endian_little ? "ar-v7-le" : "ar-v7-be"); } unsigned tar_input_ar_v7::get2(unsigned char *data) const { return endian_get2(data, endian); } unsigned long tar_input_ar_v7::get4(unsigned char *data) const { unsigned n1 = get2(data); unsigned n2 = get2(data + 2); return (((unsigned long)n1 << 16) | n2); } size_t tar_input_ar_v7::get_maximum_name_length(void) const { return 14; } tardy-1.28/libtardy/tar/input/ar/v7.h 644 0 0 1151212163037023 157250ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_AR_V7_H #define LIBTARDY_TAR_INPUT_AR_V7_H #include #include /** * The tar_input_ar_v7 class is used to represent the processing * required to read and parse an ar(1) archive in the ancient Unix * Version7 format. */ class tar_input_ar_v7: public tar_input_ar { public: /** * The destructor. */ virtual ~tar_input_ar_v7(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param ifp * The file to be read and parsed. * The byte order will be determined by sniffing at the file. */ static pointer create(const file_input::pointer &ifp); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param ifp * The file to be read and parsed. * @param endian * The byte order to be used. */ static pointer create(const file_input::pointer &ifp, endian_t endian); /** * The create_be class method is used to create new dynamically * allocated instances of this class, using big-endian byte order. * * @param ifp * The file to be read and parsed. */ static pointer create_be(const file_input::pointer &ifp); /** * The create_le class method is used to create new dynamically * allocated instances of this class, using little-endian byte order. * * @param ifp * The file to be read and parsed. */ static pointer create_le(const file_input::pointer &ifp); /** * The candidate class method is used to sniff at an input file * (without moving the file position) to see if it looks like a * ar(1) archive, in V7 format. * * @param ifp * The file to be examined. * @returns * true if the #create class method could open it, false otherwise. */ static bool candidate(const file_input::pointer &ifp); protected: // See base class for documentation. void read_archive_begin(void); // See base class for documentation. bool read_header(tar_header &hdr); // See base class for documentation. const char *get_format_name(void) const; // See base class for documentation. tar_output::pointer tar_output_factory(const file_output::pointer &ofp) const; // See base class for documentation. size_t get_maximum_name_length(void) const; private: /** * The constructor. * It is private on purpose, use a #create class method instead. * * @param ifp * The file to be read and parsed. * @param endian * The byte order to be used. V7 Unix was developed on a * PDP11, in little endian byte order. */ tar_input_ar_v7(const file_input::pointer &ifp, endian_t endian); private: /** * The default constructor. Do not use. */ tar_input_ar_v7(); /** * The endian instance variable is used to remember the byte order * to use. */ endian_t endian; /** * The get2 method is used to convert a byte array (length 2) into * an unsigned value, using the current byte ordering. * * @param data * Pointer to the array of two bytes to be converted. */ unsigned get2(unsigned char *data) const; /** * The get4 method is used to convert a byte array (length 4) into * an unsigned long value, using the current byte ordering. * * @param data * Pointer to the array of four bytes to be converted. */ unsigned long get4(unsigned char *data) const; /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_ar_v7(const tar_input_ar_v7 &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_ar_v7 &operator=(const tar_input_ar_v7 &rhs); }; #endif // LIBTARDY_TAR_INPUT_AR_V7_H tardy-1.28/libtardy/tar/input/cpio.cc 644 0 0 475312163037023 160500ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include tar_input_cpio::~tar_input_cpio() { } tar_input_cpio::tar_input_cpio( const file_input::pointer &a_ifp, int a_padding ) : ifp(a_ifp), padding(a_padding >= 2 ? a_padding : 0) { assert(ifp); } rcstring tar_input_cpio::filename(void) const { return ifp->filename(); } format_family_t tar_input_cpio::get_format_family(void) const { return format_family_cpio; } int tar_input_cpio::read_data(void *data, int data_size) { return read_deeper(data, data_size); } void tar_input_cpio::read_header_padding(void) { read_padding(); } void tar_input_cpio::read_data_padding(void) { read_padding(); } void tar_input_cpio::read_padding(void) { if (padding <= 0) return; unsigned n = ifp->get_position() % padding; if (!n) return; ifp->skip(padding - n); } rcstring tar_input_cpio::read_name(unsigned namsiz) { if (namsiz < 2) fatal("invalid name size field (%d)", namsiz); static size_t name_buf_max = 0; static char *name_buf = 0; if (namsiz > name_buf_max) { delete [] name_buf; name_buf_max = name_buf_max * 2 + 32; name_buf = new char [name_buf_max]; } unsigned nbytes = read_deeper(name_buf, namsiz); if (nbytes != namsiz) fatal("short header name read (expected %d, read %d)", namsiz, nbytes); if (name_buf[namsiz - 1] != '\0' || memchr(name_buf, '\0', namsiz - 1)) fatal("badly formatted name"); return rcstring(name_buf, namsiz - 1); } bool tar_input_cpio::is_end(const tar_header &hdr) { return (hdr.inode_number == 0 && hdr.name == "TRAILER!!!"); } size_t tar_input_cpio::read_deeper(void *data, size_t data_size) { return ifp->read(data, data_size); } tardy-1.28/libtardy/tar/input/cpio.h 644 0 0 1166612163037023 157330ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_CPIO_H #define LIBTARDY_TAR_INPUT_CPIO_H #include #include /** * The tar_input_cpio class is used to represent the process of parsing * an input file, in one of the cpio(1) formats, into a series of * archive members. */ class tar_input_cpio: public tar_input { public: /** * The destructor. */ virtual ~tar_input_cpio(); /** * The factory class method is used to create new dynamically * allocated instances of this class. * * The file provided is non-destructively examined to determine * which cpio format is actually present, and then the appropriate * class' create method is called. * * @param ifp * The file to be read and parsed. */ static tar_input::pointer factory(const file_input::pointer &ifp); /** * The candidate class method is used to sniff at an input file * (without moving the file position) to see if it looks like a * CPIO archive. * * @param ifp * The file to be examined. * @returns * true if the #factory class method could open it, false otherwise. */ static bool candidate(const file_input::pointer &ifp); protected: /** * The constructor. * For use by derived classes only. * * @param ifp * The input file to read and parse into archive members. * @param padding * The padding multiple to be used. */ tar_input_cpio(const file_input::pointer &ifp, int padding); // See base class for documentation. void read_header_padding(void); // See base class for documentation. int read_data(void *data, int data_size); // See base class for documentation. void read_data_padding(void); // See base class for documentation. rcstring filename(void) const; // See base class for documentation. format_family_t get_format_family(void) const; /** * The read_name method is used to read the name from the archive data, * checking various aspects as it goes. * * @param name_size * The size of the name field, including the terminating NUL character. */ rcstring read_name(unsigned name_size); /** * The is_end class method is used to determine whether or not the * given header represents the end of a cpio(5) archive. * * @param hdr * The header data to test. */ static bool is_end(const tar_header &hdr); /** * The read_deeper method is used by derived classes to read * underlying file contents. The file position is tracked, for * alignment purposes. * * @param data * Pointer to the base of an array of char in which to place * the data. * @param data_size * The number of bytes of data to read, maximum size of the * data array. * @returns * the number of bytes read * @note * If there is an error, this function will not return, but * will exit with a fatal error message. */ size_t read_deeper(void *data, size_t data_size); private: /** * The ifp instance variable is used to remember where to get the * binary archive data from. */ file_input::pointer ifp; /** * The padding instance variable is used to remember the padding * multiple to be used, in bytes. */ unsigned padding; /** * The read_padding method is used to advance the file position to * the next padding boundary. The actual contents of the bytes are * ignored (although they should all be NUL characters). */ void read_padding(void); /** * The default constructor. Do not use. */ tar_input_cpio(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_cpio(const tar_input_cpio &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_cpio &operator=(const tar_input_cpio &rhs); }; #endif // LIBTARDY_TAR_INPUT_CPIO_H tardy-1.28/libtardy/tar/input/cpio/binary.cc 644 0 0 1171312163037023 173460ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include tar_input_cpio_binary::~tar_input_cpio_binary() { } static endian_t sniff(const file_input::pointer &ifp) { unsigned char buffer[2]; int nbytes = ifp->peek(buffer, sizeof(buffer)); if (nbytes >= 2 && 070707 == endian_get2be(buffer)) return endian_big; return endian_little; } tar_input_cpio_binary::tar_input_cpio_binary(const file_input::pointer &a_ifp) : tar_input_cpio(a_ifp, 2), endian(sniff(a_ifp)) { } tar_input_cpio_binary::pointer tar_input_cpio_binary::create(const file_input::pointer &a_ifp) { return pointer(new tar_input_cpio_binary(a_ifp)); } bool tar_input_cpio_binary::candidate(const file_input::pointer &a_ifp) { unsigned char buffer[26]; int nbytes = a_ifp->peek(buffer, sizeof(buffer)); if (nbytes < 26) return false; return ( 070707 == endian_get2le(buffer) || 070707 == endian_get2be(buffer) ); } bool tar_input_cpio_binary::read_header(tar_header &hdr) { char buffer[26]; size_t nbytes = read_deeper(buffer, sizeof(buffer)); if (nbytes != sizeof(buffer)) { fatal ( "short header read (expected %d, read %d)", (int)sizeof(buffer), (int)nbytes ); } unsigned magic = get2(buffer); if (magic != 070707) fatal("bad magic number (expected 070707, read %#o)", magic); unsigned dev = get2(buffer + 2); hdr.device_major = dev >> 8; hdr.device_minor = dev & 255; hdr.inode_number = get2(buffer + 4); unsigned mode = get2(buffer + 6); hdr.mode = mode & 07777; hdr.type = type_from_mode(mode); hdr.user_id = get2(buffer + 8); hdr.group_id = get2(buffer + 10); hdr.link_count = get2(buffer + 12); unsigned rdev = get2(buffer + 14); hdr.rdevice_major = rdev >> 8; hdr.rdevice_minor = rdev & 255; hdr.mtime = get4(buffer + 16); unsigned name_size = get2(buffer + 20); if (name_size < 2) fatal("invalid name size (%u)", name_size); hdr.size = get4(buffer + 22); hdr.name = read_name(name_size); // // HP/UX cpio(1) creates archives that look just like ordinary // cpio(5) archives, but for devices it sets major = 0, minor = 1, // and puts the actual major/minor number in the filesize field. // See if this is an HP/UX cpio(5) archive, and if so fix it. // switch (hdr.type) { case tar_header::type_device_character: case tar_header::type_device_block: case tar_header::type_socket: case tar_header::type_fifo: if (hdr.size != 0 && hdr.rdevice_major == 0 && hdr.rdevice_minor == 1) { hdr.rdevice_major = hdr.size >> 8; hdr.rdevice_minor = hdr.size & 255; hdr.size = 0; } break; default: break; } return !is_end(hdr); } unsigned tar_input_cpio_binary::get2(const void *data) const { return endian_get2(data, endian); } unsigned long tar_input_cpio_binary::get4(const void *data) const { // // This is deeply weird. // // cpio(5) says "The four-byte integer is stored with the // most-significant 16 bits first followed by the least-significant // 16 bits. Each of the two 16 bit values are stored in // machine-native byte order." // const unsigned char *p = (const unsigned char *)data; unsigned n1 = get2(p); unsigned n2 = get2(p + 2); return (((unsigned long)n1 << 16) | n2); } const char * tar_input_cpio_binary::get_format_name(void) const { return (endian == endian_little ? "cpio-bin-le" : "cpio-bin-be"); } tar_output::pointer tar_input_cpio_binary::tar_output_factory(const file_output::pointer &ofp) const { // // Unfortunately, at this point we don't know whether it's a real // cpio(5) archive, or a bodgy HP/UX cpio(5) archive. And if it has // no devices in it, we will be unable to tell, in any case. // // This is also called, if it is called, before any archive members // have been parsed. // return tar_output_cpio_binary::create(ofp, endian); } size_t tar_input_cpio_binary::get_maximum_name_length(void) const { return 0xFFFFuL; } tardy-1.28/libtardy/tar/input/cpio/binary.h 644 0 0 622512163037023 171720ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_CPIO_BINARY_H #define LIBTARDY_TAR_INPUT_CPIO_BINARY_H #include #include /** * The tar_input_cpio_binary class is used to represent the processing * required to read and parse an archive in the old binary cpio(5) format. */ class tar_input_cpio_binary: public tar_input_cpio { public: /** * The destructor. */ virtual ~tar_input_cpio_binary(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param ifp * The file to be read and parsed. */ static pointer create(const file_input::pointer &ifp); /** * The candidate class method is used to sniff at an input file * (without moving the file position) to see if it looks like a * file in the old binary cpio(5) format. * * @param ifp * The input file to read and verify. */ static bool candidate(const file_input::pointer &ifp); protected: // See base class for documentation. bool read_header(tar_header &hdr); // See base class for documentation. const char *get_format_name(void) const; // See base class for documentation. tar_output::pointer tar_output_factory(const file_output::pointer &ofp) const; // See base class for documentation. size_t get_maximum_name_length(void) const; private: /** * The constructor. * It is private on purpose, use a #create class method instead. * * @param ifp * The file to be read and parsed. */ tar_input_cpio_binary(const file_input::pointer &ifp); /** * The endian instance variable is used to remember the byte * ordering used in the input file. */ endian_t endian; unsigned get2(const void *data) const; unsigned long get4(const void *data) const; /** * The default constructor. Do not use. */ tar_input_cpio_binary(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_cpio_binary(const tar_input_cpio_binary &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_cpio_binary &operator=(const tar_input_cpio_binary &rhs); }; #endif // LIBTARDY_TAR_INPUT_CPIO_BINARY_H tardy-1.28/libtardy/tar/input/cpio/crc.cc 644 0 0 1411312163037023 166260ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include tar_input_cpio_crc::~tar_input_cpio_crc() { } tar_input_cpio_crc::tar_input_cpio_crc(const file_input::pointer &a_ifp) : tar_input_cpio(a_ifp, 4), checksum_expected(0), running_checksum(0) { } tar_input_cpio_crc::pointer tar_input_cpio_crc::create(const file_input::pointer &a_ifp) { return pointer(new tar_input_cpio_crc(a_ifp)); } tar_output::pointer tar_input_cpio_crc::tar_output_factory(const file_output::pointer &ofp) const { return tar_output_cpio_crc::create(ofp); } bool tar_input_cpio_crc::candidate(const file_input::pointer &fp) { char buffer[6]; int nbytes = fp->peek(buffer, sizeof(buffer)); return ( nbytes == sizeof(buffer) && rcstring(buffer, sizeof(buffer)) == "070702" ); } bool tar_input_cpio_crc::read_header(tar_header &h) { assert(sizeof(cpio_header) == 110); char buffer[sizeof(cpio_header)]; size_t nbytes = read_deeper(buffer, 110); if (nbytes == 0) return false; if (nbytes != 110) fatal("short header read"); cpio_header *hp = (cpio_header *)buffer; if (hp->get_magic() != "070702") fatal("bad header magic"); h.device_major = hp->devmajor_get(); h.device_minor = hp->devminor_get(); h.group_id = hp->gid_get(); h.inode_number = hp->ino_get(); h.link_count = hp->nlink_get(); int pmode = hp->mode_get(); h.mode = pmode & 07777; h.mtime = hp->mtime_get(); h.rdevice_major = hp->rdevmajor_get(); h.rdevice_minor = hp->rdevminor_get(); h.size = hp->filesize_get(); h.type = type_from_mode(pmode); h.user_id = hp->uid_get(); checksum_expected = hp->check_get(); running_checksum = 0; unsigned name_size = hp->namesize_get(); h.name = read_name(name_size); return !is_end(h); } rcstring tar_input_cpio_crc::cpio_header::get_magic(void) const { return rcstring(magic, sizeof(magic)); } unsigned long tar_input_cpio_crc::cpio_header::devmajor_get(void) const { return hex(devmajor, sizeof(devmajor)); } unsigned long tar_input_cpio_crc::cpio_header::devminor_get(void) const { return hex(devminor, sizeof(devminor)); } unsigned long tar_input_cpio_crc::cpio_header::gid_get(void) const { return hex(gid, sizeof(gid)); } unsigned long tar_input_cpio_crc::cpio_header::ino_get(void) const { return hex(ino, sizeof(ino)); } unsigned long tar_input_cpio_crc::cpio_header::nlink_get(void) const { return hex(nlink, sizeof(nlink)); } unsigned long tar_input_cpio_crc::cpio_header::mode_get(void) const { return hex(mode, sizeof(mode)); } unsigned long tar_input_cpio_crc::cpio_header::mtime_get(void) const { return hex(mtime, sizeof(mtime)); } unsigned long tar_input_cpio_crc::cpio_header::rdevmajor_get(void) const { return hex(rdevmajor, sizeof(rdevmajor)); } unsigned long tar_input_cpio_crc::cpio_header::rdevminor_get(void) const { return hex(rdevminor, sizeof(rdevminor)); } unsigned long tar_input_cpio_crc::cpio_header::filesize_get(void) const { return hex(filesize, sizeof(filesize)); } unsigned long tar_input_cpio_crc::cpio_header::uid_get(void) const { return hex(uid, sizeof(uid)); } unsigned long tar_input_cpio_crc::cpio_header::namesize_get(void) const { return hex(namesize, sizeof(namesize)); } unsigned long tar_input_cpio_crc::cpio_header::check_get(void) const { return hex(check, sizeof(check)); } unsigned long tar_input_cpio_crc::cpio_header::hex(const char *data, size_t data_size) { long value = 0; while (data_size > 0 && *data == ' ') { ++data; --data_size; } if (data_size <= 0) return -1; while (data_size > 0) { unsigned char c = *data++; --data_size; switch (c) { case '\0': case ' ': goto done; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': c -= '0'; break; case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': c -= 'a' - 10; break; case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': c -= 'A' - 10; break; default: return -1; } // // Limit the range to 0..2^31-1. // Must test for overflow *before* the shift. // if (value & 0xF0000000) { return -1; } value = (value << 4) + c; } done: return value; } const char * tar_input_cpio_crc::get_format_name(void) const { return "cpio-crc"; } int tar_input_cpio_crc::read_data(void *data, int data_size) { size_t nbytes = read_deeper(data, data_size); const unsigned char *p = (const unsigned char *)data; for (size_t j = 0; j < nbytes; ++j) running_checksum += *p++; return nbytes; } void tar_input_cpio_crc::read_data_padding(void) { if ((running_checksum & 0xFFFFFFFF) != (checksum_expected & 0xFFFFFFFF)) { fatal ( "checksum mismatch (header %08lX, data %08lX)", checksum_expected, running_checksum ); } checksum_expected = 0; running_checksum = 0; tar_input_cpio::read_data_padding(); } tardy-1.28/libtardy/tar/input/cpio/crc.h 644 0 0 1120212163037023 164640ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_CPIO_CRC_H #define LIBTARDY_TAR_INPUT_CPIO_CRC_H #include /** * The tar_input_cpio_crc class is used to represent the processing * required to read and parse a "crc" format cpio(5) archive. * * @note * This format is misnamed, and this is acknowledged in the cpio(5) * documentation. It uses a simple checksum, not a CRC. */ class tar_input_cpio_crc: public tar_input_cpio { public: /** * The destructor. */ virtual ~tar_input_cpio_crc(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param ifp * The input file to read and parse into archive members. */ static pointer create(const file_input::pointer &ifp); /** * The candidate class method is used to sniff at an input file * (without moving the file position) to see if it looks like a * file in new-ascii cpio(1) format. * * @param ifp * The input file to read and verify. */ static bool candidate(const file_input::pointer &ifp); protected: // See base class for documentation. bool read_header(tar_header &hdr); // See base class for documentation. int read_data(void *data, int data_size); // See base class for documentation. void read_data_padding(void); // See base class for documentation. tar_output::pointer tar_output_factory(const file_output::pointer &ofp) const; // See base class for documentation. const char *get_format_name(void) const; private: /** * The constructor. * It is private on purpose, use a #create class method instead. * * @param ifp * The input file to read and parse into archive members. */ tar_input_cpio_crc(const file_input::pointer &ifp); unsigned long checksum_expected; unsigned long running_checksum; /** * The default constructor. Do not use. */ tar_input_cpio_crc(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_cpio_crc(const tar_input_cpio_crc &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_cpio_crc &operator=(const tar_input_cpio_crc &rhs); /** * The cpio_header class is used to represent the set of * information that may be found in a New ASCII Format cpio(1) file * header. This is typically overlayed (type punned, aliased) onto * a "unsigned char []". * * DO NOT add any virtual method to this class, or it will * cease to be useful for overlaying. */ class cpio_header { public: char magic[6]; rcstring get_magic(void) const; char ino[8]; unsigned long ino_get(void) const; char mode[8]; unsigned long mode_get(void) const; char uid[8]; unsigned long uid_get(void) const; char gid[8]; unsigned long gid_get(void) const; char nlink[8]; unsigned long nlink_get(void) const; char mtime[8]; unsigned long mtime_get(void) const; char filesize[8]; unsigned long filesize_get(void) const; char devmajor[8]; unsigned long devmajor_get(void) const; char devminor[8]; unsigned long devminor_get(void) const; char rdevmajor[8]; unsigned long rdevmajor_get(void) const; char rdevminor[8]; unsigned long rdevminor_get(void) const; char namesize[8]; unsigned long namesize_get(void) const; char check[8]; unsigned long check_get(void) const; private: static unsigned long hex(const char *data, size_t data_size); }; }; #endif // LIBTARDY_TAR_INPUT_CPIO_CRC_H tardy-1.28/libtardy/tar/input/cpio/factory.cc 644 0 0 317712163037023 175160ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include tar_input::pointer tar_input_cpio::factory(const file_input::pointer &ifp) { if (tar_input_cpio_binary::candidate(ifp)) return tar_input_cpio_binary::create(ifp); if (tar_input_cpio_old_ascii::candidate(ifp)) return tar_input_cpio_old_ascii::create(ifp); if (tar_input_cpio_crc::candidate(ifp)) return tar_input_cpio_crc::create(ifp); return tar_input_cpio_new_ascii::create(ifp); } bool tar_input_cpio::candidate(const file_input::pointer &ifp) { return ( tar_input_cpio_binary::candidate(ifp) || tar_input_cpio_old_ascii::candidate(ifp) || tar_input_cpio_crc::candidate(ifp) || tar_input_cpio_new_ascii::candidate(ifp) ); } tardy-1.28/libtardy/tar/input/cpio/new_ascii.cc 644 0 0 1172612163037023 200270ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include tar_input_cpio_new_ascii::~tar_input_cpio_new_ascii() { } tar_input_cpio_new_ascii::tar_input_cpio_new_ascii( const file_input::pointer &a_ifp ) : tar_input_cpio(a_ifp, 4) { } tar_input_cpio_new_ascii::pointer tar_input_cpio_new_ascii::create(const file_input::pointer &a_ifp) { return pointer(new tar_input_cpio_new_ascii(a_ifp)); } tar_output::pointer tar_input_cpio_new_ascii::tar_output_factory(const file_output::pointer &ofp) const { return tar_output_cpio_newascii::create(ofp); } bool tar_input_cpio_new_ascii::candidate(const file_input::pointer &fp) { char buffer[6]; int nbytes = fp->peek(buffer, sizeof(buffer)); return ( nbytes == sizeof(buffer) && rcstring(buffer, sizeof(buffer)) == "070701" ); } bool tar_input_cpio_new_ascii::read_header(tar_header &h) { assert(sizeof(cpio_header) == 110); char buffer[sizeof(cpio_header)]; size_t nbytes = read_deeper(buffer, 110); if (nbytes == 0) return false; if (nbytes != 110) fatal("short header read"); cpio_header *hp = (cpio_header *)buffer; if (hp->get_magic() != "070701") fatal("bad header magic"); h.device_major = hp->devmajor_get(); h.device_minor = hp->devminor_get(); h.group_id = hp->gid_get(); h.inode_number = hp->ino_get(); h.link_count = hp->nlink_get(); unsigned pmode = hp->mode_get(); h.mode = pmode & 07777; h.mtime = hp->mtime_get(); h.rdevice_major = hp->rdevmajor_get(); h.rdevice_minor = hp->rdevminor_get(); h.size = hp->filesize_get(); h.type = type_from_mode(pmode); h.user_id = hp->uid_get(); unsigned name_size = hp->namesize_get(); h.name = read_name(name_size); return !is_end(h); } rcstring tar_input_cpio_new_ascii::cpio_header::get_magic(void) const { return rcstring(magic, sizeof(magic)); } long tar_input_cpio_new_ascii::cpio_header::devmajor_get(void) const { return octal(devmajor, sizeof(devmajor)); } long tar_input_cpio_new_ascii::cpio_header::devminor_get(void) const { return octal(devminor, sizeof(devminor)); } long tar_input_cpio_new_ascii::cpio_header::gid_get(void) const { return octal(gid, sizeof(gid)); } long tar_input_cpio_new_ascii::cpio_header::ino_get(void) const { return octal(ino, sizeof(ino)); } long tar_input_cpio_new_ascii::cpio_header::nlink_get(void) const { return octal(nlink, sizeof(nlink)); } long tar_input_cpio_new_ascii::cpio_header::mode_get(void) const { return octal(mode, sizeof(mode)); } long tar_input_cpio_new_ascii::cpio_header::mtime_get(void) const { return octal(mtime, sizeof(mtime)); } long tar_input_cpio_new_ascii::cpio_header::rdevmajor_get(void) const { return octal(rdevmajor, sizeof(rdevmajor)); } long tar_input_cpio_new_ascii::cpio_header::rdevminor_get(void) const { return octal(rdevminor, sizeof(rdevminor)); } long tar_input_cpio_new_ascii::cpio_header::filesize_get(void) const { return octal(filesize, sizeof(filesize)); } long tar_input_cpio_new_ascii::cpio_header::uid_get(void) const { return octal(uid, sizeof(uid)); } long tar_input_cpio_new_ascii::cpio_header::namesize_get(void) const { return octal(namesize, sizeof(namesize)); } long tar_input_cpio_new_ascii::cpio_header::octal(const char *data, size_t data_size) { long value = 0; while (data_size > 0 && *data == ' ') { ++data; --data_size; } if (data_size <= 0) return -1; while (data_size > 0) { if (!*data || *data == ' ') break; if (*data < '0' || *data > '7') return -1; // // Limit the range to 0..2^31-1. // Must test for overflow *before* the shift. // if (value & 0xF0000000) { return -1; } value = (value << 3) + (*data++ & 7); --data_size; } return value; } const char * tar_input_cpio_new_ascii::get_format_name(void) const { return "cpio-crc"; } size_t tar_input_cpio_new_ascii::get_maximum_name_length(void) const { return ((size_t)1 << (3 * 8)); } tardy-1.28/libtardy/tar/input/cpio/new_ascii.h 644 0 0 1041612163037023 176640ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_CPIO_NEW_ASCII_H #define LIBTARDY_TAR_INPUT_CPIO_NEW_ASCII_H #include /** * The tar_input_cpio_new_ascii class is used to represent the processing * required to read and parse a "new ascii" format cpio(5) archive. */ class tar_input_cpio_new_ascii: public tar_input_cpio { public: /** * The destructor. */ virtual ~tar_input_cpio_new_ascii(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param ifp * The input file to read and parse into archive members. */ static pointer create(const file_input::pointer &ifp); /** * The candidate class method is used to sniff at an input file * (without moving the file position) to see if it looks like a * file in new-ascii cpio(1) format. * * @param ifp * The input file to read and verify. */ static bool candidate(const file_input::pointer &ifp); protected: // See base class for documentation. bool read_header(tar_header &hdr); // See base class for documentation. tar_output::pointer tar_output_factory(const file_output::pointer &ofp) const; // See base class for documentation. const char *get_format_name(void) const; // See base class for documentation. size_t get_maximum_name_length(void) const; private: /** * The default constructor. * It is private on purpose, use a #create class method instead. * * @param ifp * The input file to read and parse into archive members. */ tar_input_cpio_new_ascii(const file_input::pointer &ifp); /** * The default constructor. Do not use. */ tar_input_cpio_new_ascii(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_cpio_new_ascii(const tar_input_cpio_new_ascii &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_cpio_new_ascii &operator=(const tar_input_cpio_new_ascii &rhs); /** * The cpio_header class is used to represent the set of * information that may be found in a New ASCII Format cpio(1) file * header. This is typically overlayed (type punned, aliased) onto * a "unsigned char []". * * DO NOT add any virtual method to this class, or it will * cease to be useful for overlaying. */ class cpio_header { public: char magic[6]; rcstring get_magic(void) const; char ino[8]; long ino_get(void) const; char mode[8]; long mode_get(void) const; char uid[8]; long uid_get(void) const; char gid[8]; long gid_get(void) const; char nlink[8]; long nlink_get(void) const; char mtime[8]; long mtime_get(void) const; char filesize[8]; long filesize_get(void) const; char devmajor[8]; long devmajor_get(void) const; char devminor[8]; long devminor_get(void) const; char rdevmajor[8]; long rdevmajor_get(void) const; char rdevminor[8]; long rdevminor_get(void) const; char namesize[8]; long namesize_get(void) const; char check[8]; private: static long octal(const char *data, size_t data_size); }; }; #endif // LIBTARDY_TAR_INPUT_CPIO_NEW_ASCII_H tardy-1.28/libtardy/tar/input/cpio/old_ascii.cc 644 0 0 1153312163037023 200100ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include tar_input_cpio_old_ascii::~tar_input_cpio_old_ascii() { } tar_input_cpio_old_ascii::tar_input_cpio_old_ascii( const file_input::pointer &a_ifp ) : tar_input_cpio(a_ifp, 0) { } tar_input_cpio_old_ascii::pointer tar_input_cpio_old_ascii::create(const file_input::pointer &a_ifp) { return pointer(new tar_input_cpio_old_ascii(a_ifp)); } bool tar_input_cpio_old_ascii::candidate(const file_input::pointer &a_ifp) { char buffer[6]; return (a_ifp->peek(buffer, 6) == 6 && 0 == memcmp(buffer, "070707", 6)); } tar_output::pointer tar_input_cpio_old_ascii::tar_output_factory(const file_output::pointer &ofp) const { // // Unfortunately, at this point we don't know whether it's a real // cpio(5) archive, or a bodgy HP/UX cpio(5) archive. And if it has // no devices in it, we will be unable to tell, in any case. // // This is also called, if it is called, before any archive members // have been parsed. // return tar_output_cpio_oldascii::create(ofp); } static unsigned long octal(unsigned char *data, unsigned data_size) { unsigned long result = 0; while (data_size > 0) { --data_size; unsigned char c = *data++; switch (c) { case '\0': case ' ': return result; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': result = (result << 3) | (c & 7); break; default: return -1; } } return result; } bool tar_input_cpio_old_ascii::read_header(tar_header &hdr) { // // Name Size Offset // ---------- ---- ------ // magic 6 0 // dev 6 6 // ino 6 12 // mode 6 18 // uid 6 24 // gid 6 30 // nlink 6 36 // rdev 6 42 // mtime 11 48 // namesize 6 59 // filesize 11 65 // ---------- ---- ------ // Total: 76 // unsigned char buffer[76]; size_t nbytes = read_deeper(buffer, sizeof(buffer)); if (nbytes == 0) return false; if (nbytes != sizeof(buffer)) { fatal ( "short read (expected %d, read %d)", (int)sizeof(buffer), (int)nbytes ); } if (octal(buffer, 6) != 070707) fatal("bad magic number"); unsigned dev = octal(buffer + 6, 6); hdr.device_major = dev >> 8; hdr.device_minor = dev & 255; hdr.inode_number = octal(buffer + 12, 6); unsigned mode = octal(buffer + 18, 6); hdr.mode = mode & 07777; hdr.type = type_from_mode(mode); hdr.user_id = octal(buffer + 24, 6); hdr.group_id = octal(buffer + 30, 6); hdr.link_count = octal(buffer + 36, 6); unsigned rdev = octal(buffer + 42, 6); hdr.rdevice_major = rdev >> 8; hdr.rdevice_minor = rdev & 255; hdr.mtime = octal(buffer + 48, 11); unsigned name_size = octal(buffer + 59, 6); hdr.size = octal(buffer + 65, 11); hdr.name = read_name(name_size); // // HP/UX cpio(1) creates archives that look just like ordinary // cpio(5) archives, but for devices it sets major = 0, minor = 1, // and puts the actual major/minor number in the filesize field. // See if this is an HP/UX cpio(5) archive, and if so fix it. // switch (hdr.type) { case tar_header::type_device_character: case tar_header::type_device_block: case tar_header::type_socket: case tar_header::type_fifo: if (hdr.size != 0 && hdr.rdevice_major == 0 && hdr.rdevice_minor == 1) { hdr.rdevice_major = hdr.size >> 8; hdr.rdevice_minor = hdr.size & 255; hdr.size = 0; } break; default: break; } return !is_end(hdr); } const char * tar_input_cpio_old_ascii::get_format_name(void) const { return "cpio-odc"; } size_t tar_input_cpio_old_ascii::get_maximum_name_length(void) const { return ((size_t)1 << (3 * 6)); } tardy-1.28/libtardy/tar/input/cpio/old_ascii.h 644 0 0 571612163037023 176400ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_CPIO_OLD_ASCII_H #define LIBTARDY_TAR_INPUT_CPIO_OLD_ASCII_H #include /** * The tar_input_cpio_old_ascii class is used to represent the processing * required to read and parse a cpio(5) archive in "old ascii" format. */ class tar_input_cpio_old_ascii: public tar_input_cpio { public: /** * The destructor. */ virtual ~tar_input_cpio_old_ascii(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param ifp * The binary file from which to read the archive data. */ static pointer create(const file_input::pointer &ifp); /** * The candidate class method is used to sniff at an input file * (without moving the file position) to see if it looks like a * file in old-ascii cpio(1) format. * * @param ifp * The input file to read and verify. */ static bool candidate(const file_input::pointer &ifp); protected: // See base class for documentation. bool read_header(tar_header &hdr); // See base class for documentation. tar_output::pointer tar_output_factory(const file_output::pointer &ofp) const; // See base class for documentation. const char *get_format_name(void) const; // See base class for documentation. size_t get_maximum_name_length(void) const; private: /** * The constructor. * It is private on purpose, use a #create class method instead. * * @param ifp * The binary file from which to read the archive data. */ tar_input_cpio_old_ascii(const file_input::pointer &ifp); /** * The default constructor. Do not use. */ tar_input_cpio_old_ascii(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_cpio_old_ascii(const tar_input_cpio_old_ascii &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_cpio_old_ascii &operator=(const tar_input_cpio_old_ascii &rhs); }; #endif // LIBTARDY_TAR_INPUT_CPIO_OLD_ASCII_H tardy-1.28/libtardy/tar/input/directory.cc 644 0 0 555012163037023 171160ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include #include #include #include tar_input_directory::~tar_input_directory() { } tar_input_directory::tar_input_directory(const filenamelist::pointer &a_fnl) : fnl(a_fnl) { } tar_input::pointer tar_input_directory::create(const file_input::pointer &ifp) { filenamelist::pointer names = filenamelist_file::create(ifp); return pointer(new tar_input_directory(names)); } bool tar_input_directory::read_header(tar_header &hdr) { if (current) current.reset(); if (queue.empty()) { rcstring line; if (!fnl->read_one_line(line)) return false; queue.push_back(line); } rcstring path = queue.front(); queue.pop_front(); struct stat st; explain_lstat_or_die(path.c_str(), &st); if (S_ISDIR(st.st_mode)) { rcstring_list names; read_whole_directory(path, names); names.sort(); while (!names.empty()) { rcstring fn = names.back(); names.pop_back(); queue.push_front(path + "/" + fn); } } current = tar_input_filename::create(path); return current->read_header(hdr); } void tar_input_directory::read_header_padding(void) { if (current) current->read_header_padding(); } int tar_input_directory::read_data(void *buffer, int buflen) { if (!current) return 0; return current->read_data(buffer, buflen); } void tar_input_directory::read_data_padding(void) { if (current) { current->read_data_padding(); current.reset(); } } rcstring tar_input_directory::filename(void) const { return fnl->filename(); } const char * tar_input_directory::get_format_name(void) const { return "recursive-list"; } format_family_t tar_input_directory::get_format_family(void) const { return format_family_other; } size_t tar_input_directory::get_maximum_name_length(void) const { return PATH_MAX; } tardy-1.28/libtardy/tar/input/directory.h 644 0 0 770712163037023 167660ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_DIRECTORY_H #define LIBTARDY_TAR_INPUT_DIRECTORY_H #include #include #include #include /** * The tar_input_directory class is used to represent an archive source * that is simulated by walking a directory tree. */ class tar_input_directory: public tar_input { public: /** * The destructor. */ virtual ~tar_input_directory(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param fnl * The list of file names to be archived. */ static pointer create(const file_input::pointer &fnl); /** * The issue_progress_reports class method is used to request * (usually from the command line) that progress reports be issused * from time to time. * * @note * The issue_progress_reports class method must be called * before the #create class method, or it will have no effect. */ static void issue_progress_reports(void); protected: // See base class for documentation. bool read_header(tar_header &hdr); // See base class for documentation. void read_header_padding(void); // See base class for documentation. int read_data(void *data, int data_size); // See base class for documentation. void read_data_padding(void); // See base class for documentation. rcstring filename(void) const; // See base class for documentation. const char *get_format_name(void) const; // see base class for documentation format_family_t get_format_family(void) const; // See base class for docuemntation. size_t get_maximum_name_length(void) const; private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param fnl * The list of file names to be archived. */ tar_input_directory(const filenamelist::pointer &fnl); /** * The default constructor. Do not use. */ tar_input_directory(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_input_directory(const tar_input_directory &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_input_directory &operator=(const tar_input_directory &rhs); /** * The fnl instance variable is used to remember where we * are getting out file names from. */ filenamelist::pointer fnl; /** * The singleton instance variable is used to remember the * deeper input source. */ mutable tar_input::pointer current; /** * The queue instance variable is used to remember the files yet to * be archived. The order is significant. */ std::deque queue; /** * The get_singleton method is used to instantiate the * singleton it it is null, by reading the next file name from * the file name list and opening it. */ tar_input::pointer get_current(void) const; }; #endif // LIBTARDY_TAR_INPUT_DIRECTORY_H tardy-1.28/libtardy/tar/input/factory.cc 644 0 0 213012163037023 165500ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include tar_input::pointer tar_input::factory(const file_input::pointer &ifp) { if (tar_input_ar::candidate(ifp)) return tar_input_ar::factory(ifp); if (tar_input_cpio::candidate(ifp)) return tar_input_cpio::factory(ifp); return tar_input_tar::factory(ifp); } tardy-1.28/libtardy/tar/input/filename.cc 644 0 0 1157112163037023 167120ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2002, 2003, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include #include #include #include #include #include #include #include #include tar_input_filename::~tar_input_filename() { } tar_input_filename::tar_input_filename(const rcstring &a_name) : name(a_name), length(0) { } tar_input::pointer tar_input_filename::create(const rcstring &a_name) { return pointer(new tar_input_filename(a_name)); } int tar_input_filename::read_data(void *buffer, int buffer_length) { // // If we have had enough, stop now, even if the file has grown // in the mean time. // if (length <= 0) return 0; // // If there is no input (because we have already complained // about it shrinking) fake a bunch of zeros. // if (!source) { // This should never happen int nbytes = length; if (nbytes > buffer_length) nbytes = buffer_length; memset(buffer, 0, nbytes); length -= nbytes; return nbytes; } // // Read data from the input. As much as possible, up to the // maximum buffer length. // int maxbytes = length; if (maxbytes > buffer_length) maxbytes = buffer_length; int nbytes = source->read(buffer, maxbytes); if (nbytes == 0) { warning("file shortened unexpectedly"); source.reset(); memset(buffer, 0, maxbytes); length -= maxbytes; return maxbytes; } length -= nbytes; return nbytes; } bool tar_input_filename::read_header(tar_header &result) { result = tar_header(); struct stat statbuf; explain_lstat_or_die(name.c_str(), &statbuf); result.name = name; result.user_id = statbuf.st_uid; struct passwd *pw = getpwuid(statbuf.st_uid); if (pw) result.user_name = rcstring(pw->pw_name); result.group_id = statbuf.st_gid; struct group *gr = getgrgid(statbuf.st_gid); if (gr) result.group_name = rcstring(gr->gr_name); result.inode_number = statbuf.st_ino; switch (statbuf.st_mode & S_IFMT) { case S_IFSOCK: result.type = tar_header::type_socket; break; case S_IFLNK: { result.type = tar_header::type_link_symbolic; char linkname[2000]; int nbytes = readlink ( name.c_str(), linkname, sizeof(linkname) ); result.linkname = rcstring(linkname, nbytes); } break; case S_IFREG: result.type = tar_header::type_normal; length = statbuf.st_size; result.size = statbuf.st_size; source = file_input_normal::create(name); break; case S_IFBLK: result.type = tar_header::type_device_block; result.device_major = major(statbuf.st_rdev); result.device_minor = minor(statbuf.st_rdev); break; case S_IFDIR: result.type = tar_header::type_directory; break; case S_IFCHR: result.type = tar_header::type_device_character; result.device_major = major(statbuf.st_rdev); result.device_minor = minor(statbuf.st_rdev); break; case S_IFIFO: result.type = tar_header::type_fifo; break; default: fatal("file type unknown"); result.type = tar_header::type_normal; break; } result.atime = statbuf.st_atime; result.ctime = statbuf.st_ctime; result.mtime = statbuf.st_mtime; result.mode = statbuf.st_mode & 07777; return true; } rcstring tar_input_filename::filename(void) const { return name; } const char * tar_input_filename::get_format_name(void) const { return "list"; } format_family_t tar_input_filename::get_format_family(void) const { return format_family_other; } size_t tar_input_filename::get_maximum_name_length(void) const { return PATH_MAX; } tardy-1.28/libtardy/tar/input/filename.h 644 0 0 575612163037023 165440ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_FILENAME_H #define LIBTARDY_TAR_INPUT_FILENAME_H #include #include /** * The tar_input_filename class is used to represent tar input from a * single file. */ class tar_input_filename: public tar_input { public: /** * The destructor. */ virtual ~tar_input_filename(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param fn * The name of the file. */ static pointer create(const rcstring &fn); protected: // see base class for documentation int read_data(void *data, int data_size); // see base class for documentation bool read_header(tar_header &hdr); // see base class for documentation rcstring filename(void) const; // see base class for documentation const char *get_format_name(void) const; // see base class for documentation format_family_t get_format_family(void) const; // See base class for docuemntation. size_t get_maximum_name_length(void) const; private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param fn * The name of the file. */ tar_input_filename(const rcstring &fn); /** * The name instance variable is used to remember the name * of the file being read. */ rcstring name; /** * The length instance variable is used to remember how many * bytes of input are to be read from the file. */ int length; /** * The source instance variable is used to remember the input * file state (position, file descriptor, etc). */ file_input::pointer source; /** * The default constructor. */ tar_input_filename(); /** * The copy constructor. * * @param rhs * The right hand side of the initialization. */ tar_input_filename(const tar_input_filename &rhs); /** * The assignment operator. * * @param rhs * The right hand side of the assignment. */ tar_input_filename &operator=(const tar_input_filename &rhs); }; #endif // LIBTARDY_TAR_INPUT_FILENAME_H tardy-1.28/libtardy/tar/input/filenamelist.cc 644 0 0 517012163037023 175640ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include #include #include bool tar_input_filenamelist::progress_flag = false; tar_input_filenamelist::~tar_input_filenamelist() { } tar_input_filenamelist::tar_input_filenamelist( const filenamelist::pointer &a_source ) : source(a_source) { } tar_input::pointer tar_input_filenamelist::create(const file_input::pointer &fp) { filenamelist::pointer fnl = filenamelist_file::create(fp); if (progress_flag) fnl = filenamelist_filter_progress::create(fnl); return pointer(new tar_input_filenamelist(fnl)); } tar_input::pointer tar_input_filenamelist::get_singleton(void) const { if (!singleton) { rcstring line; if (!source->read_one_line(line)) return pointer(); singleton = tar_input_filename::create(line); } return singleton; } bool tar_input_filenamelist::read_header(tar_header &result) { if (singleton) singleton.reset(); tar_input::pointer fp = get_singleton(); return (fp ? fp->read_header(result) : false); } int tar_input_filenamelist::read_data(void *buffer, int buflen) { tar_input::pointer fp = get_singleton(); if (!fp) return 0; return fp->read_data(buffer, buflen); } rcstring tar_input_filenamelist::filename(void) const { return source->filename(); } void tar_input_filenamelist::issue_progress_reports(void) { progress_flag = true; } const char * tar_input_filenamelist::get_format_name(void) const { return "list"; } format_family_t tar_input_filenamelist::get_format_family(void) const { return format_family_other; } size_t tar_input_filenamelist::get_maximum_name_length(void) const { return PATH_MAX; } tardy-1.28/libtardy/tar/input/filenamelist.h 644 0 0 753712163037023 174370ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_FILENAMELIST_H #define LIBTARDY_TAR_INPUT_FILENAMELIST_H #include #include #include /** * The tar_input_filenamelist class is used to represent a file name * list as a source of tar input. */ class tar_input_filenamelist: public tar_input { public: /** * The destructor. */ virtual ~tar_input_filenamelist(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param fnl * The list of file names to be archived. */ static pointer create(const file_input::pointer &fnl); /** * The issue_progress_reports class method is used to request * (usually from the command line) that progress reports be issused * from time to time. * * @note * The issue_progress_reports class method must be called * before the #create class method, or it will have no effect. */ static void issue_progress_reports(void); protected: // See base class for documentation. int read_data(void *data, int data_size); // See base class for documentation. bool read_header(tar_header &hdr); // See base class for documentation. rcstring filename(void) const; // See base class for documentation. const char *get_format_name(void) const; // see base class for documentation format_family_t get_format_family(void) const; // See base class for docuemntation. size_t get_maximum_name_length(void) const; private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param fnl * The list of file names to be archived. */ tar_input_filenamelist(const filenamelist::pointer &fnl); /** * The default constructor. Do not use. */ tar_input_filenamelist(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_input_filenamelist(const tar_input_filenamelist &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_input_filenamelist &operator=(const tar_input_filenamelist &rhs); /** * The source instance variable is used to remember where we * are getting out file names from. */ filenamelist::pointer source; /** * The singleton instance variable is used to remember the * deeper input source. */ mutable tar_input::pointer singleton; /** * The progress_flag class variable is used to remember whether or * not to include progress messages as the file list is traversed. */ static bool progress_flag; /** * The get_singleton method is used to instantiate the * singleton it it is null, by reading the next file name from * the file name list and opening it. */ tar_input::pointer get_singleton(void) const; }; #endif // LIBTARDY_TAR_INPUT_FILENAMELIST_H tardy-1.28/libtardy/tar/input/filter.cc 644 0 0 371512163037023 164000ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include #include tar_input_filter::~tar_input_filter() { } tar_input_filter::tar_input_filter(const tar_input::pointer &a_deeper) : deeper(a_deeper) { assert(deeper); } void tar_input_filter::read_archive_begin(void) { deeper->read_archive_begin(); } bool tar_input_filter::read_header(tar_header &h) { return deeper->read_header(h); } void tar_input_filter::read_header_padding(void) { deeper->read_header_padding(); } int tar_input_filter::read_data(void *data, int data_size) { return deeper->read_data(data, data_size); } void tar_input_filter::read_data_padding(void) { deeper->read_data_padding(); } void tar_input_filter::read_archive_end(void) { deeper->read_archive_end(); } rcstring tar_input_filter::filename(void) const { return deeper->filename(); } const char * tar_input_filter::get_format_name(void) const { return deeper->get_format_name(); } format_family_t tar_input_filter::get_format_family(void) const { return deeper->get_format_family(); } size_t tar_input_filter::get_maximum_name_length(void) const { return deeper->get_maximum_name_length(); } tardy-1.28/libtardy/tar/input/filter.h 644 0 0 545012163037023 162400ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_FILTER_H #define LIBTARDY_TAR_INPUT_FILTER_H #include /** * The tar_input_filter class is used to represent the state of an * input filter. It remembers the origin of the input, and implements * transparent methods by default. Specific filters will want to * override some or all of these defaults. */ class tar_input_filter: public tar_input { public: /** * The destructor. */ virtual ~tar_input_filter(); protected: /** * The constructor. * For use by derived classes only. * * @param deeper * The input archive from which to read our input. */ tar_input_filter(const tar_input::pointer &deeper); // See base class for documentation. void read_archive_begin(void); // See base class for documentation. virtual bool read_header(tar_header &hdr); // See base class for documentation. virtual void read_header_padding(void); // See base class for documentation. virtual int read_data(void *data, int data_size); // See base class for documentation. virtual void read_data_padding(void); // See base class for documentation. void read_archive_end(void); // See base class for documentation. rcstring filename(void) const; // See base class for documentation. const char *get_format_name(void) const; // See base class for documentation. format_family_t get_format_family(void) const; // See base class for documentation. size_t get_maximum_name_length(void) const; private: /** * The deeper instance variable is used to remember the deeper * archive from which to read our input. */ tar_input::pointer deeper; /** * Default constructor. Do not use. */ tar_input_filter(); /** * Copy constructor. Do not use. */ tar_input_filter(const tar_input_filter &); /** * Assignment operator. Do not use. */ tar_input_filter &operator=(const tar_input_filter &); }; #endif // LIBTARDY_TAR_INPUT_FILTER_H tardy-1.28/libtardy/tar/input/filter/ar_long_names.cc 644 0 0 723412163037023 212040ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include tar_input_filter_ar_long_names::~tar_input_filter_ar_long_names() { } tar_input_filter_ar_long_names::tar_input_filter_ar_long_names( const pointer &a_deeper ) : tar_input_filter(a_deeper), first(true) { } tar_input_filter_ar_long_names::pointer tar_input_filter_ar_long_names::create(const pointer &a_deeper) { return pointer(new tar_input_filter_ar_long_names(a_deeper)); } bool tar_input_filter_ar_long_names::read_header(tar_header &hdr) { if (!tar_input_filter::read_header(hdr)) return false; if (first) { // Only do this once. first = false; // The first file contains the name mapping, if one is present. if (hdr.name != "/" && hdr.name != "//") { // No name mapping in this archive. return true; } // Read all the names into the name mapping. read_and_process_name_map(hdr.size); // Now read the next file header if (!tar_input_filter::read_header(hdr)) return false; } // If the name can be mapped, do it. names_t::iterator it = names.find(hdr.name); if (it != names.end()) hdr.name = it->second; return true; } void tar_input_filter_ar_long_names::read_and_process_name_map(size_t size) { tar_input_filter::read_header_padding(); // // Read all the data into a buffer. // // This method could probably be more frugal in the amount of memory // that it uses (split the lines out of the inner buffer). We'll do // this if it proves to be a problem. // rcstring_accumulator data; while (size > 0) { char buffer[512]; size_t want = sizeof(buffer); if (want > size) want = size; size_t nbytes = tar_input_filter::read_data(buffer, want); if (nbytes != want) fatal("short read (expected %lu, got %lu)", want, nbytes); data.push_back(buffer, nbytes); size -= nbytes; } tar_input_filter::read_data_padding(); // // Split the buffer into strings. // const char *begin = data.get_data(); const char *cp = begin; const char *end = cp + data.size(); while (cp < end) { const char *p = (const char *)memmem(cp, end - cp, "/\n", 2); if (!p) break; rcstring key = rcstring::printf("/%lu", (unsigned long)(cp - begin)); rcstring value(cp, p - cp); names.insert(names_t::value_type(key, value)); key = " " + key; names.insert(names_t::value_type(key, value)); cp = p + 2; } } size_t tar_input_filter_ar_long_names::get_maximum_name_length(void) const { // Override the filter, it returns whatever the deeper stream returns. // This filter allows long names to be effectively unlimited. return 0; } tardy-1.28/libtardy/tar/input/filter/ar_long_names.h 644 0 0 673012163037023 210460ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_FILTER_AR_LONG_NAMES_H #define LIBTARDY_TAR_INPUT_FILTER_AR_LONG_NAMES_H #include #include #include /** * The tar_input_filter_ar_long_names class is used to represent * filtering ar(5) archives with long name re-mapping. * * This applies to archives that use "/" or "//" for the lookup map, * and the "/[0-9]+" to request an indirection through that map. */ class tar_input_filter_ar_long_names: public tar_input_filter { public: /** * The destructor. */ virtual ~tar_input_filter_ar_long_names(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * The input archive from which to read our input. */ static pointer create(const pointer &deeper); protected: // See base class for documentation. virtual bool read_header(tar_header &hdr); // See base class for documentation. virtual size_t get_maximum_name_length(void) const; private: /** * The default constructor. * It is private on purpose, use a #create class method instead. * * @param deeper * The input archive from which to read our input. */ tar_input_filter_ar_long_names(const pointer &deeper); /** * The first instance variable is used to remember whether or not * the first file in the archive has been processed. The first * file contains the name mapping, if a mapping is present. */ bool first; typedef std::map names_t; /** * The names instance variable is used to remember the name mapping * from the short archive name (first) toi the longer expanded file * name (second). */ names_t names; /** * The read_and_process_name_map method is used to read the special * name map file at the start of the archive, and populate the * #names instance variable. * * @param map_file_size * The size of the map file, in bytes. */ void read_and_process_name_map(size_t map_file_size); /** * The default constructor. Do not use. */ tar_input_filter_ar_long_names(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_filter_ar_long_names(const tar_input_filter_ar_long_names &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_filter_ar_long_names &operator=( const tar_input_filter_ar_long_names &rhs); }; #endif // LIBTARDY_TAR_INPUT_FILTER_AR_LONG_NAMES_H tardy-1.28/libtardy/tar/input/filter/ar_long_names2.cc 644 0 0 535412163037023 212670ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include tar_input_filter_ar_long_names2::~tar_input_filter_ar_long_names2() { } tar_input_filter_ar_long_names2::tar_input_filter_ar_long_names2( const pointer &a_deeper ) : tar_input_filter(a_deeper), do_header_padding(true) { } tar_input_filter_ar_long_names2::pointer tar_input_filter_ar_long_names2::create(const pointer &a_deeper) { return pointer(new tar_input_filter_ar_long_names2(a_deeper)); } static bool special_file_name(const rcstring &name, int &namlen) { const char *cp = name.c_str(); if (*cp++ != '#') return false; if (*cp++ != '1') return false; if (*cp++ != '/') return false; namlen = 0; for (;;) { unsigned char c = *cp; if (!isdigit(c)) return false; namlen = namlen * 10 + c - '0'; ++cp; if (!*cp) return true; } } bool tar_input_filter_ar_long_names2::read_header(tar_header &hdr) { do_header_padding = true; if (!tar_input_filter::read_header(hdr)) return false; int namlen = 0; if (!special_file_name(hdr.name, namlen)) return true; do_header_padding = false; tar_input_filter::read_header_padding(); if (namlen > hdr.size) fatal("member %s data size too short", hdr.name.quote_c().c_str()); char *buf = new char [namlen]; int nbytes = tar_input_filter::read_data(buf, namlen); if (nbytes != namlen) fatal("short data read (expected %d, got %d)", namlen, nbytes); // adjust the header, now that we have the name. hdr.name = rcstring(buf, namlen); delete [] buf; hdr.size -= namlen; return true; } void tar_input_filter_ar_long_names2::read_header_padding(void) { if (do_header_padding) tar_input_filter::read_header_padding(); else do_header_padding = true; } size_t tar_input_filter_ar_long_names2::get_maximum_name_length(void) const { return 0; } tardy-1.28/libtardy/tar/input/filter/ar_long_names2.h 644 0 0 613412163037023 211260ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_FILTER_AR_LONG_NAMES2_H #define LIBTARDY_TAR_INPUT_FILTER_AR_LONG_NAMES2_H #include /** * The tar_input_filter_ar_long_names2 class is used to represent the * second form of long file name support in ar(1) archives. In this * form, filenames take the form of "#1/nnn" wher ennn is the length of * the filename, and the actual filename is inserted into the start of * the data (and the data size increased to match). */ class tar_input_filter_ar_long_names2: public tar_input_filter { public: /** * The destructor. */ virtual ~tar_input_filter_ar_long_names2(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * The input archive from which to read our input. */ static pointer create(const pointer &deeper); protected: // See base class for documentation. bool read_header(tar_header &hdr); // See base class for documentation. void read_header_padding(void); // See base class for documentation. size_t get_maximum_name_length(void) const; private: /** * The default constructor. * It is private on purpose, use a #create class method instead. * * @param deeper * The input archive from which to read our input. */ tar_input_filter_ar_long_names2(const pointer &deeper); /** * The do_header_padding instance variable is used to remember * whether or not the read_header_padding method should be a no-op. * It will be a no-op when the read_header method has already done * it, for access to the start of the file data, containing the * file name. */ bool do_header_padding; /** * The default constructor. Do not use. */ tar_input_filter_ar_long_names2(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_filter_ar_long_names2(const tar_input_filter_ar_long_names2 &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_filter_ar_long_names2 &operator=( const tar_input_filter_ar_long_names2 &rhs); }; #endif // LIBTARDY_TAR_INPUT_FILTER_AR_LONG_NAMES2_H tardy-1.28/libtardy/tar/input/filter/clean.cc 644 0 0 502112163037023 174520ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include #include tar_input_filter_clean::~tar_input_filter_clean() { } tar_input_filter_clean::tar_input_filter_clean( const tar_input::pointer &a_deeper, int a_flag ) : tar_input_filter(a_deeper), flag(a_flag) { } tar_input::pointer tar_input_filter_clean::create(const tar_input::pointer &a_deeper, int a_flag) { return pointer(new tar_input_filter_clean(a_deeper, a_flag)); } static rcstring launder(const rcstring &s, int flag) { // // temporary buffer to hold string while being constructed // static char *buffer; static size_t buffer_max; if (buffer_max < s.size()) { delete [] buffer; buffer_max = 16; while (buffer_max < s.size()) buffer_max <<= 1; buffer = new char [buffer_max]; } char *bp = buffer; const char *sp = s.c_str(); for (;;) { unsigned char c = *sp++; if (!c) break; if ((flag & tar_input_filter_clean::flag_space) && isspace(c)) c = '-'; if ((flag & tar_input_filter_clean::flag_print) && !isprint(c)) c = '-'; if ( (flag & tar_input_filter_clean::flag_shell) && strchr("\"#$&'()*:;<=>?[\\]^`{|}", c) ) c = '-'; if ((flag & tar_input_filter_clean::flag_down) && isupper(c)) c = tolower(c); if ((flag & tar_input_filter_clean::flag_up) && islower(c)) c = toupper(c); *bp++ = c; } return rcstring(buffer, bp - buffer); } bool tar_input_filter_clean::read_header(tar_header &h) { bool ok = tar_input_filter::read_header(h); if (ok) h.name = launder(h.name, flag); return ok; } tardy-1.28/libtardy/tar/input/filter/clean.h 644 0 0 566712163037023 173340ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_FILTER_CLEAN_H #define LIBTARDY_TAR_INPUT_FILTER_CLEAN_H #include /** * The tar_input_filter_clean class is used to represent a filter which * cleans filenames in tar archive headers. You can clean out upper * case, lower case, shite space, shell meta characters and unprintable * characters. */ class tar_input_filter_clean: public tar_input_filter { public: /** * The destructor. */ virtual ~tar_input_filter_clean(); enum { flag_down = 1 << 0, flag_print = 1 << 1, flag_shell = 1 << 2, flag_space = 1 << 3, flag_up = 1 << 4 }; /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * The deeper input is the input to be filtered. * @param flags * The flags indicate what is to be cleaned. See the enum above * for details. */ static pointer create(const tar_input::pointer &deeper, int flags); protected: // See base class for documentation. virtual bool read_header(tar_header &hdr); private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param deeper * The deeper input is the input to be filtered. * @param flags * The flags indicate what is to be cleaned. See the enum above * for details. */ tar_input_filter_clean(const tar_input::pointer &deeper, int flags); /** * The flag instance variable is used to remember what to clean. */ int flag; /** * The default constructor. Do not use. */ tar_input_filter_clean(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_input_filter_clean(const tar_input_filter_clean &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_input_filter_clean &operator=(const tar_input_filter_clean &rhs); }; #endif // LIBTARDY_TAR_INPUT_FILTER_CLEAN_H tardy-1.28/libtardy/tar/input/filter/exclude.cc 644 0 0 434012163037023 200240ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include tar_input_filter_exclude::~tar_input_filter_exclude() { } tar_input_filter_exclude::tar_input_filter_exclude( const tar_input::pointer &a_deeper, const rcstring &a_glob ) : tar_input_filter(a_deeper), glob(a_glob) { } tar_input::pointer tar_input_filter_exclude::create(const tar_input::pointer &a_deeper, const rcstring &a_glob) { return pointer(new tar_input_filter_exclude(a_deeper, a_glob)); } bool tar_input_filter_exclude::read_header(tar_header &h) { for (;;) { if (!tar_input_filter::read_header(h)) return false; bool toss = ( gmatch(glob, h.name) || ( h.type == tar_header::type_directory && gmatch(glob, h.name + "/") ) ); if (!toss) return true; tar_input_filter::read_header_padding(); // // Read and discard the file data. // size_t n = h.size; while (n > 0) { char dummy[1024]; size_t chunk_max = n; if (chunk_max > sizeof(dummy)) chunk_max = sizeof(dummy); int chunk = tar_input_filter::read_data(dummy, chunk_max); if (chunk == 0) tar_input_filter::fatal("premature end of file"); n -= chunk_max; } tar_input_filter::read_data_padding(); } } tardy-1.28/libtardy/tar/input/filter/exclude.h 644 0 0 474512163037023 176770ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_FILTER_EXCLUDE_H #define LIBTARDY_TAR_INPUT_FILTER_EXCLUDE_H #include /** * The tar_input_filter_exclude class is used to represent a filter * that removes file that match a glob pattern from the archive. */ class tar_input_filter_exclude: public tar_input_filter { public: /** * The destructor. */ virtual ~tar_input_filter_exclude(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * The input source to be filtered. * @param glob * The file name pattern to be matched. */ static pointer create(const tar_input::pointer &deeper, const rcstring &glob); protected: // See base class for documentation. virtual bool read_header(tar_header &hdr); private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param deeper * The input source to be filtered. * @param glob * The file name pattern to be matched. */ tar_input_filter_exclude(const tar_input::pointer &deeper, const rcstring &glob); /** * The glob instance variable is used to remember the file name * pattern for the excluded files. */ rcstring glob; /** * The default constructor. Do not use. */ tar_input_filter_exclude(); /** * The copy constructor. Do not use. */ tar_input_filter_exclude(const tar_input_filter_exclude &); /** * The assignment operator. Do not use. */ tar_input_filter_exclude &operator=(const tar_input_filter_exclude &); }; #endif // LIBTARDY_TAR_INPUT_FILTER_EXCLUDE_H tardy-1.28/libtardy/tar/input/filter/group_name.cc 644 0 0 261312163037023 205300ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include tar_input_filter_group_name::~tar_input_filter_group_name() { } tar_input_filter_group_name::tar_input_filter_group_name( const tar_input::pointer &arg_fp, const rcstring &arg_name ) : tar_input_filter(arg_fp), name(arg_name) { } tar_input::pointer tar_input_filter_group_name::create(const tar_input::pointer &arg_fp, const rcstring &arg_name) { return pointer(new tar_input_filter_group_name(arg_fp, arg_name)); } bool tar_input_filter_group_name::read_header(tar_header &h) { bool ok = tar_input_filter::read_header(h); if (ok) h.group_name = name; return ok; } tardy-1.28/libtardy/tar/input/filter/group_name.h 644 0 0 537112163037023 203760ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_GROUP_NAME_H #define LIBTARDY_TAR_INPUT_GROUP_NAME_H #include #include /** * The tar_input_filter_group_name class is used to represent a filter * which replaces the group name in tar archive file headers. */ class tar_input_filter_group_name: public tar_input_filter { public: /** * The destructor. */ virtual ~tar_input_filter_group_name(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * The file input stream top apply the filter to. * @param grnam * The group name to be inserted. */ static pointer create(const tar_input::pointer &deeper, const rcstring &grnam); protected: // See base class for documentation. virtual bool read_header(tar_header &hdr); private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param deeper * The file input stream top apply the filter to. * @param grnam * The group name to be inserted. */ tar_input_filter_group_name(const tar_input::pointer &deeper, const rcstring &grnam); /** * The name instance variable is used to remember the name of the * group to be inserted into the file headers. */ rcstring name; /** * The default constructor. Do not use. */ tar_input_filter_group_name(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_input_filter_group_name(const tar_input_filter_group_name &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_input_filter_group_name &operator=( const tar_input_filter_group_name &rhs); }; #endif // LIBTARDY_TAR_INPUT_GROUP_NAME_H tardy-1.28/libtardy/tar/input/filter/group_numbr.cc 644 0 0 256612163037023 207420ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include tar_input_filter_group_number::~tar_input_filter_group_number() { } tar_input_filter_group_number::tar_input_filter_group_number( const tar_input::pointer &arg_fp, long arg_gid ) : tar_input_filter(arg_fp), gid(arg_gid) { } tar_input::pointer tar_input_filter_group_number::create(const tar_input::pointer &arg_fp, long arg_gid) { return pointer(new tar_input_filter_group_number(arg_fp, arg_gid)); } bool tar_input_filter_group_number::read_header(tar_header &h) { bool ok = tar_input_filter::read_header(h); if (ok) h.group_id = gid; return ok; } tardy-1.28/libtardy/tar/input/filter/group_numbr.h 644 0 0 556012163037023 206010ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2003, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_FILTER_GROUP_NUMBR_H #define LIBTARDY_TAR_INPUT_FILTER_GROUP_NUMBR_H #include /** * The tar_input_filter_group_number class is used to represent a * filter which replaces the Group ID field in all the file headers of * a tar archive. */ class tar_input_filter_group_number: public tar_input_filter { public: /** * The destructor. */ virtual ~tar_input_filter_group_number(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * The deeper argument points to the input stream to be filtered. * @param gid * The gid parameter indicates the group ID to be placed into * each file header. */ static pointer create(const tar_input::pointer &deeper, long gid); protected: // See base class for documentation. virtual bool read_header(tar_header &hdr); private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param deeper * The deeper argument points to the input stream to be filtered. * @param gid * The gid parameter indicates the group ID to be placed into * each file header. */ tar_input_filter_group_number(const tar_input::pointer &deeper, long gid); /** * The gid instance variable is used to remember the Group ID to * (re)place into each filter header. */ long gid; /** * The default constructor. Do not use. */ tar_input_filter_group_number(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_input_filter_group_number(const tar_input_filter_group_number &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_input_filter_group_number &operator=( const tar_input_filter_group_number &rhs); }; #endif // LIBTARDY_TAR_INPUT_FILTER_GROUP_NUMBR_H tardy-1.28/libtardy/tar/input/filter/gunzip.cc 644 0 0 3302012163037023 177240ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2003, 2004, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include tar_input_filter_gunzip::~tar_input_filter_gunzip() { delete buffered_data; delete buf; } tar_input_filter_gunzip::tar_input_filter_gunzip( const tar_input::pointer &a_deeper ) : tar_input_filter(a_deeper), pass_through(true), z_eof(true), buf(0), buffered_data(0), buffered_data_pos(0), buffered_data_size(0), buffered_data_size_max(0), inflated_file_pos(0), inflated_file_length(0), deflated_file_pos(0), deflated_file_length(0) { } tar_input::pointer tar_input_filter_gunzip::create(const tar_input::pointer &a_deeper) { return pointer(new tar_input_filter_gunzip(a_deeper)); } void tar_input_filter_gunzip::zlib_fatal_error(int err) { if (err < 0) fatal("gunzip: %s (%s)", z_error(err), stream.msg); } int tar_input_filter_gunzip::buffered_getc() { unsigned char c; int nbytes = buffered_read(&c, 1); if (nbytes < 1) return -1; return c; } int tar_input_filter_gunzip::buffered_read(void *data, int len) { if (buffered_data_pos < buffered_data_size) { int nbytes = buffered_data_size - buffered_data_pos; if (nbytes > len) nbytes = len; memcpy(data, buffered_data + buffered_data_pos, nbytes); buffered_data_pos += nbytes; deflated_file_pos += nbytes; return nbytes; } if (deflated_file_pos >= deflated_file_length) return 0; int nbytes = deflated_file_length - deflated_file_pos; if (nbytes > len) nbytes = len; int nbytes2 = tar_input_filter::read_data(data, nbytes); deflated_file_pos += nbytes2; return nbytes2; } void tar_input_filter_gunzip::buffered_unread(const void *data, size_t len) { deflated_file_pos -= len; // // If we need a bigger buffer, allocate it from the heap // and copy the new and old data into it. // size_t buffered_nbytes = buffered_data_size - buffered_data_pos; if (len + buffered_nbytes > buffered_data_size_max) { int nbytes = len + buffered_nbytes; unsigned char *new_buffered_data = new unsigned char[nbytes]; memcpy(new_buffered_data, data, len); memcpy ( new_buffered_data + len, buffered_data + buffered_data_pos, buffered_nbytes ); delete buffered_data; buffered_data = new_buffered_data; new_buffered_data = 0; buffered_data_pos = 0; buffered_data_size = nbytes; buffered_data_size_max = nbytes; return; } // // See if we need to stuffle the data up to make it fit into the // existing buffer. // if (len > buffered_data_pos) { memmove ( buffered_data + buffered_data_pos, buffered_data + buffered_data_size_max - buffered_nbytes, buffered_nbytes ); buffered_data_size = buffered_data_size_max; buffered_data_pos = buffered_data_size_max - buffered_nbytes; } // // Add the data onto the *front* of the buffer. // memcpy(buffered_data + buffered_data_pos - len, data, len); buffered_data_pos -= len; } unsigned long tar_input_filter_gunzip::get_long(void) { unsigned char buffer[4]; unsigned char *bp = buffer; size_t len = sizeof(buffer); for (;;) { // // weird block boundaries can mess this up. // size_t nbytes = buffered_read(bp, len); if (nbytes == 0) fatal("short read"); len -= nbytes; if (!len) break; bp += nbytes; } return ( (unsigned long)buffer[0] | ((unsigned long)buffer[1] << 8) | ((unsigned long)buffer[2] << 16) | ((unsigned long)buffer[3] << 24) ); } // // Check the gzip header of a gz_stream opened for reading. Set the // stream mode to transparent if the gzip magic header is not present; // set this->err to Z_DATA_ERROR if the magic header is present but the // rest of the header is incorrect. // // IN assertion: the stream this has already been created sucessfully; // this->stream.avail_in is zero for the first time, but may be non-zero // for concatenated .gz files. // bool tar_input_filter_gunzip::read_header(tar_header &arg) { if (0 == tar_input_filter::read_header(arg)) return false; pass_through = (arg.type != tar_header::type_normal_gzipped); tar_input_filter::read_header_padding(); if (pass_through) return true; arg.type = tar_header::type_normal; // // Check for the magic number. // If it isn't present, assume transparent mode. // deflated_file_pos = 0; deflated_file_length = arg.size; static unsigned char gz_magic[] = { 0x1F, 0x8B }; unsigned char magic[sizeof(gz_magic)]; if ( buffered_read(magic, sizeof(magic)) != sizeof(magic) || 0 != memcmp(magic, gz_magic, sizeof(magic)) ) fatal("gunzip: bad magic number (%02X %02X)", magic[0], magic[1]); // // Magic number present, now we require the rest of the header // to be present and correctly formed. // int method = buffered_getc(); if (method != Z_DEFLATED) fatal("gunzip: not deflated encoding"); int flags = buffered_getc(); if (flags < 0 || (flags & Z_FLAG_RESERVED) != 0) fatal("gunzip: unknown flags"); // Discard time, xflags and OS code: for (int oslen = 0; oslen < 6; ++oslen) if (buffered_getc() < 0) fatal("gunzip: short file"); if (flags & Z_FLAG_EXTRA_FIELD) { // low byte of len must be 4 int len = buffered_getc(); if (len < 0) goto bad_extra; if (len != 4) goto bad_extra; // high byte of len must be zero int c = buffered_getc(); if (c < 0) goto bad_extra; if (c != 0) goto bad_extra; inflated_file_length = get_long(); } else { bad_extra: fatal("gunzip: extra field required"); } if (flags & Z_FLAG_ORIG_NAME) { // skip the original file name for (;;) { int c = buffered_getc(); if (c < 0) fatal("gunzip: short file"); if (c == 0) break; } } if (flags & Z_FLAG_COMMENT) { // skip the .gz file comment for (;;) { int c = buffered_getc(); if (c < 0) fatal("gunzip: short file"); if (c == 0) break; } } if (flags & Z_FLAG_HEAD_CRC) { // skip the header crc for (int crclen = 0; crclen < 2; ++crclen) if (buffered_getc() < 0) fatal("gunzip: short file"); } stream.zalloc = (alloc_func)0; stream.zfree = (free_func)0; stream.opaque = (voidpf)0; stream.next_in = Z_NULL; stream.avail_in = 0; stream.next_out = Z_NULL; stream.avail_out = 0; if (!buf) buf = new Byte[Z_BUFSIZE]; crc = crc32(0L, Z_NULL, 0); inflated_file_pos = 0; z_eof = false; buffered_data_pos = 0; buffered_data_size = 0; // // windowBits is passed < 0 to tell that there is no zlib header. // Note that in this case inflate *requires* an extra "dummy" byte // after the compressed stream in order to complete decompression // and return Z_STREAM_END. Here the gzip CRC32 ensures that 4 // bytes are present after the compressed stream. // int err = inflateInit2(&stream, -MAX_WBITS); if (err < 0) zlib_fatal_error(err); // // Re-write the header to reflect the decompressed file data. // arg.size = inflated_file_length; // // Report success. // return true; } void tar_input_filter_gunzip::read_header_padding(void) { // already done. } int tar_input_filter_gunzip::read_data(void *data, int len) { if (pass_through) return tar_input_filter::read_data(data, len); if (z_eof) return 0; stream.next_out = (Bytef *)data; stream.avail_out = len; while (stream.avail_out > 0) { if (stream.avail_in == 0) { // assert(buf); stream.next_in = buf; stream.avail_in = buffered_read(buf, Z_BUFSIZE); // // There should always be something left on the // input, because we have the CRC and Length // to follow. Fatal error if not. // if (stream.avail_in <= 0) fatal("premature end of file"); } int err = inflate(&stream, Z_PARTIAL_FLUSH); if (err < 0) zlib_fatal_error(err); if (err == Z_STREAM_END) { z_eof = true; // // Push back the unused portion of the input stream. // (There shouldn't be much.) // if (stream.avail_in > 0) buffered_unread(stream.next_in, stream.avail_in); // // Fall out of the loop. // break; } } // // Calculate the running CRC // long result = stream.next_out - (Bytef *)data; crc = crc32(crc, (Bytef *)data, (uInt)result); // // Update the file position. // inflated_file_pos += result; // // At end-of-file we need to do some checking. // if (z_eof) { // // Check CRC // // Watch out for 64-bit machines. This is what // those aparrently redundant 0xFFFFFFFF are for. // unsigned long icrc = get_long(); if ((icrc & 0xFFFFFFFF) != (crc & 0xFFFFFFFF)) fatal("gunzip: checksum mismatch (%lX != %lX)", icrc, crc); // // The uncompressed length here may be different // from pos in case of concatenated .gz // files. But we don't write them that way, // so give an error if it happens. // // We shouldn't have 64-bit problems in this case. // unsigned long ilen = get_long(); if (ilen != inflated_file_pos) { fatal ( "gunzip: length mismatch (%ld != %ld)", ilen, (long)inflated_file_pos ); } if (inflated_file_pos != inflated_file_length) fatal("inflated length mismatch"); if (deflated_file_pos != deflated_file_length) fatal("deflated length mismatch"); // // Finished with this stream. // int err = inflateEnd(&stream); if (err < 0) zlib_fatal_error(err); } // // Return success (failure always goes via input_format_error, // or zlib_fatal_error). // return result; } void tar_input_filter_gunzip::read_data_padding(void) { if (pass_through || z_eof) { tar_input_filter::read_data_padding(); return; } // // We should be exactly at the end of input. // So we need to read the length and CRC fields to check. // To do this, we need a dummy buffer for decompressed data. // char data[4]; stream.next_out = (Bytef *)data; stream.avail_out = sizeof(data); if (stream.avail_in == 0) { // assert(buf); stream.next_in = buf; stream.avail_in = buffered_read(buf, Z_BUFSIZE); // // There should always be something left on the // input, because we have the CRC and Length // to follow. Fatal error if not. // if (stream.avail_in <= 0) fatal("premature end of file"); } int err = inflate(&stream, Z_PARTIAL_FLUSH); if (err < 0) zlib_fatal_error(err); if (err != Z_STREAM_END || stream.next_out != (Bytef *)data) fatal("gunzip: too much deflated file"); // // Check CRC // // Watch out for 64-bit machines. This is what // those aparrently redundant 0xFFFFFFFF are for. // if ((get_long() & 0xFFFFFFFF) != (crc & 0xFFFFFFFF)) fatal("gunzip: checksum mismatch"); // // The uncompressed length here may be different // from pos in case of concatenated .gz // files. But we don't write them that way, // so give an error if it happens. // // We shouldn't have 64-bit problems in this case. // if (get_long() != inflated_file_pos) fatal("gunzip: length mismatch"); if (inflated_file_pos != inflated_file_length) fatal("inflated length mismatch"); if (deflated_file_pos != deflated_file_length) fatal("deflated length mismatch"); // // Finished with this stream. // err = inflateEnd(&stream); if (err < 0) zlib_fatal_error(err); // // Now read the deeper padding // tar_input_filter::read_data_padding(); } tardy-1.28/libtardy/tar/input/filter/gunzip.h 644 0 0 1415412163037023 175750ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2003, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_FILTER_GUNZIP_H #define LIBTARDY_TAR_INPUT_FILTER_GUNZIP_H #include #include /** * The tar_input_filter_gunzip class is used to represent a filter * which uncompresses compressed files on input. Files which are not * compressed are passed through unaltered. */ class tar_input_filter_gunzip: public tar_input_filter { public: /** * The destructor. */ virtual ~tar_input_filter_gunzip(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * The input stream to be filtered. */ static pointer create(const tar_input::pointer &deeper); protected: // See base class for documentation. bool read_header(tar_header &hdr); // See base class for documentation. void read_header_padding(void); // See base class for documentation. int read_data(void *data, int data_size); // See base class for documentation. void read_data_padding(void); private: /** * The constructor. * It is provate on purpose, use the #create class method instead. * * @param deeper * The input stream to be filtered. */ tar_input_filter_gunzip(const tar_input::pointer &deeper); /** * The pass_through instance variable is used to remember wherther * we are passing through the file data unchanged (if true) or * inflating it on-the-fly (if false). */ bool pass_through; /** * The stream instance variable is used to remember the internal * state of the zlib library when inflating the compressed data. */ z_stream stream; /** * The z_eof instance variable is used to remember whether or not * we have reached the end-of-file within the compressed data. */ bool z_eof; /** * The crc instance variable is used to remember the running cyclic * redundancy check of the decompressed data. It is used to verify * the data, by comparing it with the CRC at the end of the data. */ uLong crc; /** * The buf instance variable is used to remember an array of data * currently being consumed by the inflat function to genetate the * decompressed output data. */ Byte *buf; /** * The buffered_data instance variable is used to remember a pointer * to a buffer of data, read from the deeper file. */ unsigned char *buffered_data; /** * The buffered_data_pos instance variable is used to remember * where the next byte is to be read from within the data buffer * pointed to by buffered_data. */ size_t buffered_data_pos; /** * The buffered_data_size instance variable is used to remember * how much data was read into the buffered_data array. * * assert(buffred_data_pos <= buffered_data_size); */ size_t buffered_data_size; /** * The buffered_data_size_max instance variable is used to remember * the number of bytes allocated to hold the buffered_data. * * assert(buffred_data_size <= buffered_data_size_max); */ size_t buffered_data_size_max; /** * The inflated_file_pos instance variable is used to remember the * current position within the decompressed file. */ size_t inflated_file_pos; /** * The inflated_file_length instance variable is used to remember * the length of the decompressed file. */ size_t inflated_file_length; /** * The deflated_file_pos instance variable is used to remember the * current position within the compressed file. */ size_t deflated_file_pos; /** * The deflated_file_length instance variable is used to remember * the length of the compressed file. */ size_t deflated_file_length; /** * The zlib_fatal_error method is used to report fatal errors from * the zlib library. */ void zlib_fatal_error(int); /** * The get_long method is used to read a little-endian 4-byte value * from the input stream. */ unsigned long get_long(); /** * The buffered_getc() method is used to get a byte of data from * the deeper file, possibly through the buffered_data array. * It will return (-1) for end-of-file. */ int buffered_getc(); /** * The buffered_read method is used to read some data from the * deeper file, possibly coping with data which has been "pushed * back" into the stream. */ int buffered_read(void *data, int len); /** * The buffered_unread method is used to "push back" data into the * sources, as seen from the buffered_read method. */ void buffered_unread(const void *data, size_t len); /** * The default constructor. Do not use. */ tar_input_filter_gunzip(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_input_filter_gunzip(const tar_input_filter_gunzip &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_input_filter_gunzip &operator=(const tar_input_filter_gunzip &rhs); }; #endif // LIBTARDY_TAR_INPUT_FILTER_GUNZIP_H tardy-1.28/libtardy/tar/input/filter/mode_clear.cc 644 0 0 272712163037023 204740ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include tar_input_filter_mode_clear::~tar_input_filter_mode_clear() { } tar_input_filter_mode_clear::tar_input_filter_mode_clear( const tar_input::pointer &a_deeper, long a_bits ) : tar_input_filter(a_deeper), bits(a_bits) { } tar_input::pointer tar_input_filter_mode_clear::create(const tar_input::pointer &a_deeper, long a_bits) { return pointer(new tar_input_filter_mode_clear(a_deeper, a_bits)); } bool tar_input_filter_mode_clear::read_header(tar_header &h) { bool ok = tar_input_filter::read_header(h); if (ok) { h.mode &= ~bits; // don't clear everything if ((h.mode & 0777) == 0) h.mode = 0400; } return ok; } tardy-1.28/libtardy/tar/input/filter/mode_clear.h 644 0 0 524212163037023 203310ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_MODE_CLEAR_H #define LIBTARDY_TAR_INPUT_MODE_CLEAR_H #include /** * The tar_input_filter_mode_clear class is used to represent a filter * which clears bits in the file protection mode in tar archive file * headers. */ class tar_input_filter_mode_clear: public tar_input_filter { public: /** * The destructor. */ virtual ~tar_input_filter_mode_clear(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * The input stream to apply the filter to. * @param bits * The bits to be cleared. */ static pointer create(const tar_input::pointer &deeper, long bits); protected: // See base class for documentation. virtual bool read_header(tar_header &hdr); private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param deeper * The input stream to apply the filter to. * @param bits * The bits to be cleared. */ tar_input_filter_mode_clear(const tar_input::pointer &deeper, long bits); /** * The bits instance variable is used to remember the bits to be * cleard from the file mode in each file header. */ long bits; /** * The default constructor. Do not use. */ tar_input_filter_mode_clear(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_input_filter_mode_clear(const tar_input_filter_mode_clear &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_input_filter_mode_clear &operator=( const tar_input_filter_mode_clear &rhs); }; #endif // LIBTARDY_TAR_INPUT_MODE_CLEAR_H tardy-1.28/libtardy/tar/input/filter/mode_set.cc 644 0 0 305612163037023 201750ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include tar_input_filter_mode_set::~tar_input_filter_mode_set() { } tar_input_filter_mode_set::tar_input_filter_mode_set( const tar_input::pointer &a_deeper, long a_bits ) : tar_input_filter(a_deeper), bits(a_bits & 07777) { } tar_input::pointer tar_input_filter_mode_set::create(const tar_input::pointer &a_deeper, long a_bits) { return pointer(new tar_input_filter_mode_set(a_deeper, a_bits)); } bool tar_input_filter_mode_set::read_header(tar_header &h) { bool ok = tar_input_filter::read_header(h); if (ok) { if (h.mode & 0444) h.mode |= 0444; if (h.mode & 0111) h.mode |= 0111; h.mode |= bits; if (h.type == tar_header::type_link_symbolic) h.mode |= 0777; } return ok; } tardy-1.28/libtardy/tar/input/filter/mode_set.h 644 0 0 523512163037023 200400ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_MODE_SET_H #define LIBTARDY_TAR_INPUT_MODE_SET_H #include /** * The tar_input_filter_mode_set class is used to represent a filter * which set bits in the file protection mode in tar archive file * headers. */ class tar_input_filter_mode_set: public tar_input_filter { public: /** * The destructor. */ virtual ~tar_input_filter_mode_set(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * The input stream to apoply the filter to. * @param bits * The bits to be set in the file mode. */ static pointer create(const tar_input::pointer &deeper, long bits); protected: // See base class for documentation. virtual bool read_header(tar_header &hdr); private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param deeper * The input stream to apoply the filter to. * @param bits * The bits to be set in the file mode. */ tar_input_filter_mode_set(const tar_input::pointer &deeper, long bits); /** * The bits instance variable is used to remember which bits are * to be set in each file header in the tar archive. */ long bits; /** * The default constructor. Do not use. */ tar_input_filter_mode_set(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_input_filter_mode_set(const tar_input_filter_mode_set &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_input_filter_mode_set &operator=(const tar_input_filter_mode_set &rhs); }; #endif // LIBTARDY_TAR_INPUT_MODE_SET_H tardy-1.28/libtardy/tar/input/filter/mtime.cc 644 0 0 254512163037023 175130ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include tar_input_filter_mtime::~tar_input_filter_mtime() { } tar_input_filter_mtime::tar_input_filter_mtime( const tar_input::pointer &a_deeper, time_t a_when ) : tar_input_filter(a_deeper), when(a_when) { } tar_input::pointer tar_input_filter_mtime::create(const tar_input::pointer &a_deeper, time_t a_when) { return pointer(new tar_input_filter_mtime(a_deeper, a_when)); } bool tar_input_filter_mtime::read_header(tar_header &h) { bool ok = tar_input_filter::read_header(h); if (ok) h.mtime = when; return ok; } tardy-1.28/libtardy/tar/input/filter/mtime.h 644 0 0 533012163037023 173500ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_MTIME_H #define LIBTARDY_TAR_INPUT_MTIME_H #include /** * The tar_input_filter_mtime class is used to represent a filter which * sets the file last modifiied time in tar archive file headers. */ class tar_input_filter_mtime: public tar_input_filter { public: /** * The destructor. */ virtual ~tar_input_filter_mtime(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * The input stream to apply the filter to. * @param when * The time to set the file, as if returned by the time(2) * system call). */ static pointer create(const tar_input::pointer &deeper, time_t when); protected: // See base class for documentation. virtual bool read_header(tar_header &hdr); private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param deeper * The input stream to apply the filter to. * @param when * The time to set the file, as if returned by the time(2) * system call). */ tar_input_filter_mtime(const tar_input::pointer &deeper, time_t when); /** * The when instance variable is used to remember the last time * modified to be set in each file header in the tar archive. */ time_t when; /** * The default constructor. Do not use. */ tar_input_filter_mtime(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_input_filter_mtime(const tar_input_filter_mtime &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_input_filter_mtime &operator=(const tar_input_filter_mtime &rhs); }; #endif // LIBTARDY_TAR_INPUT_MTIME_H tardy-1.28/libtardy/tar/input/filter/prefix.cc 644 0 0 324112163037023 176670ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include tar_input_filter_prefix::~tar_input_filter_prefix() { } tar_input_filter_prefix::tar_input_filter_prefix( const tar_input::pointer &a_deeper, const rcstring &a_prefix ) : tar_input_filter(a_deeper), prefix(a_prefix) { } tar_input::pointer tar_input_filter_prefix::create(const tar_input::pointer &a_deeper, const rcstring &a_prefix) { return pointer(new tar_input_filter_prefix(a_deeper, a_prefix)); } static rcstring apply_prefix(const rcstring &prefix, const rcstring &name) { return cannonicalize(prefix + "/" + name); } bool tar_input_filter_prefix::read_header(tar_header &h) { bool ok = tar_input_filter::read_header(h); if (ok) { h.name = apply_prefix(prefix, h.name); if (h.type == tar_header::type_link_hard) h.linkname = apply_prefix(prefix, h.linkname); } return ok; } tardy-1.28/libtardy/tar/input/filter/prefix.h 644 0 0 541012163037023 175310ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_PREFIX_H #define LIBTARDY_TAR_INPUT_PREFIX_H #include #include /** * The tar_input_filter_mode_clear class is used to represent a filter * which adds a directory prefix to each file name in tar archive * file headers. */ class tar_input_filter_prefix: public tar_input_filter { public: /** * The destructor. */ virtual ~tar_input_filter_prefix(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * The input stream to apply the filter to. * @param prefix * The directory prefix to be applied to file names. */ static pointer create(const tar_input::pointer &deeper, const rcstring &prefix); protected: // See base classfor documentation. virtual bool read_header(tar_header &hdr); private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param deeper * The input stream to apply the filter to. * @param prefix * The directory prefix to be applied to file names. */ tar_input_filter_prefix(const tar_input::pointer &deeper, const rcstring &prefix); /** * The prefix instance variable is used to remember the directory * prefix to be applied to each file name in the tar archive. */ rcstring prefix; /** * The default constructor. Do not use. */ tar_input_filter_prefix(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_input_filter_prefix(const tar_input_filter_prefix &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_input_filter_prefix &operator=(const tar_input_filter_prefix &rhs); }; #endif // LIBTARDY_TAR_INPUT_PREFIX_H tardy-1.28/libtardy/tar/input/filter/relative_paths.cc 644 0 0 401012163037023 213770ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include tar_input_filter_relative_paths::~tar_input_filter_relative_paths() { } tar_input_filter_relative_paths::tar_input_filter_relative_paths( const tar_input::pointer &a_deeper ) : tar_input_filter(a_deeper) { } tar_input_filter_relative_paths::pointer tar_input_filter_relative_paths::create(const tar_input::pointer &a_deeper) { return pointer(new tar_input_filter_relative_paths(a_deeper)); } static rcstring clean(const rcstring &fn) { rcstring_list components; components.split(fn, "/", false); rcstring_list result; for (size_t j = 0; j < components.size(); ++j) { rcstring component = components[j]; if (component.empty()) continue; if (component == ".") continue; if (component == ".." && !result.empty() && result.back() != "..") { result.pop_back(); continue; } result.push_back(component); } if (result.empty()) return "."; rcstring retval = result.unsplit("/"); return retval; } bool tar_input_filter_relative_paths::read_header(tar_header &hdr) { if (!tar_input_filter::read_header(hdr)) return false; hdr.name = clean(hdr.name); return true; } tardy-1.28/libtardy/tar/input/filter/relative_paths.h 644 0 0 517512163037023 212560ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_FILTER_RELATIVE_PATHS_H #define LIBTARDY_TAR_INPUT_FILTER_RELATIVE_PATHS_H #include /** * The tar_input_filter_relative_paths class is used to represent a * filter that re-writes file names in the archive if they are absolute * paths (if they start with a '/' slash character) to be relative paths. */ class tar_input_filter_relative_paths: public tar_input_filter { public: /** * The destructor. */ virtual ~tar_input_filter_relative_paths(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * The archive to be filtered, the files we return are read * from this file, and this modified (if necessary). */ static pointer create(const tar_input::pointer &deeper); protected: // See base class for documentation. bool read_header(tar_header &hdr); private: /** * The constructor. * It is private on purpose, use a #create class method instead. * * @param deeper * The archive to be filtered, the files we return are read * from this file, and this modified (if necessary). */ tar_input_filter_relative_paths(const tar_input::pointer &deeper); /** * The default constructor. Do not use. */ tar_input_filter_relative_paths(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_filter_relative_paths(const tar_input_filter_relative_paths &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_filter_relative_paths &operator=( const tar_input_filter_relative_paths &rhs); }; #endif // LIBTARDY_TAR_INPUT_FILTER_RELATIVE_PATHS_H tardy-1.28/libtardy/tar/input/filter/remov_prefi.cc 644 0 0 631112163037023 207100ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2001, 2002, 2004, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include tar_input_filter_remove_prefix::~tar_input_filter_remove_prefix() { } static rcstring cannonicalize_plus_slash(const rcstring &arg) { rcstring tmp = cannonicalize(arg); if (tmp.empty() || tmp[tmp.size() - 1] != '/') tmp += "/"; return tmp; } tar_input_filter_remove_prefix::tar_input_filter_remove_prefix( const tar_input::pointer &a_deeper, const rcstring &a_prefix ) : tar_input_filter(a_deeper), prefix(cannonicalize_plus_slash(a_prefix)) { } tar_input::pointer tar_input_filter_remove_prefix::create(const tar_input::pointer &a_deeper, const rcstring &a_prefix) { return pointer(new tar_input_filter_remove_prefix(a_deeper, a_prefix)); } static rcstring remove_prefix_inner(const rcstring &prfx, const rcstring &name) { // // The name and the prefix have both been cannonicalized at this // point (i.e. no extra slashes, no extra dot dirs). The prefix // is also guaranteed to have a '/' on the end. // int len_p = prfx.size(); assert(len_p >= 1); assert(prfx[len_p - 1] == '/'); // // if the prefix matches the name exactly, // replace it with "./" // // Note that the prefix has been canonicalized to have a slash, and // the name as been canonicalized NOT to have a slash. // int len_n = name.size(); if ( len_p == len_n + 1 && 0 == memcmp(prfx.c_str(), name.c_str(), len_n) ) { return "."; } // // if the prefix is longer than the name, // it can't be a prefix // if (len_p > len_n) return name; // // if it is a leading prefix, // remove it from the name // if (0 == memcmp(prfx.c_str(), name.c_str(), len_p)) return rcstring(name.c_str() + len_p, len_n - len_p); // // prefix does not match the start of the name // return name; } static rcstring apply_remove_prefix(const rcstring &prefix, const rcstring &name) { return remove_prefix_inner(prefix, cannonicalize(name)); } bool tar_input_filter_remove_prefix::read_header(tar_header &h) { bool ok = tar_input_filter::read_header(h); if (ok) { h.name = apply_remove_prefix(prefix, h.name); if (h.type == tar_header::type_link_hard) h.linkname = apply_remove_prefix(prefix, h.linkname); } return ok; } tardy-1.28/libtardy/tar/input/filter/remov_prefi.h 644 0 0 571712163037023 205630ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2003, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_REMOV_PREFI_H #define LIBTARDY_TAR_INPUT_REMOV_PREFI_H #include #include /** * The tar_input_filter_remove_prefix class is used to represent a * filter which removes a directory prefix from the file names in tar * archive file header. If the filter isn't present, the file names * are unchanged. */ class tar_input_filter_remove_prefix: public tar_input_filter { public: /** * The destructor. */ virtual ~tar_input_filter_remove_prefix(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * The input stream the filter is to be applied to. * @param prefix * The directory prefix to be removed from file names, if present. */ static pointer create(const tar_input::pointer &deeper, const rcstring &prefix); protected: // See base class for documentation. virtual bool read_header(tar_header &hdr); private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param deeper * The input stream the filter is to be applied to. * @param prefix * The directory prefix to be removed from file names, if present. */ tar_input_filter_remove_prefix(const tar_input::pointer &deeper, const rcstring &prefix); /** * The prefix instance variable is used to remember the directory * prefix to be removed from file names in the tar arcive. */ rcstring prefix; /** * The default constructor. Do not use. */ tar_input_filter_remove_prefix(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_input_filter_remove_prefix(const tar_input_filter_remove_prefix &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_input_filter_remove_prefix &operator=( const tar_input_filter_remove_prefix &rhs); }; #endif // LIBTARDY_TAR_INPUT_REMOV_PREFI_H tardy-1.28/libtardy/tar/input/filter/remove_prefix_count.cc 644 0 0 440012163037023 224520ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2004, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include tar_input_filter_remove_prefix_count::~tar_input_filter_remove_prefix_count() { } tar_input_filter_remove_prefix_count::tar_input_filter_remove_prefix_count( const tar_input::pointer &a_deeper, int a_count ) : tar_input_filter(a_deeper), count(a_count) { } tar_input::pointer tar_input_filter_remove_prefix_count::create(const tar_input::pointer &a_deeper, int a_count) { return pointer(new tar_input_filter_remove_prefix_count(a_deeper, a_count)); } static rcstring apply_remove_prefix_count(const rcstring &name, int count, bool isdir) { const char *cp = name.c_str(); while (count > 0) { const char *ep = strchr(cp, '/'); if (!ep) { if (isdir) return "."; return (*cp ? cp : "."); } cp = ep + 1; --count; } return (*cp ? cp : "."); } bool tar_input_filter_remove_prefix_count::read_header(tar_header &h) { for (;;) { bool ok = tar_input_filter::read_header(h); if (!ok) return false; bool isdir = (h.type == tar_header::type_directory); h.name = apply_remove_prefix_count(h.name, count, isdir); if (isdir && h.name == ".") continue; if (h.type == tar_header::type_link_hard) h.linkname = apply_remove_prefix_count(h.linkname, count, false); return true; } } tardy-1.28/libtardy/tar/input/filter/remove_prefix_count.h 644 0 0 554012163037023 223220ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2004, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_FILTER_REMOVE_PREFIX_COUNT_H #define LIBTARDY_TAR_INPUT_FILTER_REMOVE_PREFIX_COUNT_H #include /** * The tar_input_filter_remove_prefix_count class is used to represent * an input filter which remove leading path prefixes, specifying how * many path prefixes to be removed. */ class tar_input_filter_remove_prefix_count: public tar_input_filter { public: /** * The destructor. */ virtual ~tar_input_filter_remove_prefix_count(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * The input source to be filtered. * @param count * The number of leading directories to be removed. */ static pointer create(const tar_input::pointer &deeper, int count); protected: // See base class for documentation. bool read_header(tar_header &hdr); private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param deeper * The input source to be filtered. * @param count * The number of leading directories to be removed. */ tar_input_filter_remove_prefix_count(const tar_input::pointer &deeper, int count); /** * The count instance variable is used to remember how many levels * of leading directories are to be removed. */ int count; /** * The default constructor. Do not use. */ tar_input_filter_remove_prefix_count(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_input_filter_remove_prefix_count( const tar_input_filter_remove_prefix_count &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_input_filter_remove_prefix_count &operator=( const tar_input_filter_remove_prefix_count &rhs); }; #endif // LIBTARDY_TAR_INPUT_FILTER_REMOVE_PREFIX_COUNT_H tardy-1.28/libtardy/tar/input/filter/suppr_direc.cc 644 0 0 327312163037023 207160ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include tar_input_filter_suppress_directories::~tar_input_filter_suppress_directories() { } tar_input_filter_suppress_directories::tar_input_filter_suppress_directories( const tar_input::pointer &a_deeper ) : tar_input_filter(a_deeper) { } tar_input::pointer tar_input_filter_suppress_directories::create( const tar_input::pointer &a_deeper) { return pointer(new tar_input_filter_suppress_directories(a_deeper)); } bool tar_input_filter_suppress_directories::read_header(tar_header &h) { for (;;) { if (!tar_input_filter::read_header(h)) return false; if (h.type != tar_header::type_directory) return true; read_header_padding(); // // We would need to skip the data, if directories *had* // data, but they don't. // assert(h.size == 0); read_data_padding(); } } tardy-1.28/libtardy/tar/input/filter/suppr_direc.h 644 0 0 504012163037023 205520ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2003, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_SUPPR_DIREC_H #define LIBTARDY_TAR_INPUT_SUPPR_DIREC_H #include /** * The tar_input_filter_suppress_directories class is used to represent a * filter which removes records of directories from tar archive files. * All other type of files are passed through. No file names are * altered in any way. */ class tar_input_filter_suppress_directories: public tar_input_filter { public: /** * The destructor. */ virtual ~tar_input_filter_suppress_directories(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * The input tream to be filtered. */ static pointer create(const tar_input::pointer &deeper); protected: // See base class for documentation. virtual bool read_header(tar_header &hdr); private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param deeper * The input tream to be filtered. */ tar_input_filter_suppress_directories(const tar_input::pointer &deeper); /** * The default constructor. Do not use. */ tar_input_filter_suppress_directories(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_input_filter_suppress_directories( const tar_input_filter_suppress_directories &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_input_filter_suppress_directories &operator=( const tar_input_filter_suppress_directories &rhs); }; #endif // LIBTARDY_TAR_INPUT_SUPPR_DIREC_H tardy-1.28/libtardy/tar/input/filter/user_name.cc 644 0 0 260212163037023 203500ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include tar_input_filter_user_name::~tar_input_filter_user_name() { } tar_input_filter_user_name::tar_input_filter_user_name( const tar_input::pointer &a_deeper, const rcstring &a_name ) : tar_input_filter(a_deeper), name(a_name) { } tar_input::pointer tar_input_filter_user_name::create(const tar_input::pointer &a_deeper, const rcstring &a_name) { return pointer(new tar_input_filter_user_name(a_deeper, a_name)); } bool tar_input_filter_user_name::read_header(tar_header &h) { bool ok = tar_input_filter::read_header(h); if (ok) h.user_name = name; return ok; } tardy-1.28/libtardy/tar/input/filter/user_name.h 644 0 0 537012163037023 202170ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_USER_NAME_H #define LIBTARDY_TAR_INPUT_USER_NAME_H #include #include /** * The tar_input_filter_user_name class is used to represent a filter * which replaces the user name in tar archive file headers. */ class tar_input_filter_user_name: public tar_input_filter { public: /** * The destructor. */ virtual ~tar_input_filter_user_name(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * The input stream to be filtered. * @param name * The use name to be inserted into file headers. */ static pointer create(const tar_input::pointer &deeper, const rcstring &name); protected: // See base class for documentation. virtual bool read_header(tar_header &hdr); private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param deeper * The input stream to be filtered. * @param name * The use name to be inserted into file headers. */ tar_input_filter_user_name(const tar_input::pointer &deeper, const rcstring &name); /** * The name instance variable is used to remember the user name to * be inserted into each file header in the tare archive. */ rcstring name; /** * The default constructor. Do not use. */ tar_input_filter_user_name(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_input_filter_user_name(const tar_input_filter_user_name &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_input_filter_user_name &operator=( const tar_input_filter_user_name &rhs); }; #endif // LIBTARDY_TAR_INPUT_USER_NAME_H tardy-1.28/libtardy/tar/input/filter/user_number.cc 644 0 0 255612163037023 207300ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include tar_input_filter_user_number::~tar_input_filter_user_number() { } tar_input_filter_user_number::tar_input_filter_user_number( const tar_input::pointer &a_deeper, long a_uid ) : tar_input_filter(a_deeper), uid(a_uid) { } tar_input::pointer tar_input_filter_user_number::create(const tar_input::pointer &a_deeper, long a_uid) { return pointer(new tar_input_filter_user_number(a_deeper, a_uid)); } bool tar_input_filter_user_number::read_header(tar_header &h) { bool ok = tar_input_filter::read_header(h); if (ok) h.user_id = uid; return ok; } tardy-1.28/libtardy/tar/input/filter/user_number.h 644 0 0 527412163037023 205720ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_USER_NUMBER_H #define LIBTARDY_TAR_INPUT_USER_NUMBER_H #include /** * The tar_input_filter_user_number class is used to represent a filter * which replaces the User ID in tar archive file headers. */ class tar_input_filter_user_number: public tar_input_filter { public: /** * The destructor. */ virtual ~tar_input_filter_user_number(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * The input stream to be filtered. * @param uid * The User ID to be inserted into each file header. */ static pointer create(const tar_input::pointer &deeper, long uid); protected: // See base class for documentation. virtual bool read_header(tar_header &hdr); private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param deeper * The input stream to be filtered. * @param uid * The User ID to be inserted into each file header. */ tar_input_filter_user_number(const tar_input::pointer &deeper, long uid); /** * The uid instance variable is used to remember the User ID to be * inserted into each file header in the tar archive. */ long uid; /** * The default constructor. Do not use. */ tar_input_filter_user_number(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_input_filter_user_number(const tar_input_filter_user_number &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_input_filter_user_number &operator=( const tar_input_filter_user_number &rhs); }; #endif // LIBTARDY_TAR_INPUT_USER_NUMBER_H tardy-1.28/libtardy/tar/input/tar.cc 644 0 0 2564612163037023 157300ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2001-2004, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include #include #include #include tar_input_tar::~tar_input_tar() { } tar_input_tar::tar_input_tar(const file_input::pointer &a_fp) : fp(a_fp), state(0) { assert(fp); } tar_input::pointer tar_input_tar::factory(const file_input::pointer &a_fp) { if (tar_input_tar_ustar::candidate(a_fp)) return tar_input_tar_ustar::create(a_fp); if (tar_input_tar_bsd::candidate(a_fp)) return tar_input_tar_bsd::create(a_fp); return tar_input_tar_posix::create(a_fp); } static bool all_zero(char *buf, long len) { while (len > 0) { if (*buf++) return false; --len; } return true; } void tar_input_tar::check_state(int a, int b) { if (state != a && (b >= 0 && state != b)) fatal("state %d: should be %d", state, a); if (state < 3) { unsigned alignment = fp->get_position() % TBLOCK; if (alignment != 0) fatal("state %d: offset is %u", state, alignment); } } int tar_input_tar::read_data_strict(void *buffer, int maximum_length) { if (!fp) explain_output_error_and_die("file not open (bug)"); int result = 0; while (maximum_length > 0) { int nbytes = fp->read(buffer, maximum_length); if (nbytes == 0) { if (result == 0) break; fatal ( "short read (asked %d, got %d)", maximum_length + result, result ); } result += nbytes; maximum_length -= nbytes; buffer = (char *)buffer + nbytes; } return result; } int tar_input_tar::read_data(void *buffer, int maximum_length) { check_state(2, 3); state = 3; return read_data_strict(buffer, maximum_length); } void tar_input_tar::read_data_padding(void) { check_state(2, 3); state = 0; unsigned n = fp->get_position() % TBLOCK; if (n == 0) return; fp->skip(TBLOCK - n); } bool tar_input_tar::read_header_longname(int size, tar_header &arg) { // // Read the long name. // int size2 = (size + TBLOCK - 1) & -TBLOCK; char *buffer = new char[size2]; int nbytes = read_data_strict(buffer, size2); if (nbytes != size2) fatal("premature end of file (short name read)"); while (size > 1 && buffer[size - 1] == 0) --size; rcstring long_file_name = rcstring(buffer, size); delete buffer; // // Read the next file header // state = 0; if (!read_header(arg)) return false; // // Replace the name with the long name we just read. // arg.name = long_file_name; // // Watch out for trailing slashes // while (arg.name[arg.name.size() - 1] == '/') { arg.name = rcstring ( arg.name.c_str(), arg.name.size() - 1 ); arg.type = tar_header::type_directory; arg.size = 0; arg.link_count = 2; } return true; } bool tar_input_tar::read_header_longlink(int size, tar_header &arg) { // // Read the long name. // int size2 = (size + TBLOCK - 1) & -TBLOCK; char *buffer = new char[size2]; int nbytes = read_data_strict(buffer, size2); if (nbytes != size2) fatal("premature end of file (short name read)"); while (size > 1 && buffer[size - 1] == 0) --size; rcstring long_link_name = rcstring(buffer, size); delete buffer; // // Read the next file header // state = 0; if (!read_header(arg)) return false; // // Replace the name with the long name we just read. // arg.linkname = long_link_name; return true; } bool tar_input_tar::read_header_gzipped(int size, tar_header &arg) { // // Read the name of the uncompressed file. // int size2 = (size + TBLOCK - 1) & -TBLOCK; char *buffer = new char[size2]; int nbytes = read_data_strict(buffer, size2); if (nbytes != size2) fatal("premature end of file (short name read)"); while (size > 1 && buffer[size - 1] == 0) --size; rcstring long_file_name = rcstring(buffer, size); delete buffer; // // Read the next file header // state = 0; if (!read_header(arg)) return false; // // Replace the name with the name of the uncompressed file. // if (long_file_name.size() != 0) arg.name = long_file_name; arg.type = tar_header::type_normal_gzipped; return true; } bool tar_input_tar::read_header(tar_header &arg) { check_state(0); state = 1; // // read a block of input // char block[TBLOCK]; int nbytes = read_data_strict(block, TBLOCK); if (!nbytes) return false; if (nbytes != TBLOCK) fatal("premature end of file (short header read)"); if (all_zero(block, TBLOCK)) return false; // // Build a pointer to the on-tape header block structure. // Use this to asist decoding the header block. // header_ty *hp = (header_ty *)block; // // chew over header fields // int hchksum = hp->chksum_get(); if (hchksum < 0) fp->fatal("corrupted checksum field"); int cs2 = hp->calculate_checksum(); if (hchksum != cs2) { hp->dump(); fp->fatal ( "checksum does not match (calculated 0%o, file has 0%o)", cs2, hchksum ); } arg = tar_header(); // zero out everything // // Give all files a unique inode number. // // Let the writer figure out (from the linkname) if they should // be the same. // // FIXME: use a symtab and get the inode_number and link_count more // correct. // static long ino; arg.inode_number = ++ino; arg.name = hp->name_get(); int hsize = hp->size_get(); if (hsize < 0) fp->fatal("%s: corrupted size field", arg.name.c_str()); arg.size = hsize; switch (hp->linkflag_get()) { case LF_OLDNORMAL: case LF_NORMAL: arg.type = tar_header::type_normal; // // Working out that it is a directory is // interesting: you can't rely on the mode bits, // and it shows as a normal file. The clue is // that the name will end with a slash. // if (arg.size == 0) { while (arg.name[arg.name.size() - 1] == '/') { arg.name = rcstring(arg.name.c_str(), arg.name.size() - 1); arg.type = tar_header::type_directory; arg.size = 0; arg.link_count = 2; } } break; case LF_CONTIG: arg.type = tar_header::type_normal_contiguous; break; case LF_GZIPPED: return read_header_gzipped(hsize, arg); case LF_LINK: arg.linkname = hp->linkname_get(); arg.type = tar_header::type_link_hard; arg.size = 0; arg.link_count = 2; break; case LF_SYMLINK: arg.linkname = hp->linkname_get(); arg.type = tar_header::type_link_symbolic; arg.size = 0; break; case LF_CHR: arg.type = tar_header::type_device_character; arg.size = 0; break; case LF_BLK: arg.type = tar_header::type_device_block; arg.size = 0; break; case LF_DIR: while (arg.name[arg.name.size() - 1] == '/') arg.name = rcstring(arg.name.c_str(), arg.name.size() - 1); if (arg.size != 0) { // Some tarball writing programs are storing files as // directories. No idea which program is doing this. The // broken tarballs were from thr HTC Android Download site. arg.type = tar_header::type_normal; break; } arg.type = tar_header::type_directory; arg.size = 0; arg.link_count = 2; break; case LF_FIFO: arg.type = tar_header::type_fifo; arg.size = 0; break; case LF_LONGNAME: return read_header_longname(hsize, arg); case LF_LONGLINK: return read_header_longlink(hsize, arg); default: fp->fatal("file type \"%c\" unknown", hp->linkflag_get()); break; } int hmode = hp->mode_get(); if (hmode < 0) fatal("\"%s\" corrupted mode field", arg.name.c_str()); arg.mode = hmode; int huid = hp->uid_get(); if (huid < 0) fatal("\"%s\" corrupted uid field", arg.name.c_str()); arg.user_id = huid; int hgid = hp->gid_get(); if (hgid < 0) fatal("\"%s\" corrupted gid field", arg.name.c_str()); arg.group_id = hgid; int hmtime = hp->mtime_get(); if (hmtime < 0) { // // usually because of a file time // before 1970 or after 2038 // if (errno != ERANGE) fatal("\"%s\" corrupted mtime field", arg.name.c_str()); warning("\"%s\" mtime field out of range", arg.name.c_str()); time_t now; time(&now); hmtime = now; } arg.mtime = hmtime; if (0 == memcmp(hp->magic, TMAGIC, sizeof(hp->magic))) { arg.user_name = hp->uname_get(); arg.group_name = hp->gname_get(); arg.device_major = hp->devmajor_get(); arg.device_minor = hp->devminor_get(); } else { arg.user_name = "nobody"; arg.group_name = "nogroup"; arg.device_major = 0; arg.device_minor = 0; } // // say that we found something // return true; } void tar_input_tar::read_header_padding(void) { check_state(1); state = 2; } rcstring tar_input_tar::filename(void) const { return fp->filename(); } format_family_t tar_input_tar::get_format_family(void) const { return format_family_tar; } #if 0 size_t tar_input_tar::get_maximum_name_length(void) const { // // This would be true, if it weren't for the GNU long name // extensions. When they are split out into a separate filter, this // method will be necessary. // return NAMSIZ; } #endif tardy-1.28/libtardy/tar/input/tar.h 644 0 0 1067612163037023 155670ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2003, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_TAR_H #define LIBTARDY_TAR_INPUT_TAR_H #include #include /** * The tar_input_tar class is used to represent the process of parsing * an input file, in tar(1) format, into a series of archive contents. */ class tar_input_tar: public tar_input { public: /** * The destructor. */ virtual ~tar_input_tar(); /** * The factory class method is used to create new dynamically * allocated instances of this class. * * The file provided is non-destructively examined to determine * which tar format is actually present, and then the appropriate * class' create method is called. * * @param fp * The file to be read. */ static pointer factory(const file_input::pointer &fp); protected: /** * The constructor. * For use by derived classes only. * * @param fp * The file to be read. */ tar_input_tar(const file_input::pointer &fp); // See base class for documentation. virtual tar_output::pointer tar_output_factory( const file_output::pointer &ofp) const = 0; // See base class for documentation. virtual int read_data(void *data, int data_size); // See base class for documentation. virtual void read_data_padding(void); // See base class for documentation. virtual bool read_header(tar_header &hdr); // See base class for documentation. virtual void read_header_padding(void); // See base class for documentation. rcstring filename(void) const; // See base class for documentation. format_family_t get_format_family(void) const; private: /** * The read_data_strict method is used to read in data from the * input file, insisting on exactly the right number of bytes. * Short reads not acceptable. */ int read_data_strict(void *data, int data_size); /** * The fp instance variable is used to remember where we are * getting out input from. */ file_input::pointer fp; /** * The state instance variable is used to remember * where we are up to in processing a single file. * 0 = haven't read a header yet * 1 = have read the header (read header padding next) * 2 = have read the header padding (read data next) * 3 = have read some data */ int state; /** * The check_state method is used to make sure we are in the * correct state for the method being called. */ void check_state(int, int = -1); /** * The read_header_longname method is used to read a long * file name (out of file data) and then read the next header, * replacing the file name with the one read. */ bool read_header_longname(int, tar_header &); /** * The read_header_longlink method is used to read a long * link name (out of file data) and then read the next header, * replacing the link name with the one read. */ bool read_header_longlink(int, tar_header &); /** * The read_header_gzipped method is used to read a gzip flag * header. The unzipped name in in the file data. Then read * the next header, replacing the file name with the one read, * and set the gzipped flag. */ bool read_header_gzipped(int, tar_header &); /** * The default constructor. Do not use. */ tar_input_tar(); /** * The copy constructor. Do not use. */ tar_input_tar(const tar_input_tar &); /** * The assignment operator. Do not use. */ tar_input_tar &operator=(const tar_input_tar &); }; #endif // LIBTARDY_TAR_INPUT_TAR_H tardy-1.28/libtardy/tar/input/tar/bsd.cc 644 0 0 377312163037023 164550ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include tar_input_tar_bsd::~tar_input_tar_bsd() { } tar_input_tar_bsd::tar_input_tar_bsd(const file_input::pointer &a_ifp) : tar_input_tar(a_ifp) { } tar_input_tar_bsd::pointer tar_input_tar_bsd::create(const file_input::pointer &a_ifp) { return pointer(new tar_input_tar_bsd(a_ifp)); } bool tar_input_tar_bsd::candidate(const file_input::pointer &ifp) { char buf[512]; int nbytes = ifp->peek(buf, sizeof(buf)); if (nbytes != sizeof(buf)) return false; header_ty *hp = (header_ty *)buf; // // We may have to get smarter than this: the way to distinguish // V7 tarballs from BSD tarballs, is that BSD uses LF_NORMAL for // regular files while V7 uses LF_OLDNORMAL. // // But that may require skipping a few directories (or other no-data // files) first. // // BSD tarballs don't have user names or group names, either. // return (hp->magic[0] == '\0'); } tar_output::pointer tar_input_tar_bsd::tar_output_factory(const file_output::pointer &ofp) const { return tar_output_tar_bsd::create(ofp); } const char * tar_input_tar_bsd::get_format_name(void) const { return "tar-bsd"; } tardy-1.28/libtardy/tar/input/tar/bsd.h 644 0 0 530512163037023 163100ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_TAR_BSD_H #define LIBTARDY_TAR_INPUT_TAR_BSD_H #include /** * The tar_input_tar_bsd class is used to represent the process of * parsing an input file, in BSD tar(1) format, into a series of * archive contents. */ class tar_input_tar_bsd: public tar_input_tar { public: typedef boost::shared_ptr pointer; /** * The destructor. */ virtual ~tar_input_tar_bsd(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param ifp * The binary file containing the archive to be read. */ static pointer create(const file_input::pointer &ifp); /** * The candidate class method is used to sniff at an input file * (without moving the file position) to see if it looks like a * file in BSD tar(1) format. */ static bool candidate(const file_input::pointer &ifp); protected: // See base class for documentation. tar_output::pointer tar_output_factory(const file_output::pointer &ofp) const; // See base class for documentation. const char *get_format_name(void) const; private: /** * The constructor. * It is private on purpose, use a #create class method instead. * * @param ifp * The binary file containing the archive to be read. */ tar_input_tar_bsd(const file_input::pointer &ifp); /** * The default constructor. Do not use. */ tar_input_tar_bsd(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_tar_bsd(const tar_input_tar_bsd &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_tar_bsd &operator=(const tar_input_tar_bsd &rhs); }; #endif // LIBTARDY_TAR_INPUT_TAR_BSD_H tardy-1.28/libtardy/tar/input/tar/posix.cc 644 0 0 252512163037023 170410ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include tar_input_tar_posix::~tar_input_tar_posix() { } tar_input_tar_posix::tar_input_tar_posix(const file_input::pointer &a_ifp) : tar_input_tar(a_ifp) { } tar_input_tar_posix::pointer tar_input_tar_posix::create(const file_input::pointer &a_ifp) { return pointer(new tar_input_tar_posix(a_ifp)); } tar_output::pointer tar_input_tar_posix::tar_output_factory(const file_output::pointer &ofp) const { return tar_output_tar_posix::create(ofp); } const char * tar_input_tar_posix::get_format_name(void) const { return "tar-posix"; } tardy-1.28/libtardy/tar/input/tar/posix.h 644 0 0 474112163037023 167050ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_TAR_POSIX_H #define LIBTARDY_TAR_INPUT_TAR_POSIX_H #include /** * The tar_input_tar_posix class is used to represent the process of parsing * an input file, in POSIX tar(1) format, into a series of archive contents. */ class tar_input_tar_posix: public tar_input_tar { public: typedef boost::shared_ptr pointer; /** * The destructor. */ virtual ~tar_input_tar_posix(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param ifp * The file to read for the binary archive contents. */ static pointer create(const file_input::pointer &ifp); protected: // See base class for documentation. tar_output::pointer tar_output_factory(const file_output::pointer &ofp) const; // See base class for documentation. const char *get_format_name(void) const; private: /** * The constructor. * It is private on purpose, use a #create class method instead. * * @param ifp * The file to read for the binary archive contents. */ tar_input_tar_posix(const file_input::pointer &ifp); /** * The default constructor. Do not use. */ tar_input_tar_posix(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_tar_posix(const tar_input_tar_posix &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_tar_posix &operator=(const tar_input_tar_posix &rhs); }; #endif // LIBTARDY_TAR_INPUT_TAR_POSIX_H tardy-1.28/libtardy/tar/input/tar/ustar.cc 644 0 0 314112163037023 170300ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include tar_input_tar_ustar::~tar_input_tar_ustar() { } tar_input_tar_ustar::tar_input_tar_ustar(const file_input::pointer &a_ifp) : tar_input_tar(a_ifp) { } tar_input_tar_ustar::pointer tar_input_tar_ustar::create(const file_input::pointer &a_ifp) { return pointer(new tar_input_tar_ustar(a_ifp)); } bool tar_input_tar_ustar::candidate(const file_input::pointer &ifp) { char buf[512]; int nbytes = ifp->peek(buf, sizeof(buf)); if (nbytes != sizeof(buf)) return false; return (0 == memcmp(buf + 508, "tar", 3)); } tar_output::pointer tar_input_tar_ustar::tar_output_factory(const file_output::pointer &ofp) const { return tar_output_tar_ustar::create(ofp); } const char * tar_input_tar_ustar::get_format_name(void) const { return "ustar"; } tardy-1.28/libtardy/tar/input/tar/ustar.h 644 0 0 537712163037023 167070ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_INPUT_TAR_USTAR_H #define LIBTARDY_TAR_INPUT_TAR_USTAR_H #include /** * The tar_input_tar_ustar class is used to represent the process of * parsing an input file, in Joerg Schilloings's star(1) format, into a * series of archive contents. */ class tar_input_tar_ustar: public tar_input_tar { public: typedef boost::shared_ptr pointer; /** * The destructor. */ virtual ~tar_input_tar_ustar(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param ifp * The binary file containing the archive to be read. */ static pointer create(const file_input::pointer &ifp); /** * The candidate class method is used to sniff at an input file * (without moving the file position) to see if it looks like a * file in Joerg Schilling's star(1) format. */ static bool candidate(const file_input::pointer &ifp); protected: // See base class for documentation. tar_output::pointer tar_output_factory(const file_output::pointer &ofp) const; // See base class for documentation. const char *get_format_name(void) const; private: /** * The constructor. * It is private on purpose, use a #create class method instead. * * @param ifp * The binary file containing the archive to be read. */ tar_input_tar_ustar(const file_input::pointer &ifp); /** * The default constructor. Do not use. */ tar_input_tar_ustar(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_tar_ustar(const tar_input_tar_ustar &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_input_tar_ustar &operator=(const tar_input_tar_ustar &rhs); }; #endif // LIBTARDY_TAR_INPUT_TAR_USTAR_H tardy-1.28/libtardy/tar/input/tar_output_factory.cc 644 0 0 165612163037023 210520ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include tar_output::pointer tar_input::tar_output_factory(const file_output::pointer &ofp) const { return tar_output_tar_posix::create(ofp); } tardy-1.28/libtardy/tar/output.cc 644 0 0 572412163037023 153160ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002-2004, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include #include #include #include tar_output::~tar_output() { } tar_output::tar_output() { } tar_output::tar_output(const tar_output &) { assert(!"should not reach here"); } tar_output & tar_output::operator=(const tar_output &) { assert(!"should not reach here"); return *this; } void tar_output::fatal(const char *fmt, ...) const { va_list ap; va_start(ap, fmt); char buffer[2000]; vsnprintf(buffer, sizeof(buffer), fmt, ap); va_end(ap); explain_output_error_and_die ( "%s: %s {%s}", filename().c_str(), buffer, get_format_name() ); } void tar_output::write_data_padding() { // none by default } void tar_output::write_header_padding() { // same alignment as data by default write_data_padding(); } void tar_output::write_archive_begin() { // none by default } void tar_output::write_archive_end() { // none by default } void tar_output::set_block_size(long) { // ignore by default } int tar_output::calculate_mode(const tar_header &h) const { // // Don't use the native UNIX defintions, because // (a) this may not be UNIX, and // (b) the vendor may have gratuitously changed things. // int hibits; hibits = 0100000; switch (h.type) { case tar_header::type_socket: hibits = 0140000; break; case tar_header::type_link_symbolic: hibits = 0120000; break; case tar_header::type_normal: case tar_header::type_normal_contiguous: case tar_header::type_link_hard: hibits = 0100000; break; case tar_header::type_device_block: hibits = 0060000; break; case tar_header::type_directory: hibits = 0040000; break; case tar_header::type_device_character: hibits = 0020000; break; case tar_header::type_fifo: hibits = 0010000; break; case tar_header::type_normal_gzipped: fatal("gzipped type not supported"); break; } return (h.mode | hibits); } tardy-1.28/libtardy/tar/output.h 644 0 0 2101012163037023 151620ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2003, 2004, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_OUTPUT_H #define LIBTARDY_TAR_OUTPUT_H #include #include #include /** * The tar_output class is used to represent an abstract output stream * containing a sequence of file headers and file data. * * The expected sequence of operations is *
  *                 |
  *     +-----------------------+
  *     | write_archive_begin   |
  *     +-----------------------+
  *                 |
  *                 | ,------------------<---------------.
  *                 |/                                    \
  *                 V                                      |
  *                 |                                      |
  *     +-----------------------+                          |
  *     |     write_header      |                          |
  *     +-----------------------+                          |
  *                 |                                      |
  *     +-----------------------+                          |
  *     | write_header_padding  |                          |
  *     +-----------------------+                          |
  *                 |                                      |
  *                 *------->-------.                      ^
  *                 |                \                     |
  *                 |                 |                    |
  *                 |                 | ,------<-----.     |
  *                 |                 |/              \    |
  *                 |                 V                |   |
  *                 |                 |                |   |
  *                 |     +-----------------------+    |   |
  *                 |     |      write_data       |    ^   |
  *                 |     +-----------------------+    |   |
  *                 |                 |               /    |
  *                 |                 *-------->-----'     |
  *                 |                 |                    |
  *                 |                /                     |
  *                 | ,-----<-------'                      ^
  *                 |/                                     |
  *                 V                                      |
  *                 |                                      |
  *                 |                                      |
  *     +-----------------------+                          |
  *     |  write_data_padding   |                          |
  *     +-----------------------+                          |
  *                 |                                     /
  *                 *-------------------->---------------'
  *                 |
  *     +-----------------------+
  *     |   write_archive_end   |
  *     +-----------------------+
  *                 |                                                   
*/ class tar_output { public: /** * The pointer type should be used for all pointers to output * instances, as it does reference counting a resource clean up at * the appropriate time. */ typedef boost::shared_ptr pointer; /** * The destructor. */ virtual ~tar_output(); /** * The fatal method is used to report fatal errors. The name of * the output file will be prepended. * * @param fmt * The format controlling the string to be printed. See * printf(3) for a description of the formats and their * arguments. */ void fatal(const char *fmt, ...) const ATTR_PRINTF(2, 3); /** * The write_header method is used to write file meta-data to * the output stream. Must be called exactly once for each file. * The size in the header shall exactly match the amount of data * written with the write_data methods which follow. * * @param hdr * The header information to be written. */ virtual void write_header(const tar_header &hdr) = 0; /** * The write_header_padding is used to write padding to bring * the output stream to a suitable byte multiple. Must be called * exactly once for each file, after the header has been written. */ virtual void write_header_padding(void); /** * The write_data method is used to write file data to the output * stream. The file header must be written first. Must be called * zero or more times for each file. * * @param data * A pointer to the array of byte data to be written. * @param data_size * The size in bytes of the data to be written. * assert(data_size > 0); */ virtual void write_data(const void *data, int data_size) = 0; /** * The write_data_padding is used to write padding to bring the * output stream to a suitable byte multiple. Must be called * exactly once for each file, after all the data has been written. */ virtual void write_data_padding(void); /** * The filename method is used to retrieve the name of the output * file, which the archive is being written to. */ virtual rcstring filename(void) const = 0; /** * The get_format_name method may be used to obtain the name of the * file format in use. * * Derived classes shall make every attempt to return strings that * can be used with the tardy -ofmt command line option. */ virtual const char *get_format_name(void) const = 0; /** * The write_archive_begin method is used to begin an archive. * It shall be called before the first file header is written. */ virtual void write_archive_begin(void); /** * The write_archive_begin method is used to end an archive. * It shall be called after the last file data padding has been * written. */ virtual void write_archive_end(void); /** * The set_block_size method is used to set the output block size * in bytes, the multiple of which will always be written to the * output. This largely controls the number of bytes of padding at * the end of the archive. The default is no padding. * * @param nbytes * The number of bytes per block. * assert(nbytes > 0); * assert((nbytes % 512) == 0); */ virtual void set_block_size(long nbytes); /** * The get_maximum_name_length method may be used to obtain the * longest name that may be stored in the archive (as opposed to * the longest name actually present in the archive). * * @returns * The longest filename that may be present in the archive in * bytes (not characters). * A value of zero means "effectively infinite", or more * accurately "how much memory do you have?". */ virtual size_t get_maximum_name_length(void) const = 0; protected: /** * The default constructor. * Only derived classes may use it. */ tar_output(); /** * The calculate_mode method is used to determine an st_mode * equalivalent for the hdr.type and hdr.mode fields. * * @param hdr * The header to extract information from. * @returns * the appropriate mode field, combining type and permission mmode bits */ int calculate_mode(const tar_header &hdr) const; private: /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_output(const tar_output &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_output &operator=(const tar_output &rhs); }; #endif // LIBTARDY_TAR_OUTPUT_H tardy-1.28/libtardy/tar/output/ar.cc 644 0 0 523612163037023 157160ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include tar_output_ar::~tar_output_ar() { } tar_output_ar::tar_output_ar(const file_output::pointer &a_ofp, int a_padding) : ofp(a_ofp), padding(a_padding >= 2 ? a_padding : 0), position(0) { assert(ofp); } void tar_output_ar::write_header_padding(void) { write_padding(); } void tar_output_ar::write_data(const void *data, int data_size) { assert(data_size >= 0); write_deeper(data, data_size); } void tar_output_ar::write_data_padding(void) { write_padding(); } void tar_output_ar::write_deeper(const void *data, size_t data_size) { ofp->write(data, data_size); position += data_size; } rcstring tar_output_ar::filename(void) const { return ofp->filename(); } void tar_output_ar::write_padding(void) { if (!padding) return; unsigned mod = position % padding; if (!mod) return; unsigned pad = padding - mod; static char *dummy; static size_t dummy_size; if (dummy_size < pad) { delete [] dummy; dummy_size = padding; dummy = new char [dummy_size]; memset(dummy, '\n', dummy_size); } write_deeper(dummy, pad); } void tar_output_ar::dec(char *data, unsigned long value, size_t data_size) { char temp[60]; snprintf(temp, sizeof(temp), "%lu", value); size_t temp_len = strlen(temp); if (temp_len > data_size) { memset(data, '9', data_size); return; } memcpy(data, temp, temp_len); memset(data + temp_len, ' ', data_size - temp_len); } void tar_output_ar::oct(char *data, unsigned long value, size_t data_size) { char temp[60]; snprintf(temp, sizeof(temp), "%lo", value); size_t temp_len = strlen(temp); if (temp_len > data_size) { memset(data, '7', data_size); return; } memcpy(data, temp, temp_len); memset(data + temp_len, ' ', data_size - temp_len); } tardy-1.28/libtardy/tar/output/ar.h 644 0 0 1044312163037023 155740ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_OUTPUT_AR_H #define LIBTARDY_TAR_OUTPUT_AR_H #include #include /** * The tar_output_ar base class is used to represent the processing * required to write an ar(1) archive. There are several of these, * each will derive from this base class. * * The bdf/archive.c file in the sources of the GNU Binutils package is * most instructive. */ class tar_output_ar: public tar_output { public: /** * The destructor. */ virtual ~tar_output_ar(); protected: /** * The constructor. * For use by derived classes only. * * @param ofp * The file to be written to. * @param padding * The byte multiple for padding. Zero means none required. */ tar_output_ar(const file_output::pointer &ofp, int padding); // See base class for documentation. void write_header_padding(void); // See base class for documentation. void write_data(const void *data, int data_size); // See base class for documentation. void write_data_padding(void); // See base class for documentation. rcstring filename(void) const; /** * The write_deeper method is used by derived classes to write data * to the output file. */ void write_deeper(const void *data, size_t data_size); /** * The dec method is used to insert an ascii representation of a * numeric value, in decimal, into a data field. It will be padded * with spaces on the right, if necessary. * * @param data * Pointer to the base of an array to be filled with the number. * @param value * The value to be inserted. * @param data_size * The size of the field, in bytes. */ static void dec(char *data, unsigned long value, size_t data_size); /** * The oct method is used to insert an ascii representation of a * numeric value, in octal, into a data field. It will be padded * with spaces on the right, if necessary. * * @param data * Pointer to the base of an array to be filled with the number. * @param value * The value to be inserted. * @param data_size * The size of the field, in bytes. */ static void oct(char *data, unsigned long value, size_t data_size); private: /** * The ofp instance variable isused to remember the binary file in * which to write the archive contents. */ file_output::pointer ofp; /** * The padding instance variable is used to remember the byte * multiple that file headers and file data are to start on. Zero * means no alignment required. */ unsigned padding; /** * The position instance variable is used to remember the output * file position, this is used when calculating how much padding to * insert. */ unsigned long position; /** * The write_padding method may be used to write zero-valued bytes * upto the next padding boundary. */ void write_padding(void); /** * The default constructor. Do not use. */ tar_output_ar(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_output_ar(const tar_output_ar &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_output_ar &operator=(const tar_output_ar &rhs); }; #endif // LIBTARDY_TAR_OUTPUT_AR_H tardy-1.28/libtardy/tar/output/ar/bsd.cc 644 0 0 705212163037023 164640ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include #include #include tar_output_ar_bsd::~tar_output_ar_bsd() { } tar_output_ar_bsd::tar_output_ar_bsd(const file_output::pointer &a_ofp) : tar_output_ar(a_ofp, 2) { } tar_output::pointer tar_output_ar_bsd::create(const file_output::pointer &a_ofp) { pointer p(new tar_output_ar_bsd(a_ofp)); p = tar_output_filter_ar_long_names::create(p); return tar_output_filter_basename::create(p); } tar_output::pointer tar_output_ar_bsd::create_l2(const file_output::pointer &a_ofp) { pointer p(new tar_output_ar_bsd(a_ofp)); p = tar_output_filter_ar_long_names2::create(p); return tar_output_filter_basename::create(p); } const char * tar_output_ar_bsd::get_format_name(void) const { return "ar-bsd"; } void tar_output_ar_bsd::write_archive_begin(void) { write_deeper("!\n", 8); } void tar_output_ar_bsd::write_header(const tar_header &hdr) { switch (hdr.type) { case tar_header::type_device_block: case tar_header::type_device_character: case tar_header::type_fifo: case tar_header::type_link_hard: case tar_header::type_link_symbolic: case tar_header::type_socket: fatal("%s: file type not supported", hdr.name.c_str()); break; case tar_header::type_normal_gzipped: assert(!"not implemented yet"); break; case tar_header::type_directory: // Quietly ignore break; case tar_header::type_normal: case tar_header::type_normal_contiguous: // // Name Offset Size // ---- ------ ---- // name 0 16 // date 16 12 // uid 28 6 // gid 34 6 // mode 40 8 // size 48 10 // fmag 58 2 // ----------- ---- // Total: 60 // char buffer[60]; size_t name_size = hdr.name.size(); if (name_size > 16) name_size = 16; memcpy(buffer, hdr.name.c_str(), name_size); if (name_size < 16 && !memchr(hdr.name.c_str(), '/', name_size)) buffer[name_size++] = '/'; while (name_size < 16) buffer[name_size++] = ' '; dec(buffer + 16, hdr.mtime, 12); dec(buffer + 28, hdr.user_id, 6); dec(buffer + 34, hdr.group_id, 6); oct(buffer + 40, calculate_mode(hdr), 8); if (hdr.size > 999999999) fatal("file size too large"); dec(buffer + 48, hdr.size, 10); buffer[58] = '`'; buffer[59] = '\n'; write_deeper(buffer, 60); break; } } size_t tar_output_ar_bsd::get_maximum_name_length(void) const { return 16; } tardy-1.28/libtardy/tar/output/ar/bsd.h 644 0 0 545412163037023 163320ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_OUTPUT_AR_BSD_H #define LIBTARDY_TAR_OUTPUT_AR_BSD_H #include /** * The tar_output_ar_bsd class is used to represent the processing * required to write an ar(1) archive, in BSD format. */ class tar_output_ar_bsd: public tar_output_ar { public: /** * The destructor. */ virtual ~tar_output_ar_bsd(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * It uses the "/nnn" long file name method. * * @param ofp * The file to be written to. */ static pointer create(const file_output::pointer &ofp); /** * The create class method is used to create new dynamically * allocated instances of this class. * * It uses the "#1/nnn" long file name method. * * @param ofp * The file to be written to. */ static pointer create_l2(const file_output::pointer &ofp); protected: // See base class for docuemntation. void write_archive_begin(); // See base class for docuemntation. void write_header(const tar_header &hdr); // See base class for docuemntation. const char *get_format_name(void) const; // See base class for docuemntation. size_t get_maximum_name_length(void) const; private: /** * The constructor. * It is private on purpose, use a #create class method instead. * * @param ofp * The file to be written to. */ tar_output_ar_bsd(const file_output::pointer &ofp); /** * The default constructor. Do not use. */ tar_output_ar_bsd(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_output_ar_bsd(const tar_output_ar_bsd &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_output_ar_bsd &operator=(const tar_output_ar_bsd &rhs); }; #endif // LIBTARDY_TAR_OUTPUT_AR_BSD_H tardy-1.28/libtardy/tar/output/ar/pdp11.cc 644 0 0 712712163037023 166440ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include tar_output_ar_pdp11::~tar_output_ar_pdp11() { } tar_output_ar_pdp11::tar_output_ar_pdp11( const file_output::pointer &a_ofp, endian_t a_endian ) : tar_output_ar(a_ofp, 2), endian(a_endian) { } tar_output_ar_pdp11::pointer tar_output_ar_pdp11::create(const file_output::pointer &a_ofp, endian_t a_endian) { pointer p(new tar_output_ar_pdp11(a_ofp, a_endian)); p = tar_output_filter_ar_long_names::create(p); return tar_output_filter_basename::create(p); } tar_output_ar_pdp11::pointer tar_output_ar_pdp11::create_le(const file_output::pointer &a_ofp) { return create(a_ofp, endian_little); } tar_output_ar_pdp11::pointer tar_output_ar_pdp11::create_be(const file_output::pointer &a_ofp) { return create(a_ofp, endian_big); } static const unsigned MAGIC = 0177555; void tar_output_ar_pdp11::write_archive_begin(void) { unsigned char buffer[2]; put2(buffer, MAGIC); write_deeper(buffer, sizeof(buffer)); } #define min(a, b) ((a) < (b) ? (a) : (b)) void tar_output_ar_pdp11::write_header(const tar_header &hdr) { switch (hdr.type) { default: fatal("%s: file type not supported", hdr.name.c_str()); break; case tar_header::type_directory: // Silently ignore break; case tar_header::type_normal: case tar_header::type_normal_contiguous: // // Name Offset Size // ---- ------ ---- // name 0 8 // date 8 4 // uid 12 1 // gid 13 1 // mode 14 2 // size 16 2 // ---- ------ ---- // Total: 18 // unsigned char buffer[18]; size_t name_size = hdr.name.size(); if (name_size > 8) name_size = 8; memcpy(buffer, hdr.name.c_str(), name_size); memset(buffer + name_size, 0, 8 - name_size); put4(buffer + 8, hdr.mtime); buffer[12] = min(255, hdr.user_id); buffer[13] = min(255, hdr.group_id); put2(buffer + 14, calculate_mode(hdr)); if (hdr.size >= (1 << 16)) fatal("%s: file too large", hdr.name.c_str()); put2(buffer + 16, hdr.size); write_deeper(buffer, sizeof(buffer)); break; } } void tar_output_ar_pdp11::put2(unsigned char *data, unsigned value) const { endian_set2(data, value, endian); } void tar_output_ar_pdp11::put4(unsigned char *data, unsigned long value) const { put2(data, value >> 16); put2(data + 2, value); } const char * tar_output_ar_pdp11::get_format_name(void) const { return (endian == endian_little ? "ar-pdp11-le" : "ar-pdp11-be"); } size_t tar_output_ar_pdp11::get_maximum_name_length(void) const { return 8; } tardy-1.28/libtardy/tar/output/ar/pdp11.h 644 0 0 1005012163037023 165130ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_OUTPUT_AR_PDP11_H #define LIBTARDY_TAR_OUTPUT_AR_PDP11_H #include #include /** * The tar_output_ar_pdp11 class is used to represent the processing * required to write an ar(1) archive, in the (probably) oldest PDP11 * Unix format. */ class tar_output_ar_pdp11: public tar_output_ar { public: /** * The destructor. */ virtual ~tar_output_ar_pdp11(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param ofp * Where to write the archive data. * @param endian * The byte order to be used. */ static pointer create(const file_output::pointer &ofp, endian_t endian); /** * The create_be class method is used to create new dynamically * allocated instances of this class, using big-endian byte order. * * @param ofp * Where to write the archive data. */ static pointer create_be(const file_output::pointer &ofp); /** * The create_le class method is used to create new dynamically allocated * instances of this class, using little-endian byte order. The PDP11 was * a little endian machine, this is the authentic byte order. * * @param ofp * Where to write the archive data. */ static pointer create_le(const file_output::pointer &ofp); protected: // See base class for documentation. void write_archive_begin(void); // See base class for documentation. void write_header(const tar_header &hdr); // See base class for documentation. const char *get_format_name(void) const; // See base class for docuemntation. size_t get_maximum_name_length(void) const; private: /** * The constructor. * It is private on purpose, use a #create class method instead. * * @param ofp * Where to write the archive data. * @param endian * The byte order to be used. */ tar_output_ar_pdp11(const file_output::pointer &ofp, endian_t endian); /** * The endian instance variable is used to remember the byte order * to be used. */ endian_t endian; /** * The put2 method is used to insert a two byte value into a data * buffer. * * @param data * where to insert the two bytes * @param value * the value to be inserted */ void put2(unsigned char *data, unsigned value) const; /** * The put4 method is used to insert a four byte value into a data * buffer. * * @param data * where to insert the two bytes * @param value * the value to be inserted */ void put4(unsigned char *data, unsigned long value) const; /** * The default constructor. Do not use. */ tar_output_ar_pdp11(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_output_ar_pdp11(const tar_output_ar_pdp11 &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_output_ar_pdp11 &operator=(const tar_output_ar_pdp11 &rhs); }; #endif // LIBTARDY_TAR_OUTPUT_AR_PDP11_H tardy-1.28/libtardy/tar/output/ar/port5.cc 644 0 0 2004512163037023 170020ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include // // http://ftp.funet.fi/pub/unix/ctix/ar.h // // ARCHIVE File Organization: // // +---------------------------------------------+ // | ARCHIVE_HEADER_DATA | // + ----------------------------------------- + // | Archive Header "ar_hdr" | // ! ......................................... ! // | | // | Symbol Directory "ar_sym" | // | | // +---------------------------------------------+ // | ARCHIVE FILE MEMBER 1 | // + ----------------------------------------- + // | Archive File Header "arf_hdr" | // ! ......................................... ! // | Member Contents (either a.out.h | // | format or text file) | // +---------------------------------------------+ // | . . . | // | . . . | // | . . . | // +---------------------------------------------+ // | ARCHIVE FILE MEMBER n | // + ----------------------------------------- + // | Archive File Header "arf_hdr" | // ! ......................................... ! // | Member Contents (either a.out.h | // | format or text file) | // +---------------------------------------------+ // // // #define ARMAG "" // #define SARMAG 4 // // struct ar_hdr // archive header // { // char ar_magic[SARMAG]; // magic number // char ar_name[16]; // archive name // char ar_date[4]; // date of last archive modification // char ar_syms[4]; // number of ar_sym entries // }; // // struct ar_sym // archive symbol table entry // { // char sym_name[8]; // symbol name, recognized by ld // char sym_ptr[4]; // archive position of symbol // }; // // struct arf_hdr // archive file member header // { // char arf_name[16]; // file member name // char arf_date[4]; // file member date // char arf_uid[4]; // file member user identification // char arf_gid[4]; // file member group identification // char arf_mode[4]; // file member mode // char arf_size[4]; // file member size // }; // tar_output_ar_port5::~tar_output_ar_port5() { } tar_output_ar_port5::tar_output_ar_port5( const file_output::pointer &a_ofp, endian_t a_endian ) : tar_output_ar(a_ofp, 4), endian(a_endian) { } tar_output_ar_port5::pointer tar_output_ar_port5::create(const file_output::pointer &a_ofp, endian_t a_endian) { pointer p(new tar_output_ar_port5(a_ofp, a_endian)); p = tar_output_filter_ar_long_names::create(p); return tar_output_filter_basename::create(p); } tar_output_ar_port5::pointer tar_output_ar_port5::create_be(const file_output::pointer &a_ofp) { return create(a_ofp, endian_big); } tar_output_ar_port5::pointer tar_output_ar_port5::create_le(const file_output::pointer &a_ofp) { return create(a_ofp, endian_little); } const char * tar_output_ar_port5::get_format_name(void) const { return (endian == endian_little ? "ar-port5-le" : "ar-port5-be"); } void tar_output_ar_port5::write_archive_begin(void) { // // +---------------------------------------------+ // | ARCHIVE_HEADER_DATA | // + ----------------------------------------- + // | Archive Header "ar_hdr" | // ! ......................................... ! // | | // | Symbol Directory "ar_sym" | // | | // +---------------------------------------------+ // // struct ar_hdr // archive header // { // char ar_magic[SARMAG]; // magic number // char ar_name[16]; // archive name // char ar_date[4]; // date of last archive modification // char ar_syms[4]; // number of ar_sym entries // }; // // struct ar_sym // archive symbol table entry // { // char sym_name[8]; // symbol name, recognized by ld // char sym_ptr[4]; // archive position of symbol // }; // unsigned char buffer[28]; memcpy(buffer, "", 4); rcstring name = filename().basename(); size_t name_size = name.size(); if (name_size > 16) name_size = 16; memcpy(buffer + 4, name.c_str(), name_size); memset(buffer + 4 + name_size, 0, 16 - name_size); put4(buffer + 20, 0); put4(buffer + 24, 0); write_deeper(buffer, sizeof(buffer)); } void tar_output_ar_port5::write_header(const tar_header &hdr) { switch (hdr.type) { case tar_header::type_device_block: case tar_header::type_device_character: case tar_header::type_fifo: case tar_header::type_link_hard: case tar_header::type_link_symbolic: case tar_header::type_normal_gzipped: case tar_header::type_socket: fatal("%s: file type not supported", hdr.name.c_str()); break; case tar_header::type_directory: // Silently ignore. break; case tar_header::type_normal: case tar_header::type_normal_contiguous: // // +---------------------------------------------+ // | ARCHIVE FILE MEMBER 1 | // + ----------------------------------------- + // | Archive File Header "arf_hdr" | // ! ......................................... ! // | Member Contents (either a.out.h | // | format or text file) | // +---------------------------------------------+ // // struct arf_hdr // archive file member header // { // char arf_name[16]; // file member name // char arf_date[4]; // file member date // char arf_uid[4]; // file member user identification // char arf_gid[4]; // file member group identification // char arf_mode[4]; // file member mode // char arf_size[4]; // file member size // }; // unsigned char buffer[36]; size_t name_size = hdr.name.size(); if (name_size > 16) name_size = 16; memcpy(buffer, hdr.name.c_str(), name_size); memset(buffer + name_size, 0, 16 - name_size); put4(buffer + 16, hdr.mtime); put4(buffer + 20, hdr.user_id); put4(buffer + 24, hdr.group_id); put4(buffer + 28, calculate_mode(hdr)); put4(buffer + 32, hdr.size); write_deeper(buffer, sizeof(buffer)); break; } } void tar_output_ar_port5::put4(unsigned char *data, unsigned long value) const { endian_set4(data, value, endian); } size_t tar_output_ar_port5::get_maximum_name_length(void) const { return 16; } tardy-1.28/libtardy/tar/output/ar/port5.h 644 0 0 735712163037023 166370ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_OUTPUT_AR_CTIX_H #define LIBTARDY_TAR_OUTPUT_AR_CTIX_H #include #include /** * The tar_output_ar_port5 class is used to represent the processing * required to create an ar(1) archive in "port 5" format, aka "mc68k", * aka "ctix". */ class tar_output_ar_port5: public tar_output_ar { public: /** * The destructor. */ virtual ~tar_output_ar_port5(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param ofp * The file to write the binary archive to. * @param endian * The byte order to be used. */ static pointer create(const file_output::pointer &ofp, endian_t endian); /** * The create_be class method is used to create new dynamically * allocated instances of this class, using big-endian byte order. * * @param ofp * The file to write the binary archive to. */ static pointer create_be(const file_output::pointer &ofp); /** * The create_le class method is used to create new dynamically * allocated instances of this class, using little-endian byte order. * * @param ofp * The file to write the binary archive to. */ static pointer create_le(const file_output::pointer &ofp); protected: // See base class for documentation. void write_archive_begin(void); // See base class for documentation. void write_header(const tar_header &hdr); // See base class for documentation. const char *get_format_name(void) const; // See base class for docuemntation. size_t get_maximum_name_length(void) const; private: /** * The constructor. * It is private on purpose, use a #create class method instead. * * @param ofp * The file to write the binary archive to. * @param endian * The byte order to be used. */ tar_output_ar_port5(const file_output::pointer &ofp, endian_t endian); /** * The endian instance variable is used to remember the byte ordeer * to use. */ endian_t endian; /** * The put4 method is used to insert a four byte value into a data * buffer, using the current byte ordering. * * @param data * where to insert the two bytes * @param value * the value to be inserted */ void put4(unsigned char *data, unsigned long value) const; /** * The default constructor. Do not use. */ tar_output_ar_port5(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_output_ar_port5(const tar_output_ar_port5 &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_output_ar_port5 &operator=(const tar_output_ar_port5 &rhs); }; #endif // LIBTARDY_TAR_OUTPUT_AR_CTIX_H tardy-1.28/libtardy/tar/output/ar/v7.cc 644 0 0 734212163037023 162520ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include tar_output_ar_v7::~tar_output_ar_v7() { } tar_output_ar_v7::tar_output_ar_v7( const file_output::pointer &a_ofp, endian_t a_endian ) : tar_output_ar(a_ofp, 0), endian(a_endian) { } tar_output_ar_v7::pointer tar_output_ar_v7::create(const file_output::pointer &a_ofp, endian_t a_endian) { pointer p(new tar_output_ar_v7(a_ofp, a_endian)); p = tar_output_filter_ar_long_names::create(p); return tar_output_filter_basename::create(p); } tar_output_ar_v7::pointer tar_output_ar_v7::create_le(const file_output::pointer &a_ofp) { return create(a_ofp, endian_little); } tar_output_ar_v7::pointer tar_output_ar_v7::create_be(const file_output::pointer &a_ofp) { return create(a_ofp, endian_big); } void tar_output_ar_v7::write_archive_begin(void) { const int ARMAG = 0177545; unsigned char buffer[2]; put2(buffer, ARMAG); write_deeper(buffer, 2); } #define min(a, b) ((a) < (b) ? (a) : (b)) void tar_output_ar_v7::write_header(const tar_header &hdr) { switch (hdr.type) { case tar_header::type_device_block: case tar_header::type_device_character: case tar_header::type_fifo: case tar_header::type_link_hard: case tar_header::type_link_symbolic: case tar_header::type_normal_gzipped: case tar_header::type_socket: fatal("%s: file type not supported", hdr.name.c_str()); break; case tar_header::type_directory: break; case tar_header::type_normal: case tar_header::type_normal_contiguous: // // Name Offset Size // ---- ------ ---- // name 0 14 // date 14 4 // long in byte order 2 3 1 0 // uid 18 1 // gid 19 1 // mode 20 2 // short in byte order 0 1 // size 22 4 // long in byte order 2 3 1 0 // ---- ------ ---- // Total: 26 // unsigned char buffer[26]; size_t name_size = hdr.name.size(); if (name_size > 14) name_size = 14; memcpy(buffer, hdr.name.c_str(), name_size); memset(buffer + name_size, 0, 14 - name_size); put4(buffer + 14, hdr.mtime); buffer[18] = min(255, hdr.user_id); buffer[19] = min(255, hdr.group_id); put2(buffer + 20, hdr.mode); put4(buffer + 22, hdr.size); write_deeper(buffer, sizeof(buffer)); break; } } void tar_output_ar_v7::put2(unsigned char *data, unsigned value) const { endian_set2(data, value, endian); } void tar_output_ar_v7::put4(unsigned char *data, unsigned long value) const { put2(data, value >> 16); put2(data + 2, value); } const char * tar_output_ar_v7::get_format_name(void) const { return (endian == endian_little ? "ar-v7-le" : "ar-v7-be"); } size_t tar_output_ar_v7::get_maximum_name_length(void) const { return 14; } tardy-1.28/libtardy/tar/output/ar/v7.h 644 0 0 767512163037023 161250ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_OUTPUT_AR_V7_H #define LIBTARDY_TAR_OUTPUT_AR_V7_H #include #include /** * The tar_output_ar_v7 class is used to represent the processing * required to writa ean ar(1) archive in Unix Version 7 format. */ class tar_output_ar_v7: public tar_output_ar { public: /** * The destructor. */ virtual ~tar_output_ar_v7(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param ofp * The file to write the binary archive to. * @param endian * The byte order to be used. */ static pointer create(const file_output::pointer &ofp, endian_t endian); /** * The create_be class method is used to create new dynamically * allocated instances of this class, using big-endian byte order. * * @param ofp * The file to write the binary archive to. */ static pointer create_be(const file_output::pointer &ofp); /** * The create_le class method is used to create new dynamically * allocated instances of this class, using little-endian byte order. * * @param ofp * The file to write the binary archive to. */ static pointer create_le(const file_output::pointer &ofp); protected: // See base class for documentation. void write_archive_begin(void); // See base class for documentation. void write_header(const tar_header &hdr); // See base class for documentation. const char *get_format_name(void) const; // See base class for docuemntation. size_t get_maximum_name_length(void) const; private: /** * The default constructor. * It is private on purpose, use a #create class method instead. * * @param ofp * The file to write the binary archive to. * @param endian * The byte order to use. */ tar_output_ar_v7(const file_output::pointer &ofp, endian_t endian); /** * The endian instance variable is used to remember the byte ordeer * to use. */ endian_t endian; /** * The put2 method is used to insert a two byte value into a data * buffer. * * @param data * where to insert the two bytes * @param value * the value to be inserted */ void put2(unsigned char *data, unsigned value) const; /** * The put4 method is used to insert a four byte value into a data * buffer. * * @param data * where to insert the two bytes * @param value * the value to be inserted */ void put4(unsigned char *data, unsigned long value) const; /** * The default constructor. Do not use. */ tar_output_ar_v7(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_output_ar_v7(const tar_output_ar_v7 &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_output_ar_v7 &operator=(const tar_output_ar_v7 &rhs); }; #endif // LIBTARDY_TAR_OUTPUT_AR_V7_H tardy-1.28/libtardy/tar/output/cpio.cc 644 0 0 444012163037023 162420ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2003, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include tar_output_cpio::~tar_output_cpio() { } tar_output_cpio::tar_output_cpio( const file_output::pointer &a_fp, int a_padding ) : fp(a_fp), padding(a_padding), pos(0) { } void tar_output_cpio::write_header_padding(void) { write_padding(); } void tar_output_cpio::write_data(const void *data, int data_size) { write_deeper(data, data_size); } void tar_output_cpio::write_data_padding(void) { write_padding(); } void tar_output_cpio::write_padding(void) { if (padding <= 0) return; unsigned n = pos % padding; if (!n) return; // // This serves all class instances, even though the chances // of more than one are unlikely. Each instance could // have a different padding multiple. // static char *dummy; static size_t dummy_size; if (dummy_size < padding) { delete [] dummy; dummy_size = 16; while (dummy_size < padding) dummy_size <<= 1; dummy = new char [dummy_size]; memset(dummy, 0, dummy_size); } write_deeper(dummy, padding - n); } void tar_output_cpio::write_deeper(const void *data, size_t data_size) { fp->write(data, data_size); pos += data_size; } void tar_output_cpio::write_archive_end(void) { tar_header h; h.name = "TRAILER!!!"; h.inode_number = 0; write_header(h); write_header_padding(); write_data_padding(); } rcstring tar_output_cpio::filename(void) const { return fp->filename(); } tardy-1.28/libtardy/tar/output/cpio.h 644 0 0 725712163037023 161150ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_OUTPUT_CPIO_H #define LIBTARDY_TAR_OUTPUT_CPIO_H #include #include /** * The tar_output_tar abstract class reperesents a generic CPIO * formatted archive output, and the current state of the output. * (The leading tar_ prefix is an accident of history.) * * There are several cpio(5) formats, this class shall be further derived * to represent each kind. */ class tar_output_cpio: public tar_output { public: /** * The destructor. */ virtual ~tar_output_cpio(); protected: /** * The constructor. * For use by derived classes only. * * @param fp * The file to be written. * @param padding * The amount of bytes of data padding to use (zero or negative * mean none). */ tar_output_cpio(const file_output::pointer &fp, int padding); // See base class for documentation. virtual void write_header_padding(void); // See base class for documentation. virtual void write_data(const void *data, int data_size); // See base class for documentation. virtual void write_data_padding(void); // See base class for documentation. virtual void write_archive_end(void); // See base class for documentation. rcstring filename(void) const; /** * The write_deeper method is used to derived classes to write * directly to the binary archive. * * @param data * Pointer to the base of the array of bytes to be written. * @param data_size * Size of the base of the array of bytes to be written. */ void write_deeper(const void *data, size_t data_size); /** * The write_padding method may be used to write zero-valued bytes * upto the next padding boundary. */ void write_padding(void); private: /** * The fp instance variable is used to remember where to send the * output, usually the file to write the output to. */ file_output::pointer fp; /** * The padding instance variable is used to remember the byte * multiple that file headers and file data are to start on. Zero * means no alignment required. */ unsigned padding; /** * The pos instance variable is used to remember the output file * position, this is used when calculating how much padding to * insert. */ unsigned long pos; private: /** * The default constructor. Do not use. */ tar_output_cpio(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_output_cpio(const tar_output_cpio &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_output_cpio &operator = (const tar_output_cpio &rhs); }; #endif // LIBTARDY_TAR_OUTPUT_CPIO_H tardy-1.28/libtardy/tar/output/cpio/binary.cc 644 0 0 620112163037023 175230ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include tar_output_cpio_binary::~tar_output_cpio_binary() { } tar_output_cpio_binary::tar_output_cpio_binary( const file_output::pointer &a_ofp, endian_t a_endian ) : tar_output_cpio(a_ofp, 2), endian(a_endian) { } tar_output_cpio_binary::pointer tar_output_cpio_binary::create(const file_output::pointer &a_ofp, endian_t a_endian) { return pointer(new tar_output_cpio_binary(a_ofp, a_endian)); } tar_output_cpio_binary::pointer tar_output_cpio_binary::create_le(const file_output::pointer &a_ofp) { return create(a_ofp, endian_little); } tar_output_cpio_binary::pointer tar_output_cpio_binary::create_be(const file_output::pointer &a_ofp) { return create(a_ofp, endian_big); } tar_output_cpio_binary::pointer tar_output_cpio_binary::create_native_endian(const file_output::pointer &a_ofp) { return create(a_ofp, endian_native()); } void tar_output_cpio_binary::write_header(const tar_header &hdr) { char buffer[26]; set2(buffer, 070707); unsigned dev = (hdr.device_major << 8) | hdr.device_minor; set2(buffer + 2, dev); set2(buffer + 4, hdr.inode_number); set2(buffer + 6, calculate_mode(hdr)); set2(buffer + 8, hdr.user_id); set2(buffer + 10, hdr.group_id); set2(buffer + 12, hdr.link_count); unsigned rdev = (hdr.rdevice_major << 8) | hdr.rdevice_minor; set2(buffer + 14, rdev); set4(buffer + 16, hdr.mtime); unsigned name_size = hdr.name.size() + 1; set2(buffer + 20, name_size); set4(buffer + 22, hdr.size); write_deeper(buffer, sizeof(buffer)); write_deeper(hdr.name.c_str(), hdr.name.size() + 1); } void tar_output_cpio_binary::set2(void *data, unsigned value) const { endian_set2(data, value, endian); } void tar_output_cpio_binary::set4(void *data, unsigned long value) const { // // This is deeply weird. // // cpio(5) says "The four-byte integer is stored with the // most-significant 16 bits first followed by the least-significant // 16 bits. Each of the two 16 bit values are stored in // machine-native byte order." // unsigned char *p = (unsigned char *)data; set2(p, value >> 16); set2(p + 2, value); } const char * tar_output_cpio_binary::get_format_name(void) const { return (endian == endian_little ? "cpio-bin-le" : "cpio-bin-be"); } size_t tar_output_cpio_binary::get_maximum_name_length(void) const { return 0xFFFFuL; } tardy-1.28/libtardy/tar/output/cpio/binary.h 644 0 0 766112163037023 174000ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_OUTPUT_CPIO_BINARY_H #define LIBTARDY_TAR_OUTPUT_CPIO_BINARY_H #include #include /** * The tar_output_cpio_binary class is used to represent writing to a * "old binary" formatted cpio(5) archive. */ class tar_output_cpio_binary: public tar_output_cpio { public: /** * The destructor. */ virtual ~tar_output_cpio_binary(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param ofp * The file into which the archive is to be written. * @param endian * The byte order to be used when writing binary values into * the archive file. */ static pointer create(const file_output::pointer &ofp, endian_t endian); /** * The create_le class method is used to create new dynamically * allocated instances of this class, in little-endian order. * * @param ofp * The file into which the archive is to be written. */ static pointer create_le(const file_output::pointer &ofp); /** * The create_be class method is used to create new dynamically * allocated instances of this class, in big-endian order. * * @param ofp * The file into which the archive is to be written. */ static pointer create_be(const file_output::pointer &ofp); /** * The create_native_endian class method is used to create new * dynamically allocated instances of this class, in native byte * order. * * @param ofp * The file into which the archive is to be written. */ static pointer create_native_endian(const file_output::pointer &ofp); protected: // See base class for documentation. void write_header(const tar_header &hdr); // See base class for documentation. const char *get_format_name(void) const; // See base class for docuemntation. size_t get_maximum_name_length(void) const; private: /** * The constructor. * It is private on purpose, use a #create class method instead. * * @param ofp * The file into which the archive is to be written. * @param endian * The byte order to be used when writing binary values into * the archive file. */ tar_output_cpio_binary(const file_output::pointer &ofp, endian_t endian); /** * The endian instance variable is used to remember the byte * ordering to be used in the output file. */ endian_t endian; void set2(void *data, unsigned value) const; void set4(void *data, unsigned long value) const; /** * The default constructor. Do not use. */ tar_output_cpio_binary(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_output_cpio_binary(const tar_output_cpio_binary &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_output_cpio_binary &operator=(const tar_output_cpio_binary &rhs); }; #endif // LIBTARDY_TAR_OUTPUT_CPIO_BINARY_H tardy-1.28/libtardy/tar/output/cpio/crc.cc 644 0 0 575012163037023 170160ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include tar_output_cpio_crc::~tar_output_cpio_crc() { } tar_output_cpio_crc::tar_output_cpio_crc(const file_output::pointer &a_fp) : tar_output_cpio(a_fp, 4), running_checksum(0) { } tar_output::pointer tar_output_cpio_crc::create(const file_output::pointer &a_fp) { return pointer(new tar_output_cpio_crc(a_fp)); } void tar_output_cpio_crc::write_header(const tar_header &h) { current_header = h; current_data.clear(); running_checksum = 0; } void tar_output_cpio_crc::write_header_padding(void) { } void tar_output_cpio_crc::write_data(const void *data, int data_size) { current_data.push_back(data, data_size); const unsigned char *p = (const unsigned char *)data; for (int j = 0; j < data_size; ++j) running_checksum += *p++; } void tar_output_cpio_crc::write_data_padding(void) { char buffer[112]; snprintf ( buffer, sizeof(buffer), "%6s%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx", "070702", current_header.inode_number, (long)calculate_mode(current_header), current_header.user_id, current_header.group_id, current_header.link_count, current_header.mtime, current_header.size, current_header.device_major, current_header.device_minor, current_header.rdevice_major, current_header.rdevice_minor, (long)current_header.name.size() + 1, // // From Linux cpio(5): // "The check field is set to the sum of all bytes in the file data. // This sum is computed treating all bytes as unsigned values and using // unsigned arithmetic. Only the least-significant 32 bits of the sum // are stored." // running_checksum ); write_deeper(buffer, 110); write_deeper(current_header.name.c_str(), current_header.name.size() + 1); write_padding(); write_deeper(current_data.get_data(), current_data.size()); write_padding(); current_data.clear(); running_checksum = 0; } const char * tar_output_cpio_crc::get_format_name(void) const { return "cpio-crc"; } size_t tar_output_cpio_crc::get_maximum_name_length(void) const { return 0; } tardy-1.28/libtardy/tar/output/cpio/crc.h 644 0 0 702012163037023 166500ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_OUTPUT_CPIO_CRC_H #define LIBTARDY_TAR_OUTPUT_CPIO_CRC_H #include #include /** * The tar_output_cpio_newascii class is used to represent writing to a * "crc" formatted CPIO archive. * * This format includes a checksum in each file header. The header * data ia cached, and the file data is also chached. At the end of * each file, the archive header is written, with the correct checksum, * and then the file data. This assumes enough memory is available. */ class tar_output_cpio_crc: public tar_output_cpio { public: /** * The destructor. */ virtual ~tar_output_cpio_crc(); /** * The create class method is sued to create new dynamically * allocated instances of the class. * * @param fp * The file to be written. */ static pointer create(const file_output::pointer &fp); protected: // See base class for documentation. void write_header(const tar_header &); // See base class for documentation. void write_header_padding(void); // See base class for documentation. void write_data(const void *data, int data_size); // See base class for documentation. void write_data_padding(void); // See base class for documentation. const char *get_format_name(void) const; // See base class for docuemntation. size_t get_maximum_name_length(void) const; private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param fp * The file to be written. */ tar_output_cpio_crc(const file_output::pointer &fp); /** * The current_header instance variable is used to remember the * file meta-data for the file we will emit shortly. */ tar_header current_header; /** * The current_data instance variable is used to remember the file * contents for the file we will emit shortly. */ rcstring_accumulator current_data; /** * The running_checksum instance variable is used to remember the * file contents checksum for the file we will emit shortly. */ unsigned long running_checksum; /** * The default constructor. Do not use. */ tar_output_cpio_crc(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_output_cpio_crc(const tar_output_cpio_crc &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_output_cpio_crc &operator = (const tar_output_cpio_crc &rhs); }; #endif // LIBTARDY_TAR_OUTPUT_CPIO_CRC_H tardy-1.28/libtardy/tar/output/cpio/newascii.cc 644 0 0 401312163037023 200400ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include tar_output_cpio_newascii::~tar_output_cpio_newascii() { } tar_output_cpio_newascii::tar_output_cpio_newascii( const file_output::pointer &a_fp ) : tar_output_cpio(a_fp, 4) { } tar_output::pointer tar_output_cpio_newascii::create(const file_output::pointer &a_fp) { return pointer(new tar_output_cpio_newascii(a_fp)); } void tar_output_cpio_newascii::write_header(const tar_header &h) { char buffer[112]; snprintf ( buffer, sizeof(buffer), "%6s%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx%08lx", "070701", h.inode_number, (long)calculate_mode(h), h.user_id, h.group_id, h.link_count, h.mtime, h.size, h.device_major, h.device_minor, h.rdevice_major, h.rdevice_minor, (long)h.name.size() + 1, (long)0 // no checksum, for this format ); write_deeper(buffer, 110); write_deeper(h.name.c_str(), h.name.size() + 1); } const char * tar_output_cpio_newascii::get_format_name(void) const { return "cpio-new-ascii"; } size_t tar_output_cpio_newascii::get_maximum_name_length(void) const { return ((size_t)1 << (3 * 8)); } tardy-1.28/libtardy/tar/output/cpio/newascii.h 644 0 0 475712163037023 177210ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_OUTPUT_CPIO_NEWASCII_H #define LIBTARDY_TAR_OUTPUT_CPIO_NEWASCII_H #include /** * The tar_output_cpio_newascii class is used to represent writing to a * "new" ascii formatted CPIO archive. */ class tar_output_cpio_newascii: public tar_output_cpio { public: /** * The destructor. */ virtual ~tar_output_cpio_newascii(); /** * The create class method is sued to create new dynamically * allocated instances of the class. * * @param fp * The file to be written. */ static pointer create(const file_output::pointer &fp); protected: // See base class for documentation. virtual void write_header(const tar_header &); // See base class for documentation. const char *get_format_name(void) const; // See base class for docuemntation. size_t get_maximum_name_length(void) const; private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param fp * The file to be written. */ tar_output_cpio_newascii(const file_output::pointer &fp); /** * The default constructor. Do not use. */ tar_output_cpio_newascii(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_output_cpio_newascii(const tar_output_cpio_newascii &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_output_cpio_newascii &operator = (const tar_output_cpio_newascii &rhs); }; #endif // LIBTARDY_TAR_OUTPUT_CPIO_NEWASCII_H tardy-1.28/libtardy/tar/output/cpio/oldascii.cc 644 0 0 432312163037023 200310ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include tar_output_cpio_oldascii::~tar_output_cpio_oldascii() { } tar_output_cpio_oldascii::tar_output_cpio_oldascii( const file_output::pointer &a_fp ) : tar_output_cpio(a_fp, 2) { } tar_output::pointer tar_output_cpio_oldascii::create(const file_output::pointer &a_fp) { return pointer(new tar_output_cpio_oldascii(a_fp)); } void tar_output_cpio_oldascii::write_header(const tar_header &h) { char buffer[78]; int dev = ((h.device_major & 0xFF) << 8) | (h.device_minor & 0xFF); int rdev = ((h.rdevice_major & 0xFF) << 8) | (h.rdevice_minor & 0xFF); snprintf ( buffer, sizeof(buffer), "%06o%06o%06lo%06lo%06lo%06lo%06lo%06o%011lo%06lo%011lo", 070707, dev & 0777777, h.inode_number & 0x777777, (long)calculate_mode(h) & 07777, h.user_id & 0777777, h.group_id & 0777777, h.link_count & 0777777, rdev & 0777777, h.mtime & 07777777777, (long)h.name.size() + 1, h.size ); write_deeper(buffer, 76); write_deeper(h.name.c_str(), h.name.size() + 1); } void tar_output_cpio_oldascii::write_header_padding(void) { // no header padding, only data padding } const char * tar_output_cpio_oldascii::get_format_name(void) const { return "cpio-old-ascii"; } size_t tar_output_cpio_oldascii::get_maximum_name_length(void) const { return ((size_t)1 << (3 * 6)); } tardy-1.28/libtardy/tar/output/cpio/oldascii.h 644 0 0 506412163037023 176760ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_OUTPUT_CPIO_OLDASCII_H #define LIBTARDY_TAR_OUTPUT_CPIO_OLDASCII_H #include /** * The tar_output_cpio_oldascii class is used to represent writing to an * "old" ascii formatted CPIO archive. */ class tar_output_cpio_oldascii: public tar_output_cpio { public: /** * The destructor. */ virtual ~tar_output_cpio_oldascii(); /** * The create class method is used to create new dynamically * allocated isntances of this class. * * @param fp * The output file to be written. */ static pointer create(const file_output::pointer &fp); protected: // See base class for documentation. virtual void write_header(const tar_header &); // See base class for documentation. virtual void write_header_padding(void); // See base class for documentation. const char *get_format_name(void) const; // See base class for docuemntation. size_t get_maximum_name_length(void) const; private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param fp * The output file to be written. */ tar_output_cpio_oldascii(const file_output::pointer &fp); public: /** * The default constructor. Do not use. */ tar_output_cpio_oldascii(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_output_cpio_oldascii(const tar_output_cpio_oldascii &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_output_cpio_oldascii &operator = (const tar_output_cpio_oldascii &rhs); }; #endif // LIBTARDY_TAR_OUTPUT_CPIO_OLDASCII_H tardy-1.28/libtardy/tar/output/extract.cc 644 0 0 1101012163037023 167710ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include #include #include #include #include #include tar_output_extract::~tar_output_extract() { } tar_output_extract::tar_output_extract() : fd(-1) { } tar_output_extract::pointer tar_output_extract::create(void) { return pointer(new tar_output_extract()); } void tar_output_extract::write_header(const tar_header &hdr) { assert(fd == -1); current_header = hdr; } static void mkdir_p(const rcstring &path) { if (mkdir(path.c_str(), 0755) >= 0) return; if (errno != ENOENT) return; mkdir_p(path.dirname()); mkdir(path.c_str(), 0755); } void tar_output_extract::write_header_padding(void) { assert(fd == -1); mkdir_p(current_header.name.dirname()); switch (current_header.type) { case tar_header::type_device_block: fatal ( "not creating block special device %s", current_header.name.quote_c().c_str() ); break; case tar_header::type_device_character: fatal ( "not creating character special device %s", current_header.name.quote_c().c_str() ); break; case tar_header::type_directory: explain_mkdir_or_die(current_header.name.c_str(), current_header.mode); break; case tar_header::type_fifo: fatal ( "not creating fifo %s", current_header.name.quote_c().c_str() ); break; case tar_header::type_link_hard: fatal ( "not creating hard link %s", current_header.name.quote_c().c_str() ); break; case tar_header::type_link_symbolic: fatal ( "not creating symbolic link %s", current_header.name.quote_c().c_str() ); break; case tar_header::type_normal: case tar_header::type_normal_contiguous: fd = explain_creat_or_die ( current_header.name.c_str(), current_header.mode ); break; case tar_header::type_normal_gzipped: assert(!"not implemented yet"); break; case tar_header::type_socket: fatal ( "not creating socket %s", current_header.name.quote_c().c_str() ); break; default: assert(!"these aren't the droids you are looking for"); break; } } void tar_output_extract::write_data(void const *data, int data_size) { assert(fd >= 0); ssize_t nbytes = explain_write_or_die(fd, data, data_size); if (nbytes != data_size) fatal("short write (expected %d, got %ld)", data_size, (long)nbytes); } void tar_output_extract::write_data_padding(void) { switch (current_header.type) { case tar_header::type_device_block: case tar_header::type_device_character: case tar_header::type_directory: case tar_header::type_fifo: case tar_header::type_link_hard: case tar_header::type_link_symbolic: case tar_header::type_socket: assert(fd == -1); break; case tar_header::type_normal: case tar_header::type_normal_contiguous: assert(fd >= 0); explain_close_or_die(fd); fd = -1; break; case tar_header::type_normal_gzipped: assert(!"not implemented yet"); break; } } rcstring tar_output_extract::filename(void) const { return "extracting"; } const char * tar_output_extract::get_format_name(void) const { return "extract"; } size_t tar_output_extract::get_maximum_name_length(void) const { return PATH_MAX; } tardy-1.28/libtardy/tar/output/extract.h 644 0 0 502012163037023 166170ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_OUTPUT_EXTRACT_H #define LIBTARDY_TAR_OUTPUT_EXTRACT_H #include /** * The tar_output_extract class is used to represent the processing * required to extract the files form an archive. */ class tar_output_extract: public tar_output { public: typedef boost::shared_ptr pointer; /** * The destructor. */ virtual ~tar_output_extract(); /** * The create class method is used to create new dynamically * allocated instances of this class. */ static pointer create(void); protected: // See base class for documentation. void write_header(const tar_header &hdr); // See base class for documentation. void write_header_padding(void); // See base class for documentation. void write_data(const void *data, int data_size); // See base class for documentation. void write_data_padding(void); // See base class for documentation. rcstring filename(void) const; // See base class for documentation. const char *get_format_name(void) const; // See base class for docuemntation. size_t get_maximum_name_length(void) const; private: int fd; tar_header current_header; /** * The default constructor. * It is private on purpose, use a #create class method instead. */ tar_output_extract(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_output_extract(const tar_output_extract &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_output_extract &operator=(const tar_output_extract &rhs); }; #endif // LIBTARDY_TAR_OUTPUT_EXTRACT_H tardy-1.28/libtardy/tar/output/filter.cc 644 0 0 341712163037023 166000ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2003, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include tar_output_filter::~tar_output_filter() { } tar_output_filter::tar_output_filter(const tar_output::pointer &a_deeper) : deeper(a_deeper) { } void tar_output_filter::write_header(const tar_header &arg) { deeper->write_header(arg); } void tar_output_filter::write_header_padding(void) { deeper->write_header_padding(); } void tar_output_filter::write_data(const void *arg1, int arg2) { deeper->write_data(arg1, arg2); } void tar_output_filter::write_data_padding(void) { deeper->write_data_padding(); } rcstring tar_output_filter::filename(void) const { return deeper->filename(); } void tar_output_filter::write_archive_begin(void) { deeper->write_archive_begin(); } void tar_output_filter::write_archive_end(void) { deeper->write_archive_end(); } const char * tar_output_filter::get_format_name(void) const { return deeper->get_format_name(); } size_t tar_output_filter::get_maximum_name_length(void) const { return deeper->get_maximum_name_length(); } tardy-1.28/libtardy/tar/output/filter.h 644 0 0 564512163037023 164470ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2003, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_OUTPUT_FILTER_H #define LIBTARDY_TAR_OUTPUT_FILTER_H #include /** * The tar_output_filter class is used to represent a generic filter * class which modifies the file headers or data in some way. * The default operation of the methods of this class is to forward the * operation to the deepr instance; derived classes will override those * methods which need a different behaviour. */ class tar_output_filter: public tar_output { public: /** * The destructor. */ virtual ~tar_output_filter(); protected: /** * The constructor. * For use by derived classes only. * * @param deeper * The underlying archive to be written to. */ tar_output_filter(const tar_output::pointer &deeper); // See base class for documentation. void write_header(const tar_header &); // See base class for documentation. void write_header_padding(void); // See base class for documentation. void write_data(const void *, int); // See base class for documentation. void write_data_padding(void); // See base class for documentation. rcstring filename(void) const; // See base class for documentation. const char *get_format_name(void) const; // See base class for documentation. void write_archive_begin(void); // See base class for documentation. void write_archive_end(void); // See base class for docuemntation. size_t get_maximum_name_length(void) const; private: /** * The deeper instance variable is used to remember where the * filtered output is to be sent. */ tar_output::pointer deeper; /** * The default constructor. Do not use. */ tar_output_filter(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_output_filter(const tar_output_filter &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_output_filter &operator=(const tar_output_filter &rhs); }; #endif // LIBTARDY_TAR_OUTPUT_FILTER_H tardy-1.28/libtardy/tar/output/filter/ar_long_names.cc 644 0 0 1121112163037023 214130ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include tar_output_filter_ar_long_names::~tar_output_filter_ar_long_names() { } tar_output_filter_ar_long_names::tar_output_filter_ar_long_names( const pointer &a_deeper ) : tar_output_filter(a_deeper) { } tar_output_filter_ar_long_names::pointer tar_output_filter_ar_long_names::create(const pointer &a_deeper) { return pointer(new tar_output_filter_ar_long_names(a_deeper)); } void tar_output_filter_ar_long_names::write_header(const tar_header &hdr) { current_header = hdr; current_data.clear(); switch (hdr.type) { case tar_header::type_directory: // silently ignore break; case tar_header::type_normal: case tar_header::type_normal_contiguous: break; default: fatal("file %s type not supported", hdr.name.quote_c().c_str()); break; } } void tar_output_filter_ar_long_names::write_header_padding(void) { // Do nothing. } void tar_output_filter_ar_long_names::write_data(const void *data, int data_size) { assert(data_size >= 0); current_data.push_back(data, data_size); } void tar_output_filter_ar_long_names::write_data_padding(void) { switch (current_header.type) { case tar_header::type_normal: case tar_header::type_normal_contiguous: break; default: return; } // stash the file and its data contents.push_back(contents_t::value_type(current_header, current_data)); // frugal current_data.clear(); } static bool needs_name_map(const rcstring &name, size_t max) { if (max == 0) return false; return ( name.empty() || name.size() > max || strchr(name.c_str(), ' ') || strchr(name.c_str(), '/') || strchr(name.c_str(), '\n') ); } void tar_output_filter_ar_long_names::write_archive_end(void) { size_t maxnamlen = tar_output_filter::get_maximum_name_length(); rcstring_accumulator index_data; for (contents_t::iterator it = contents.begin(); it != contents.end(); ++it) { tar_header &hdr = it->first; if (needs_name_map(hdr.name, maxnamlen)) { rcstring new_name = rcstring::printf("/%lu", (unsigned long)index_data.size()); rcstring old_name = hdr.name; if (old_name.empty()) old_name = " "; else old_name = old_name.substitute("\n", " "); index_data.push_back(old_name); index_data.push_back("/\n"); hdr.name = new_name; } } // // Only write an index file if it has some contents. // if (!index_data.empty()) { tar_header index_hdr; index_hdr.name = "//"; index_hdr.type = tar_header::type_normal; index_hdr.size = index_data.size(); tar_output_filter::write_header(index_hdr); tar_output_filter::write_header_padding(); tar_output_filter::write_data(index_data.get_data(), index_data.size()); tar_output_filter::write_data_padding(); // frugal index_data.clear(); } // // Write each archive member to the output, // the names have been mapped already. // for (contents_t::iterator it = contents.begin(); it != contents.end(); ++it) { tar_header &hdr = it->first; tar_output_filter::write_header(hdr); tar_output_filter::write_header_padding(); const rcstring_accumulator &data = it->second; tar_output_filter::write_data(data.get_data(), data.size()); tar_output_filter::write_data_padding(); } // frugal contents.clear(); // // finialize the resulting archive // tar_output_filter::write_archive_end(); } size_t tar_output_filter_ar_long_names::get_maximum_name_length(void) const { return 0; } tardy-1.28/libtardy/tar/output/filter/ar_long_names.h 644 0 0 750512163037023 212500ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_OUTPUT_FILTER_AR_LONG_NAMES_H #define LIBTARDY_TAR_OUTPUT_FILTER_AR_LONG_NAMES_H #include #include #include #include /** * The tar_output_filter_ar_long_names class is used to represent * writing an ar(10 archive, using the first form of long name mapping, * the use of an initial index file. * * Because the index file has to be written first, we are going to need * to spools the entire contents, and then write the index file, and * then write the archive contents. */ class tar_output_filter_ar_long_names: public tar_output_filter { public: /** * The destructor. */ virtual ~tar_output_filter_ar_long_names(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * The underlying archive to be written to. */ static pointer create(const pointer &deeper); protected: // See base class for documentation. void write_header(const tar_header &hdr); // See base class for documentation. void write_header_padding(void); // See base class for documentation. void write_data(const void *data, int data_size); // See base class for documentation. void write_data_padding(void); // See base class for documentation. void write_archive_end(void); // See base class for documentation. size_t get_maximum_name_length(void) const; private: /** * The default constructor. * It is private on purpose, use a #create class method instead. * * @param deeper * The underlying archive to be written to. */ tar_output_filter_ar_long_names(const pointer &deeper); typedef std::list > contents_t; /** * The contents instance variable is used to remember each * individual archive member, because we can't write the first * archive member (the name map) until we have seen all of the * archive members. */ contents_t contents; /** * The current_header instance variable is used to remember the * meta-data for the archive member being processed at the moment. */ tar_header current_header; /** * The current_data instance variable is used to remember the file * data for the archive member being processed at the moment. */ rcstring_accumulator current_data; /** * The default constructor. Do not use. */ tar_output_filter_ar_long_names(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_output_filter_ar_long_names(const tar_output_filter_ar_long_names &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_output_filter_ar_long_names &operator=( const tar_output_filter_ar_long_names &rhs); }; #endif // LIBTARDY_TAR_OUTPUT_FILTER_AR_LONG_NAMES_H tardy-1.28/libtardy/tar/output/filter/ar_long_names2.cc 644 0 0 633012163037023 214630ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include tar_output_filter_ar_long_names2::~tar_output_filter_ar_long_names2() { } tar_output_filter_ar_long_names2::tar_output_filter_ar_long_names2( const pointer &a_deeper ) : tar_output_filter(a_deeper), name_is_long(false) { } tar_output_filter_ar_long_names2::pointer tar_output_filter_ar_long_names2::create(const pointer &a_deeper) { return pointer(new tar_output_filter_ar_long_names2(a_deeper)); } static bool name_is_oops(const rcstring &name, size_t max) { return ( name.empty() || name.size() > max || memchr(name.c_str(), '/', name.size()) || memchr(name.c_str(), ' ', name.size()) ); } void tar_output_filter_ar_long_names2::write_header(const tar_header &hdr) { name_cache.clear(); name_is_long = false; switch (hdr.type) { case tar_header::type_directory: // silently ignore break; case tar_header::type_normal: case tar_header::type_normal_contiguous: break; default: fatal("file %s type not supported", hdr.name.quote_c().c_str()); break; } size_t maxnamlen = tar_output_filter::get_maximum_name_length(); name_is_long = name_is_oops(hdr.name, maxnamlen); if (name_is_long) { // // "If any file name is more than 16 characters in length or contains // an embedded space, the string "#1/" followed by the ASCII length of // the name is written in the name field. The file size (stored in the // archive header) is incremented by the length of the name. The name // is then written immediately following the archive header." // name_cache = hdr.name; tar_header h2 = hdr; h2.name = rcstring::printf("#1/%lu", hdr.name.size()); h2.size += hdr.name.size(); tar_output_filter::write_header(h2); } else { tar_output_filter::write_header(hdr); } } void tar_output_filter_ar_long_names2::write_header_padding(void) { tar_output_filter::write_header_padding(); if (name_is_long) { // // "The name is then written immediately following the archive header." // tar_output_filter::write_data(name_cache.c_str(), name_cache.size()); name_is_long = false; name_cache.clear(); } } size_t tar_output_filter_ar_long_names2::get_maximum_name_length(void) const { return 0; } tardy-1.28/libtardy/tar/output/filter/ar_long_names2.h 644 0 0 715412163037023 213320ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_OUTPUT_FILTER_AR_LONG_NAMES2_H #define LIBTARDY_TAR_OUTPUT_FILTER_AR_LONG_NAMES2_H #include /** * The tar_output_filter_ar_long_names2 class is used to represent * a filter for adding long archive member names, by inserting the * name in the start of the data. You can recognise this format byte * "#1/nnn" file names. * * The advantage of this method over the other (see the * #tar_output_filter_ar_long_names class) is that you can do it as * the archive members stream past, and there is no need to build and * remember a name mapping pseudo-file. * * "If any file name is more than 16 characters in length or contains an * embedded space, the string "#1/" followed by the ASCII length of the * name is written in the name field. The file size (stored in the archive * header) is incremented by the length of the name. The name is then * written immediately following the archive header." */ class tar_output_filter_ar_long_names2: public tar_output_filter { public: /** * The destructor. */ virtual ~tar_output_filter_ar_long_names2(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * The underlying archive to be written to. */ static pointer create(const pointer &deeper); protected: // See base class for docuemntation. void write_header(const tar_header &hdr); // See base class for docuemntation. void write_header_padding(void); // See base class for docuemntation. size_t get_maximum_name_length(void) const; private: /** * The default constructor. * It is private on purpose, use a #create class method instead. * * @param deeper * The underlying archive to be written to. */ tar_output_filter_ar_long_names2(const pointer &deeper); /** * The name_is_long instance variable is used to remember whether * or not a long name is being written into the archive. */ bool name_is_long; /** * The name_cache instance variable is used to remember the long * name to be written into the archive (if #name_is_long is true). */ rcstring name_cache; /** * The default constructor. Do not use. */ tar_output_filter_ar_long_names2(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_output_filter_ar_long_names2( const tar_output_filter_ar_long_names2 &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_output_filter_ar_long_names2 &operator=( const tar_output_filter_ar_long_names2 &rhs); }; #endif // LIBTARDY_TAR_OUTPUT_FILTER_AR_LONG_NAMES2_H tardy-1.28/libtardy/tar/output/filter/basename.cc 644 0 0 250412163037023 203470ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include tar_output_filter_basename::~tar_output_filter_basename() { } tar_output_filter_basename::tar_output_filter_basename( const pointer &a_deeper ) : tar_output_filter(a_deeper) { } tar_output_filter_basename::pointer tar_output_filter_basename::create(const pointer &a_deeper) { return pointer(new tar_output_filter_basename(a_deeper)); } void tar_output_filter_basename::write_header(const tar_header &hdr) { tar_header h2 = hdr; h2.name = h2.name.basename(); if (h2.name.empty()) h2.name = "."; tar_output_filter::write_header(h2); } tardy-1.28/libtardy/tar/output/filter/basename.h 644 0 0 461712163037023 202200ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_OUTPUT_FILTER_BASENAME_H #define LIBTARDY_TAR_OUTPUT_FILTER_BASENAME_H #include /** * The tar_output_filter_basename class is used to represent * the removal of all but the final path conponent from file names. * * This is used by the ar(1) classes, as they do not store directory * components in their names (almost always they have very little room * for file names). */ class tar_output_filter_basename: public tar_output_filter { public: /** * The destructor. */ virtual ~tar_output_filter_basename(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param deeper * The underlying archive to be written to. */ static pointer create(const pointer &deeper); protected: // See base class for documentation. void write_header(const tar_header &); private: /** * The default constructor. * It is private on purpose, use a #create class method instead. * * @param deeper * The underlying archive to be written to. */ tar_output_filter_basename(const pointer &deeper); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_output_filter_basename(const tar_output_filter_basename &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialisation. */ tar_output_filter_basename &operator=( const tar_output_filter_basename &rhs); }; #endif // LIBTARDY_TAR_OUTPUT_FILTER_BASENAME_H tardy-1.28/libtardy/tar/output/filter/gzip.cc 644 0 0 1663312163037023 175750ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2003, 2008-2011 Peter Miller // // 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 3 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, see . // #include #include #include #include #include #include #include #include #include #ifndef Z_BUFSIZE #ifdef MAXSEG_64K #define Z_BUFSIZE 4096 // minimize memory usage for 16-bit DOS #else #define Z_BUFSIZE 16384 #endif #endif tar_output_filter_gzip::~tar_output_filter_gzip() { delete outbuf; } tar_output_filter_gzip::tar_output_filter_gzip( const tar_output::pointer &a_deeper ) : tar_output_filter(a_deeper), pass_through(true), outbuf(0), crc(0) { } tar_output::pointer tar_output_filter_gzip::create(const tar_output::pointer &a_deeper) { return pointer(new tar_output_filter_gzip(a_deeper)); } // // Outputs a long in LSB order to the given file // (little endian) // static void put_long(FILE *fp, unsigned long x) { unsigned char buffer[4]; buffer[0] = x; buffer[1] = x >> 8; buffer[2] = x >> 16; buffer[3] = x >> 24; fwrite(buffer, 1, sizeof(buffer), fp); } void tar_output_filter_gzip::write_header(const tar_header &arg) { if (arg.type != tar_header::type_normal) { pass_through = true; tar_output_filter::write_header(arg); return; } if (arg.size <= 1024) { // Don't bother with files which are too small to compress usefully. pass_through = true; tar_output_filter::write_header(arg); return; } pass_through = false; // // Remember the header for later use. // hdr = arg; // // Open a temporary file to hold the compressed file. // static char filename_template[] = "/tmp/tardy-XXXXXX"; char tfn[sizeof(filename_template)]; memcpy(tfn, filename_template, sizeof(tfn)); int fd = explain_mkstemp_or_die(tfn); temp_filename = tfn; FILE *fp = fdopen(fd, "w+b"); temp_fp = fp; // // Initialize the compression engine. // crc = crc32(0L, Z_NULL, 0); stream.avail_in = 0; stream.avail_out = 0; stream.next_in = NULL; stream.next_out = NULL; stream.opaque = (voidpf)0; stream.zalloc = (alloc_func)0; stream.zfree = (free_func)0; // // Set the parameters for the compression. // Note: windowBits is passed < 0 to suppress zlib header. // int err = deflateInit2 ( &stream, Z_BEST_COMPRESSION, // level Z_DEFLATED, // method -MAX_WBITS, // windowBits DEF_MEM_LEVEL, // memLevel Z_DEFAULT_STRATEGY // strategy ); if (err != Z_OK) drop_dead(err); if (!outbuf) outbuf = new Byte[Z_BUFSIZE]; stream.next_out = outbuf; stream.avail_out = Z_BUFSIZE; // // Write a very simple .gz header: // static unsigned char ghdr[] = { 0x1F, 0x8B, // gzip magic number Z_DEFLATED, // method Z_FLAG_EXTRA_FIELD, // flags 0, 0, 0, 0, // time 0, // xflags 3, // always use unix OS_CODE 4, 0, // extra length }; fwrite(ghdr, 1, sizeof(ghdr), fp); put_long(fp, hdr.size); } void tar_output_filter_gzip::write_header_padding() { if (pass_through) tar_output_filter::write_header_padding(); } void tar_output_filter_gzip::write_data(const void *data, int len) { if (pass_through) { tar_output_filter::write_data(data, len); return; } FILE *fp = (FILE *)temp_fp; stream.next_in = (Bytef *)data; stream.avail_in = len; while (stream.avail_in != 0) { if (stream.avail_out == 0) { explain_fwrite_or_die(outbuf, Z_BUFSIZE, 1, fp); stream.next_out = outbuf; stream.avail_out = Z_BUFSIZE; } int err = deflate(&stream, Z_NO_FLUSH); if (err != Z_OK) drop_dead(err); } crc = crc32(crc, (Bytef *)data, len); } void tar_output_filter_gzip::write_data_padding() { if (!pass_through) { FILE *fp = (FILE *)temp_fp; // // finish sending the compressed stream // stream.avail_in = 0; // should be zero already anyway if (stream.avail_out == 0) { explain_fwrite_or_die(outbuf, 1, Z_BUFSIZE, fp); stream.next_out = outbuf; stream.avail_out = Z_BUFSIZE; } for (;;) { int err = deflate(&stream, Z_FINISH); if (err < 0) drop_dead(err); size_t len = Z_BUFSIZE - stream.avail_out; if (!len) break; explain_fwrite_or_die(outbuf, len, 1, fp); stream.next_out = outbuf; stream.avail_out = Z_BUFSIZE; } // // and the trailer // put_long(fp, crc); put_long(fp, stream.total_in); explain_fflush_or_die(fp); // // Clean up any resources we were using. // if (stream.state != NULL) deflateEnd(&stream); // // Now we have the temporary file, we know the size of the // compressed data, so we are able to write the tar file header // for the compressed form into the archive. // tar_header nhdr = hdr; nhdr.type = tar_header::type_normal_gzipped; nhdr.size = ftell(fp); tar_output_filter::write_header(nhdr); tar_output_filter::write_header_padding(); // // Transfer the data from the temporary file into the archive. // rewind(fp); for (long opos = 0; opos < nhdr.size;) { unsigned long ret; unsigned long nbytes = nhdr.size - opos; if (nbytes > Z_BUFSIZE) nbytes = Z_BUFSIZE; ret = explain_fread_or_die(outbuf, 1, nbytes, fp); if (ret != nbytes) { fatal ( "%s: short read (requested %lu, got %lu)", filename().c_str(), (unsigned long)nbytes, (unsigned long)ret ); } tar_output_filter::write_data(outbuf, nbytes); opos += nbytes; } fclose(fp); temp_fp = 0; unlink(temp_filename.c_str()); // // Go back to pass through mode (the default). // pass_through = true; } // // Write the data padding to the deeper file. // tar_output_filter::write_data_padding(); } void tar_output_filter_gzip::drop_dead(int err) { fatal("gzip: %s (%s)", z_error(err), stream.msg); } tardy-1.28/libtardy/tar/output/filter/gzip.h 644 0 0 770212163037023 174140ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2003, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_OUTPUT_FILTER_GZIP_H #define LIBTARDY_TAR_OUTPUT_FILTER_GZIP_H #include #include /** * The tar_output_filter_gzip class is used to represent an output * stream which compresses (via gzip) the contents of file data. * * By compressing file data, rather than the whole archive, when tape * blocks go bad, you can still get at the file data for later files. * If you compress the whole archive, you lose all files after the * bad block. */ class tar_output_filter_gzip: public tar_output_filter { public: /** * The destructor. */ virtual ~tar_output_filter_gzip(); /** * The create class method is used to create new dynamically * allocated instance of this class. * * @param deeper * The underlying archive to be written to. */ static pointer create(const tar_output::pointer &deeper); protected: // See base class for documentation. void write_header(const tar_header &hdr); // See base class for documentation. void write_header_padding(void); // See base class for documentation. void write_data(const void *data, int data_size); // See base class for documentation. void write_data_padding(void); private: /** * The constructor. * * @param deeper * The underlying archive to be written to. */ tar_output_filter_gzip(const tar_output::pointer &deeper); /** * The pass_through instance variable is used to remember whether * we are using raw data (true) or compressing the data (false). */ bool pass_through; /** * The stream instance variable is used to remember the internal * state of the zlib library. */ z_stream stream; /** * The outbuf instance variable is used to remember data to be sent * to the compressed stream. */ Byte *outbuf; /** * The crc instance variable is used to remember the running CRC * of the uncompressed data. */ uLong crc; /** * The hdr instance variable is used to remember original file * header. This is needed after the file has been compressed to * send the modified headers. */ tar_header hdr; /** * The temp_fp instance variable is used to remember the file * pointer for the temporary file. */ void *temp_fp; /** * The temp_filename instance variable is used to remember the name * of the temporary file. */ rcstring temp_filename; /** * The drop_dead method is used to report fatal errors from zlib. */ void drop_dead(int err); /** * The default constructor. Do not use. */ tar_output_filter_gzip(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_output_filter_gzip(const tar_output_filter_gzip &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_output_filter_gzip &operator=(const tar_output_filter_gzip &rhs); }; #endif // LIBTARDY_TAR_OUTPUT_FILTER_GZIP_H tardy-1.28/libtardy/tar/output/filter/list.cc 644 0 0 300512163037023 175440ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include tar_output_filter_list::~tar_output_filter_list() { } tar_output_filter_list::tar_output_filter_list( const tar_output::pointer &a_deeper ) : tar_output_filter(a_deeper) { } tar_output::pointer tar_output_filter_list::create(const tar_output::pointer &a_deeper) { return pointer(new tar_output_filter_list(a_deeper)); } void tar_output_filter_list::write_header(const tar_header &h) { rcstring name = h.name; if (h.type == tar_header::type_directory) name += "/"; fprintf ( stderr, "%04lo %3ld %3ld %5ld %s\n", h.mode, h.user_id, h.group_id, h.size, name.c_str() ); tar_output_filter::write_header(h); } tardy-1.28/libtardy/tar/output/filter/list.h 644 0 0 455712163037023 174230ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_OUTPUT_FILTER_LIST_H #define LIBTARDY_TAR_OUTPUT_FILTER_LIST_H #include /** * The tar_output_filter_list class is used to print a running * commentary about file being written to the output archive. * The file data and meta-data is left unchanged. */ class tar_output_filter_list: public tar_output_filter { public: /** * The destructor. */ virtual ~tar_output_filter_list(); /** * The create class method is sued to create new dynamically * allocated instances of this class. * * @param deeper * The actual archive to be written to. */ static pointer create(const tar_output::pointer &deeper); protected: // See base class for documentation. virtual void write_header(const tar_header &hdr); private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param deeper * The actual archive to be written to. */ tar_output_filter_list(const tar_output::pointer &deeper); /** * The default constructor. Do not use. */ tar_output_filter_list(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_output_filter_list(const tar_output_filter_list &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_output_filter_list &operator = (const tar_output_filter_list &rhs); }; #endif // LIBTARDY_TAR_OUTPUT_FILTER_LIST_H tardy-1.28/libtardy/tar/output/tar.cc 644 0 0 354512163037023 161030ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2001-2004, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include tar_output_tar::~tar_output_tar() { } tar_output_tar::tar_output_tar(const file_output::pointer &a_fp) : fp(a_fp), pos(0), block_size(TBLOCK * 20) { assert(fp); } void tar_output_tar::write_data(const void *data, int data_size) { fp->write(data, data_size); pos += data_size; } void tar_output_tar::write_data_padding(void) { static char padding[TBLOCK]; int n = pos % TBLOCK; if (n) write_data(padding, TBLOCK - n); } rcstring tar_output_tar::filename(void) const { return fp->filename(); } void tar_output_tar::write_archive_end(void) { if ((pos % block_size) == 0) return; char buffer[TBLOCK]; memset(buffer, 0, TBLOCK); for (;;) { write_data(buffer, TBLOCK); if ((pos % block_size) == 0) break; } } void tar_output_tar::set_block_size(long nbytes) { if (nbytes <= 0 || (nbytes % TBLOCK != 0)) block_size = TBLOCK * 20; else block_size = nbytes; } tardy-1.28/libtardy/tar/output/tar.h 644 0 0 573312163037023 157460ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2004, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_OUTPUT_TAR_H #define LIBTARDY_TAR_OUTPUT_TAR_H #include #include #include /** * The tar_output_tar abstract class reperesents a generic tar formatted * archive output, and the current state of the output. * * There are several tar formats, this class shall be further derived * to represent each kind. */ class tar_output_tar: public tar_output { public: /** * The destructor. */ virtual ~tar_output_tar(); protected: /** * The constructor. * For use by derived classes only. * * @param fp * The file to be written to. */ tar_output_tar(const file_output::pointer &fp); // See base class for documentation. virtual void write_data(const void *, int); // See base class for documentation. virtual void write_data_padding(void); // See base class for documentation. rcstring filename(void) const; // See base class for documentation. virtual void write_archive_end(void); // See base class for documentation. virtual void set_block_size(long nbytes); private: /** * The fp instance variable is used to remember where to send the * output, usually the file to write the output to. */ file_output::pointer fp; /** * The pos instance variable is used to remember the output file * position, this is used when calculating how much padding to * insert. */ long pos; /** * The block_size instance variable is used to remember the size in * bytes of the output block size. This is used for output padding * at the end of the archive. */ long block_size; /** * The default constructor. Do not use. */ tar_output_tar(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_output_tar(const tar_output_tar &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_output_tar &operator = (const tar_output_tar &rhs); }; #endif // LIBTARDY_TAR_OUTPUT_TAR_H tardy-1.28/libtardy/tar/output/tar/bsd.cc 644 0 0 771312163037023 166540ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2003, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include #include tar_output_tar_bsd::~tar_output_tar_bsd() { } tar_output_tar_bsd::tar_output_tar_bsd(const file_output::pointer &a_fp) : tar_output_tar(a_fp) { } tar_output::pointer tar_output_tar_bsd::create(const file_output::pointer &a_fp) { return pointer(new tar_output_tar_bsd(a_fp)); } void tar_output_tar_bsd::write_header(const tar_header &h) { char block[TBLOCK]; memset(block, 0, sizeof(block)); // NOTE: no magic number header_ty *hp = (header_ty *)block; if (h.name.size() < 1) fatal("filename \"%s\" too short", h.name.c_str()); if (h.name.size() > sizeof(hp->name)) { fatal ( "filename \"%s\" too long (by %d)", h.name.c_str(), (int)(h.name.size() - sizeof(hp->name)) ); } hp->name_set(h.name); hp->mode_set(h.mode); hp->uid_set(h.user_id); hp->gid_set(h.group_id); hp->size_set(h.size); hp->mtime_set(h.mtime); hp->linkflag_set(LF_NORMAL); switch (h.type) { case tar_header::type_normal: hp->linkflag_set(LF_NORMAL); break; case tar_header::type_normal_contiguous: hp->linkflag_set(LF_CONTIG); break; case tar_header::type_directory: hp->linkflag_set(LF_DIR); hp->name_set(h.name + "/"); break; case tar_header::type_link_hard: hp->linkflag_set(LF_LINK); break; case tar_header::type_link_symbolic: hp->linkflag_set(LF_SYMLINK); break; case tar_header::type_fifo: hp->linkflag_set(LF_FIFO); break; case tar_header::type_device_block: fatal ( "\"%s\" block special devices not supported by this format", h.name.c_str() ); break; case tar_header::type_device_character: fatal ( "\"%s\" character special devices not supported by this format", h.name.c_str() ); break; case tar_header::type_socket: fatal ( "\"%s\" named sockets not supported by this format", h.name.c_str() ); break; case tar_header::type_normal_gzipped: fatal ( "\"%s\" gzipped files not supported by this format", h.name.c_str() ); break; } if ( h.type == tar_header::type_link_hard || h.type == tar_header::type_link_symbolic ) { if (h.linkname.size() < 1) { fatal("linkname \"%s\" too short", h.linkname.c_str()); } if (h.linkname.size() > sizeof(hp->linkname)) { fatal ( "linkname \"%s\" too long (by %d)", h.linkname.c_str(), (int)(h.linkname.size() - sizeof(hp->linkname)) ); } hp->linkname_set(h.linkname); } hp->chksum_set(hp->calculate_checksum()); write_data(block, sizeof(block)); } const char * tar_output_tar_bsd::get_format_name(void) const { return "tar-bsd"; } size_t tar_output_tar_bsd::get_maximum_name_length(void) const { return NAMSIZ; } tardy-1.28/libtardy/tar/output/tar/bsd.h 644 0 0 457112163037023 165150ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_OUTPUT_TAR_BSD_H #define LIBTARDY_TAR_OUTPUT_TAR_BSD_H #include /** * The tar_output_tar_bsd clas sis used to represent writing a BSD * formatted tar archive. */ class tar_output_tar_bsd: public tar_output_tar { public: /** * The destructor. */ virtual ~tar_output_tar_bsd(); public: /** * The #create class method is used to create new dynamically * allocated instances of this class. * * @param fp * The file to be written. */ static pointer create(const file_output::pointer &fp); protected: // See base class for documentation. virtual void write_header(const tar_header &); // See base class for documentation. const char *get_format_name(void) const; // See base class for docuemntation. size_t get_maximum_name_length(void) const; private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param fp * The file to be written. */ tar_output_tar_bsd(const file_output::pointer &fp); /** * The default constructor. Do not use. */ tar_output_tar_bsd(); /** * The copy constructor. Do not use. * * @param rhs * The rigth hand side of the initialization. */ tar_output_tar_bsd(const tar_output_tar_bsd &rhs); /** * The assignment operator. Do not use. * * @param rhs * The rigth hand side of the assignment. */ tar_output_tar_bsd &operator = (const tar_output_tar_bsd &rhs); }; #endif // LIBTARDY_TAR_OUTPUT_TAR_BSD_H tardy-1.28/libtardy/tar/output/tar/posix.cc 644 0 0 1435312163037023 172640ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2002, 2003, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include tar_output_tar_posix::~tar_output_tar_posix() { } tar_output_tar_posix::tar_output_tar_posix(const file_output::pointer &a_fp) : tar_output_tar(a_fp) { } tar_output::pointer tar_output_tar_posix::create(const file_output::pointer &a_fp) { return pointer(new tar_output_tar_posix(a_fp)); } void tar_output_tar_posix::write_header(const tar_header &h) { char block[TBLOCK]; header_ty *hp = (header_ty *)block; if (h.name.size() < 1) fatal("filename %s too short", h.name.quote_c().c_str()); if (h.name[h.name.size() - 1] == '/') { explain_output_error_and_die ( "bug (%s:%d) name %s ends with a slash", __FILE__, __LINE__, h.name.quote_c().c_str() ); } rcstring name = h.name; if (h.type == tar_header::type_directory) name = h.name + "/"; if (h.type == tar_header::type_normal_gzipped) { // // Write a bogus header block, indicating that the following // data is compressed. // memset(block, 0, sizeof(block)); memcpy(hp->magic, TMAGIC, sizeof(hp->magic)); hp->name_set("././@Gzipped"); hp->mode_set(0); hp->uid_set(0); hp->uname_set("root"); hp->gid_set(0); hp->gname_set("root"); hp->size_set(0); hp->mtime_set(0); hp->linkflag_set(LF_GZIPPED); hp->chksum_set(hp->calculate_checksum()); write_data(block, sizeof(block)); } if (name.size() + 1 > sizeof(hp->name)) { // // Write a bogus header block, indicating that the following // data is a long file name. // memset(block, 0, sizeof(block)); memcpy(hp->magic, TMAGIC, sizeof(hp->magic)); hp->name_set("././@LongLink"); hp->mode_set(0); hp->uid_set(0); hp->uname_set("root"); hp->gid_set(0); hp->gname_set("root"); hp->size_set(name.size() + 1); hp->mtime_set(0); hp->linkflag_set(LF_LONGNAME); hp->chksum_set(hp->calculate_checksum()); write_data(block, sizeof(block)); // // Write a bogus data block with the file name in it. // write_data(name.c_str(), name.size() + 1); write_data_padding(); } if ( ( h.type == tar_header::type_link_hard || h.type == tar_header::type_link_symbolic ) && h.linkname.size() + 1 > sizeof(hp->linkname) ) { // // Write a bogus header block, indicating that the following // data is a long file name. // memset(block, 0, sizeof(block)); memcpy(hp->magic, TMAGIC, sizeof(hp->magic)); hp->name_set("././@LongLink"); hp->mode_set(0); hp->uid_set(0); hp->uname_set("root"); hp->gid_set(0); hp->gname_set("root"); hp->size_set(name.size() + 1); hp->mtime_set(0); hp->linkflag_set(LF_LONGLINK); hp->chksum_set(hp->calculate_checksum()); write_data(block, sizeof(block)); // // Write a bogus data block with the file name in it. // write_data(h.linkname.c_str(), h.linkname.size() + 1); write_data_padding(); } // // Write the file header. // memset(block, 0, sizeof(block)); memcpy(hp->magic, TMAGIC, sizeof(hp->magic)); hp->name_set(name); hp->mode_set(h.mode); hp->uid_set(h.user_id); hp->gid_set(h.group_id); hp->size_set(h.size); hp->mtime_set(h.mtime); hp->uname_set(h.user_name); hp->gname_set(h.group_name); hp->linkflag_set(LF_NORMAL); switch (h.type) { case tar_header::type_normal: case tar_header::type_normal_gzipped: // already set break; case tar_header::type_normal_contiguous: hp->linkflag_set(LF_CONTIG); break; case tar_header::type_directory: hp->linkflag_set(LF_DIR); break; case tar_header::type_link_hard: hp->linkflag_set(LF_LINK); break; case tar_header::type_link_symbolic: hp->linkflag_set(LF_SYMLINK); break; case tar_header::type_fifo: hp->linkflag_set(LF_FIFO); break; case tar_header::type_device_block: hp->linkflag_set(LF_BLK); break; case tar_header::type_device_character: hp->linkflag_set(LF_CHR); break; case tar_header::type_socket: fatal ( "%s named sockets not supported by this format", h.name.quote_c().c_str() ); break; } if ( h.type == tar_header::type_link_hard || h.type == tar_header::type_link_symbolic ) { if (h.linkname.size() < 1) { fatal("linkname %s too short", h.linkname.quote_c().c_str()); } hp->linkname_set(h.linkname); } if ( h.type == tar_header::type_device_block || h.type == tar_header::type_device_character ) { hp->devmajor_set(h.device_major); hp->devminor_set(h.device_minor); } hp->chksum_set(hp->calculate_checksum()); write_data(block, sizeof(block)); } const char * tar_output_tar_posix::get_format_name(void) const { return "tar-posix"; } size_t tar_output_tar_posix::get_maximum_name_length(void) const { return NAMSIZ; } tardy-1.28/libtardy/tar/output/tar/posix.h 644 0 0 470312163037023 171040ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_OUTPUT_TAR_POSIX_H #define LIBTARDY_TAR_OUTPUT_TAR_POSIX_H #include /** * The tar_output_tar_posix class is used to represent writing a POSIX * formatted tar archive. */ class tar_output_tar_posix: public tar_output_tar { public: /** * The destructor. */ virtual ~tar_output_tar_posix(); /** * The create class method is used to create new dynamically * allocated instances of this class. * * @param fp * The output file to be written. */ static pointer create(const file_output::pointer &fp); protected: // See base class for documentation. virtual void write_header(const tar_header &hdr); // See base class for documentation. const char *get_format_name(void) const; // See base class for docuemntation. size_t get_maximum_name_length(void) const; private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param fp * The output file to be written. */ tar_output_tar_posix(const file_output::pointer &fp); /** * The default constructor. Do not use. */ tar_output_tar_posix(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_output_tar_posix(const tar_output_tar_posix &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_output_tar_posix &operator = (const tar_output_tar_posix &rhs); }; #endif // LIBTARDY_TAR_OUTPUT_TAR_POSIX_H tardy-1.28/libtardy/tar/output/tar/ustar.cc 644 0 0 1616412163037023 172620ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // Copyright (C) 2011 Thomas // // 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 3 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, see . // #include #include #include #include tar_output_tar_ustar::~tar_output_tar_ustar() { } tar_output_tar_ustar::tar_output_tar_ustar(const file_output::pointer &a_fp) : tar_output_tar(a_fp) { } tar_output::pointer tar_output_tar_ustar::create(const file_output::pointer &a_fp) { return pointer(new tar_output_tar_ustar(a_fp)); } void tar_output_tar_ustar::write_header(const tar_header &h) { char block[TBLOCK]; header_ty *hp = (header_ty *)block; if (h.name.size() < 1) fatal("filename \"%s\" too short", h.name.c_str()); if (h.name[h.name.size() - 1] == '/') { explain_output_error_and_die ( "bug (%s:%d) name \"%s\" has slash", __FILE__, __LINE__, h.name.c_str() ); } rcstring name = h.name; if (h.type == tar_header::type_directory) name = h.name + "/"; if (h.type == tar_header::type_normal_gzipped) { // // Write a bogus header block, indicating that the following // data is compressed. // memset(block, 0, sizeof(block)); // this hack makes joerg schillings star think // it's create by it own, in fact it's only important // for long links and long names a.k.a. L/K header memcpy(block + 508, "tar", 3); memcpy(hp->magic, USTAR_MAGIC, sizeof(hp->magic)); hp->name_set("././@Gzipped"); hp->mode_set_z(0); hp->uid_set_z(0); hp->uname_set("root"); hp->gid_set_z(0); hp->gname_set("root"); hp->size_set_z(0); hp->mtime_set_z(0); hp->linkflag_set(LF_GZIPPED); hp->chksum_set_z(hp->calculate_checksum()); write_data(block, sizeof(block)); } if (name.size() + 1 > sizeof(hp->name)) { // // Write a bogus header block, indicating that the following // data is a long file name. // memset(block, 0, sizeof(block)); // this hack makes joerg schillings star think // it's create by it own, in fact it's only important // for long links and long names a.k.a. L/K header memcpy(block + 508, "tar", 3); memcpy(hp->magic, USTAR_MAGIC, sizeof(hp->magic)); hp->name_set("././@LongLink"); hp->mode_set_z(0); hp->uid_set_z(0); hp->uname_set("root"); hp->gid_set_z(0); hp->gname_set("root"); hp->size_set_z(name.size() + 1); hp->mtime_set_z(0); hp->linkflag_set(LF_LONGNAME); hp->chksum_set_z(hp->calculate_checksum()); write_data(block, sizeof(block)); // // Write a bogus data block with the file name in it. // write_data(name.c_str(), name.size() + 1); write_data_padding(); } if ( ( h.type == tar_header::type_link_hard || h.type == tar_header::type_link_symbolic ) && h.linkname.size() + 1 > sizeof(hp->linkname) ) { // // Write a bogus header block, indicating that the following // data is a long file name. // memset(block, 0, sizeof(block)); // this hack makes joerg schillings star think // it's create by it own, in fact it's only important // for long links and long names a.k.a. L/K header memcpy(block + 508, "tar", 3); memcpy(hp->magic, USTAR_MAGIC, sizeof(hp->magic)); hp->name_set("././@LongLink"); hp->mode_set_z(0); hp->uid_set_z(0); hp->uname_set("root"); hp->gid_set_z(0); hp->gname_set("root"); hp->size_set_z(name.size() + 1); hp->mtime_set_z(0); hp->linkflag_set(LF_LONGLINK); hp->chksum_set_z(hp->calculate_checksum()); write_data(block, sizeof(block)); // // Write a bogus data block with the file name in it. // write_data(h.linkname.c_str(), h.linkname.size() + 1); write_data_padding(); } // // Write the file header. // memset(block, 0, sizeof(block)); // This hack makes joerg schillings star think // it's create by it own, in fact it's only important // for long links and long names a.k.a. L/K header memcpy(block + 508, "tar", 3); memcpy(hp->magic, USTAR_MAGIC, sizeof(hp->magic)); hp->name_set(name); hp->mode_set_z(h.mode); hp->uid_set_z(h.user_id); hp->gid_set_z(h.group_id); hp->size_set_z(h.size); hp->mtime_set_z(h.mtime); hp->uname_set(h.user_name); hp->gname_set(h.group_name); hp->linkflag_set(LF_NORMAL); switch (h.type) { case tar_header::type_normal: case tar_header::type_normal_gzipped: // already set break; case tar_header::type_normal_contiguous: hp->linkflag_set(LF_CONTIG); break; case tar_header::type_directory: hp->linkflag_set(LF_DIR); break; case tar_header::type_link_hard: hp->linkflag_set(LF_LINK); break; case tar_header::type_link_symbolic: hp->linkflag_set(LF_SYMLINK); break; case tar_header::type_fifo: hp->linkflag_set(LF_FIFO); break; case tar_header::type_device_block: hp->linkflag_set(LF_BLK); break; case tar_header::type_device_character: hp->linkflag_set(LF_CHR); break; case tar_header::type_socket: fatal ( "\"%s\" named sockets not supported by this format", h.name.c_str() ); break; } if ( h.type == tar_header::type_link_hard || h.type == tar_header::type_link_symbolic ) { if (h.linkname.size() < 1) { fatal("linkname \"%s\" too short", h.linkname.c_str()); } hp->linkname_set(h.linkname); } if ( h.type == tar_header::type_device_block || h.type == tar_header::type_device_character ) { hp->devmajor_set_z(h.device_major); hp->devminor_set_z(h.device_minor); } hp->chksum_set_z(hp->calculate_checksum()); write_data(block, sizeof(block)); } const char * tar_output_tar_ustar::get_format_name(void) const { return "ustar"; } size_t tar_output_tar_ustar::get_maximum_name_length(void) const { return NAMSIZ; } tardy-1.28/libtardy/tar/output/tar/ustar.h 644 0 0 473412163037023 171040ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // Copyright (C) 2011 Thomas // // 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 3 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, see . // #ifndef COMMON_TAR_OUTPUT_TAR_USTAR_H #define COMMON_TAR_OUTPUT_TAR_USTAR_H #include /** * The tar_output_tar_ustar class is used to represent writing a USTAR * formatted tar archive. */ class tar_output_tar_ustar: public tar_output_tar { public: /** * The destructor. */ virtual ~tar_output_tar_ustar(); /** * The create class method is used to create a new dynamically * allocated instance of this class. * * @param fp * The file to write the archive to. */ static pointer create(const file_output::pointer &fp); protected: // See base class for documentation. virtual void write_header(const tar_header &); // See base class for documentation. const char *get_format_name(void) const; // See base class for docuemntation. size_t get_maximum_name_length(void) const; private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param fp * The file to write the archive to. */ tar_output_tar_ustar(const file_output::pointer &fp); /** * The default constructor. Do not use. */ tar_output_tar_ustar(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_output_tar_ustar(const tar_output_tar_ustar &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_output_tar_ustar &operator=(const tar_output_tar_ustar &rhs); }; #endif // COMMON_TAR_OUTPUT_TAR_USTAR_H tardy-1.28/libtardy/tar/output/tar/v7.cc 644 0 0 1002712163037023 164500ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2003, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include #include tar_output_tar_v7::~tar_output_tar_v7() { } tar_output_tar_v7::tar_output_tar_v7(const file_output::pointer &a_fp) : tar_output_tar(a_fp) { } tar_output::pointer tar_output_tar_v7::create(const file_output::pointer &a_fp) { return pointer(new tar_output_tar_v7(a_fp)); } void tar_output_tar_v7::write_header(const tar_header &h) { char block[TBLOCK]; memset(block, 0, sizeof(block)); // NOTE: no magic number header_ty *hp = (header_ty *)block; if (h.name.size() < 1) fatal("filename \"%s\" too short", h.name.c_str()); if (h.name.size() > sizeof(hp->name)) { fatal ( "filename \"%s\" too long (by %d)", h.name.c_str(), (int)(h.name.size() - sizeof(hp->name)) ); } hp->name_set(h.name); hp->mode_set(h.mode); hp->uid_set(h.user_id); hp->gid_set(h.group_id); hp->size_set(h.size); hp->mtime_set(h.mtime); hp->linkflag_set(LF_NORMAL); switch (h.type) { case tar_header::type_normal: case tar_header::type_normal_contiguous: hp->linkflag_set(LF_OLDNORMAL); break; case tar_header::type_directory: hp->linkflag_set(LF_OLDNORMAL); hp->name_set(h.name + "/"); break; case tar_header::type_link_hard: hp->linkflag_set(LF_LINK); break; case tar_header::type_link_symbolic: hp->linkflag_set(LF_SYMLINK); break; case tar_header::type_fifo: fatal("\"%s\" fifo files not supported by this format", h.name.c_str()); break; case tar_header::type_device_block: fatal ( "\"%s\" block special devices not supported by this format", h.name.c_str() ); break; case tar_header::type_device_character: fatal ( "\"%s\" character special devices not supported by this format", h.name.c_str() ); break; case tar_header::type_socket: fatal ( "\"%s\" named sockets not supported by this format", h.name.c_str() ); break; case tar_header::type_normal_gzipped: fatal ( "\"%s\" compressed file supported by this format", h.name.c_str() ); break; } if ( h.type == tar_header::type_link_hard || h.type == tar_header::type_link_symbolic ) { if (h.linkname.size() < 1) { fatal ( "linkname \"%s\" too short", h.linkname.c_str() ); } if (h.linkname.size() > sizeof(hp->linkname)) { fatal ( "linkname \"%s\" too long (by %d)", h.linkname.c_str(), (int)(h.linkname.size() - sizeof(hp->linkname)) ); } hp->linkname_set(h.linkname); } hp->chksum_set(hp->calculate_checksum()); write_data(block, sizeof(block)); } const char * tar_output_tar_v7::get_format_name(void) const { return "tar-v7"; } size_t tar_output_tar_v7::get_maximum_name_length(void) const { return NAMSIZ; } // vim: set ts=8 sw=4 et : tardy-1.28/libtardy/tar/output/tar/v7.h 644 0 0 460012163037023 162720ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1998, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TAR_OUTPUT_TAR_V7_H #define LIBTARDY_TAR_OUTPUT_TAR_V7_H #include /** * The tar_output_tar_v7 clas sis used to represent writing an ancient * UNIX Version 7 formatted tar archive. */ class tar_output_tar_v7: public tar_output_tar { public: /** * The destructor. */ virtual ~tar_output_tar_v7(); /** * The create class method is used to create new dynamically * allocated instance of this class. * * @param fp * The file to be written to. */ static pointer create(const file_output::pointer &fp); protected: // See base class for documentation. virtual void write_header(const tar_header &hdr); // See base class for documentation. const char *get_format_name(void) const; // See base class for docuemntation. size_t get_maximum_name_length(void) const; private: /** * The constructor. * It is private on purpose, use the #create class method instead. * * @param fp * The file to be written to. */ tar_output_tar_v7(const file_output::pointer &fp); /** * The default constructor. Do not use. */ tar_output_tar_v7(); /** * The copy constructor. Do not use. * * @param rhs * The right hand side of the initialization. */ tar_output_tar_v7(const tar_output_tar_v7 &rhs); /** * The assignment operator. Do not use. * * @param rhs * The right hand side of the assignment. */ tar_output_tar_v7 &operator = (const tar_output_tar_v7 &rhs); }; #endif // LIBTARDY_TAR_OUTPUT_TAR_V7_H tardy-1.28/libtardy/trace.cc 644 0 0 2052312163037023 143000ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1991-2009, 2011, 2012 Peter Miller // // 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 3 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, see . // #include #include #include #include #include #include #include #include #define INDENT 2 struct known_t { known_t() : flag(0), flag_p(0), next(0) { } rcstring filename; int flag; int *flag_p; known_t *next; }; static rcstring file_name; static int line_number; static int page_width; static known_t *known; static int depth; int trace_pretest(const char *file, int *result) { rcstring s = rcstring(file).basename(); known_t *kp = known; for (; kp; kp = kp->next) { if (s == kp->filename) { break; } } if (!kp) { kp = new known_t; kp->filename = s; kp->next = known; kp->flag = 2; // disabled known = kp; } kp->flag_p = result; *result = kp->flag; return *result; } void trace_where(const char *file, int line) { file_name = rcstring(file).basename(); line_number = line; } static void trace_putchar(int c) { static char buffer[200]; static char *cp; static int in_col; static int out_col; if (!page_width) { // don't use last column, many terminals are dumb page_width = 79; // allow for progname, filename and line number (8 each) page_width -= 24; if (page_width < 16) page_width = 16; } if (!cp) { strcpy(buffer, explain_program_name_get()); cp = buffer + strlen(buffer); if (cp > buffer + 6) cp = buffer + 6; *cp++ = ':'; *cp++ = '\t'; strcpy(cp, file_name.c_str()); cp += file_name.size(); *cp++ = ':'; *cp++ = '\t'; snprintf(cp, buffer + sizeof(buffer) - cp, "%d:\t", line_number); cp += strlen(cp); in_col = 0; out_col = 0; } switch (c) { case '\n': *cp++ = '\n'; *cp = 0; explain_fflush_or_die(stdout); fputs(buffer, stderr); explain_fflush_or_die(stderr); cp = 0; break; case ' ': if (out_col) ++in_col; break; case '\t': if (out_col) in_col = (in_col/INDENT + 1) * INDENT; break; case '}': case ')': case ']': if (depth > 0) --depth; // fall through default: if (!out_col) { if (c != '#') // modulo so never too long in_col = (INDENT * depth) % page_width; else in_col = 0; } if (in_col >= page_width) { trace_putchar('\n'); trace_putchar(c); return; } while (((out_col + 8) & -8) <= in_col && out_col + 1 < in_col) { *cp++ = '\t'; out_col = (out_col + 8) & -8; } while (out_col < in_col) { *cp++ = ' '; ++out_col; } if (c == '{' || c == '(' || c == '[') ++depth; *cp++ = c; in_col++; out_col++; break; } } void trace_printf(const char *s, ...) { va_list ap; va_start(ap, s); char buffer[2000]; vsnprintf(buffer, sizeof(buffer), s, ap); va_end(ap); for (s = buffer; *s; ++s) trace_putchar(*s); } void trace_enable(const char *file) { rcstring s = rcstring(file).basename(); known_t *kp; for (kp = known; kp; kp = kp->next) { if (s == kp->filename) { break; } } if (!kp) { kp = new known_t; kp->filename = s; kp->next = known; known = kp; } kp->flag = 3; // enabled if (kp->flag_p) *kp->flag_p = kp->flag; } void trace_char_real(char *name, char *vp) { trace_printf("%s = '", name); if (*vp < ' ' || *vp > '~' || strchr("(){}[]", *vp)) { const char *s = strchr("\bb\nn\tt\rr\ff", *vp); if (s) { trace_putchar('\\'); trace_putchar(s[1]); } else trace_printf("\\%03o", (unsigned char)*vp); } else { if (strchr("'\\", *vp)) trace_putchar('\\'); trace_putchar(*vp); } trace_printf("'; /* 0x%02X, %d */\n", (unsigned char)*vp, *vp); } void trace_char_unsigned_real(char *name, unsigned char *vp) { trace_printf("%s = '", name); if (*vp < ' ' || *vp > '~' || strchr("(){}[]", *vp)) { const char *s = strchr("\bb\nn\tt\rr\ff", *vp); if (s) { trace_putchar('\\'); trace_putchar(s[1]); } else trace_printf("\\%03o", *vp); } else { if (strchr("'\\", *vp)) trace_putchar('\\'); trace_putchar(*vp); } trace_printf("'; /* 0x%02X, %d */\n", *vp, *vp); } void trace_int_real(char *name, int *vp) { trace_printf("%s = %d;\n", name, *vp); } void trace_int_unsigned_real(char *name, unsigned int *vp) { trace_printf("%s = %u;\n", name, *vp); } void trace_long_real(char *name, long *vp) { trace_printf("%s = %ld;\n", name, *vp); } void trace_long_unsigned_real(char *name, unsigned long *vp) { trace_printf("%s = %lu;\n", name, *vp); } void trace_pointer_real(char *name, void *vptrptr) { void **ptr_ptr = (void **)vptrptr; void *ptr = *ptr_ptr; if (!ptr) trace_printf("%s = NULL;\n", name); else trace_printf("%s = 0x%08lX;\n", name, (long)ptr); } void trace_short_real(char *name, const short *vp) { trace_printf("%s = %hd;\n", name, *vp); } void trace_short_unsigned_real(const char *name, const unsigned short *vp) { trace_printf("%s = %hu;\n", name, *vp); } void trace_string_real(const char *name, const char *vp) { trace_printf("%s = ", name); if (!vp) { trace_printf("NULL;\n"); return; } trace_printf("\""); long count = 0; for (const char *s = vp; *s; ++s) { switch (*s) { case '('//) : case '['//] : case '{'//} : ++count; break; case //( ')': case //[ ']': case //{ '}': --count; break; } } if (count > 0) count = -count; else count = 0; for (const char *s = vp; *s; ++s) { int c = *s; if (c < ' ' || c > '~') { const char *cp = strchr("\bb\ff\nn\rr\tt", c); if (cp) trace_printf("\\%c", cp[1]); else trace_printf("\\%03o", (unsigned char)c); } else { switch (c) { case '(': case '[': case '{': ++count; if (count <= 0) { trace_printf("\\%03o", (unsigned char)c); goto next; } break; case ')': case ']': case '}': --count; if (count < 0) { trace_printf("\\%03o", (unsigned char)c); goto next; } break; case '\\': case '"': trace_printf("\\"); break; default: break; } trace_printf("%c", c); } next:; } trace_printf("\";\n"); } void trace_indent_reset(void) { #ifdef DEBUG (void)trace_pretest_result; #endif depth = 0; } tardy-1.28/libtardy/trace.h 644 0 0 2347012163037023 141460ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1991-1995, 1998, 1999, 2004, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_TRACE_H #define LIBTARDY_TRACE_H #include #include #ifdef DEBUG #define trace_pretest_ \ ( \ ( \ trace_pretest_result \ ? \ trace_pretest_result \ : \ trace_pretest(__FILE__, &trace_pretest_result) \ ) \ & \ 1 \ ) #define trace_where_ trace_where(__FILE__, __LINE__) #define trace(x) (void)(trace_pretest_ && (trace_where_, trace_printf x, 0)) #define trace_if() (trace_pretest_ && (trace_where_, 1)) #else #define trace(x) #define trace_if() 0 #endif // // This variable is static to each file which // includes the "trace.h" file. // Tracing is file-by-file, but need only test this once. // Files will fail to trace if a trace call is executed in them // prior to a call to trace_enable turning it on. // #ifdef DEBUG static int trace_pretest_result; #endif int trace_pretest(const char *file, int *result); void trace_where(const char *file, int line); void trace_printf(const char *, ...) ATTR_PRINTF(1, 2); void trace_enable(const char *); void trace_indent_reset(void); #define trace_stringize(x) #x void trace_char_real(const char *, const char *); void trace_char_unsigned_real(const char *, const unsigned char *); void trace_int_real(const char *, const int *); void trace_int_unsigned_real(const char *, const unsigned *); void trace_long_real(const char *, const long *); void trace_long_unsigned_real(const char *, const unsigned long *); void trace_pointer_real(const char *, const void *); void trace_short_real(const char *, const short *); void trace_short_unsigned_real(const char *, const unsigned short *); void trace_string_real(const char *, const char *); #ifdef DEBUG #define trace_char(x) \ (void) \ ( \ trace_pretest_ \ && \ ( \ trace_where_, \ trace_char_real(trace_stringize(x), &x), \ 0 \ ) \ ) #define trace_char_unsigned(x) \ (void) \ ( \ trace_pretest_ \ && \ ( \ trace_where_, \ trace_char_unsigned_real(trace_stringize(x), &x), \ 0 \ ) \ ) #define trace_int(x) \ (void) \ ( \ trace_pretest_ \ && \ ( \ trace_where_, \ trace_int_real(trace_stringize(x), &x), \ 0 \ ) \ ) #define trace_int_unsigned(x) \ (void) \ ( \ trace_pretest_ \ && \ ( \ trace_where_, \ trace_int_unsigned_real(trace_stringize(x), &x), \ 0 \ ) \ ) #define trace_long(x) \ (void) \ ( \ trace_pretest_ \ && \ ( \ trace_where_, \ trace_long_real(trace_stringize(x), &x), \ 0 \ ) \ ) #define trace_long_unsigned(x) \ (void) \ ( \ trace_pretest_ \ && \ ( \ trace_where_, \ trace_long_unsigned_real(trace_stringize(x), &x), \ 0 \ ) \ ) #define trace_pointer(x) \ (void) \ ( \ trace_pretest_ \ && \ ( \ trace_where_, \ trace_pointer_real(trace_stringize(x), &x), \ 0 \ ) \ ) #define trace_short(x) \ (void) \ ( \ trace_pretest_ \ && \ ( \ trace_where_, \ trace_short_real(trace_stringize(x), &x), \ 0 \ ) \ ) #define trace_short_unsigned(x) \ (void) \ ( \ trace_pretest_ \ && \ ( \ trace_where_, \ trace_short_unsigned_real(trace_stringize(x), &x), \ 0 \ ) \ ) #define trace_string(x) \ (void) \ ( \ trace_pretest_ \ && \ ( \ trace_where_, \ trace_string_real(trace_stringize(x), x), \ 0 \ ) \ ) #else #define trace_char(x) #define trace_char_unsigned(x) #define trace_int(x) #define trace_int_unsigned(x) #define trace_long(x) #define trace_long_unsigned(x) #define trace_pointer(x) #define trace_short(x) #define trace_short_unsigned(x) #define trace_string(x) #endif #endif // LIBTARDY_TRACE_H tardy-1.28/libtardy/versi_stamp.cc 644 0 0 177412163037023 155250ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1995, 1998, 1999, 2008-2010 Peter Miller // // 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 3 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, see // . // #include #include const char * version_stamp(void) { return PATCHLEVEL; } const char * copyright_years(void) { return COPYRIGHT_YEARS; } tardy-1.28/libtardy/version.cc 644 0 0 1066512163037023 146750ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1991-1999, 2001, 2002, 2004, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include #include #include #include static void version_copyright(void) { static const char *text[] = { ".so cr", }; roff().interpret(text, SIZEOF(text)); } void version_license(void) { static const char *text[] = { #include }; roff().interpret(text, SIZEOF(text)); } struct vsn_table_t { const char *name; void (*func)(void); }; static vsn_table_t vsn_table[] = { { "Copyright", version_copyright }, { "License", version_license }, }; void arglex::version_main(void) { void (*func)(void) = 0; trace(("version_main()\n{\n")); const char *name = 0; while (token != token_eoln) { switch (token) { default: generic_argument(); continue; case token_string: if (name) { explain_output_error_and_die ( "too many version information names given" ); } name = value.string; break; } lex(); } if (name) { int nhit = 0; const vsn_table_t *hit[SIZEOF(vsn_table)]; for (const vsn_table_t *tp = vsn_table; tp < ENDOF(vsn_table); ++tp) { if (compare(tp->name, name)) hit[nhit++] = tp; } switch (nhit) { case 0: explain_output_error_and_die ( "version information name %s unknown", rcstring(name).quote_c().c_str() ); case 1: break; default: rcstring s(hit[0]->name); for (int j = 1; j < nhit; ++j) { s = s + ", " + hit[j]->name; } explain_output_error_and_die ( "version information name %s ambiguous (%s)", rcstring(name).quote_c().c_str(), s.c_str() ); } lex(); func = hit[0]->func; } else func = version_copyright; func(); trace(("}\n")); } void arglex::version_help(void) { static const char *text[] = { ".TH \"\\*(n) -VERSion\" 1 \\*(N)", ".SH NAME", "\\*(n) -VERSion \\- give version information", ".SH SYNOPSIS", ".B \\*(n)", ".B -VERSion", "[", ".IR info-name", "]", ".br", ".B \\*(n)", ".B -VERSion", ".B -Help", ".SH DESCRIPTION", "The", ".I \\*(n)", ".I -VERSion", "command is used to", "give version information", "and conditions of use.", ".PP", "There are a number of possible", ".IR info-name s,", "as follow (abbreviations as for command line options):", ".TP 8n", "Copyright", "The copyright notice for the \\*(n) program.", "Version information will also be printed.", "This is the default.", ".TP 8n", "Redistribution", "Print the conditions of use and redistribution.", ".TP 8n", "Warranty", "Print the limited warranty.", ".SH OPTIONS", "The following options are understood:", ".so o_help.so", ".so o__rules.so", ".SH RECOMMENDED ALIAS", "The recommended alias for this command is", ".nf", ".ta 8n 16n", "csh%\talias aev '\\*(n) -vers \\e!*'", "sh$\taev(){\\*(n) -vers $*}", ".fi", ".SH ERRORS", "It is an error if", "the ", ".I info-name", "given is unknown.", ".so z_exit.so", ".so z_cr.so", }; help_f(text, SIZEOF(text)); } void arglex::version(void) { trace(("version()\n{\n")); switch (lex()) { default: version_main(); break; case token_help: version_help(); break; } trace(("}\n")); } tardy-1.28/libtardy/version_stmp.h 644 0 0 166412163037023 155610ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 1995, 1998, 1999, 2008, 2009, 2011 Peter Miller // // 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 3 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, see . // #ifndef LIBTARDY_VERSION_STMP_H #define LIBTARDY_VERSION_STMP_H #include const char *version_stamp(void); const char *copyright_years(void); #endif // LIBTARDY_VERSION_STMP_H tardy-1.28/man/man1/o__rules.h 644 0 0 201212163037023 144210ustar PeterMiller".r)", ".PP", "All options may be abbreviated;", "the abbreviation is documented as the upper case letters,", "all lower case letters and underscores (_) are optional.", "You must use consecutive sequences of optional letters.", ".PP", "All options are case insensitive,", "you may type them in upper case or lower case or a combination of both,", "case is not important.", ".PP", "For example:", "the arguments \\[lq]\\-help\\[rq], \\[lq]\\-HELP\\[rq] and \\[lq]\\-h\\[rq] are", "all interpreted to mean the \\fB\\-Help\\fP option.", "The argument \\[lq]-hlp\\[rq] will not be understood,", "because consecutive optional characters were not supplied.", ".PP", "Options and other command line arguments may be", "mixed arbitrarily on the command line,", "after the function selectors.", ".br", ".ne 4", ".PP", "The GNU long option names are understood.", "Since all option names for", ".I \\*(n)", "are long,", "this means ignoring the extra leading '-'.", "The \"\\fB--\\fIoption\\fB=\\fIvalue\\fR\" convention is also understood.", tardy-1.28/man/man1/o__rules.so 644 0 0 327612163037023 146300ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 1991-1993, 1995, 1999, 2008, 2011, 2013 Peter Miller .\" .\" 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 3 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, see . .\" .r) .PP All options may be abbreviated; the abbreviation is documented as the upper case letters, all lower case letters and underscores (_) are optional. You must use consecutive sequences of optional letters. .PP All options are case insensitive, you may type them in upper case or lower case or a combination of both, case is not important. .PP For example: the arguments \[lq]\-help\[rq], \[lq]\-HELP\[rq] and \[lq]\-h\[rq] are all interpreted to mean the \fB\-Help\fP option. The argument \[lq]-hlp\[rq] will not be understood, because consecutive optional characters were not supplied. .PP Options and other command line arguments may be mixed arbitrarily on the command line, after the function selectors. .br .ne 4 .PP The GNU long option names are understood. Since all option names for .I \*(n) are long, this means ignoring the extra leading '-'. The "\fB--\fIoption\fB=\fIvalue\fR" convention is also understood. .\" vim: set ts=8 sw=4 et : tardy-1.28/man/man1/o_help.h 644 0 0 20312163037023 140400ustar PeterMiller".TP 8n", ".B \\-Help", ".br", "This option may be used to obtain more information about how to use the", ".I \\*(n)", "program.", tardy-1.28/man/man1/o_help.so 644 0 0 162012163037023 142560ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 1991-1993, 1995, 1999, 2008, 2011, 2013 Peter Miller .\" .\" 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 3 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, see . .\" .TP 8n .B \-Help .br This option may be used to obtain more information about how to use the .I \*(n) program. .\" vim: set ts=8 sw=4 et : tardy-1.28/man/man1/tardy.1 644 0 0 3676412163037023 137130ustar PeterMiller'\" t .\" tardy - a tar post-processor .\" Copyright (C) 1993-2013 Peter Miller .\" .\" 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 3 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, see . .\" .ds n) tardy .TH Tardy 1 .SH NAME tardy \- a tar post-processor .XX "tardy(1)" "a tar(1) post-processor" .SH SYNOPSIS .B \*(n) [ .IR option \&... ][ .IR infile [ .IR outfile ]] .br .B \*(n) .B \-Help .br .B \*(n) .B \-VERSion .SH DESCRIPTION The \fI\*(n)\fP program is used to manipulate the file headers within archive files. Supported archive formats include \f[I]tar\fP(1), \f[I]cpio\fP(1) and \f[I]ar\fP(1). .PP This is useful when preparing sources for Internet archive sites, and you don't want to included details of your development environment in the \f[I]tar\fP(1) file. .PP One of the most useful features is the ability to add a prefix to the names of the files within the \f[I]tar\fP(1) file. An example is adding the prefix \[lq].\[rq], for when you have a \f[I]tar\fP(1) file with absolute paths in it, and need to extract the file with relative paths. .PP The GNU tar format headers are understood, including extended names. .PP If no input file is named, or the special name \[lq]\-\[rq] is used, input will be read from the standard input. Similarly, if no output file is named, or the special name \[lq]-\[rq] is used, output will be written to the standard output. Note that \fI\*(n)\fP will refuse to read from or write to a terminal, as this indicates that the user has made a mistake. .PP If the input is in \f[I]gzip\fP(1) format, it will be automatically \f[I]gunzip\fP(1)ed before processing. Similarly, if the output file name indicates that \f[I]gzip\fP(1) should be used, this will be done automatically on output. .SH OPTIONS The following options are understood: .\" ---------- A --------------------------------------------------------- .\" ---------- B --------------------------------------------------------- .TP 8n \fB\-Block_Size\fP \f[I]number\fP This option many be used to specify the block size, as a multiple of 512 bytes. The default is \f[CW]\-bs=20\fP resulting in a 10kB block size. .\" ---------- C --------------------------------------------------------- .TP 8n .B \-Clean_Meta .br This option may be used to ensure that file names do not contain shell meta characters. If any are found, they are replaced by a hyphen (\-) character. Warning: duplicate file names may result. .TP 8n .B -Clean_Print .br This option may be used to ensure that file names only contain printable ASCII characters. If any non-printable characters are found, they are replaced by a hyphen (\-) character. Warning: duplicate file names may result. .TP 8n .B \-Clean_Space .br This option may be used to ensure that file names contain no white space characters. If any are found, they are replaced by a hyphen (\-) character. Warning: duplicate file names may result. .TP 8n .B \-Clean .br This option is a terse way of specifying all of the above 3 options. .\" ---------- D --------------------------------------------------------- .TP 8n .B \-DownCase .br This option may be used to force file names to be all lower case. Warning: duplicate file names may result. .\" ---------- E --------------------------------------------------------- .TP 8n \fB\-EXclude\fP \f[I]pattern\fP This option may be used to completely remove files from the archive. All files that have a filename patching the given shell filename pattern will be removed. Be careful with wild cards, they match everything, including slash (/) characters. The exclude pattern is applied before all file-name manipulating patterns. .TP 8n \fB\-eXtract\fP This option may be used to extract the contents of an archive. .\" ---------- F --------------------------------------------------------- .\" ---------- G --------------------------------------------------------- .TP 8n \fB\-Group\fP \f[I]arg\fP .br This option may be used to set both the group name and group number fields in the header of every file in the archive file. The argument may be either a string or a number. It is an error if a corresponding entry cannot be found in the .I /etc/group file. .TP 8n \fB-Group_NAme\fP \f[I]string\fP .br This option is used to set the group name field in the header of every file in the archive file. The string may be any arbitrary string, it is not restricted to a known group. .TP 8n \fB\-Group_NAme\fP \f[I]number\fP .br This option is used to set the group name field in the header of every file in the archive file. The number is mapped to a group name through the .I /etc/group file. It is an error if a corresponding group cannot be found. .TP 8n \fB\-Group_NUmber\fP \f[I]string\fP .br This option is used to set the group number field in the header of every file in the archive file. The string is mapped to a group number through the .I /etc/group file. It is an error if a corresponding group cannot be found. .TP 8n \fB\-Group_NUmber\fP \f[I]number\fP .br This option is used to set the group number field in the header of every file in the archive file. The number may be any arbitrary number, it is not restricted to a known group. .\" ---------- H --------------------------------------------------------- .so man/man1/o_help.so .\" ---------- I --------------------------------------------------------- .TP 8n \fB\-Input_ForMaT\fP \f[I]name\fP .RS By default, the input file is examined to automatically detect the input archive file's format. This option may be used to specify the input format to be used. The input format \f[I]name\fPs are .TP 8n tar This format understands all of the various \f[I]tar\fP(1) formats. This is the default. .TP 8n tar\[hy]bsd This format expects BSD \f[I]tar\fP(1) archives. .TP 8n ustar This format expects \f[I]ustar\fP(1) format archives. .TP 8n list The input is a text file which contains one file name per line. The named files are read as if they were the input. It is common for \f[I]find\fP(1) to be used to form the list of file names. .TP 8n directory The input is a text file which contains one file name per line. The named files are read as if they were an archive input. If any directories are found, they will be descended recursively. .TP 8n cpio The file is expected to be in one of the \f[I]cpio\fP(5) formats, and will be examined to figure out which. .TP 8n cpio\[hy]bin This format expects \f[I]cpio\fP(5) \[lq]old binary\[rq] format archives. .TP 8n cpio\[hy]crc This format expects \f[I]cpio\fP(5) \[lq]crc\[rq] format archives. .TP 8n cpio\[hy]new\[hy]ascii This format expects \f[I]cpio\fP(5) \[lq]new ascii\[rq] format archives. .TP 8n cpio\[hy]old\[hy]ascii This format expects \f[I]cpio\fP(5) \[lq]old ascii\[rq] format archives. .TP 8n ar The file is expected to be in one of the \f[I]ar\fP(1) formats, and will be examined to figure out which. .TP 8n ar\[hy]bsd This format expects \f[I]ar\fP(1) \[lq]BSD\[rq] format archives. .TP 8n ar\[hy]pdp11 This format expects \f[I]ar\fP(1) archives, in the ancient pre\[hy]V7 format. .TP 8n ar\[hy]v7 This format expects \f[I]ar\fP(1) \[lq]Unix Version 7\[rq] format archives. .PP Any other format name will produce an error. .RE .\" ---------- J --------------------------------------------------------- .\" ---------- K --------------------------------------------------------- .\" ---------- L --------------------------------------------------------- .TP 8n .B \-List .br Give a terse listing of the file headers on the standard error as they are written to the output. .\" ---------- M --------------------------------------------------------- .TP 8n \fB\-Mode_Clear\fP \f[I]bits\fP .br This option may be used to set the mode of each file in the archive file. The .I bits specified are cleared in the mode. You should use an octal number with a leading zero as the argument; if you omit the leading zero it will be interpreted as decimal. The .B \-Mode_Set option is applied first, the .B \-Mode_Clear option is applied second; if neither is specified the mode of each file is unaltered. .TP 8n \fB\-Mode_Set\fP \f[I]bits\fP .br This option may be used to set the mode of each file in the archive file. The .I bits specified are set in the mode. You should use an octal number with a leading zero as the argument; if you omit the leading zero it will be interpreted as decimal. .\" ---------- N --------------------------------------------------------- .TP 8n .B \-No_Directories .br This option may be used to suppress directories from the output. This can be useful when the archive has been created with directories in useless modes. .TP 8n .B \-Now .br Set the last\[hy]time\[hy]modified field of the headers to the current time, all files will be given the same time. .\" ---------- O --------------------------------------------------------- .TP 8n .B \-Old_Type .br By default, \*(n) corrects the old normal file type into the modern normal file type. This option requests that old normal file type indicators remain unaltered. .TP 8n \fB\-Output_ForMaT\fP \f[I]name\fP .RS By default, \f[I]\*(n)\fP tries to write the same format on output as it sees on input. This option may be used to specify the output format to be used. The output format \f[I]name\fPs are .TP 8n ar The archive will be written using the \f[I]ar\fP(1) format, BSD variant. Note that this format only supports simple files; it silently discards directories, and even discards directory portions of file names. .TP 8n ar\[hy]bsd The archive will be written using the \f[I]ar\fP(1) format, BSD variant. Long file names are handled by a special file at the start of the archive full of file names. .TP 8n ar\[hy]bsd\[hy]l2 The archive will be written using the \f[I]ar\fP(1) format, BSD variant. Long file names are handled by special file name mangling in the archive, with the actual file name transparently injected into the start of the file data. .TP 8n ar\[hy]pdp11 The archive will be written using the \f[I]ar\fP(1) format, in the most ancient pre\[hy]V7 variant. (There are also \f[I]ar\[hy]pdp11\[hy]le\fP and \f[I]ar\[hy]pdp11\[hy]le\fP names, if you need to select the byte order.) .TP 8n ar\[hy]port5 The archive will be written using the \f[I]ar\fP(1) format, in the PORT5 variant. (There are also \f[I]ar\[hy]port5\[hy]le\fP and \f[I]ar\[hy]port5\[hy]le\fP names, if you need to select the byte order.) .TP 8n ar\[hy]v7 The archive will be written using the \f[I]ar\fP(1) format, ancient Unix Version 7 variant. (There are also \f[I]ar\[hy]v7\[hy]le\fP and .TP 8n posix The format that GNU tar uses. .TP 8n tar\[hy]bsd The format that BSD \f[I]tar\fP(1) uses. .TP 8n cpio The new \f[I]cpio\fP(5) ASCII format. .TP 8n cpio\[hy]bin The \f[I]cpio\fP(5) "old binary" format, using host byte order. .TP 8n cpio\[hy]bin\[hy]le The \f[I]cpio\fP(5) "old binary" format, using littl\[hy]-endian byte order. .TP 8n cpio\[hy]bin\[hy]be The \f[I]cpio\fP(5) "old binary" format, using big\[hy]endian byte order. .TP 8n cpio\[hy]crc The \f[I]cpio\fP(5) "crc ascii" format. .TP 8n cpio\[hy]old\[hy]ascii The old \f[I]cpio\fP(5) ASCII format. .TP 8n ustar This is the format that Joerg Schilling's \f[I]ustar\fP(1) uses. .TP 8n v7 The ancient UNIX V7 \f[I]tar\fP(1) format. .PP Any other format name will produce an error. .RE .TP 8n \fB\-Prefix\fP \f[I]string\fP .br This option is used to add a prefix directory name to the name of every file in the archive file. .\" ---------- P --------------------------------------------------------- .TP 8n \fB\-PROgress\fP This option is used to obtain a progress indicator. Only works in combination with the \f[I]\-ifmt=list\fP option. .\" ---------- Q --------------------------------------------------------- .\" ---------- R --------------------------------------------------------- .TP 8n \fB\-Remove_Prefix\fP \f[I]number\fP .br This option is used to remove a number of leading directories from the name of every file in the archive file, if present. The prefixes will be removed before any prefix specified by the .B \-Prefix option is prepended. .TP 8n \fB\-Remove_Prefix\fP \f[I]string\fP .RS This option is used to remove a prefix directory name from the name of every file in the archive file, if present. This option may be given more than once, and as many of the prefixes as appear will be removed. The prefixes will be removed before any prefix specified by the .B \-Prefix option is prepended. .PP This option is potentially ambiguous with the preceding option, if you wish to remove a leading prefix which looks like a number. If this is the case, add a slash ("/") to the end of the prefix to stop it looking like a number. .RE .\" ---------- S --------------------------------------------------------- .\" ---------- T --------------------------------------------------------- .\" ---------- U --------------------------------------------------------- .TP 8n .B \-UpCase .br This option may be used to force file names to be all upper case. Warning: duplicate file names may result. .TP 8n \fB\-User\fP \f[I]arg\fP .br This option may be used to set both the user name and user number fields in the header of every file in the archive file. The argument may be either a string or a number. It is an error if a corresponding entry cannot be found in the .I /etc/passwd file. .TP 8n \fB\-User_NAme\fP \f[I]string\fP .br This option is used to set the user name field in the header of every file in the archive file. The string may be any arbitrary string, it is not restricted to a known user. .TP 8n \fB\-User_NAme\fP \f[I]number\fP .br This option is used to set the user name field in the header of every file in the archive file. The number is mapped to a user name through the .I /etc/passwd file. It is an error if a corresponding user cannot be found. .TP 8n \fB\-User_NUmber\fP \f[I]string\fP .br This option is used to set the user number field in the header of every file in the archive file. The string is mapped to a user number through the .I /etc/passwd file. It is an error if a corresponding user cannot be found. .TP 8n \fB\-User_NUmber\fP \f[I]number\fP .br This option is used to set the user number field in the header of every file in the archive file. The number may be any arbitrary number, it is not restricted to a known user. .\" ---------- V --------------------------------------------------------- .TP 8n .B \-VERSion .br Print the version of the .I \*(n) program being executed. .\" ---------- W --------------------------------------------------------- .\" ---------- X --------------------------------------------------------- .\" ---------- Y --------------------------------------------------------- .\" ---------- Z --------------------------------------------------------- .so man/man1/o__rules.so .so man/man1/z_exit.so .SH SEE ALSO .TP 8n \f[I]ar\fP(1) Create, modify, and extract from archives .TP 8n \f[I]ar\fP(5) Format of \f[I]ar\fP(1) archive files (not all systems have this man page). .TP 8n \f[I]cpio\fP(1) Copy files to and from archives .TP 8n \f[I]cpio\fP(5) Format of \f[I]cpio\fP(1) archive files .TP 8n \f[I]find\fP(1) Search for files in a directory hierarchy .TP 8n \f[I]tar\fP(1) Store and extract files from a tape or disk archive .TP 8n \f[I]tar\fP(5) Format of \f[I]tar\fP(1) archive files .so man/man1/z_cr.so .\" vim: set ts=8 sw=4 et : tardy-1.28/man/man1/tardy.h 644 0 0 3462412163037023 137730ustar PeterMiller".ds n) tardy", ".TH Tardy 1", ".SH NAME", "tardy \\- a tar post-processor", ".XX \"tardy(1)\" \"a tar(1) post-processor\"", ".SH SYNOPSIS", ".B \\*(n)", "[", ".IR option \\&...", "][", ".IR infile", "[", ".IR outfile", "]]", ".br", ".B \\*(n)", ".B \\-Help", ".br", ".B \\*(n)", ".B \\-VERSion", ".SH DESCRIPTION", "The \\fI\\*(n)\\fP program is used to manipulate the file headers within", "archive files. Supported archive formats include \\f[I]tar\\fP(1),", "\\f[I]cpio\\fP(1) and \\f[I]ar\\fP(1).", ".PP", "This is useful when preparing sources for Internet archive sites,", "and you don't want to included details of your development environment", "in the \\f[I]tar\\fP(1) file.", ".PP", "One of the most useful features is the ability to add a prefix to the", "names of the files within the \\f[I]tar\\fP(1) file. An example is adding", "the prefix \\[lq].\\[rq], for when you have a \\f[I]tar\\fP(1) file with absolute", "paths in it, and need to extract the file with relative paths.", ".PP", "The GNU tar format headers are understood,", "including extended names.", ".PP", "If no input file is named,", "or the special name \\[lq]\\-\\[rq] is used,", "input will be read from the standard input.", "Similarly,", "if no output file is named,", "or the special name \\[lq]-\\[rq] is used,", "output will be written to the standard output.", "Note that \\fI\\*(n)\\fP will refuse to read from or write to a terminal,", "as this indicates that the user has made a mistake.", ".PP", "If the input is in \\f[I]gzip\\fP(1) format, it will be automatically", "\\f[I]gunzip\\fP(1)ed before processing. Similarly, if the output file", "name indicates that \\f[I]gzip\\fP(1) should be used, this will be done", "automatically on output.", ".SH OPTIONS", "The following options are understood:", ".TP 8n", "\\fB\\-Block_Size\\fP \\f[I]number\\fP", "This option many be used to specify the block size, as a multiple of", "512 bytes. The default is \\f[CW]\\-bs=20\\fP resulting in a 10kB block size.", ".TP 8n", ".B \\-Clean_Meta", ".br", "This option may be used to", "ensure that file names do not contain shell meta characters.", "If any are found, they are replaced by a hyphen (\\-) character.", "Warning: duplicate file names may result.", ".TP 8n", ".B -Clean_Print", ".br", "This option may be used to", "ensure that file names only contain printable ASCII characters.", "If any non-printable characters are found,", "they are replaced by a hyphen (\\-) character.", "Warning: duplicate file names may result.", ".TP 8n", ".B \\-Clean_Space", ".br", "This option may be used to", "ensure that file names contain no white space characters.", "If any are found, they are replaced by a hyphen (\\-) character.", "Warning: duplicate file names may result.", ".TP 8n", ".B \\-Clean", ".br", "This option is a terse way of specifying all of the above 3 options.", ".TP 8n", ".B \\-DownCase", ".br", "This option may be used to", "force file names to be all lower case.", "Warning: duplicate file names may result.", ".TP 8n", "\\fB\\-EXclude\\fP \\f[I]pattern\\fP", "This option may be used to completely remove files from the archive.", "All files that have a filename patching the given shell filename pattern", "will be removed.", "Be careful with wild cards, they match everything, including slash (/)", "characters.", "The exclude pattern is applied before all file-name manipulating patterns.", ".TP 8n", "\\fB\\-eXtract\\fP", "This option may be used to extract the contents of an archive.", ".TP 8n", "\\fB\\-Group\\fP \\f[I]arg\\fP", ".br", "This option may be used to set both", "the group name and group number fields", "in the header of every file in the archive file.", "The argument may be either a string or a number.", "It is an error if a corresponding entry cannot be found in the", ".I /etc/group", "file.", ".TP 8n", "\\fB-Group_NAme\\fP \\f[I]string\\fP", ".br", "This option is used to", "set the group name field in the header", "of every file in the archive file.", "The string may be any arbitrary string,", "it is not restricted to a known group.", ".TP 8n", "\\fB\\-Group_NAme\\fP \\f[I]number\\fP", ".br", "This option is used to", "set the group name field in the header", "of every file in the archive file.", "The number is mapped to a group name through the", ".I /etc/group", "file.", "It is an error if a corresponding group cannot be found.", ".TP 8n", "\\fB\\-Group_NUmber\\fP \\f[I]string\\fP", ".br", "This option is used to", "set the group number field in the header", "of every file in the archive file.", "The string is mapped to a group number through the", ".I /etc/group", "file.", "It is an error if a corresponding group cannot be found.", ".TP 8n", "\\fB\\-Group_NUmber\\fP \\f[I]number\\fP", ".br", "This option is used to", "set the group number field in the header", "of every file in the archive file.", "The number may be any arbitrary number,", "it is not restricted to a known group.", ".so man/man1/o_help.so", ".TP 8n", "\\fB\\-Input_ForMaT\\fP \\f[I]name\\fP", ".RS", "By default, the input file is examined to automatically detect the input", "archive file's format.", "This option may be used to specify the input format to be used.", "The input format \\f[I]name\\fPs are", ".TP 8n", "tar", "This format understands all of the various \\f[I]tar\\fP(1) formats.", "This is the default.", ".TP 8n", "tar\\[hy]bsd", "This format expects BSD \\f[I]tar\\fP(1) archives.", ".TP 8n", "ustar", "This format expects \\f[I]ustar\\fP(1) format archives.", ".TP 8n", "list", "The input is a text file which contains one file name per line.", "The named files are read as if they were the input.", "It is common for \\f[I]find\\fP(1) to be used to form the list of file names.", ".TP 8n", "directory", "The input is a text file which contains one file name per line.", "The named files are read as if they were an archive input.", "If any directories are found, they will be descended recursively.", ".TP 8n", "cpio", "The file is expected to be in one of the \\f[I]cpio\\fP(5) formats,", "and will be examined to figure out which.", ".TP 8n", "cpio\\[hy]bin", "This format expects \\f[I]cpio\\fP(5) \\[lq]old binary\\[rq] format archives.", ".TP 8n", "cpio\\[hy]crc", "This format expects \\f[I]cpio\\fP(5) \\[lq]crc\\[rq] format archives.", ".TP 8n", "cpio\\[hy]new\\[hy]ascii", "This format expects \\f[I]cpio\\fP(5) \\[lq]new ascii\\[rq] format archives.", ".TP 8n", "cpio\\[hy]old\\[hy]ascii", "This format expects \\f[I]cpio\\fP(5) \\[lq]old ascii\\[rq] format archives.", ".TP 8n", "ar", "The file is expected to be in one of the \\f[I]ar\\fP(1) formats,", "and will be examined to figure out which.", ".TP 8n", "ar\\[hy]bsd", "This format expects \\f[I]ar\\fP(1) \\[lq]BSD\\[rq] format archives.", ".TP 8n", "ar\\[hy]pdp11", "This format expects \\f[I]ar\\fP(1) archives, in the ancient pre\\[hy]V7 format.", ".TP 8n", "ar\\[hy]v7", "This format expects \\f[I]ar\\fP(1) \\[lq]Unix Version 7\\[rq] format archives.", ".PP", "Any other format name will produce an error.", ".RE", ".TP 8n", ".B \\-List", ".br", "Give a terse listing of the file headers on the standard error", "as they are written to the output.", ".TP 8n", "\\fB\\-Mode_Clear\\fP \\f[I]bits\\fP", ".br", "This option may be used to", "set the mode of each file in the archive file.", "The", ".I bits", "specified are cleared in the mode.", "You should use an octal number with a leading zero as the argument;", "if you omit the leading zero it will be interpreted as decimal.", "The", ".B \\-Mode_Set", "option is applied first,", "the", ".B \\-Mode_Clear", "option is applied second;", "if neither is specified the mode of each file is unaltered.", ".TP 8n", "\\fB\\-Mode_Set\\fP \\f[I]bits\\fP", ".br", "This option may be used to set the", "mode of each file in the archive file.", "The", ".I bits", "specified are set in the mode.", "You should use an octal number with a leading zero as the argument;", "if you omit the leading zero it will be interpreted as decimal.", ".TP 8n", ".B \\-No_Directories", ".br", "This option may be used to suppress directories", "from the output.", "This can be useful when the archive has been created with", "directories in useless modes.", ".TP 8n", ".B \\-Now", ".br", "Set the last\\[hy]time\\[hy]modified field of the headers to the current time,", "all files will be given the same time.", ".TP 8n", ".B \\-Old_Type", ".br", "By default,", "\\*(n) corrects the old normal file", "type into the modern normal file type.", "This option requests that old normal file", "type indicators remain unaltered.", ".TP 8n", "\\fB\\-Output_ForMaT\\fP \\f[I]name\\fP", ".RS", "By default, \\f[I]\\*(n)\\fP tries to write the same format on output as", "it sees on input.", "This option may be used to specify the output format to be used.", "The output format \\f[I]name\\fPs are", ".TP 8n", "ar", "The archive will be written using the \\f[I]ar\\fP(1) format, BSD variant.", "Note that this format only supports simple files; it silently discards", "directories, and even discards directory portions of file names.", ".TP 8n", "ar\\[hy]bsd", "The archive will be written using the \\f[I]ar\\fP(1) format, BSD variant.", "Long file names are handled by a special file at the start of the", "archive full of file names.", ".TP 8n", "ar\\[hy]bsd\\[hy]l2", "The archive will be written using the \\f[I]ar\\fP(1) format, BSD variant.", "Long file names are handled by special file name mangling in the", "archive, with the actual file name transparently injected into the start", "of the file data.", ".TP 8n", "ar\\[hy]pdp11", "The archive will be written using the \\f[I]ar\\fP(1) format, in the most", "ancient pre\\[hy]V7 variant. (There are also \\f[I]ar\\[hy]pdp11\\[hy]le\\fP", "and \\f[I]ar\\[hy]pdp11\\[hy]le\\fP names, if you need to select the byte order.)", ".TP 8n", "ar\\[hy]port5", "The archive will be written using the \\f[I]ar\\fP(1) format, in the", "PORT5 variant. (There are also \\f[I]ar\\[hy]port5\\[hy]le\\fP and", "\\f[I]ar\\[hy]port5\\[hy]le\\fP names, if you need to select the byte order.)", ".TP 8n", "ar\\[hy]v7", "The archive will be written using the \\f[I]ar\\fP(1) format, ancient", "Unix Version 7 variant. (There are also \\f[I]ar\\[hy]v7\\[hy]le\\fP and", ".TP 8n", "posix", "The format that GNU tar uses.", ".TP 8n", "tar\\[hy]bsd", "The format that BSD \\f[I]tar\\fP(1) uses.", ".TP 8n", "cpio", "The new \\f[I]cpio\\fP(5) ASCII format.", ".TP 8n", "cpio\\[hy]bin", "The \\f[I]cpio\\fP(5) \"old binary\" format, using host byte order.", ".TP 8n", "cpio\\[hy]bin\\[hy]le", "The \\f[I]cpio\\fP(5) \"old binary\" format, using littl\\[hy]-endian byte order.", ".TP 8n", "cpio\\[hy]bin\\[hy]be", "The \\f[I]cpio\\fP(5) \"old binary\" format, using big\\[hy]endian byte order.", ".TP 8n", "cpio\\[hy]crc", "The \\f[I]cpio\\fP(5) \"crc ascii\" format.", ".TP 8n", "cpio\\[hy]old\\[hy]ascii", "The old \\f[I]cpio\\fP(5) ASCII format.", ".TP 8n", "ustar", "This is the format that Joerg Schilling's \\f[I]ustar\\fP(1) uses.", ".TP 8n", "v7", "The ancient UNIX V7 \\f[I]tar\\fP(1) format.", ".PP", "Any other format name will produce an error.", ".RE", ".TP 8n", "\\fB\\-Prefix\\fP \\f[I]string\\fP", ".br", "This option is used to add a prefix directory name to the", "name of every file in the archive file.", ".TP 8n", "\\fB\\-PROgress\\fP", "This option is used to obtain a progress indicator.", "Only works in combination with the \\f[I]\\-ifmt=list\\fP option.", ".TP 8n", "\\fB\\-Remove_Prefix\\fP \\f[I]number\\fP", ".br", "This option is used to remove a number of leading directories from", "the name of every file in the archive file,", "if present.", "The prefixes will be removed before any prefix specified by the", ".B \\-Prefix", "option is prepended.", ".TP 8n", "\\fB\\-Remove_Prefix\\fP \\f[I]string\\fP", ".RS", "This option is used to remove a prefix directory name from", "the name of every file in the archive file,", "if present.", "This option may be given more than once,", "and as many of the prefixes as appear will be removed.", "The prefixes will be removed before any prefix specified by the", ".B \\-Prefix", "option is prepended.", ".PP", "This option is potentially ambiguous with the preceding option, if you", "wish to remove a leading prefix which looks like a number. If this is", "the case, add a slash (\"/\") to the end of the prefix to stop it looking", "like a number.", ".RE", ".TP 8n", ".B \\-UpCase", ".br", "This option may be used to", "force file names to be all upper case.", "Warning: duplicate file names may result.", ".TP 8n", "\\fB\\-User\\fP \\f[I]arg\\fP", ".br", "This option may be used to set both", "the user name and user number fields", "in the header of every file in the archive file.", "The argument may be either a string or a number.", "It is an error if a corresponding entry cannot be found in the", ".I /etc/passwd", "file.", ".TP 8n", "\\fB\\-User_NAme\\fP \\f[I]string\\fP", ".br", "This option is used to", "set the user name field in the header of every file in the archive file.", "The string may be any arbitrary string,", "it is not restricted to a known user.", ".TP 8n", "\\fB\\-User_NAme\\fP \\f[I]number\\fP", ".br", "This option is used to", "set the user name field in the header of every file in the archive file.", "The number is mapped to a user name through the", ".I /etc/passwd", "file.", "It is an error if a corresponding user cannot be found.", ".TP 8n", "\\fB\\-User_NUmber\\fP \\f[I]string\\fP", ".br", "This option is used to", "set the user number field in the header of", "every file in the archive file.", "The string is mapped to a user number through the", ".I /etc/passwd", "file.", "It is an error if a corresponding user cannot be found.", ".TP 8n", "\\fB\\-User_NUmber\\fP \\f[I]number\\fP", ".br", "This option is used to", "set the user number field in the header", "of every file in the archive file.", "The number may be any arbitrary number,", "it is not restricted to a known user.", ".TP 8n", ".B \\-VERSion", ".br", "Print the version of the", ".I \\*(n)", "program being executed.", ".so man/man1/o__rules.so", ".so man/man1/z_exit.so", ".SH SEE ALSO", ".TP 8n", "\\f[I]ar\\fP(1)", "Create, modify, and extract from archives", ".TP 8n", "\\f[I]ar\\fP(5)", "Format of \\f[I]ar\\fP(1) archive files (not all systems have this man page).", ".TP 8n", "\\f[I]cpio\\fP(1)", "Copy files to and from archives", ".TP 8n", "\\f[I]cpio\\fP(5)", "Format of \\f[I]cpio\\fP(1) archive files", ".TP 8n", "\\f[I]find\\fP(1)", "Search for files in a directory hierarchy", ".TP 8n", "\\f[I]tar\\fP(1)", "Store and extract files from a tape or disk archive", ".TP 8n", "\\f[I]tar\\fP(5)", "Format of \\f[I]tar\\fP(1) archive files", ".so man/man1/z_cr.so", tardy-1.28/man/man1/tardy_license.1 644 0 0 10547012163037023 154240ustar PeterMiller.TH GPL GNU GPL GNU "Free Software Foundation" .PP .ce 2 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 .XX "tardy_license(1)" "GNU General Public License" .PP Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. .PP .ce 1 Preamble .PP The GNU General Public License is a free, copyleft license for software and other kinds of works. .PP The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program -- to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. .PP 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 them 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. .PP To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. .PP For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. 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. .PP Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. .PP For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. .PP Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. .PP Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. .PP The precise terms and conditions for copying, distribution and modification follow. .ne 2i .PP .ce 1 TERMS AND CONDITIONS .PP 0. Definitions. .PP \[lq]This License\[rq] refers to version 3 of the GNU General Public License. .PP \[lq]Copyright\[rq] also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. .PP \[lq]The Program\[rq] refers to any copyrightable work licensed under this License. Each licensee is addressed as \[lq]you\[rq]. \[lq]Licensees\[rq] and \[lq]recipients\[rq] may be individuals or organizations. .PP To \[lq]modify\[rq] a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a \[lq]modified version\[rq] of the earlier work or a work \[lq]based on\[rq] the earlier work. .PP A \[lq]covered work\[rq] means either the unmodified Program or a work based on the Program. .PP To \[lq]propagate\[rq] a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. .PP To \[lq]convey\[rq] a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. .PP An interactive user interface displays \[lq]Appropriate Legal Notices\[rq] to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. .ne 2i .PP 1. Source Code. .PP The \[lq]source code\[rq] for a work means the preferred form of the work for making modifications to it. \[lq]Object code\[rq] means any non-source form of a work. .PP A \[lq]Standard Interface\[rq] means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. .PP The \[lq]System Libraries\[rq] of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A \[lq]Major Component\[rq], in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. .PP The \[lq]Corresponding Source\[rq] for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. .PP The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. .PP The Corresponding Source for a work in source code form is that same work. .ne 2i .PP 2. Basic Permissions. .PP All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. .PP You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. .PP Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. .PP 3. Protecting Users' Legal Rights From Anti-Circumvention Law. .PP No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. .PP When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. .PP 4. Conveying Verbatim Copies. .PP You may convey 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; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. .PP You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. .PP 5. Conveying Modified Source Versions. .PP You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: .TP 4n a) The work must carry prominent notices stating that you modified it, and giving a relevant date. .TP 4n b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to \[lq]keep intact all notices\[rq]. .TP 4n c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. .TP 4n d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. .PP A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an \[lq]aggregate\[rq] if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. .ne 2i .PP 6. Conveying Non-Source Forms. .PP You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: .TP 4n a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. .TP 4n b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. .TP 4n c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. .TP 4n d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. .TP 4n e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. .PP A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. .PP A \[lq]User Product\[rq] is either (1) a \[lq]consumer product\[rq], which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, \[lq]normally used\[rq] refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. .PP \[lq]Installation Information\[rq] for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. .PP If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). .PP The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. .PP Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. .ne 2i .PP 7. Additional Terms. .PP \[lq]Additional permissions\[rq] are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. .PP When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. .PP Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: .TP 4n a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or .TP 4n b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or .TP c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or .TP 4n d) Limiting the use for publicity purposes of names of licensors or authors of the material; or .TP 4n e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or .TP 4n f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. .PP All other non-permissive additional terms are considered \[lq]further restrictions\[rq] within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. .PP If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. .PP Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. .ne 2i .PP 8. Termination. .PP You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). .PP However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. .PP Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. .PP Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. .ne 2i .PP 9. Acceptance Not Required for Having Copies. .PP You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. .ne 2i .PP 10. Automatic Licensing of Downstream Recipients. .PP Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. .PP An \[lq]entity transaction\[rq] is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. .PP You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. .ne 2i .PP 11. Patents. .PP A \[lq]contributor\[rq] is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's \[lq]contributor version\[rq]. .PP A contributor's \[lq]essential patent claims\[rq] are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, \[lq]control\[rq] includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. .PP Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. .PP In the following three paragraphs, a \[lq]patent license\[rq] is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To \[lq]grant\[rq] such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. .PP If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. \[lq]Knowingly relying\[rq] means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. .PP If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. .PP A patent license is \[lq]discriminatory\[rq] if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. .PP Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. .ne 2i .PP 12. No Surrender of Others' Freedom. .PP If 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 convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. .ne 2i .PP 13. Use with the GNU Affero General Public License. .PP Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. .ne 2i .PP 14. Revised Versions of this License. .PP The Free Software Foundation may publish revised and/or new versions of the GNU 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. .PP Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License \[lq]or any later version\[rq] applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. .PP If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. .PP Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. .ne 2i .PP 15. Disclaimer of Warranty. .PP 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 \[lq]AS IS\[rq] 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. .ne 2i .PP 16. Limitation of Liability. .PP IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 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. .ne 2i .PP 17. Interpretation of Sections 15 and 16. .PP If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. .PP .ce 1 END OF TERMS AND CONDITIONS .ne 2i .PP .ce 1 How to Apply These Terms to Your New Programs .PP 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. .PP 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 state the exclusion of warranty; and each file should have at least the \[lq]copyright\[rq] line and a pointer to where the full notice is found. .PP .RS 4n .if n < .if t .ft I one line to give the program's name and a brief idea of what it does. .if t .ft P .if n > .br Copyright (C) .if n < .if t .ft I year .if t .ft P .if n > .if n < .if t .ft I name of author .if t .ft P .if n > .PP 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 3 of the License, or (at your option) any later version. .PP 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. .PP You should have received a copy of the GNU General Public License along with this program. If not, see . .RE .PP Also add information on how to contact you by electronic and paper mail. .PP If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: .PP .RS 4n Copyright (C) .br This program comes with ABSOLUTELY NO WARRANTY; for details type \[lq]show w\[rq]. This is free software, and you are welcome to redistribute it under certain conditions; type \[lq]show c\[rq] for details. .RE .PP The hypothetical commands \[lq]show w\[rq] and \[lq]show c\[rq] should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an \[lq]about box\[rq]. .PP You should also get your employer (if you work as a programmer) or school, if any, to sign a \[lq]copyright disclaimer\[rq] for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . .PP The GNU 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 Lesser General Public License instead of this License. But first, please read . tardy-1.28/man/man1/tardy_license.h 644 0 0 11207312163037023 155100ustar PeterMiller".TH GPL GNU GPL GNU \"Free Software Foundation\"", ".PP", ".ce 2", "GNU GENERAL PUBLIC LICENSE", "Version 3, 29 June 2007", ".XX \"tardy_license(1)\" \"GNU General Public License\"", ".PP", "Copyright (C) 2007 Free Software Foundation, Inc. ", "Everyone is permitted to copy and distribute verbatim copies", "of this license document, but changing it is not allowed.", ".PP", ".ce 1", "Preamble", ".PP", "The GNU General Public License is a free, copyleft license for", "software and other kinds of works.", ".PP", "The licenses for most software and other practical works are designed", "to take away your freedom to share and change the works. By contrast,", "the GNU General Public License is intended to guarantee your freedom to", "share and change all versions of a program -- to make sure it remains free", "software for all its users. We, the Free Software Foundation, use the", "GNU General Public License for most of our software; it applies also to", "any other work released this way by its authors. You can apply it to", "your programs, too.", ".PP", "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", "them 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.", ".PP", "To protect your rights, we need to prevent others from denying you", "these rights or asking you to surrender the rights. Therefore, you have", "certain responsibilities if you distribute copies of the software, or if", "you modify it: responsibilities to respect the freedom of others.", ".PP", "For example, if you distribute copies of such a program, whether", "gratis or for a fee, you must pass on to the recipients the same", "freedoms that you received. 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.", ".PP", "Developers that use the GNU GPL protect your rights with two steps:", "(1) assert copyright on the software, and (2) offer you this License", "giving you legal permission to copy, distribute and/or modify it.", ".PP", "For the developers' and authors' protection, the GPL clearly explains", "that there is no warranty for this free software. For both users' and", "authors' sake, the GPL requires that modified versions be marked as", "changed, so that their problems will not be attributed erroneously to", "authors of previous versions.", ".PP", "Some devices are designed to deny users access to install or run", "modified versions of the software inside them, although the manufacturer", "can do so. This is fundamentally incompatible with the aim of", "protecting users' freedom to change the software. The systematic", "pattern of such abuse occurs in the area of products for individuals to", "use, which is precisely where it is most unacceptable. Therefore, we", "have designed this version of the GPL to prohibit the practice for those", "products. If such problems arise substantially in other domains, we", "stand ready to extend this provision to those domains in future versions", "of the GPL, as needed to protect the freedom of users.", ".PP", "Finally, every program is threatened constantly by software patents.", "States should not allow patents to restrict development and use of", "software on general-purpose computers, but in those that do, we wish to", "avoid the special danger that patents applied to a free program could", "make it effectively proprietary. To prevent this, the GPL assures that", "patents cannot be used to render the program non-free.", ".PP", "The precise terms and conditions for copying, distribution and", "modification follow.", ".ne 2i", ".PP", ".ce 1", "TERMS AND CONDITIONS", ".PP", "0. Definitions.", ".PP", "\\[lq]This License\\[rq] refers to version 3 of the GNU General Public License.", ".PP", "\\[lq]Copyright\\[rq] also means copyright-like laws that apply to other kinds of", "works, such as semiconductor masks.", ".PP", "\\[lq]The Program\\[rq] refers to any copyrightable work licensed under this", "License. Each licensee is addressed as \\[lq]you\\[rq]. \\[lq]Licensees\\[rq] and", "\\[lq]recipients\\[rq] may be individuals or organizations.", ".PP", "To \\[lq]modify\\[rq] a work means to copy from or adapt all or part of the work", "in a fashion requiring copyright permission, other than the making of an", "exact copy. The resulting work is called a \\[lq]modified version\\[rq] of the", "earlier work or a work \\[lq]based on\\[rq] the earlier work.", ".PP", "A \\[lq]covered work\\[rq] means either the unmodified Program or a work based", "on the Program.", ".PP", "To \\[lq]propagate\\[rq] a work means to do anything with it that, without", "permission, would make you directly or secondarily liable for", "infringement under applicable copyright law, except executing it on a", "computer or modifying a private copy. Propagation includes copying,", "distribution (with or without modification), making available to the", "public, and in some countries other activities as well.", ".PP", "To \\[lq]convey\\[rq] a work means any kind of propagation that enables other", "parties to make or receive copies. Mere interaction with a user through", "a computer network, with no transfer of a copy, is not conveying.", ".PP", "An interactive user interface displays \\[lq]Appropriate Legal Notices\\[rq]", "to the extent that it includes a convenient and prominently visible", "feature that (1) displays an appropriate copyright notice, and (2)", "tells the user that there is no warranty for the work (except to the", "extent that warranties are provided), that licensees may convey the", "work under this License, and how to view a copy of this License. If", "the interface presents a list of user commands or options, such as a", "menu, a prominent item in the list meets this criterion.", ".ne 2i", ".PP", "1. Source Code.", ".PP", "The \\[lq]source code\\[rq] for a work means the preferred form of the work", "for making modifications to it. \\[lq]Object code\\[rq] means any non-source", "form of a work.", ".PP", "A \\[lq]Standard Interface\\[rq] means an interface that either is an official", "standard defined by a recognized standards body, or, in the case of", "interfaces specified for a particular programming language, one that", "is widely used among developers working in that language.", ".PP", "The \\[lq]System Libraries\\[rq] of an executable work include anything, other", "than the work as a whole, that (a) is included in the normal form of", "packaging a Major Component, but which is not part of that Major", "Component, and (b) serves only to enable use of the work with that", "Major Component, or to implement a Standard Interface for which an", "implementation is available to the public in source code form. A", "\\[lq]Major Component\\[rq], in this context, means a major essential component", "(kernel, window system, and so on) of the specific operating system", "(if any) on which the executable work runs, or a compiler used to", "produce the work, or an object code interpreter used to run it.", ".PP", "The \\[lq]Corresponding Source\\[rq] for a work in object code form means all", "the source code needed to generate, install, and (for an executable", "work) run the object code and to modify the work, including scripts to", "control those activities. However, it does not include the work's", "System Libraries, or general-purpose tools or generally available free", "programs which are used unmodified in performing those activities but", "which are not part of the work. For example, Corresponding Source", "includes interface definition files associated with source files for", "the work, and the source code for shared libraries and dynamically", "linked subprograms that the work is specifically designed to require,", "such as by intimate data communication or control flow between those", "subprograms and other parts of the work.", ".PP", "The Corresponding Source need not include anything that users", "can regenerate automatically from other parts of the Corresponding", "Source.", ".PP", "The Corresponding Source for a work in source code form is that", "same work.", ".ne 2i", ".PP", "2. Basic Permissions.", ".PP", "All rights granted under this License are granted for the term of", "copyright on the Program, and are irrevocable provided the stated", "conditions are met. This License explicitly affirms your unlimited", "permission to run the unmodified Program. The output from running a", "covered work is covered by this License only if the output, given its", "content, constitutes a covered work. This License acknowledges your", "rights of fair use or other equivalent, as provided by copyright law.", ".PP", "You may make, run and propagate covered works that you do not", "convey, without conditions so long as your license otherwise remains", "in force. You may convey covered works to others for the sole purpose", "of having them make modifications exclusively for you, or provide you", "with facilities for running those works, provided that you comply with", "the terms of this License in conveying all material for which you do", "not control copyright. Those thus making or running the covered works", "for you must do so exclusively on your behalf, under your direction", "and control, on terms that prohibit them from making any copies of", "your copyrighted material outside their relationship with you.", ".PP", "Conveying under any other circumstances is permitted solely under", "the conditions stated below. Sublicensing is not allowed; section 10", "makes it unnecessary.", ".PP", "3. Protecting Users' Legal Rights From Anti-Circumvention Law.", ".PP", "No covered work shall be deemed part of an effective technological", "measure under any applicable law fulfilling obligations under article", "11 of the WIPO copyright treaty adopted on 20 December 1996, or", "similar laws prohibiting or restricting circumvention of such", "measures.", ".PP", "When you convey a covered work, you waive any legal power to forbid", "circumvention of technological measures to the extent such circumvention", "is effected by exercising rights under this License with respect to", "the covered work, and you disclaim any intention to limit operation or", "modification of the work as a means of enforcing, against the work's", "users, your or third parties' legal rights to forbid circumvention of", "technological measures.", ".PP", "4. Conveying Verbatim Copies.", ".PP", "You may convey 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;", "keep intact all notices stating that this License and any", "non-permissive terms added in accord with section 7 apply to the code;", "keep intact all notices of the absence of any warranty; and give all", "recipients a copy of this License along with the Program.", ".PP", "You may charge any price or no price for each copy that you convey,", "and you may offer support or warranty protection for a fee.", ".PP", "5. Conveying Modified Source Versions.", ".PP", "You may convey a work based on the Program, or the modifications to", "produce it from the Program, in the form of source code under the", "terms of section 4, provided that you also meet all of these conditions:", ".TP 4n", "a)", "The work must carry prominent notices stating that you modified", "it, and giving a relevant date.", ".TP 4n", "b)", "The work must carry prominent notices stating that it is", "released under this License and any conditions added under section", "7. This requirement modifies the requirement in section 4 to", "\\[lq]keep intact all notices\\[rq].", ".TP 4n", "c)", "You must license the entire work, as a whole, under this", "License to anyone who comes into possession of a copy. This", "License will therefore apply, along with any applicable section 7", "additional terms, to the whole of the work, and all its parts,", "regardless of how they are packaged. This License gives no", "permission to license the work in any other way, but it does not", "invalidate such permission if you have separately received it.", ".TP 4n", "d)", "If the work has interactive user interfaces, each must display", "Appropriate Legal Notices; however, if the Program has interactive", "interfaces that do not display Appropriate Legal Notices, your", "work need not make them do so.", ".PP", "A compilation of a covered work with other separate and independent", "works, which are not by their nature extensions of the covered work,", "and which are not combined with it such as to form a larger program,", "in or on a volume of a storage or distribution medium, is called an", "\\[lq]aggregate\\[rq] if the compilation and its resulting copyright are not", "used to limit the access or legal rights of the compilation's users", "beyond what the individual works permit. Inclusion of a covered work", "in an aggregate does not cause this License to apply to the other", "parts of the aggregate.", ".ne 2i", ".PP", "6. Conveying Non-Source Forms.", ".PP", "You may convey a covered work in object code form under the terms", "of sections 4 and 5, provided that you also convey the", "machine-readable Corresponding Source under the terms of this License,", "in one of these ways:", ".TP 4n", "a)", "Convey the object code in, or embodied in, a physical product", "(including a physical distribution medium), accompanied by the", "Corresponding Source fixed on a durable physical medium", "customarily used for software interchange.", ".TP 4n", "b)", "Convey the object code in, or embodied in, a physical product", "(including a physical distribution medium), accompanied by a", "written offer, valid for at least three years and valid for as", "long as you offer spare parts or customer support for that product", "model, to give anyone who possesses the object code either (1) a", "copy of the Corresponding Source for all the software in the", "product that is covered by this License, on a durable physical", "medium customarily used for software interchange, for a price no", "more than your reasonable cost of physically performing this", "conveying of source, or (2) access to copy the", "Corresponding Source from a network server at no charge.", ".TP 4n", "c)", "Convey individual copies of the object code with a copy of the", "written offer to provide the Corresponding Source. This", "alternative is allowed only occasionally and noncommercially, and", "only if you received the object code with such an offer, in accord", "with subsection 6b.", ".TP 4n", "d)", "Convey the object code by offering access from a designated", "place (gratis or for a charge), and offer equivalent access to the", "Corresponding Source in the same way through the same place at no", "further charge. You need not require recipients to copy the", "Corresponding Source along with the object code. If the place to", "copy the object code is a network server, the Corresponding Source", "may be on a different server (operated by you or a third party)", "that supports equivalent copying facilities, provided you maintain", "clear directions next to the object code saying where to find the", "Corresponding Source. Regardless of what server hosts the", "Corresponding Source, you remain obligated to ensure that it is", "available for as long as needed to satisfy these requirements.", ".TP 4n", "e)", "Convey the object code using peer-to-peer transmission, provided", "you inform other peers where the object code and Corresponding", "Source of the work are being offered to the general public at no", "charge under subsection 6d.", ".PP", "A separable portion of the object code, whose source code is excluded", "from the Corresponding Source as a System Library, need not be", "included in conveying the object code work.", ".PP", "A \\[lq]User Product\\[rq] is either (1) a \\[lq]consumer product\\[rq],", "which means any", "tangible personal property which is normally used for personal, family,", "or household purposes, or (2) anything designed or sold for incorporation", "into a dwelling. In determining whether a product is a consumer product,", "doubtful cases shall be resolved in favor of coverage. For a particular", "product received by a particular user, \\[lq]normally used\\[rq] refers to a", "typical or common use of that class of product, regardless of the status", "of the particular user or of the way in which the particular user", "actually uses, or expects or is expected to use, the product. A product", "is a consumer product regardless of whether the product has substantial", "commercial, industrial or non-consumer uses, unless such uses represent", "the only significant mode of use of the product.", ".PP", "\\[lq]Installation Information\\[rq] for a User Product means any methods,", "procedures, authorization keys, or other information required to install", "and execute modified versions of a covered work in that User Product from", "a modified version of its Corresponding Source. The information must", "suffice to ensure that the continued functioning of the modified object", "code is in no case prevented or interfered with solely because", "modification has been made.", ".PP", "If you convey an object code work under this section in, or with, or", "specifically for use in, a User Product, and the conveying occurs as", "part of a transaction in which the right of possession and use of the", "User Product is transferred to the recipient in perpetuity or for a", "fixed term (regardless of how the transaction is characterized), the", "Corresponding Source conveyed under this section must be accompanied", "by the Installation Information. But this requirement does not apply", "if neither you nor any third party retains the ability to install", "modified object code on the User Product (for example, the work has", "been installed in ROM).", ".PP", "The requirement to provide Installation Information does not include a", "requirement to continue to provide support service, warranty, or updates", "for a work that has been modified or installed by the recipient, or for", "the User Product in which it has been modified or installed. Access to a", "network may be denied when the modification itself materially and", "adversely affects the operation of the network or violates the rules and", "protocols for communication across the network.", ".PP", "Corresponding Source conveyed, and Installation Information provided,", "in accord with this section must be in a format that is publicly", "documented (and with an implementation available to the public in", "source code form), and must require no special password or key for", "unpacking, reading or copying.", ".ne 2i", ".PP", "7. Additional Terms.", ".PP", "\\[lq]Additional permissions\\[rq] are terms that supplement the terms of this", "License by making exceptions from one or more of its conditions.", "Additional permissions that are applicable to the entire Program shall", "be treated as though they were included in this License, to the extent", "that they are valid under applicable law. If additional permissions", "apply only to part of the Program, that part may be used separately", "under those permissions, but the entire Program remains governed by", "this License without regard to the additional permissions.", ".PP", "When you convey a copy of a covered work, you may at your option", "remove any additional permissions from that copy, or from any part of", "it. (Additional permissions may be written to require their own", "removal in certain cases when you modify the work.) You may place", "additional permissions on material, added by you to a covered work,", "for which you have or can give appropriate copyright permission.", ".PP", "Notwithstanding any other provision of this License, for material you", "add to a covered work, you may (if authorized by the copyright holders of", "that material) supplement the terms of this License with terms:", ".TP 4n", "a)", "Disclaiming warranty or limiting liability differently from the", "terms of sections 15 and 16 of this License; or", ".TP 4n", "b)", "Requiring preservation of specified reasonable legal notices or", "author attributions in that material or in the Appropriate Legal", "Notices displayed by works containing it; or", ".TP", "c)", "Prohibiting misrepresentation of the origin of that material, or", "requiring that modified versions of such material be marked in", "reasonable ways as different from the original version; or", ".TP 4n", "d)", "Limiting the use for publicity purposes of names of licensors or", "authors of the material; or", ".TP 4n", "e)", "Declining to grant rights under trademark law for use of some", "trade names, trademarks, or service marks; or", ".TP 4n", "f)", "Requiring indemnification of licensors and authors of that", "material by anyone who conveys the material (or modified versions of", "it) with contractual assumptions of liability to the recipient, for", "any liability that these contractual assumptions directly impose on", "those licensors and authors.", ".PP", "All other non-permissive additional terms are considered \\[lq]further", "restrictions\\[rq] within the meaning of section 10. If the Program as you", "received it, or any part of it, contains a notice stating that it is", "governed by this License along with a term that is a further", "restriction, you may remove that term. If a license document contains", "a further restriction but permits relicensing or conveying under this", "License, you may add to a covered work material governed by the terms", "of that license document, provided that the further restriction does", "not survive such relicensing or conveying.", ".PP", "If you add terms to a covered work in accord with this section, you", "must place, in the relevant source files, a statement of the", "additional terms that apply to those files, or a notice indicating", "where to find the applicable terms.", ".PP", "Additional terms, permissive or non-permissive, may be stated in the", "form of a separately written license, or stated as exceptions;", "the above requirements apply either way.", ".ne 2i", ".PP", "8. Termination.", ".PP", "You may not propagate or modify a covered work except as expressly", "provided under this License. Any attempt otherwise to propagate or", "modify it is void, and will automatically terminate your rights under", "this License (including any patent licenses granted under the third", "paragraph of section 11).", ".PP", "However, if you cease all violation of this License, then your", "license from a particular copyright holder is reinstated (a)", "provisionally, unless and until the copyright holder explicitly and", "finally terminates your license, and (b) permanently, if the copyright", "holder fails to notify you of the violation by some reasonable means", "prior to 60 days after the cessation.", ".PP", "Moreover, your license from a particular copyright holder is", "reinstated permanently if the copyright holder notifies you of the", "violation by some reasonable means, this is the first time you have", "received notice of violation of this License (for any work) from that", "copyright holder, and you cure the violation prior to 30 days after", "your receipt of the notice.", ".PP", "Termination of your rights under this section does not terminate the", "licenses of parties who have received copies or rights from you under", "this License. If your rights have been terminated and not permanently", "reinstated, you do not qualify to receive new licenses for the same", "material under section 10.", ".ne 2i", ".PP", "9. Acceptance Not Required for Having Copies.", ".PP", "You are not required to accept this License in order to receive or", "run a copy of the Program. Ancillary propagation of a covered work", "occurring solely as a consequence of using peer-to-peer transmission", "to receive a copy likewise does not require acceptance. However,", "nothing other than this License grants you permission to propagate or", "modify any covered work. These actions infringe copyright if you do", "not accept this License. Therefore, by modifying or propagating a", "covered work, you indicate your acceptance of this License to do so.", ".ne 2i", ".PP", "10. Automatic Licensing of Downstream Recipients.", ".PP", "Each time you convey a covered work, the recipient automatically", "receives a license from the original licensors, to run, modify and", "propagate that work, subject to this License. You are not responsible", "for enforcing compliance by third parties with this License.", ".PP", "An \\[lq]entity transaction\\[rq] is a transaction transferring control of an", "organization, or substantially all assets of one, or subdividing an", "organization, or merging organizations. If propagation of a covered", "work results from an entity transaction, each party to that", "transaction who receives a copy of the work also receives whatever", "licenses to the work the party's predecessor in interest had or could", "give under the previous paragraph, plus a right to possession of the", "Corresponding Source of the work from the predecessor in interest, if", "the predecessor has it or can get it with reasonable efforts.", ".PP", "You may not impose any further restrictions on the exercise of the", "rights granted or affirmed under this License. For example, you may", "not impose a license fee, royalty, or other charge for exercise of", "rights granted under this License, and you may not initiate litigation", "(including a cross-claim or counterclaim in a lawsuit) alleging that", "any patent claim is infringed by making, using, selling, offering for", "sale, or importing the Program or any portion of it.", ".ne 2i", ".PP", "11. Patents.", ".PP", "A \\[lq]contributor\\[rq] is a copyright holder who authorizes use under this", "License of the Program or a work on which the Program is based. The", "work thus licensed is called the contributor's \\[lq]contributor version\\[rq].", ".PP", "A contributor's \\[lq]essential patent claims\\[rq] are all patent claims", "owned or controlled by the contributor, whether already acquired or", "hereafter acquired, that would be infringed by some manner, permitted", "by this License, of making, using, or selling its contributor version,", "but do not include claims that would be infringed only as a", "consequence of further modification of the contributor version. For", "purposes of this definition, \\[lq]control\\[rq] includes the right to grant", "patent sublicenses in a manner consistent with the requirements of", "this License.", ".PP", "Each contributor grants you a non-exclusive, worldwide, royalty-free", "patent license under the contributor's essential patent claims, to", "make, use, sell, offer for sale, import and otherwise run, modify and", "propagate the contents of its contributor version.", ".PP", "In the following three paragraphs, a \\[lq]patent license\\[rq] is any express", "agreement or commitment, however denominated, not to enforce a patent", "(such as an express permission to practice a patent or covenant not to", "sue for patent infringement). To \\[lq]grant\\[rq] such a patent license to a", "party means to make such an agreement or commitment not to enforce a", "patent against the party.", ".PP", "If you convey a covered work, knowingly relying on a patent license,", "and the Corresponding Source of the work is not available for anyone", "to copy, free of charge and under the terms of this License, through a", "publicly available network server or other readily accessible means,", "then you must either (1) cause the Corresponding Source to be so", "available, or (2) arrange to deprive yourself of the benefit of the", "patent license for this particular work, or (3) arrange, in a manner", "consistent with the requirements of this License, to extend the patent", "license to downstream recipients. \\[lq]Knowingly relying\\[rq] means you have", "actual knowledge that, but for the patent license, your conveying the", "covered work in a country, or your recipient's use of the covered work", "in a country, would infringe one or more identifiable patents in that", "country that you have reason to believe are valid.", ".PP", "If, pursuant to or in connection with a single transaction or", "arrangement, you convey, or propagate by procuring conveyance of, a", "covered work, and grant a patent license to some of the parties", "receiving the covered work authorizing them to use, propagate, modify", "or convey a specific copy of the covered work, then the patent license", "you grant is automatically extended to all recipients of the covered", "work and works based on it.", ".PP", "A patent license is \\[lq]discriminatory\\[rq] if it does not include within", "the scope of its coverage, prohibits the exercise of, or is", "conditioned on the non-exercise of one or more of the rights that are", "specifically granted under this License. You may not convey a covered", "work if you are a party to an arrangement with a third party that is", "in the business of distributing software, under which you make payment", "to the third party based on the extent of your activity of conveying", "the work, and under which the third party grants, to any of the", "parties who would receive the covered work from you, a discriminatory", "patent license (a) in connection with copies of the covered work", "conveyed by you (or copies made from those copies), or (b) primarily", "for and in connection with specific products or compilations that", "contain the covered work, unless you entered into that arrangement,", "or that patent license was granted, prior to 28 March 2007.", ".PP", "Nothing in this License shall be construed as excluding or limiting", "any implied license or other defenses to infringement that may", "otherwise be available to you under applicable patent law.", ".ne 2i", ".PP", "12. No Surrender of Others' Freedom.", ".PP", "If 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 convey a", "covered work so as to satisfy simultaneously your obligations under this", "License and any other pertinent obligations, then as a consequence you may", "not convey it at all. For example, if you agree to terms that obligate you", "to collect a royalty for further conveying from those to whom you convey", "the Program, the only way you could satisfy both those terms and this", "License would be to refrain entirely from conveying the Program.", ".ne 2i", ".PP", "13. Use with the GNU Affero General Public License.", ".PP", "Notwithstanding any other provision of this License, you have", "permission to link or combine any covered work with a work licensed", "under version 3 of the GNU Affero General Public License into a single", "combined work, and to convey the resulting work. The terms of this", "License will continue to apply to the part which is the covered work,", "but the special requirements of the GNU Affero General Public License,", "section 13, concerning interaction through a network will apply to the", "combination as such.", ".ne 2i", ".PP", "14. Revised Versions of this License.", ".PP", "The Free Software Foundation may publish revised and/or new versions of", "the GNU 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.", ".PP", "Each version is given a distinguishing version number. If the", "Program specifies that a certain numbered version of the GNU General", "Public License \\[lq]or any later version\\[rq] applies to it, you have the", "option of following the terms and conditions either of that numbered", "version or of any later version published by the Free Software", "Foundation. If the Program does not specify a version number of the", "GNU General Public License, you may choose any version ever published", "by the Free Software Foundation.", ".PP", "If the Program specifies that a proxy can decide which future", "versions of the GNU General Public License can be used, that proxy's", "public statement of acceptance of a version permanently authorizes you", "to choose that version for the Program.", ".PP", "Later license versions may give you additional or different", "permissions. However, no additional obligations are imposed on any", "author or copyright holder as a result of your choosing to follow a", "later version.", ".ne 2i", ".PP", "15. Disclaimer of Warranty.", ".PP", "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 \\[lq]AS IS\\[rq] 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.", ".ne 2i", ".PP", "16. Limitation of Liability.", ".PP", "IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING", "WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS", "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.", ".ne 2i", ".PP", "17. Interpretation of Sections 15 and 16.", ".PP", "If the disclaimer of warranty and limitation of liability provided", "above cannot be given local legal effect according to their terms,", "reviewing courts shall apply local law that most closely approximates", "an absolute waiver of all civil liability in connection with the", "Program, unless a warranty or assumption of liability accompanies a", "copy of the Program in return for a fee.", ".PP", ".ce 1", "END OF TERMS AND CONDITIONS", ".ne 2i", ".PP", ".ce 1", "How to Apply These Terms to Your New Programs", ".PP", "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.", ".PP", "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", "state the exclusion of warranty; and each file should have at least", "the \\[lq]copyright\\[rq] line and a pointer to where the full notice is found.", ".PP", ".RS 4n", ".if n <", ".if t .ft I", "one line to give the program's name and a brief idea of what it does.", ".if t .ft P", ".if n >", ".br", "Copyright (C)", ".if n <", ".if t .ft I", "year", ".if t .ft P", ".if n >", ".if n <", ".if t .ft I", "name of author", ".if t .ft P", ".if n >", ".PP", "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 3 of the License, or", "(at your option) any later version.", ".PP", "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.", ".PP", "You should have received a copy of the GNU General Public License", "along with this program. If not, see .", ".RE", ".PP", "Also add information on how to contact you by electronic and paper mail.", ".PP", "If the program does terminal interaction, make it output a short", "notice like this when it starts in an interactive mode:", ".PP", ".RS 4n", " Copyright (C) ", ".br", "This program comes with ABSOLUTELY NO WARRANTY; for details type", "\\[lq]show w\\[rq].", "This is free software, and you are welcome to redistribute it", "under certain conditions; type \\[lq]show c\\[rq] for details.", ".RE", ".PP", "The hypothetical commands \\[lq]show w\\[rq] and \\[lq]show c\\[rq] should", "show the appropriate", "parts of the General Public License. Of course, your program's commands", "might be different; for a GUI interface, you would use an \\[lq]about box\\[rq].", ".PP", "You should also get your employer (if you work as a programmer) or school,", "if any, to sign a \\[lq]copyright disclaimer\\[rq] for the program, if necessary.", "For more information on this, and how to apply and follow the GNU GPL, see", ".", ".PP", "The GNU 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 Lesser General", "Public License instead of this License. But first, please read", ".", tardy-1.28/man/man1/z_cr.h 644 0 0 123312163037023 135530ustar PeterMiller".br", ".ne 2i", ".SH COPYRIGHT", ".so etc/version.so", "\\*(n) version \\*(V)", ".br", ".if t .ds C) \\(co", ".if n .ds C) (C)", "Copyright \\*(C) \\*(Y) Peter Miller", ".br", ".PP", "The \\*(n) program comes with ABSOLUTELY NO WARRANTY;", "for details use the \\[lq]\\fI\\*(n)\\-VERSion License\\fP\\[rq] command.", "This is free software", "and you are welcome to redistribute it under certain conditions;", "for details use the \\[lq]\\fI\\*(n)\\-VERSion License\\fP\\[rq] command.", ".br", ".ne 1i", ".SH AUTHOR", ".TS", "tab(;);", "l r l.", "Peter Miller;EMail:;pmiller@opensource.org.au", "\\f[CW]/\\e/\\e*\\f[R];WWW:;http://miller.emu.id.au/pmiller/", ".TE", tardy-1.28/man/man1/z_cr.so 644 0 0 254012163037023 137470ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 1991-1995, 1998-2000, 2008, 2010, 2011, 2013 Peter Miller .\" .\" 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 3 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, see . .\" .br .ne 2i .SH COPYRIGHT .so etc/version.so \*(n) version \*(V) .br .if t .ds C) \(co .if n .ds C) (C) Copyright \*(C) \*(Y) Peter Miller .br .PP The \*(n) program comes with ABSOLUTELY NO WARRANTY; for details use the \[lq]\fI\*(n)\-VERSion License\fP\[rq] command. This is free software and you are welcome to redistribute it under certain conditions; for details use the \[lq]\fI\*(n)\-VERSion License\fP\[rq] command. .br .ne 1i .SH AUTHOR .TS tab(;); l r l. Peter Miller;EMail:;pmiller@opensource.org.au \f[CW]/\e/\e*\f[R];WWW:;http://miller.emu.id.au/pmiller/ .TE .\" vim: set ts=8 sw=4 et : tardy-1.28/man/man1/z_exit.h 644 0 0 26612163037023 141050ustar PeterMiller".SH EXIT STATUS", "The", ".I \\*(n)", "command will exit with a status of 1 on any error.", "The", ".I \\*(n)", "command will only exit with a status of 0 if there are no errors.", tardy-1.28/man/man1/z_exit.so 644 0 0 163612163037023 143210ustar PeterMiller.\" .\" tardy - a tar post-processor .\" Copyright (C) 1991-1993, 1995, 1999, 2008, 2011 Peter Miller .\" .\" 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 3 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, see . .\" .SH EXIT STATUS The .I \*(n) command will exit with a status of 1 on any error. The .I \*(n) command will only exit with a status of 0 if there are no errors. tardy-1.28/script/test_prelude.sh.in 644 0 0 627012163037023 160100ustar PeterMiller# # tardy - a tar post-processor # Copyright (C) 2011, 2012 Peter Miller # # 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 3 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, see . # if [ "$TEST_SUBJECT" = "fill me in" -o "$TEST_SUBJECT" = "" ] then echo ' You must set the TEST_SUBJECT environment variable' 1>&2 echo ' at the top of your test script to something' 1>&2 echo ' descriptive.' 1>&2 exit 2 fi # # Remember where we came from, so that we can refer back to it as necessary. # here=$(pwd) test $? -eq 0 || exit 2 arch=${1-.} bindir=$here/$arch/bin # # We are going to create a temporary directory for running tests within. # This makes it easy to clean up after tests (just rm -r) and it means # tests can be run even if the development directory is read only (e.g. # for reviewers). # testdir=/tmp/icomp-$$ # # The tear_down function is used by all the ways of leaving a test # script, so that they all clean up in exactly the same way. # tear_down() { set +x cd $here rm -rf $testdir } # # The pass function (command) is used to declare a test to have passed, # and exit. The exit code of 0 is dictated by Aegis, so Aegis can know # the result of running the test. # # Note that we don't say what was being tested, because only failed # tests are interesting, especially when your project get to the point # of having hundreds of tests. # pass() { tear_down echo PASSED exit 0 } # # The fail function (command) is used to declare a test to have failed, # and exit. The exit code of 1 is dictated by Aegis, so Aegis can know # the result of running the test. # fail() { tear_down echo "FAILED test of $TEST_SUBJECT" exit 1 } # # The no_result function (command) is used to declare a test to have # failed in an unexpected way, and exit. This is used for any case # where the "scaffolding" of a test does no succeed, effectively making # the correctedness of the functionality being tested indeterminate. # The exit code of 2 is dictated by Aegis, so Aegis can know the result # of running the test. # no_result() { tear_down echo "NO RESULT for test of $TEST_SUBJECT" exit 1 } # # Create our testing directory and cd into it. # mkdir $testdir test $? -eq 0 || exit 2 cd $testdir test $? -eq 0 || no_result # On cygwin, we need to have diff ignore the CR in CRLF sequences # otherwise we see diff output which looks to be identical but which # diff things differs. And it does, by a carriage return. if diff --strip-trailing-cr /dev/null /dev/null > /dev/null 2>&1 then diffpath=`which diff` diff() { $diffpath --strip-trailing-cr "$@" } fi LINES=24; export LINES COLS=80; export COLS # vim: set ts=8 sw=4 et : tardy-1.28/tardy.spec 644 0 0 212312163037023 130340ustar PeterMillerSummary: a tar post-processor Name: tardy Version: 1.28 Release: 1 Copyright: GPL Group: System/Tape Source: http://tardy.sourceforge.net/tardy-1.28.tar.gz URL: http://tardy.sourceforge.net/ BuildRoot: /tmp/tardy-build-root %description The tardy program is a tar(1) post-processor. It may be used to manipulate the file headers tar(5) archive files in various ways. The reason the tardy program was written was because the author wanted to "spruce up" tar files before posting them to the net, mostly to remove artefacts of the development environment, without introducing more. The tardy program was designed to allow you to alter certain atrributes of files after they have been included in the tar file. Among them are: * change file owner (by number or name) * change file group (by number or name) * add directory prefix (for example, dot) * change file protections (for example, from 600 to 644) Note that all of these affect ALL files in the archive. %prep %setup ./configure --prefix=/usr %build make %install make RPM_BUILD_ROOT=$RPM_BUILD_ROOT install %files /usr/bin/tardy tardy-1.28/tardy/arglex/tardy.cc 644 0 0 707312163037023 151050ustar PeterMiller// // tardy - a tar post-processor // Copyright (C) 2011 Peter Miller // // 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 3 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, see . // #include #include #include #include arglex_tardy::~arglex_tardy() { } static const arglex::table_t argtab[] = { { "-Automated_Testing", arglex_tardy::token_mtime_debug, }, { "-Block_Size", arglex_tardy::token_blocksize, }, { "-Clean", arglex_tardy::token_clean, }, { "-Clean_Meta", arglex_tardy::token_clean_meta, }, { "-Clean_Print", arglex_tardy::token_clean_print, }, { "-Clean_Space", arglex_tardy::token_clean_space, }, { "-COmpress", arglex_tardy::token_gzip, }, { "-DeCOmpress", arglex_tardy::token_gunzip, }, { "-DownCase", arglex_tardy::token_downcase, }, { "-EXclude", arglex_tardy::token_exclude, }, { "-eXtract", arglex_tardy::token_extract, }, { "-Group", arglex_tardy::token_group, }, { "-Group_NAme", arglex_tardy::token_group_name, }, { "-Group_NUmber", arglex_tardy::token_group_number, }, { "-GUnZip", arglex_tardy::token_gunzip, }, { "-GZip", arglex_tardy::token_gzip, }, { "-HexDump", arglex_tardy::token_hexdump, }, { "-Input_ForMaT", arglex_tardy::token_format_input, }, { "-List", arglex_tardy::token_list, }, { "-Mode_Clear", arglex_tardy::token_mode_clear, }, { "-Mode_Set", arglex_tardy::token_mode_set, }, { "-MTime_Debug", arglex_tardy::token_mtime_debug, }, { "-No_Absolute_Paths", arglex_tardy::token_relative_paths, }, { "-Now", arglex_tardy::token_now, }, { "-No_Directories", arglex_tardy::token_no_directories, }, { "-Old_Type", arglex_tardy::token_old_type, }, { "-Output_ForMaT", arglex_tardy::token_format_output, }, { "-Prefix", arglex_tardy::token_prefix, }, { "-PROgress", arglex_tardy::token_progress, }, { "-RELative_paths", arglex_tardy::token_relative_paths, }, { "-Remove_Prefix", arglex_tardy::token_remove_prefix, }, { "-UnCOmpress", arglex_tardy::token_gunzip, }, { "-UpCase", arglex_tardy::token_upcase, }, { "-User", arglex_tardy::token_user, }, { "-User_NAme", arglex_tardy::token_user_name, }, { "-User_NUmber", arglex_tardy::token_user_number, }, { 0, 0, }, // end marker }; arglex_tardy::arglex_tardy(int a_argc, char **a_argv) : arglex(a_argc, a_argv, argtab) { } void arglex_tardy::usage(void) const { const char *progname = explain_program_name_get(); fprintf(stderr, "Usage: %s [