home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
MBUG
/
MBUG044.ARC
/
SQUEEZE.DOC
< prev
next >
Wrap
Text File
|
1979-12-31
|
7KB
|
181 lines
*** SQUEEZE.DOC ***
Thi≤ i≤ ß ver∙ abbrieviateΣ documen⌠ file« Thσ ful∞ 24δ versioε caε bσ founΣ ì
oε bulletiε board≤ sucΦ a≤ TARDI╙ iε Melbourne« ╔ havσ provideΣ ß cut-dowε ì
version so as to simplify it and make it fit on this disk. Sept 24th 1985
Jan Roberts
USAGE AND RECOMPILATION DOCUMENTATION (June 18th, 1981)
SQ.COM/OBJ Squeezes files and creates a new one with similar
name but with a Q in the file type. eg. xxx.dqc
USQ.COM/OBJ Unsqueezes files created by SQ, creating an exact
replica of the original under the original name.
FLS.COM/OBJ Produces parameter lists for SQ and USQ. Its main
purpose is to expand wild card names, especially
*.?Q?.
The overall effect is to be able to issue a single command
which will produce many squeezed or unsqueezed files from and
to various diskettes.
DISTRIBUTION RIGHTS: Unrestricted for non-profit use.
Any file can be squeezed, but program source files and text
files benefit the most, typically shrinking by 35%. Files
containing only a limited character set, such as dictionary
files, may shrink as much as 48%. Squeezed files look like
gibbersh and must be unsqueezed before they can be used.
Both SQ and USQ accept batches of work specified by lists of
file names (with drives if needed) and miscellaneous options.
They accept these parameters in any of three ways:
1. On the CP/M command line.
2. From the console keyboard.
3. From a file.
The FLS program can be used (on the same command line!) to
expand parameter lists containing wild-card (ambiguous) file
names into lists with the specific file names required by SQ
and USQ.
This combination of programs allows you to issue a single
command which will produce many squeezed or unsqueezed files
from and to various diskettes. For example, to unsqueeze all
squeezed ASM files on drive B and send the results to drive C
and also unsqueeze all squeezed TXT files on drive A and send
the results to drive D:
A>fls c: b:*.aqm d: *.tqt |usq
The above example simulates a "pipe" (indicated by the "|") by èsending the "console" output of the fls.com program to a
temporary file and then running the sq.com program with options
which cause it to read its parameters from its "console" input,
which is really redirected to come from the temporary file.
USAGE TUTORIAL:
In the simplest case either SQ or USQ can simply be given one
or more file names (with or without drive names):
A>sq xyz.asm
A>sq thisfile.doc b:thatfile.doc
will create squeezed files xyz.aqm, thisfile.dqc and
thatfile.dqc, all on the current drive, A. The original files
are not disturbed. Note that the names of the squeezed files
arσ generateΣ b∙ rule≤ - yo⌡ don'⌠ specif∙ them« Wheε unsqueezing¼ thσ ì
squeezed version remains on the disk.
Yo⌡ caε lis⌠ al∞ thσ file≤ yo⌡ caε fi⌠ iε ß command« Thσ filσ name≤ giveε ì
t∩ S╤ anΣ USQ must be specific.
A>sq x.asm b: y.asm z.asm c: d:s.asm
will create x.aqm on the current drive, A, y.aqm and z.aqm on
the B drive and s.aqm on the C drive. Note that the first three
originals are on drive A and the last one is on drive D.
Remember that each parameter is processed in order, so you must
change the destination drive before you specify the files to be
created on that drive.
A>usq -10 x.bas b:y.asm
will not take the time to create unsqueezed files. Instead it
will unsqueeze the first 10 lines of each file and display them
on your console. The display from each file consists of the
file names, the data and a formfeed (FF).
Also,
A>usq - c:xyz.mac
will unsqueeze and display the first 65,535 lines of any files
listed. That's the biggest number you can give it, and is
intended to display the whole file.
SQ and USQ will prompt with an asterisk and accept parameters from the
console keyboard. Each parameter must be followed by RETURN and
will be processed immediately. An empty command (just RETURN)
will cause the program to exit back to CP/M.
Perhaps you frequently squeeze or unsqueeze the same list of
files and you would like to type the list once and be done with
it. Use an editor (or FLS, described below) to create a file
with one parameter per line. For example call it commands.lst.
èA>sq <commands.lst
will cause the command list file to be read as if you were
typing it! You will see it on the console.
That was redirected console input. Now assume that you have a
very long list of files to squeeze or unsqueeze and while you
are taking a nap the progress comments and maybe some error
comments scroll off the screen. Redirecting the console output
will let you capture the progress information in a file so you
can check it later. The error comments will have the screen to
themselves.
For example,
A>sq <commands.lst >out
will send the progress comments to the file "out", which you
can TYPE later. The routine display of the program name and
version, etc., will still go to the console.
A more practical example is to send that information to the
console and to the file.
A>sq <commands.lst +out
will do that.
Redirected input and output are independent - you can do
either, both or neither.
There is one more form of redirection called a "pipe".
FLS is intended primarily for use in pipes. Here is an example:
FLS is smart enough to know that a letter followed by a colon
and nothing else is a destination drive name intended for SQ or
USQ. It will also treat any parameter beginning with a - (minus
sign) as an option to be passed through. Anything else is
considered a file name or pattern and is checked against the
directory of the appropriate drive.
Therefore you could use:
A>fls b: c:*.aqm *.aqm -10 stuff.dqc >temp.$$$
A>usq <temp.$$$
A>era temp.$$$
to unsqueeze all files of type aqm on drives C and A and put
the unsqueezed files on drive B, and then preview the first 10
lines of file stuff.dqc.
Here is where the pipe comes in. The above three commands can
be abbreviated as:
èA>fls b: c:*.aqm *.aqm -10 stuff.dqc |usq
That little "|" is the pipe option and it causes the FLS output
to be redirected to a temporary file and when that is done it
actually runs USQ for you with the proper input redirection and
then erases the temporary file.
If that isn't enough, you can still use the + or > redirection
option at the end of that line to capture the console output
from USQ.
A>fls b: c:*.aqm *.aqm -10 stuff.dqc |usq >out
If you plan your comments carefully you can produce a single
file containing an abstract of an entire library of squeezed
files in one step!
A>fls -25 *.?q? |usq >abstract