home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 June
/
SIMTEL_0692.cdr
/
msdos
/
arc_lbr
/
arff.arc
/
ARFF.DOC
< prev
next >
Wrap
Text File
|
1988-08-20
|
5KB
|
147 lines
ARFF -- ARchive File Finder 1
Summary:
-------
ARFF is a directory tree searcher that can search archives as they are
encountered.
Usage:
-----
arff [-an] [path] file ...
-a look in archives only
-n don't look in archives
path start looking here
file(s) what to look for, allows MS-DOS wildcards * and ?
Configuration:
-------------
To make ARFF more general, it uses the actual archive manipulation programs to
list the archive contents. The output from the archive programs is captured
and searched for matching names. If any are found, their lisings are
reformatted and displayed.
The command used to list an archive's contents and the expected format of the
archive listing are controlled by entries in the configuration file. The
configuration file is found as follows. If the environment variable ARFF.CFG
is set, use its value for the configuration file name. If not, use the default
name. If you are running DOS 3.X, the default name is derived from the
executable name by changing its extension to .CFG. If you are running DOS 2.X,
the default name is C:\BIN\ARFF.CFG.
Each line in the configuration file tells ARFF how to deal with a particular
type of archive. Any line that begins with a semi-colon is ignored. Each
definition line consists
of:
example description
_______ ___________
.ARC This is the archive identifier, any file
encountered with this extension is listed and
searched using information from this entry.
"c:\bin\arcv.com %s" This is the command used to list the archive to
stdout. The name of the archive is represented
by the %s in the string. Use of full path name
is required.
"=" This is a string, starting in column one of the
listing that identifies the last line of
information that preceeds the file names in the
archive listing. If there are no preceeding
lines, use "."
"%s" This is the format used to read the file name
from the archive listing. This is passed
directly to sscanf(). sscanf formats are
discussed later in this document.
"%*12c %s" This is the format used to read the file size
from the archive listing. This is passed
directly to sscanf(). sscanf formats are
discussed later in this document.
"%*50c%9c" This is the format used to read the file date
from the archive listing. This is passed
directly to sscanf(). sscanf formats are
discussed later in this document.
"%*61c%8c" This is the format used to read the file time
from the archive listing. This is passed
directly to sscanf(). sscanf formats are
discussed later in this document. If the time
was read as part of the date, use "."
"." This is the format used to read the file
options/attributes from the archive listing.
This is passed directly to sscanf(). sscanf
formats are discussed later in this document.
If there are no options, use "."
"*total" This is a string, starting in column one of the
listing that identifies the first line of
information that follows the file names in the
archive listing. If there are no following
lines, use "."
Sample ARFF.CFG file:
; for ARCV 1.17
.ARC "c:\bin\arcv.com %s" "=" "%s" "%*12c %s" "%*50c%9c" "%*61c%8c" "." "*total"
; for ZOO 2.00
.ZOO "c:\bin\zoo.exe ld %s" "-" "%*46c%s" " %s" "%*24c%9c" "%*34c%8s" "%*43c%2c" "-"
; for TAR (unknown version, DOS/MINIX port of gnu 1.21)
.TAR "c:\bin\tar.exe -tvf %s" "." "%*42c%s" "%*14c %s" "%*24c%17c" "." "%3c" "."
Archive listing reformatter:
------- ------- -----------
The input format for each field is contained in the configuration file. It is
a fairly simple subset of C's standard scanf() formats:
"%*#c" skip # characters
" " skip 0 or more "white space" characters (space, tab, EOL)
"%#c" the target field is # characters
"%s" the target is a "white space" terminated string
The output format is fixed:
file size 8 character right justified
2 spaces
date and time 19 characters left justified, 2 spaces between date and
time fields
1 space
options 3 characters, right justified
1 space
archive name variable length string
:
file name variable length string
Bugs:
----
If you interrupt (control-C) ARFF at the right time, it leaves its temporary
file around. The temporary files are placed in the directory named in the TMP
environment variable, or in the root directory if TMP is not set. The temp
files are named $ARFxxxx.
Author:
------
Mark Armbrust (maa@nbires.UUCP)
70 So. 31st Street
Boulder, CO 80303