hyc@umix.cc.umich.edu (Howard Chu) (04/14/88)
Howdy... I'm calling this a pre-release, but there's nothing wrong with the included code. (Assuming you're on a BSD style machine.) It may even work on a Sys V flavor machine; I don't know. When I find out for certain, the resulting code will be posted to comp.sources.misc. (I hope. Depends on Brandon, I guess.) Meanwhile, I've sent a copy of this to Jon Zeeff, (umix!b-tech!zeeff) who has promised to test this for me on his Sys V machine. (Got that, Jon? If there are any delays, the entire alt world will blame it on you... }-) Anyway... Cut all this crud out, cat all 9 pieces together, unshar it, and read the Readme file. You should be able to just type make, walk away for a few minutes, and come back to find a shiny new arc program on your machine... While it's nearly identical to the MSDOS program, even if you're familiar with how to use ARC you should read my notes on the two new options... neuf'o'dix. Further info in the Readme. byefornow # This is a shell archive. # Remove everything above and including the cut line. # Then run the rest of the file through sh. #----cut here-----cut here-----cut here-----cut here----- #!/bin/sh # shar: Shell Archiver # Run the following text with /bin/sh to create: # Readme # Manifest # Make.tws # Makefile # Arc.doc # Arcinfo # arc.c # arc.h # arcadd.c # arccode.c # arccvt.c # arcdata.c # arcdel.c # arcdos.c # arcext.c # arcio.c # arclst.c # arclzw.c # arcmatch.c # arcmisc.c # arcpack.c # arcrun.c # arcs.h # arcsqs.c # arcsvc.c # arctst.c # arcunp.c # arcusq.c # dtime.c # dtimep.lex # lexedit.sed # lexstring.c # libtws.3 # tws.h # This archive created: Thu Apr 14 00:30:56 1988 echo shar: extracting Readme '(4232 characters)' sed 's/^XX//' << \SHAR_EOF > Readme XXGreetings, XX herein you should be pleased to find the complete sources for the XXlatest and greatest version of ARC, based on the sources for version 5.20 XXof the MSDOS ARC program. The patches to the previous release, 5.12, with XXsquashing algorithm, have also been applied here. The code is known to XXwork on a Sun 3 running SunOS 3.4, Apollo DN3000 running SR9.7 DOMAIN/IX, XXVax 750 running 4.3BSD, and IBM 3090 running MTS. I shall probably begin XXporting to my Atari ST in a few days as well... XX Also included is a detailed description of the format of a .ARC XXfile directory entry, in the file named Arcinfo. Could be useful if you're XXtrying to port ARC to any more esoteric systems... XX One final necessary inclusion: sources for libtws.a, which was XXposted a long time ago to mod.sources as part of a package he called XX"phoon" - a program that calculated and displayed the PHase of the mOON. XXThe only thing I use the time routines for here is to convert an expanded XXdate/time back into a Unix style time value, for keeping file modification XXtimes straight. XX I have not written a man page; if you need docs for this program, XXsee the docs for ARC 5.20 on a PC. Operation is pretty much identical, XXexcept as noted below. XX XXA necessary legal note: ARC is copywritten by Systems Enhancement XXAssociates. You may freely distribute the ARC program as long as you do not XXcharge for distribution. The comments in the code indicate that the program XXis intended to be distributed in unmodified form (i.e., lots of people will XXget very angry at you if you rewrite a banner to claim that you wrote the XXprogram, or if you do something vile like insert a virus.). This is a moot XXpoint, really, since the sources were made public by the SEA folk to allow XX(heck, encourage!) other people to use and modify the code. (The point is XXmoot only in this context - I'm not distributing binary executables...) XXOrdinarily, if you liked this program, you'd send a registration fee to SEA XXand they'd promise to give you technical support. The registration form is XXincluded here, at the end of the doc file. I suppose you can send them your XXmoney if you want, after using this code. I don't see why, though, since XXthey didn't write the non-MSDOS code, and probably won't provide any XXsupport for it. (Actually, I suppose it would be very easy for them to pick XXthis up and then offer to support non-MSDOS users. Whatever...) In any case, XXThey didn't write all of what you're about to see, and neither did I, but I XXsuspect neither the SEA folk, myself, or any of the many others who have XXinvested time in this program would appreciate it much if you were to charge XXanything for distributing this code. neuf'o'dix. XX XXThings to note - if you specify the "q" (use squashing) option, ARC will XXnot bother trying the other compression methods at all. This may or may XXnot be desirable. (A small speed gain, but Squashing isn't always better XXthan Crunching...) Also, as of version 5.20, ARC no longer uses the Huffman XXSqueeze algorithm for compression. This is also a speed gain, since it no XXlonger spends time performing 3 different compression methods simultaneously XXand choose the best. (Now it only tries two at most.) XX XXAnother thing - this version, unlike for MSDOS, distinguishes between text XXand binary files. The default is text, which will strip CRs from files XXupon extraction, and will insert them before LFs upon storage. Should make XXsending text files between machines a little less painful than before. XX(On a 370 machine it also translates from and to ASCII/EBCDIC, so all XXfiles are stored internally in an MSDOS usable format, i.e, ASCII text, XXCR/LF line terminator...) XX XXTo compile all this stuff... Edit Make.tws (shouldn't need to change anything XXhere, really.) Edit arc.h. I've never run this on a pure System V Unix, so XXI can't say how it'll behave, but it should still compile with BSD defined. XXAfter that, just type make and wait a while... Ok... Well, I've had this XXfor a while, and it works for me, but if somehow I've goofed, let me know. XX XX / XX /_ , ,_. Howard Chu XX/ /(_/(__ University of Michigan XX / Computing Center College of LS&A XX ' Unix Project Information Systems SHAR_EOF if test 4232 -ne "`wc -c Readme`" then echo shar: error transmitting Readme '(should have been 4232 characters)' fi echo shar: extracting Manifest '(2051 characters)' sed 's/^XX//' << \SHAR_EOF > Manifest XXContents of this distribution.... XX 55115 Apr 14 00:08 Arc.doc Docs for original PC ARC 5.20 XX 5577 Apr 11 19:15 Arcinfo Description of .ARC file format XX 1323 Apr 11 19:10 Make.tws Makefile for the time routine library XX 1697 Apr 11 18:48 Makefile Makefile for ARC XX 2051 Apr 11 19:16 Manifest This file XX 4232 Apr 11 19:50 Readme Brief description of this package XX 10348 Apr 11 18:57 arc.c Main routine, option parser... XX 3115 Apr 11 17:40 arc.h System dependencies, externs XX 9205 Apr 11 17:43 arcadd.c Top level routine for adding to archive XX 1314 Apr 8 16:43 arccode.c Code for file encryption/decryption XX 3800 Apr 11 17:45 arccvt.c Convert from old to new packing method XX 1838 Apr 11 17:46 arcdata.c Declarations of externs from arc.h XX 2077 Apr 8 16:43 arcdel.c delete files from archive XX 5048 Apr 11 17:46 arcdos.c OS specific file management routines XX 5231 Apr 11 17:52 arcext.c Top level routine for extraction XX 7950 Apr 11 17:54 arcio.c OS specific low-level I/O routines XX 4534 Apr 11 17:56 arclst.c list contents of archive XX 23283 Apr 11 18:06 arclzw.c low-level lempel-ziv-welch compression XX 3403 Apr 11 18:14 arcmatch.c pattern matching routines XX 11060 Apr 11 18:20 arcmisc.c OS specific miscellaneous functions XX 7219 Apr 11 18:50 arcpack.c mid-level compression code XX 3287 Apr 8 16:44 arcrun.c run files from archive XX 1832 Dec 19 03:52 arcs.h Declaration of .ARC header format XX 11230 Apr 11 18:32 arcsqs.c low-level squash code XX 5470 Apr 11 18:35 arcsvc.c .ARC file utilities XX 1437 Apr 8 16:44 arctst.c test archive integrity XX 5622 Apr 11 18:51 arcunp.c mid-level extraction code XX 2678 Apr 11 18:40 arcusq.c low-level Huffman unSqueezer XX 9035 Apr 11 19:10 dtime.c sources for the time routine library... XX 7327 Apr 11 19:11 dtimep.lex XX 356 Apr 11 19:12 lexedit.sed XX 3765 Apr 11 19:12 lexstring.c XX 2241 Apr 11 19:13 libtws.3 man page for the time routine library XX 2999 Aug 13 1987 tws.h SHAR_EOF if test 2051 -ne "`wc -c Manifest`" then echo shar: error transmitting Manifest '(should have been 2051 characters)' fi echo shar: extracting Make.tws '(1323 characters)' sed 's/^XX//' << \SHAR_EOF > Make.tws XX# Makefile for phoon, deltime, parsetime, and libtws (stolen from mh). XX XX# Valid options: XX# BSD42 Set this if your system is BSD 4.2 or later. XX# SYS5 Set this if your system is System V. XX# EUROPE Makes nn/nn/nn mean dd/mm/yy instead of mm/dd/yy. XX# ATZ This has something to do with alpha-numeric time zones. XX# DSTXXX This has something to do with daylight savings time. XX# HUJI I don't XX# INETONLY know what XX# LEXDEBUG the rest of these XX# ONECASE do. XX# XX# Original posted to mod.sources by Jef Poskanzer. Cannibalized for use XX# with ARC by Howard Chu. XXOPTIONS = -DBSD42 -DATZ -DDSTXXX -DONECASE XX XX XXCC = cc XXCFLAGS = -O $(OPTIONS) XXLDFLAGS = -ns XX XXlibtws.a: dtime.o dtimep.o lexstring.o XX ar r libtws.a dtime.o dtimep.o lexstring.o XX# The following amusing bullshit makes sure that ranlib XX# gets executed if it is present, no matter which shell XX# make uses. If there's a better way to do this, someone XX# please tell me! XX -if test -r /usr/bin/ranlib ; then ranlib libtws.a ; fi XX -if ( -r /usr/bin/ranlib ) ranlib libtws.a XX XXdtime.o: dtime.c tws.h XX XXdtimep.o: dtimep.c tws.h XX XXdtimep.c: dtimep.lex XX lex -nt dtimep.lex | sed -f lexedit.sed > dtimep.c XX XXlexstring.o: lexstring.c XX $(CC) $(CFLAGS) -c lexstring.c SHAR_EOF if test 1323 -ne "`wc -c Make.tws`" then echo shar: error transmitting Make.tws '(should have been 1323 characters)' fi echo shar: extracting Makefile '(1697 characters)' sed 's/^XX//' << \SHAR_EOF > Makefile XX# XX# Makefile for Hack-attack 1.3 XX# VAX 11/780 BSD4.2 "ARC" utility XX# XX# Originals from Dan Lanciani, James Turner, and others... XX# XX# Modified to support squashing, also added targets for the time routine XX# library. -- Howard Chu, hyc@umix.cc.umich.edu, 4-11-88 XX# XXCFLAGS = -O XX XXOBJS = arc.o arcadd.o arccode.o arccvt.o arcdata.o arcdel.o arcdos.o \ XXarcext.o arcio.o arclst.o arclzw.o arcmatch.o arcpack.o arcrun.o \ XXarcsqs.o arcsvc.o arctst.o arcunp.o arcusq.o arcmisc.o XX XX XXSRCS = arc.c arcadd.c arccode.c arccvt.c arcdata.c arcdel.c arcdos.c \ XXarcext.c arcio.c arclst.c arclzw.c arcmatch.c arcpack.c arcrun.c \ XXarcsqs.c arcsvc.c arctst.c arcunp.c arcusq.c arcmisc.c XX XXarc: ${OBJS} libtws.a XX cc ${CFLAGS} -o arc ${OBJS} libtws.a XXarc.o: arc.h XX cc ${CFLAGS} -c arc.c XXarcadd.o: arc.h XX cc ${CFLAGS} -c arcadd.c XXarccode.o: arc.h XX cc ${CFLAGS} -c arccode.c XXarccvt.o: arc.h XX cc ${CFLAGS} -c arccvt.c XXarcdata.o: arc.h XX cc ${CFLAGS} -c arcdata.c XXarcdel.o: arc.h XX cc ${CFLAGS} -c arcdel.c XXarcdir.o: arc.h XX cc ${CFLAGS} -c arcdir.c XXarcdos.o: arc.h tws.h XX cc ${CFLAGS} -c arcdos.c XXarcext.o: arc.h XX cc ${CFLAGS} -c arcext.c XXarcio.o: arc.h XX cc ${CFLAGS} -c arcio.c XXarclst.o: arc.h XX cc ${CFLAGS} -c arclst.c XXarclzw.o: arc.h XX cc ${CFLAGS} -c arclzw.c XXarcmatch.o: arc.h XX cc ${CFLAGS} -c arcmatch.c XXarcmisc.o: arc.h XX cc ${CFLAGS} -c arcmisc.c XXarcpack.o: arc.h XX cc ${CFLAGS} -c arcpack.c XXarcrun.o: arc.h XX cc ${CFLAGS} -c arcrun.c XXarcsqs.o: arc.h XX cc ${CFLAGS} -c arcsqs.c XXarcsvc.o: arc.h XX cc ${CFLAGS} -c arcsvc.c XXarctst.o: arc.h XX cc ${CFLAGS} -c arctst.c XXarcunp.o: arc.h XX cc ${CFLAGS} -c arcunp.c XXarcusq.o: arc.h XX cc ${CFLAGS} -c arcusq.c XXarc.h: arcs.h XX touch arc.h XX XXlibtws.a: XX make -f Make.tws libtws.a SHAR_EOF if test 1697 -ne "`wc -c Makefile`" then echo shar: error transmitting Makefile '(should have been 1697 characters)' fi echo shar: extracting Arc.doc '(55115 characters)' sed 's/^XX//' << \SHAR_EOF > Arc.doc XX XX XX XX XX XX XX XX XX XX XX XX XX ARC XX XX File Archive Utility XX Version 5.20 XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX (C)COPYRIGHT 1985,86 XX by XX System Enhancement Associates, Inc. XX ALL RIGHTS RESERVED XX XX XX XX XX XXThis document describes version 5.20 of the ARC file XXutility, which was created by System Enhancement XXAssociates, Inc. in October of 1986. XX XX XX TABLE OF CONTENTS XX XX XX XX_______ ____ XX XX XXIntroduction .................................... 1 XXUsing ARC ....................................... 3 XXARC commands .................................... 5 XX Adding files ................................ 5 XX Extracting files ............................ 7 XX Deleting files .............................. 8 XX Listing archive entries ..................... 8 XX Running files ............................... 10 XX Printing files .............................. 11 XX Testing an archive .......................... 11 XX Converting an archive ....................... 12 XXARC options ..................................... 13 XX Suppressing compression ..................... 13 XX Backup retention ............................ 14 XX Message suppression ......................... 15 XX Encryption/Decryption ....................... 17 XXRAMdisk support ................................. 18 XXMARC ............................................ 19 XXARCE ............................................ 20 XXVersion numbers ................................. 21 XXCommon questions and answers .................... 22 XXMaintenance contracts ........................... 24 XXRevision history ................................ 25 XX Changes in version 3 ........................ 25 XX Changes in version 4 ........................ 25 XX Changes in version 4.1 ...................... 26 XX Changes in version 4.3 ...................... 26 XX Changes in version 4.4 ...................... 27 XX Changes in version 4.5 ...................... 27 XX Changes in version 5.0 ...................... 28 XX Changes in version 5.1 ...................... 29 XX Changes in version 5.2 ...................... 30 XXProgram history and credits ..................... 31 XXBulletin boards ................................. 33 XXSite licenses ................................... 34 XX XX XX XX XX XX XX XX XX XX XX XX XX XX INTRODUCTION XX XX XX XXARC is the copyrighted property of System Enhancement XXAssociates, Inc. You are granted a limited license to XXuse ARC, and to copy it and distribute it, provided XXthat the following conditions are met: XX XX1) No fee may be charged for such copying and XX distribution. XX XX2) ARC may ONLY be distributed in its original, XX unmodified state. XX XX ___ XX part of any commercial product or service without XX the express written permission of System XX Enhancement Associates. XX XX XXContributions for the use of this program will be XXappreciated, and should be sent to: XX XX System Enhancement Associates, Inc. XX 21 New Street, Wayne NJ 07470 XX XXYou may not use this product in a commercial XXenvironment or a governmental organization without XXpaying a license fee of $35. Site licenses and XXcommercial distribution licenses are available. A XXprogram disk and printed documentation are available XXfor $50. See the order form enclosed with this manual XXfor more details. XX XX XX XXARC is user supported software. This means that you XXmay copy it freely and give the copies away to anyone XXyou wish, at no cost. They are in turn requested to XXsend in a contribution if they decide to use it. XX XXThe user supported software concept (often referred to XX _________ XXcost. The cost of offering a new product by XXconventional means is staggering, and hence dissuades XXmany independent authors and small companies from XXdeveloping and promoting their ideas. User supported XXsoftware is an attempt to develop a new marketing XXchannel, where products can be introduced at low cost. XX XX XX XX XXARC Page 1 XXIf user supported software works, then everyone will XXbenefit. The user will benefit by receiving quality XXproducts at low cost, and by being able to "test XXdrive" software thoroughly before purchasing it. The XXauthor benefits by being able to enter the commercial XXsoftware arena without first needing large sources of XXventure capital. XX XXBut it can only work with your support. We're not XXjust talking about ARC here, but about all user XXsupported software. If you obtain a user supported XXprogram from a friend or colleague, and are still XXusing it after a couple of weeks, then it is obviously XXworth something to you, and a contribution should be XXsent. XX XX XX XXAnd now, back to ARC: XX XXARC is used to create and maintain file archives. An XXarchive is a group of files collected together into XXone file in such a way that the individual files may XXbe recovered intact. XX XXARC is different from other archive and library XXutilities in that it automatically compresses the XXfiles being archived, so that the resulting archive XXtakes up a minimum amount of space. XX XXWhen ARC is used to add a file to an archive it XXanalyzes the file to determine which of three storage XXmethods will result in the greatest savings. These XXthree methods are: XX XX1) No compression; the file is stored as is. XX XX2) Repeated-character compression; repeated sequences XX of the same byte value are collapsed into a three- XX byte code sequence. XX XX3) Dynamic Lempel-Zev compression; the file is stored XX as a series of variable size bit codes which XX represent character strings, and which are created XX "on the fly". XX XXNote that since one of the three methods involves no XXcompression at all, the resulting archive entry will XXnever be larger than the original file. XX XX XX XX XX XXARC Page 2 XX USING ARC XX XX XX XXARC is invoked with a command of the following format: XX XX ARC <x> <arcname> [<template> . . .] XX XXWhere: XX XX <x> is an ARC command letter (see below), in XX either upper or lower case. XX XX <arcname> is the name of the archive to act on, XX with or without an extension. If no extension is XX supplied, then ".ARC" is assumed. The archive XX name may include path and drive specifiers. XX XX <template> is one or more file name templates. XX The "wildcard" characters "*" and "?" may be used. XX A file name template may include a path or drive XX specifier, though it isn't always meaningful. XX XX XXIf ARC is invoked with no arguments (by typing "ARC", XXand pressing "enter"), then a brief command summary is XXdisplayed. XX XX XX XXFollowing is a brief summary of the available ARC XXcommands: XX XX a = add files to archive XX m = move files to archive XX u = update files in archive XX f = freshen files in archive XX d = delete files from archive XX x,e = extract files from archive XX r = run files from archive XX p = copy files from archive to standard output XX l = list files in archive XX v = verbose listing of files in archive XX t = test archive integrity XX c = convert entry to new packing method XX XX XX XX XX XX XX XX XX XXARC Page 3 XXFollowing is a brief summary of the available ARC XXoptions, which may alter how a command works: XX XX b = retain backup copy of archive XX s = suppress compression (store only) XX w = suppress warning messages XX n = suppress notes and comments XX o = overwrite existing files when extracting XX g = encode or decode archive entry XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXARC Page 4 XX ARC COMMANDS XX XX XX XXThis section describes each of the commands. ARC will XXaccept any one command at a time. If no commands are XXgiven, then a brief command list is displayed. XX XX XX XX____________ XX XXFiles are added to an archive using the "A" (Add), "M" XX(Move), "U" (Update), or "F" (Freshen) commands. Add XXalways adds the file. Move differs from Add in that XXthe source file is deleted once it has been added to XXthe archive. XX XXUpdate differs from Add in that the file is only added XXif it is not already in the archive, or if it is newer XXthat the corresponding entry in the archive. XX XXFreshen is similar to Update, except that new files XXare not added to the archive; only files already in XXthe archive are updated. XX XX XXFor example, if you wish to add a file named XX"TEST.DAT" to an archive named "MY.ARC", you would use XXa command of the form: XX XX ARC a my test.dat XX XXIf you wanted to add all files with a ".C" extension, XXand all files named "STUFF" to an archive named XX"JUNK.ARC", you could type: XX XX ARC a junk *.c stuff.* XX XXIf you wanted to move all files in your current XXdirectory into an archive named "SUM.ARC", you could XXuse a command of the form: XX XX ARC m sum *.* XX XXIf you have an archive named "TEXT.ARC", and you XXwanted to add to it all of your files with an XXextension of ".TXT" which have been created or changed XXsince they were last archived, then you would type: XX XX ARC u text *.txt XX XX XX XXARC Page 5 XXIf you have a bunch of files in your current XXdirectory, with backup copies being stored in an XXarchive named "SAFE.ARC", then if you wanted to make XXsure that every file in the archive is the latest XXversion of that file, you would type: XX XX ARC f safe XX XX XXA word about Update and Freshen: These are similar in XXthat they look at the date and time of last change on XXthe file, and only add it if the file has been changed XXsince it was last archived. They differ in that XXUpdate will add new files, while Freshen will not. XX XXIn other words, Update looks for the files on disk, XXand adds them if they are new or have changed, while XXFreshen looks in the archive, and tries to update the XXfiles which are already there. XX XX XXArchive entries are always maintained in alphabetic XXorder. Archive entries may not have duplicate names. XXIf you add a file to an archive that already contains XXa file by that name, then the existing entry in the XXarchive is replaced. Also, the archive itself and its XXbackup will not be added. XX XXYou may also add a file which is in a directory other XXthan your current directory. For example, it is XXperfectly legal to type: XX XX ARC a junk c:\dustbin\stuff.txt XX XXYou cannot add two files with the same name. In other XXwords, if you have a file named "C:\DUSTBIN\STUFF.TXT" XXand another file named "C:\BUCKET\STUFF.TXT", then XXtyping: XX XX arc a junk c:\dustbin\*.* c:\bucket\*.* XX XXwill not work. XX XX XXARC does not save the path name. In other words, if XXyou specify a drive and/or path when adding a file, XXonly the actual file name is stored in the archive. XX XX XX XX XX XX XX XXARC Page 6 XXARC will never add an archive to itself, nor will it XXadd the temporary copy or a backup copy of the XXarchive. XX XX XXAn interesting note: It has been brought to our XXattention that BASIC programs compress to a smaller XX ___ XXconcerned with space than speed, you may wish to XXconvert your BASIC programs to ASCII form before XXadding them to an archive. Your BASIC manual should XXgive instructions on how to do this. XX XX XX XX________________ XX XXArchive entries are extracted with the "E" (Extract) XXand "X" (eXtract) commands. For example, if you had XXan archive named "JUNK.ARC", and you wanted all files XXin it with an extension of ".TXT" or ".DOC" to be XXrecreated on your disk, you could type: XX XX ARC x junk *.txt *.doc XX XXIf you wanted to extract all of the files in an XXarchive named "JUNK.ARC", you could simply type: XX XX ARC x junk XX XXWhatever method of file compression was used in XXstoring the files is reversed, and uncompressed copies XXare created in the current directory. XX XXYou can also specify a path name, in which case the XXdecompressed copy is placed in the specified XXdirectory. For example, if you had an archive named XX"JUNK.ARC", and you wanted all files in it with an XXextension of ".TXT" to be placed in the directory XX"C:\WASTE\LAND", then you could type: XX XX ARC x junk c:\waste\land\*.txt XX XXIf you wanted to put the file "TRASH.TXT" on your A: XXdrive, and the file "LITTER.TXT" on your B: drive, you XXcould type: XX XX ARC x junk a:trash.txt b:litter.txt XX XX XX XX XX XX XXARC Page 7 XXIf you give more than one path for a file, then only XXthe first one is used. For example, if you typed: XX XX ARC x junk a:trash.txt b:trash.txt XX XXthen TRASH.TXT will be placed on your A: drive. XX XX XX XX______________ XX XXArchive entries are deleted with the "D" (Delete) XXcommand. For example, if you had an archive named XX"JUNK.ARC", and you wished to delete all entries in it XXwith a filename extension of ".C", you could type: XX XX ARC d junk *.c XX XX XX XX_______________________ XX XXYou can obtain a list of the contents of an archive by XXusing the "L" (List) command or the "V" (Verbose list) XXcommand. For example, to see what is in an archive XXnamed "JUNK.ARC", you could type: XX XX ARC l junk XX XXIf you are only interested in files with an extension XXof ".DOC", then you could type: XX XX ARC l junk *.doc XX XX XXARC prints a short listing of an archive's contents XXlike this: XX XX Name Length Date XX ============ ======== ========= XX ALPHA.TXT 6784 16 May 85 XX BRAVO.TXT 2432 16 May 85 XX COCO.TXT 256 16 May 85 XX ==== ======== XX Total 3 9472 XX XX XX"Name" is simply the name of the file. XX XX XX XX XX XX XXARC Page 8 XX"Length" is the unpacked file length. In other words, XXit is the number of bytes of disk space which the file XXwould take up if it were extracted. XX XX"Date" is the date on which the file had last been XXmodified, as of the time when it was added to the XXarchive. XX XX"Total" is pretty obvious, I think. XX XX XXARC prints a verbose listing of an archive's contents XXlike this: XX XXName Length Stowage SF Size now Date Time CRC XX============ ======== ======== ==== ======== ========= ====== ==== XXALPHA.TXT 6784 Crunched 35% 4413 16 May 85 11:53a 8708 XXBRAVO.TXT 2432 Crunched 41% 1438 16 May 85 11:53a 5BD6 XXCOCO.TXT 256 Packed 5% 244 16 May 85 11:53a 3AFB XX ==== ======== ==== ======== XXTotal 3 9472 27% 6095 XX XX XX"Name", "Length", and "Date" are the same as for a XXshort listing. XX XX"Stowage" is the compression method used. The XXfollowing compression methods are currently known: XX XX -- No compression. XX XX Packed Runs of repeated byte values are XX collapsed. XX XX Crunched Lempel-Zev compression technique XX employed. XX XX Squeezed Huffman encoding compression XX technique, as employed by an XX earlier version of ARC. XX XX"SF" is the stowage factor. In other words, it is the XXpercentage of the file length which was saved by XXcompression. The total stowage factor is the stowage XXfactor for the archive as a whole, not counting XXarchive overhead. XX XX"Size now" is the number of bytes the file is XXoccupying while in the archive. XX XX XX XX XX XXARC Page 9 XX"Time" is the time of last modification, and is XXassociated with the date of last modification. XX XX"CRC" is the CRC check value which has been stored XXwith the file. Another CRC value will be calculated XXwhen the file is extracted or tested to ensure data XXintegrity. There is no especially good reason for XXdisplaying this value. XX XX XX XX_____________ XX XXArchive entries may be run without being extracted by XXuse of the "R" (Run) command. For example, if you had XXan archive named "JUNK.ARC" which contained a file XXnamed "LEMON.COM", which you wished to run, you could XXtype: XX XX ARC r junk lemon XX XXYou can run any file from an archive which has an XXextension of ".COM", ".EXE", ".BAT", or ".BAS". You XXdo not have to specify the extension, but all matching XXfiles are run if you do not. In other words, if you XXhad an archive named "JUNK.ARC" which contained the XXfiles "LEMON.COM", "LEMON.EXE", and "LEMON.BAS", and XXyou typed: XX XX ARC r junk lemon XX XXThen all three programs will be run. You can avoid XXthis by specifying an extension in this case. XX XXYou can give arguments to the program you are running XXby appending them to the command line. For example, XXif you have an archive named "JUNK.ARC" which contains XXa program named "LEMON.COM", and you wanted to run it XXgiving it the argument "JUICE", you would type: XX XX ARC r junk lemon juice XX XXYou will need a fair amount of memory to run a program XXfrom an archive. It probably cannot be done with less XXthan 256k. XX XX XX XX XX XX XX XX XX XXARC Page 10 XXIn practice, the file to be run is extracted, run, and XXthen deleted. In other words, the above example is XXequivalent to: XX XX ARC x junk lemon.com XX lemon juice XX erase lemon.com XX XXIf you have an archive which contains a program that XXyou will be running often, then you should probably XXextract the program from the archive and use it XXnormally. XX XX XX XX______________ XX XXArchive entries may be examined with the "P" (Print) XXcommand. This works the same as the Extract command, XXexcept that the files are not created on disk. XXInstead, the contents of the files are written to XXstandard output. For example, if you wanted to see XXthe contents of every ".TXT" file in an archive named XX"JUNK.ARC", but didn't want them saved on disk, you XXcould type: XX XX ARC p junk *.txt XX XXIf you wanted them to be printed on your printer XXinstead of on your screen, you could type: XX XX ARC p junk *.txt >prn XX XX XX XX__________________ XX XXThe integrity of an archive may be tested by use of XXthe "T" (Test) command. This checks to make sure that XXall of the file headers are properly placed, and that XXall of the files are in good shape. XX XXThis can be very useful for critical archives, where XXdata integrity must be assured. When an archive is XXtested, all of the entries in the archive are unpacked XX(without saving them anywhere) so that a CRC check XXvalue may be calculated and compared with the recorded XXCRC value. XX XX XX XX XX XX XXARC Page 11