DeTar V1.3 - PUBLIC DOMAIN - ported and re-written in 1994-97 by Andreas R. Kleinert. based on code for MS-DOS written in 1988 by Steve R. Sampson This program was written under OS V3.1 and is therefore fully compatible. It needs OS V1.2+. Release Date : 27.10.1997 Copyright : =========== The program DeTar and its documentation files are placed in the PUBLIC DOMAIN. Disclaimer : ============ The author takes no responsibility for any results of the use of this program. This software is provided "AS IS" and there is no warranty of any kind, so that you use this software at your own risk. Distribution : ============== The program Detar is freely distributable (PUBLIC DOMAIN). You may copy it, if all of its parts are included in the distribution. This program may be put on public domain disks or included in public domain disk libraries. Special permission hereby goes to Fred Fish's AmigaLib-Disks and the german series (in alphabetical order) : AmigaSzene, BerndsPD, FRANZ, GPD, TAIFUN and TIME. This program may also be distributed via electronic mail and may be put into mailboxes as long as the redistribution conditions are respected in all points. Special permission hereby goes to Aminet. By using or distributing this program you automatically agree to all of the above conditions and terms. Function/Usage : ================ "DeTar" extracts Unix Tar-Archives and may - not very well - also list their contents. Extracting : DeTar [Archive-Name] Listing : DeTar d [Archive-Name] Often Tar-Files have been "zipped" with GZip, after that changing their extension to ".tgz". Just extract the original Archive with "GZip" and then use "DeTar" on them. Additional Information / Credits : ================================== [ History ] Did you ever tried to extract a simple Unix TAR-Archive ? Some time ago I bough a "Source-Code" CD-ROM (Walnut Creek), which mainly contained ".zip", ".tgz" and ".tar" Files, but nearly no unarchived Source-Codes. It was quite easy to find programs to extract the ".zip" (UnZip) and ".tgz" (GZip) Archives, but what about the ".tar" Archives ? Additionally, the ".tgz" Files also contain Tar-Archives ! Due to the fact, that I couldn't find any Tar-Archiver anywhere (Fish-Disks, SaarAG-Disks, ...), I decided to port one from Unix, MS-DOS, or whatever. So I tried to find a Tar-Archive-Source for any of these Systems on the CD-ROM. Most of the Tar-Archivers there were either only MS-DOS executables without any Source-Code, or they had been archived with Tar themselves ! After searching some time, I found the "PDTAR" source code for Unix, but I was very hard to port it, because of the missing User/Group functions under AmigaDOS and other Unix standard functions. So I took the Source of "detar" for MS-DOS, which is public domain and also based on the original "GNU tar". I removed the MS-DOS specific functions and created an Amiga Version, which is still thought to do only the _main_ thing : extracting tar-files to disk-based mediums ! The original SourceCode is as well included as the Amiga-Source ! "detar" for MS-DOS has been written in 1988 by Steve R. Sampson and bases on the originally public domain TAR program by John Gilmore. The original documentation of "detar" has been appended to this doc-file. Correspondence : ================ Send bug-reports, money or whatever to : EMail: Andreas_Kleinert@t-online.de Fido: 2:2457/350.18 History : ========= V1.3 (27.10.1997): ------ - recompiled with SAS/C 6.58 V1.2 (28.3.1995): ----------------- - replaced time conversion functions with SAS/C pendants - using GlobalSymbolTable now, thus some self-made definitons could be removed - clearified code by replacing some ints with longs - re-packed MS-DOS stuff with LHA - added 68030 version - and more V1.1 (24.4.1994): ----------------- - first version. Public Domain. Copyrights : ============ Some of the mentioned names or products above may be copyrighted by companies or trademarks of companies. *************************************************************************** Original Documentation follows *************************************************************************** Detar Documentation 23 January 1988 The Unix(tm) Forum has decided to archive its uploads in the compressed TAR format. The 'detar' program is meant to provide you with a method of bursting the files on an MS-DOS(tm) computer. Additionally the source code in 'C' is included so others can use it as a base for porting to other computers. As a disclaimer: not a lot of planning went into the program. I basically rounded up some code laying around and threw it together. In order to make the program useful to MS-DOS computers some features of TAR format had to be worked around. For instance: filenames. The solution was simple, reduce to 3 characters after the first dot '.'. Reduce to eight characters before the dot. Multiple dots are changed to dash '-' after the first dot is found. (Run this program on smail.tar for a good example). The directory 'd' option shows all the filenames in their original state. The 'detar' program has exactly two options. One is to perform a direct- ory, and the second is to extract files. There is no TAR create routines. The directory output can be redirected to a file or a printer. The best method of using the extraction option is as follows: 1. Put the detar.exe file in the \bin directory. Set your path command to search the \bin. 2. Create a working directory, such as: 'MD TMP'. 3. Change to the temporary directory: 'CD TMP'. 4. Execute detar: 'detar ../smail.tar' This will begin building files in the TMP directory based on the naming algorithm above. This is the simplest method and you will determine your best procedure after working with the program for awhile. A sample of the output received when executing the 'directory' option: C>detar d ../smail -rw-r--r-- 102/10 1006 Aug 27 21:42 1987 src/Makefile -rw-r--r-- 102/10 9875 Aug 27 21:42 1987 src/alias.c -rw-r--r-- 102/10 9983 Aug 27 21:43 1987 src/defs.h -rw-r--r-- 102/10 10007 Aug 28 14:39 1987 src/defs.h.kk -rw-r--r-- 102/10 12008 Aug 27 21:42 1987 src/deliver.c -rw-r--r-- 102/10 2533 Aug 27 21:42 1987 src/getopt.c -rw-r--r-- 102/10 2218 Aug 27 21:42 1987 src/getpath.c ... The first column is the protection bits. It is Unix specific. As is the next column which is the user and group number of the person who made the archive. Absolutely no use at all in MSDOS. The third column is the file size in bytes. The fourth column is the date, and the fifth is the complete filename. If you make a mistake on the detar command line, three error messages are output: C>detar g ..\smail 1. Usage: detar [d] filename[.tar] Where d means directory only C>detar ..\smale 2. Tar File '..\SMALE.TAR' Not Found C>detar ..\detar.c 3. File '..\DETAR.C' not a TAR archive The brackets ('[', ']') shown on the "Usage" line mean that the information contained within them are optional. A sample output from the extraction option follows: C>detar smail Extracting: Makefile Extracting: alias.c Extracting: defs.h Extracting: defs.h-k Extracting: deliver.c Extracting: getopt.c Extracting: getpath.c ... ---------------- 23 Jan 88 - First bugs fixed. Insufficient testing. Names without a pathname were munged. ---------------- If you have any further questions or comments (especially improvements) feel free to contact me. Steve R. Sampson, Compuserve(tm): 75136,626, Usenet: sampson@killer.UUCP