

		  Pete Cann's Communication Package

       Portions Copyright (C) 1992,1993,1994 Peter Edward Cann

	     (Please see the file README for legal info)

This is a set of programs and data files for communication between a
PC and something external, possibly over a modem. In the case of
certain modems, fax and voice are supported.

This package is drastically different from most other communications
programs, in that it is highly modular and generally requires the
user to write batch files and/or scripts to make use of it. This is
what you might call a "hacker style" paradigm (not to be confused
with "cracker", generally an infantile individual who feels so
insignificant that they screw other people in a desperate attempt to
feel powerful). Hackers are people who are very comfortable with
computers, and who like to have a lot of control and to know what's
going on. Generally, they are good engineers, dedicated to the art.

If you are a hacker, you may hate some of this stuff at first, like
everything else. It isn't completely pretty; it hasn't been designed
from the ground up for a long time, but if you use it enough to
compare it to the <ahem> that you'd otherwise be dealing with, you
may find it adequate.

If you are a novice, welcome to the world of hacking! This is not a
consumer product, and you are not going to get support. I will give
you one vital piece of advice: start very small, and get a simple
system working. Write down which versions of all files you are using
for your working system, and BACK THEM UP, at least under backup
names, like .BSS for .SSC, .CBK for .C, etc. Do this every time
before you start screwing around with something that works. Write
down briefly what was good and bad about the backed-up version;
otherwise you'll be utterly boggled as to what you had working when.

The source code for all of these programs is included in the
distribution, so if you know C you have all the information I do now.
This C is MicroSoft QuickC, of which no endorsement should
necessarily be inferred. Some of the style is pre-ANSI. The
formatting style is that mandated by goD (which is odd 'cause I'm an
Atheist). I apologize for all my lapses in rigor. It's amazing how
much better a programmer you are at the end of your first 10,000-line
project than at the beginning of it! Also, this package grew, rather
than being designed, so it may be awkward in places. This phenomenon
should be familiar to UNIX hackers.

All of the programs give USAGE: information if invoked without
arguments, except any that are supposed to be invoked without
arguments. All of the programs that use a port can use COM 1 through
8, but COM 5 and 6 are only for AT and later machines and have not
been tested. Speeds are given in units of 100 bps, such as: 24, 96,
384 or 576. All speeds that it is possible to specify thus are
supported if the IBM can do them. The speed 0, although it shouldn't
be meaningful, stuffs 0x0000 into the divisor latch, in case you want
to do that.

The environment variable PCCPPATH can be used to tell some of the
programs where to find PCCP files, such as emu files and scripts.

NOTE ON OPERATING SYSTEMS: These programs were developed under MS-DOS
3.31, and have been used fairly well under 5.0. If you're running any
wierd stuff on top of DOS, i.e. desktops, Windows, etc., etc., this
stuff may fail, possibly in a very nasty way. Of course, I'm not
saying it won't do that anyway! Caveat usor!

NOTE ON 16550 UARTS: I enable the FIFOs if present, with the receive
threshold at one byte, then put them back the way I found them when
done. I do NOT, however, gate 16 bytes for transmit every time the
flag comes ready. (Icky, icky, icky! Take my PC, please!) This
completely normal technique may highlight a timing bug in some
internal modem virtual UARTS. In this case, use a higher speed.

NOTE ON VIRUSES: I don't think I have a virus, but you never know. If
these executables get irremediably infested, you should hopefully be
able to compile the source on a clean system, unless of course some
pathetic washout has stuck virus source into the source!

The program TERM is a terminal emulator. It takes an emulation file,
which you create or modify with EMUED. EMUED lets you specify
strings to send for any programmable key, and lets you enter strings
of characters and substitution tokens to invoke functions. These
would be the "escape sequences", although they need not begin with
Escape. The token codes are in EMU.H. The emulation facility also
provides a graphics character substitution table for graphics
character commands. TERM and EMUED look in the directory named by the
PCCPPATH environment variable for emulation files, if PCCPPATH is
set. The program CCODES types a hex listing of display character
codes for use when assigning graphics characters in EMUED.

TERM generates a CRLF in response to a Linefeed character, so it is
often desirable to program an emulation to do a DOWN in response to a
Linefeed. For LF insertion, the function CRLF can be performed in
response to a CR. If the emulation file basename is prefixed with a
plus sign (+), local echo is activated.

The program TERMPLAY will step a file through an emulation.

The program MASTERM invokes term with the three or four arguments,
but if you exit TERM you get a menu for file transfers or beginning a
dribble file. The file transfer programs are four variations on
XMODEM in each direction, and have fairly clear names. Also, you can
use mind-boggling port speeds without a 550, 'cause I only go out to
disk between packets.

On file transfer terminations, MASTERM does "Charge of the Light
Brigade" or whatever you call that for success, and five descending
adjacent semitones for error. I'm embarassed about this, but they're
under a second, they tell you something, intuitively, and they're
less annoying than the standard PC beep.

If you want ZMODEM, *you* can write the thing, as soon as you come to
after reading the spec! I *have* added my very own XMODEM CRC 16K
protocol, which took me very nearly an entire half hour! It ought to
do better than 95% at V.32bis/V.42 sending a zip.  This is straight
XMODEM CRC with a HI6 (0xb6, i.e. 0x80+'6') packet intro and double
tail-end fallback. It's 16K so people won't burn me in effigy when
28.8 kbps arrives, which is about all she wrote for your basic POTS
line. When ISDN happens, hopefully there will be a sensible standard.

There are a lot of fairly sick interpretations of "automatic" XMODEM
these days. One important trick is to nail your send in there *fast*,
before the receiver stops offerring to do CRC. If you see a squiggle
instead of a C it's too late; they want to do checksum (bleah!).

My xmodem send programs, other than the 16k, take an optional /h flag
for hit-and-run, which makes them not wait for an ACK after an EOT.
Apparently, you don't ever get the ACK from rx on unix.

The program SESSION is a simple host program, for use AFTER password
validation by the script facility. It is hard-coded for 8n1 bits. It
expects the modem to be in AT&C1 mode, that is, Carrier Detect
conveys information. The last (optional) two arguments to SESSION are
directories for download and upload. If they are given, they are
prepended to the entered pathname in file transfer operations. If a
directory is given, dot-dot (..) is prohibited in pathnames and the
Shell option is not available. Session uses PCCPPATH to find
executables, to speed up loading.

The environment of any subschell contains REMOTE=YES, so you can do

	IF NOT "%REMOTE%"=="YES" THING

in a batch file, where THING is something that would be bad to do
from a comport, such as run a display editor. SESSION terminates if
Carrier Detect goes false, unless it is running the shell.

The program MESSIN accepts a message from the port and appends it to
the specified file. This is for email to the sysop. The program
MESSOUT asks for a filename in or below the specified directory and
displays it with pagination. Security is achieved through sparse
naming.

The program COMSCRPT runs scripts. It is very powerful, with multiple
branching look-fors, timeouts and retry limits. The program SCRCHK
checks scripts for parsability and undefined label references. The
USAGE: message for SCRCHK also tells you the script buffer capacity
for both of these, which is a #define.

The script file must have the extension ".SCR". If the PCCPPATH
environment variable is set, the program looks for the script there.
The program loads the script into RAM and then executes it. Lines are
limited to 80 characters.

String fields in a script start immediately after the delimiting
space, even if that means they start with whitespace. Trailing
whitespace is also included in a string field. If your editor gives
you no way to tell if you have trailing whitespace, why are you using
it? I'm quite partial to any good EMACS. (This should not be taken as
an unqualified endorsement of RMS. Abolishing intellectual property
altogether strikes me as being similar to communism, in that it's a
nice idea and it might be workable in a few hundred years.)

At parse time, a $1 through $9 will be replaced with the
corresponding argument to COMSCRPT starting after the name of the
script. $@ expands to the value of PCCPPATH followed by \ if PCCPPATH
is set; otherwise it expands (to use the term loosely) into nothing,
i.e. the $@ is simply diked out. $<digit> on the other hand will bomb
if the arg is not supplied. $ is an escape; to use it without
expansion, use two of them and you'll end up with one. $ is expanded
pretty much before any other parsing.

The first line in a script file must be <port#> <speed> <db><par><sb>
followed optionally by zero to turn off flow control. $<digit> is
permitted.

The characters '|' and '~' are special. '|' means CR in <, > and k
lines; and newline in !  lines. '~' means 0.4 second delay in < lines
and bell in ! lines.  (In > lines it means itself.) Also, in <, >, !
and k lines, `xx (backquote followed by two hex digits) expands to
the specified character code. Letters in the hex number may be either
case.  There is no validity checking. `00 will terminate a > line.
Also in < lines, ^ means break. To send a magic character, use its
hex code with a backquote.

The first line of the script file is the first three arguments as for
TERM, space-delimited. In subsequent lines, the first character of
each line is the command; the rest of the line (after the delimiting
space) is argument(s). A final string argument may include spaces,
and begins after the delimiting space. Blank lines are ignored.

The command characters are as follows:

;
	Introduces comment; line ignored; space not required.

: <decimal number 0-255>
	Label for conditional or unconditional goto.

g <label #>
	Goto label #.

= <speed>
= <comnum> <speed> <databits><parity><stopbits> <flow ctl flag>
	Set new port speed in hundreds of bps. Zero sets DL=0.
	Long form simply closes old port and tries to open new one.
	Waits for shift register to empty; leaves handshake alone.

* <label #>
	Establishes a demon to goto label upon Control-X from keyboard.
	"* -1" cancels.

r <label #> <retries> <register>
	Increments specified retry register.
	<retries> is an int, try 32766 for a dummy to just increment.
	Zeros register and goes to label if register > retries.
	<register> is 0 - 255.

0 <retry register>
	Zeros the specified retry register.

" <retry register>
	Prints contents of retry register to local screen.

p <seconds>
p <seconds> <processing>
p t<ticks>
p t<ticks> <processing>
	Processes pending look-fors (">"); falls through upon timeout.
	Clears pending look-for list upon completion either way.
	Zero seconds indicates no timeout, i.e. wait forever for hit.
	Ticks are about 1/18.2 second (IBM PC).
	Scanned characters are displayed and maybe sent to file.
	Processing: 0 = none, 1 = visible line buffer, 2 = password buffer.

> <label #> <string>
	Look for string upon p command; if hit goto label.
	First come, first served.
	Maximum of 32 active > demons allowed.

f
	Flush characters previously received from port.
	Does NOT append characters to file.

o <label #> <string>
	Open file <string> for append of scanned characters & ! messages
		or close current file if string is "*".
	Goto label if error.

i <label #> <string>
	Open file <string> for input or close current file if string is "*".
	Goto label if error.

t <label #>
	Transfer one line of input file out the port.
	Newline characters are not sent.
	Goto label if EOF.

? <label #>
	Goto label if Tx Hold Reg Empty is false,
		or in CTS flow control mode & CTS is false.
	Avoids hanging forever on a transmit.

d <label #>
	Goto label if Carrier Detect is true.

< <string>
	Send string to port.

! <string>
	Send string to console.

x <command line string>
	Run executable file with arguments and wait for termination.

# <label #> <return value>
	Jump to label if most recent "x" command returned <= <return value>.

s <label #> <command line string>
	Run system command line and wait for termination.
	Goto label # if error in running command.com.
	Will not report errors within command string.

+
	Raise DTR handshake line.

-
	Drop DTR handshake line.

k <label> <character>
	Set branch to label upon keyboard character received in w or m.
	This is a scanf(), so space must be `20 and tab `09.
	Limit 64 simultaneous keyboard character scans pending.

w <seconds>
	Wait <seconds> for keyboard character, performing k dispatching.
	Fall through if no character in <seconds> seconds.
	Zero seconds indicates no timeout, i.e. wait forever for key.
	Clears all k commands pending upon any termination.

m <seconds> [<screen-save seconds>]
m t<ticks> [<screen-save seconds>]
	Mnemonic: monitor -- combines functions of 'p' and 'w';
		except that no front end services are provided.
	Ticks are about 1/18.2 second (IBM PC).
	Clears both kinds of scans when it exits.
	Screen-save is for 24x80, and is DEAD BLACK, PERIOD. (Ahhh!)

c
	Clears pending lookfors and keys (">" and "k").

l <label #> <jump register #>
	Load label into jump register. -1 unloads register.
	Jump registers are 0 - 255.
	Subroutine convention: return register # = routine entry label #.

j <jump register #>
	Jump to label previously loaded into jump register.
	Falls through if register is unloaded.

q <exit code>
	Quit with exit code.
	Codes other than zero under 128 are reserved to internals.

SUGGESTED CONVENTION: When a body of code is to be used as a
subroutine, an elegant convention is to jump via the jump register
having the same index as the routine entry label upon completion.

WHY IS COMSCRPT SO LIMITED? (Stop laughing!) There comes a time in
every scripted project when one must bite the bullet, pull together a
few handy modules, and start doing it in C. You can buy a C++
compiler if you wish, but be careful of going beyond C. From what I
have had the stomach to learn of it, C++ is one of the worst-designed
languages I've ever seen, and yes, I've written a LOT of object-
oriented code long before it was fashionable. C++ also helps
bad programmers write worse code; believe me, I just got done
disinfecting some. Of course, it was developed for Windows...

When scripting modem commands, which is how you're intended to
configure and dial the modem, if the modem doesn't respond, try a ~
before and after the at, for instance:

	< ~at~&f&c1&d2|

The program SCRCHK types a listing of the argument script file giving
statement numbers, which are not the same as line numbers. It leaves
out blank lines for some reason. It also detects some errors,
including potential branching to undefined labels. It prints out a
table of label numbers with their corresponding line numbers.

The program CSPREPRO will preprocess a symbolic script file into a
numeric script file. Symbolic files just use alphanumeric symbols of
up to 15 characters in place of labels; the preprocessor resolves
them. The convention for a symbolic script file name is, for example,
FOO.SSC. A regular, numeric-label script would be FOO.SCR. Symbolic
files must be preprocessed in order to run them. This feature is VERY
handy if your script is large -- trust me; I know! One spooky feature
is that equate references are match-delimited. (I just made that term
up, so far as I know.) The reference ends where the match ends, as
defined in the %= statement, so the symbol can run right into what's
to the right of it while you're reading the .SSC file. If you don't
like this, end all your equate symbols with ';' or something. Please
DO NOT begin any symbol with punctuation; I reserve the right to make
that do various disgusting and useful things in the future.

During execution of a script, Control-C will cancel and Control-X can
redirect the script on an interrupt basis.

PROBEF returns 0 if the argument file is openable for read, and
nonzero otherwise. It is for use in scripts. For example, you can
avoid dialing a fax call if the SFX file doesn't exist.

TIMECHK does fairly sophisticated testing of the date/time and
indicates the result in its return value. It too is for scripts.

All of the I/O programs except TERM pay attention to CTS. (Comscrpt
is configurable.) None of them do XON/XOFF. The computer is assumed
to be fast enough to keep up. However, since DOS video is very slow,
TERM will suspend display if an interrupt-routine buffer overrun
threatens.


FAX PROGRAMS

The fax facility is intended primarily for modems based on chips and
firmware from Rockwell International, operating in Rockwell's
conception, circa 1992, of the TIA draft Class 2 standard. This may
be relevant with regard to port speed changes required, and
especially with regard to bit order. I haven't seen the new official
Class 2 standard yet.

Nothing in this section assumes filename extentions; you must give
the complete filename.

RCVFAX receives a fax (surprize!). It is intended to be called
immediately after the "FAX" response in +FAA=1, or immediately after
answer in +FCLASS=2. See HOSTDEMO.SCR for how to configure the
faxmodem. RCVFAX uses the first speed until it sees the "+FCON"
message, then switches to the second speed, which will generally be
19200 with earlier Rockwell-based modems. It stimulates page
transmits, and stores the session in the specified directory in a
file of which the name is the universal time as an 8-digit hex number
with the extension .RFX.

Since the filenames are awkward, FAXMANIP, when run in the fax
directory, displays RFX files as dates and times, and allows you
to convert or delete. A secret FAXMANIP function is E, which will
run a system call on the second argument, space, filename. This
is intended for editing, by the adventurous. Since fax files are
wonderfully compact, they are a good way to store a document. I
suggest that, if you want to name a fax file, you make it
<name>.NRF, for Named Received Fax. Don't alter the basename and
leave it .RFX, since FAXMANIP will read the name as a garbage
date, or explode.

RFXTOPCX converts an RFX file to a series of PCX files, prompting for
the name of each page file and reporting status. This now uses a
quarter-meg state table file, STATMACH.DAT. If you don't need the
speed, delete both and rename OLDRTOP.EXE to RFXTOPCX.EXE. The old
one will do debug mode if given a second argument. The old one skips
garbage to the next EOL while the new one just croaks on garbage.
Fixing the new one would have slowed it down. Some faxmodems and/or
software may send some garbage. If you don't want to delete the new
one you can rename it FASTRTOP. Whichever you don't normally use can
be accessed using the E feature of FAXMANIP, above.

VIEWPCX displays a fax PCX file on the monitor. It has not been
tested with EGA or CGA yet, and doesn't support SVGA yet, although it
will try to configure anything it doesn't recognize as VGA 640x480x1.
Invoked without arguments it gives usage and command keys. In zoom
mode, it uses black-priority within lines and pot-luck among lines.

BJFAXPCX prints a fax PCX file to a Cannon BJ-type printer on a
parallel port, with appropriate scaling.

EPFAXPCX does likewise to an Epson-compatible 24-pin printer. It uses
180 x 180 resolution, for possible compatibility with earlier
printers. The units I've played with are really 180 anyway, unless
you're in marketing and feel called upon to point out that they can
actually do 360 in ONE of the two dimensions. This program also uses
two passes for each horizontal stripe. I had to do this in order to
get anything recognizable out of the Panasonic KX-P 2023 at work, but
it still renders large black areas with amazing whimsy.

ASCTOSFX is a simple ASCII to Fax converter. The present font is
fixed-width because variable width fonts are a pain in the wazoo if
you're trying to line things up, and I couldn't face myself in the
morning if you couldn't fax source code. I am distributing a font
named PCCPSTOK.FXF, which I made. You can make one yourself with FED,
the font editor. You can even switch, but only between lines.
ASCTOSFX starts out with WORKINGF.FXF, which you must make sure exists.

ASCTOSFX defaults to dumb; an extra argument puts it into pretty
mode, with nice margins all around.  ASCTOSFX will tell you if
PCCPFROM isn't set, but that won't affect conversion. To include a
PCX file, use Control-P [<space>] <pathname> <newline> on a line by
itself. The image must be one plane, one bit deep, and fit on a page.
Use -<space><pathname> for flush left and + for flush right. The
default is centered on the page. - is for signatures, for example.
Also, Control-T<mag> will switch to that magnification until another
^T.  Magnified type is a crudely-filleted bitmap, which is at least
considerably better than a crudely-bitmap bitmap.

FED is a font editor for .FXF font files. It's pretty cute. Crude,
but cute. It actually uses a mouse if you have one, and it gives help
and status (kind of) with a kinky little vector font I knocked off.

SNDFAX sends faxes prepared by the above. It tries to use the
environment variable PCCPFROM to get the originator telephone number,
as required for standalone fax machines by USA regulations (there
seems to be some consensus that fax software is responsible for this
in a faxmodem situation). The header is seven-segment, because fonts
are fat, so only digits and hyphen are allowed, to a maximum of 40
characters in the sender telephone number field. I'm sorry about
guzzling environment space, but two file finds would be too much.

Parties not subject to USA FCC regulations may set PCCPFROM to a
string of all-invalid characters, for example:

	set PCCPFROM=dummheit

I'm sorry about the inconvenience to such users, but in most cases my
government would find it a lot more convenient to ruin my life than
yours would.

SFXTORFX does what it says; it was the easiest way for me to debug
ASCTOSFX, and since I had it I threw it into the distribution.


VOICE PROGRAMS

NOTE: Voice files are now distributed in strict temporal byte order.
If you have an older Rockwell-type model, do SWAPLIST ZIPLIST.
Getting it wrong makes prompts play as white noise.

VOICETX issues the #VTX command, waits for CONNECT and plays the
file. Optional arguments are shielded report codes upon which to
terminate; the exit code is the zero-based index of the report among
the reports armed on the command line. Hex is any two character
argument, except a few magic codes; see USAGE. Normal end-of-play is
128.  Keyboard terminate (^D) is 129. Nasties are higher.  Command
echoes, responses and all shielded codes are reported to the screen.
If you have an internal modem with a processor virtual UART timing
bug, you might need to use 57.6 kbps even though 38.4 ought to work.

VOICERX issues the #VRX command, waits for CONNECT and plays the
file. If the specified file ends in '\', it is taken to be a
directory and the hex utime is used with the extension .VCE, ala
RCVFAX. Reports and exit codes are the same as above, also output.

RAMREC is like VOICERX except that it records into RAM without going
out to disk, and doesn't terminate unless you run out of RAM or hit a
key on the console. It's intended for recording greetings at high
speed without a 550. It has optional arguments for using a DTMF burst
as a time reference mark, and recording with in and out times. Times
are ticks, i.e. about 1/18.2 second. Error is up to -1 tick.

VBROWSE is for playing utime messages, such as picking up your
voicemail. It uses the following voice files, located in PCCPPATH:

	 * NOFILES.VCE: "There are no files in the directory."
	 * ENTSHFB.VCE: "entries exist. How far back?"
	 * INSTRUC.VCE "Cancel any playback with star. At any prompt,
	 *	     dial digits, star to clear, pound to enter.
		     Entering nothing exits."
	 * DELETE.VCE "Dial 3 pound to delete, or just pound to proceed."
	 * DELETED.VCE "You have already deleted that message."
	 * <digit>RISE.VCE Decimal digit with rising inflection.
	 * <digit>DIP.VCE Decimal digit with dip inflection.
	 * <digit>FALL.VCE Decimal digit with falling inflection.
	 * POINT.VCE "Point" with mild dip inflection.
	 * AT.VCE "At" with mild dip inflection

To record the digits, you need to be able to trim them to get
acceptable sequence speed. If the editing source is time-quantized,
the sampling rate should preferably be, say, twice that of the
target. I suggest that you not lose the digits I provided.

My digits were originally recorded on a consumer stereo cassette
deck, with a DTMF burst about a second before the good audio, using
the editing feature of RAMREC. The arguments were derived for each
digit segment by rough timing and then iteratively tuned. The tape
recording was made through a graphic equalizer, with 125 Hz and below
at -12 dB, 250 Hz at -6 dB, 500 Hz at -3 dB, 1 kHz at 0 dB, 2 kHz at
+3 dB, 4 kHz at +6 dB, and 8 kHz and above at -12 dB.

The mic was a Radio Shack bottom-of-the-line quasi-professional
dynamic. There may be a bit of extra hiss, as the mic-line mixer I
built runs the mic right into an LM318. You don't do that for real
stuff because of the noise of the op-amp; if I wanted to blow the
extra $40 I would have used a good transformer on the mic to boost
the voltage to where the op-amp wouldn't mess it up.

The delete option in VBROWSE is suppressed unless enabled with a
command line argument. Call without arguments for USAGE. Modem and
port settings must be correct for the file or vice versa.

VCEMANIP is just like FAXMANIP except that it calls VOICETX instead
of the fax converter. You use it inside a script to hear your
messages while at the computer. The script would do #VLS=1, #VLS=2 or
some such. You have to give it the port and speed to pass to VOICETX.


SCRIPTS

SENDFAX.SCR sends a fax. Who'd a thunk it! You should customise the
ID string, which says "PCCP Noncustomized" now.

MOBYHOST.SSC is the current demo script. It is a symbolic script
file, and must be run through CSPREPRO before it can be executed by
COMSCRPT. Also, you will have to record many of the voice files
called for before you can use it.

SPKR.SCR switches the modem to 2-bit local speaker operation and runs
VCEMANIP, then resets the modem. You use it (drum roll, please) for
listening to voice messages.


-----------------------------------------------------------------
RELEASE NOTES:

I've been very bad about release notes. In 053, file transfer won't
abort until the second CAN, comscrpt will recognize the first char of
a sequence even if it's the char that resets the scan for the
sequence, and I may have fixed other stuff.

In 054, I'm handling ANSI attributes differently, based on new info
from the Argus ANSI forum. I'm still not going to support remote key
reprogram though, nor alternative screen modes. Non-white colors are
now low-intensity unless bold, and faint only works for white. This
seems to be how folks are doing ANSI on PCs. Emulation now supports
ANSI CPR. Also EMUED has a better user interface.

055 adds 16550 support, I think (I don't have one). Probably not
relevant except for dribble in TERM, unless I ever get around to
doing Zmodem.

056 changes the exit chord for TERM, cause I just hit the old one by
accident myself and was annoyed. It also adds file-hacking to
COMSCRPT.

057 corrects an esthetic bug in EMUED and an error reporting bug in
SCRCHK. I also added the Jump Register feature to COMSCRPT, and made
SCRCHK not output the table if there are unlisted label errors.

058 fixes a bug in RFXTOPCX that caused it to choke if there was no
Sender ID message. It also adds a PCX file viewer and a PCX file
printer. Also, RFXTOPCX is massively redesigned, including my amazing
state machine method of fax decoding, for mondo speed increase.
STATMACH.DAT is the table now used by RFXTOPCX. It also adds the $
substitution operator to COMSCRPT. Also, PCCPPATH is not prepended to
<drive>:<path>, \<path>, or .\<path>. Also, an obsolete reference to
TERMPATH was replaced with PCCPPATH. Also, I think it was around here
that I added VIEWPCX. Also, COMSCRPT now does arguments. Also I took
the label out of X in COMSCRPT and added the # command.

I think it's time for a new revision! 059 changes bit rate
specifications to units of 100 bps, and allows any possible such
speed. (You can now do 115200).

Barf! Bletch! I wasn't using an absolute path for the first TERM
within MASTERM. All better in 060. PORT.C has a lot of comments added
to teach people about IBM UART programming.

In 061, COMSCRPT now substitutes zero-character and two-character
command line arguments properly. (Boy, that was a stupid one!)

In 062, COMSCRPT is now a multi-data-and-code-segment executable,
with a separate parse-and-validate module shared with SCRCHK, which
required having a multi-data-and-code-segments version of PORT.OBJ,
which is now provided for in the MAKEFILE. Due to a disgusting SickC
problem, I'm now allocating the program buffer the hard way. Also, I
added Flow Control Control (still no XON/XOFF; that would be a pain).
Default is on, which is what you used to be stuck with.  No more
burned fingers for the wierd gizmo community! (Or at least only 3/5
as many, unless you're also using XMODEM, which requires DCD!) Also,
fixed a fall-through for COMSCRPT's C command. Also added " function;
handy for abusing things. Also made EMUED (k) a bit more coherent.

In 063, everybody waits for last character to shift out before
restoring port. ASCIIS restores port. COMSCRPT has = command. Fax
goodies are in, but still have to do federal stripe in SNDFAX, which
has some elements of such in source that are not yet used.

064 has the USA federal stripe in SNDFAX. The = command in COMSCRPT
now takes zero, same as the top line.

065 has voice record and play for Rockwell (TIA?) modems. I also
mucked around a bit with MANUAL and README. It also has the pretty
mode in ASCTOSFX. Also, I redid RCVFAX to use hand-rolled file
buffering. I was using a stream, and it worked fine, but the fact
that -1 is a bit magic was bugging the hell out of me. Also, SCRCHK
will now still tell you what labels are available even if you
duplicated a label, so now you can actually fix your booboo! Nice,
huh? Also, COMSCRPT now frees unneeded RAM; this might make a
difference to something you spawn. ("Nobody could possibly need more
than 640 k." Come on, PowerPC!!!) Also (I love that word), I added
XMODEM CRC 16K file transfers. Yet even more also, FAXMANIP no longer
trashes itself when you call an editor with a non-short name.  Also,
I made SNDFAX use XON/OFF only and ignore CTS. Also, I changed some
stuff in RCVFAX that looked doubtful. Also, OLDRTOP now skips bits
after seven zeros to get a genuine 11-zero EOL. Since some faxmodems
apparently send junk sometimes, this can be vital. RFXTOPCX is not
yet so forgiving.

066 started as a complete new compile, so I decided to give it a new
rev number. Fixed minor bug in case of initial CAN in Xmodem sends.
Made all Xmodem senders print out hex response characters from other
end, so you can tell what sick conception of Xmodem the other guy is
using. I was having trouble working with a board, compiled this into
XMCRCS.C while on line, and then it worked great. Possible code
alignment issue; I have *got* to write my own compiler! VIEWPCX was
also modified to implement horizontal black priority for better zoomed
viewing of typical faxes.

067 Yow, hacking frenzy! COMSCRPT has had the '=' command expanded,
and line buffering (optional) added to the 'p' command. The 'm'
command combines 'w' and 'p', but without line buffering. Also, only
linefeeds *without* the high bit set are now discarded in the scan
functions. (In line buffering, they turn into CR's.) The high bit is
no longer ignored in scans. VIEWPCX has a rotate 180 function on the
DELETE key; exit has been moved to the ESCape key. Sorry. Also fixed
a flaw in the priority hack. SNDFAX now ORs segments at the corners
in the federal stripe, 'cause it was real ugly the old way. Also,
ASCTOSFX now gives a nonfatal message if the PCCPFROM environment
variable is not set. Also, XMCRC16S has been fixed to revert to
128-byte blocks after reverting to 1k blocks; it was a bit confused.
Also, VIEWPCX emits a less irritating, custom beep when you thud.

068 has PCX image inclusion in ASCTOSFX. I also fixed a remarkable
bonehead move in that file, re not zeroing the index on explicit
flush. The voice stuff seems pretty good; still have to record stock
prompts, etc. Also, in the xmodem protocols, kbhit(), which has
the speed of a garden slug on a cold morning, has been replaced
by bios keyboard calls.

069 has voice prompts and various little voice tweaks. RAMREC has
editing features. Also, COMSCRPT no longer ignores Linefeed while
scanning. It seemed handy at first, but the more I thought about it,
the more evil and perverted it seemed. COMSCRPT also also lets you
optionally specify 'p' and 'm' waits in ticks. NOTE: 069 has had
somewhat poor subversion control.

070 has 3-bit prompts with better EQ. Also, COMSCRPT now expands $@
to <PCCPPATH>\. Also, I evidently did something to VBROWSE, but I
don't remember what. Also, VCEMANIP and FAXMANIP now take an optional
argument to specify the directory. This argument is mandatory in
FAXMANIP if you want to use the secret editor feature. Also, COMSCRPT
has an internal modification in dribble output to work around an
apparent MicroSoft bug.

071 has a slightly modified HOSTDEMO.SCR. It is also zipped in
PKZip204g, which is apparently all the rage these days. Of course, if
you're reading this, you don't care. 0DIP.VCE, 7DIP.VCE and 9DIP.VCE
were also re-dubbed with better trimming.

072 And off we go again! Browsing through Que's DOS book, I saw that
the authors were massively confused about the tick frequency, as
evidenced by the fact that they stated that a specific number divided
by another specific number was exactly equal to something that it was
in fact not exactly equal to. Being massively fed up with all the
rumors about tick frequency, I measured it! (No!) It's exactly
nothing, except per DOS day. Hence, there's a new include file,
TPERDAY.H, and everything now uses it. This is critical for timing
functions not going bananas across midnight. Also, the `m' command in
COMSCRPT now times out properly; I had been scanning the time
argument into a string as an int.

073: XMODEM receive variants have better error messages.
Documentation of COMSCRPT 'k' command updated. New triple host demo
scripts. RAMREC now only kicks the modem every three seconds after
the stop time, rather than every time it gets a character. FXF.H is
now included in the ZIPLIST and so you hopefully actually have it
(I'm such a slob!).

074 has everything modified to do its own tick timing with a tick
interrupt handler. The file TPERDAY.H is no longer included. It turns
out that if you call the bios tick time function and it just turned
midnight, DOS never hears about it. Naturally, MicroSoft doesn't
point that out in the documentation of _bios_timeofday() in the
QuickC manual, although they do see fit to pad the product out with
tutorials out the wazoo.

075 has a fixed-up HOSTDEMO.SCR.

076 has a fix of a serious bug introduced while fixing the calendar
bug. It was possible to do a Control-C interrupt and not have the
interrupt vectors cauterized, especially during the pre-execute
phases of COMSCRPT. Everything is hopefully quite rigorous now,
except poot() in VIEWPCX, which doesn't do typeout or disk access and
thus should be OK.

077 Fixes a bug in XMCRCS.C where I was totally botching the
interrupt surgery as a result of doing more of it to fix the tick
problem. I discovered this while adding stupid success and failure
noises to MASTERM for file transfers. Hey, it needs a noise; might's
well differentiate them and make them a bit less annoying. At least
they're under one second. Also, SESSION now stomps on the BIOS RAM
area that holds the BIOS's latest inspiration as to the
correspondence between COM port numbers according to the BIOS and COM
port numbers according to the rest of the world, including the
hardware. This keeps the Shell function of SESSION from going off
into the ozone. I think they do this to drive you insane, so you'll
buy your next machine with their BIOS. When the Shell returns,
SESSION reloads the previous values.

078 adds PROBEF, and SENDFAX.SCR uses it, so you don't dial if the
SFX file doesn't exist. Also fixed MOBYHOST.SCR so it hangs up on
dialtone during greeting instead of trying to receive a fax.
(COMSCRPT is so ugly even its author gets confused! Damned useful,
though.)  Also made stupid_error_noise in MASTERM descend to C rather
than from C, 'cause it was kinda getting out of range of your basic
PC speaker.  Also, SNDFAX and RCVFAX have some speed improvements,
and better ^C abort acceptance. Also, I finally figured out that the
MASTERM menu and prompt and the SESSION menu and prompt should look a
bit different! (Helps in not overwriting precious files.) They now
do; MASTERM uses its name in the header and prompt. Also, the
filename queries are now more alarming for receive on both ends.

079 adds CSPREPRO, for symbolic script labels. Also, VOICETX and
VOICERX now accept the endcode "nn", which expands to decimal digits
0 - 9 individually to help keep command lines legally short. Also,
TERM now documents +<emu> for local echo in USAGE. Also, Xmodem
receive variants will now not NAK after a block with block number,
inverted block number or CRC errors until no characters are received
for one second. May give you a slight edge with a noisy line and no
Error Correction protocol (or someone's unfortunate conception
thereof). Also, SNDFAX now takes an optional flag on the end, for
negotiate-for-new-document or voice-request. What you do afterwards,
I've never looked up. Also, COMSCRPT no longer translates '|' to '\r'
in an 'x' command, and VOICETX and VOICERX now return 129 for ^D
abort, and 222 or something not equal to 128 on timeout.

Also in 079, COMSCRPT 'm' command now optionally does 24x80 screen
saving.  Sorry 'm' and 'p' are arbitrary; they're what I needed at
the time.  Also, ASCTOSFX now has optional magnified type, and SNDFAX
now says PAGE (or actually PA6E) before the page number in the
header. Also, (ta-da!) ASCTOSFX now has "painless wrap", which means
if you wrap but the next character is a newline, you only end up with
one newline! Wish my editors did that! (I'll have to write one soon.)
Also, TERMPLAY now can go line-by-line if desired, which let me put a
break; after the DTAB handling in TERMPLAY and TERM so a tab wouldn't
also do a CRLF. (Oorg, I don't feel good!) Also, TERMPLAY now stops
at the end of the file (Oorg again!).

Yet more also in 079, I added 'uu' and 'us<num>' keyword arguments to
VOICERX. Also, COMSCRPT now goes to the BIOS for all keyboard input,
DOS won't do all those helpful interceptions anymore, like Xing OFF
or printing the screen or whatnot. Yum. (You need to be able to use
control characters in your triple-host script if you have cats.)
Also, COMSCRPT now properly chokes if a lookfor has nothing to look
for, instead of going off into the ozone. Also, MOBYHOST.SSC has
replaced all earlier demo scripts. goD, it sure got a hell of a lot
bigger when I converted it to symbolic! At least now I can maintain
it! This is starting to look suspiciously like a programming
language. Good, though! (-Walt Kelly) Also added byte-swapping;
SWAPLIST and BYTESWAP. Also, COMSCRPT now does not printf anything
when it does a system() or spawn(). Also, ASCTOSFX has letterhead
mode for no top margin on first page, and RFXTOPCX takes an optional
second arg for target template and hacks in page numbers.

080 is exactly the same as above, but 080 will always be 080, i.e. it
is frozen. There will not be multiple 080s. There will most likely be
an 081 at some point; the old featuritis is acting up again.

081: Just after releasing the first copy of 080 to somebody, I
discovered that ziplist said "swap.list.exe". Fortunately, I guess I
put the file in by hand earlier. It even appears to be the current
version! ZIPLIST is now fixed, anyway. Also, added FED, the font
editor. Also have a new font, PCCPSTOK.FXF, which I made with FED. I
didn't like the typewriter font I was using, and I was having a
hellacious time finding its legal status. (Someone from the TeX
Users' Group told me it was Copyright by the American Mathematical
Association AND public domain. How do you do that?!)

ASCTOSFX also takes a new font name in a discarded line after ^F.
Also, added Epson 24-pin printing, and made an int that should have
been a long be so.  Also fixed a couple magnification-filletting
boo-boos in ASCTOSFX, corrected USAGE for CSPREPRO, and made same
accept single arg that includes .SSC extension. Also, VIEWPCX now
uses 1/10 screen for arrows rather than 1/3. It was too clunky. Also,
VOICERX has IO.H included so tell() will return long instead of int,
and I put IO.H in everything that seeks, too, so I found I had to
coerce read() and write()'s pointer args to unsigned char * to avoid
warnings. Also, ASCIIS now has a /s flag for spew mode, i.e. no
handshake. Needed that for faxing to a number entered by DTMF.

Also, VIEWPCX now does page-left and page-right on control-arrows,
and will attempt to load next or previous page on Control-Page keys,
using numbering system now in RFXTOPCX.  Also allowed <space> right
after ^P in ASCTOPCX, in case the file name begins with '-' or '+'!
Also, CSPARSE (COMSCRPT & SCRCHK) now gives an error if a seconds
argument to p or m overflows when converted to ticks, which is how
it's actually stored. Unfortunately, overflow of the actual number in
the script is not caught yet. (Stupid sscanf!) Also, TIMECHK is
included, as is CPVNE.BAT (Convert and Preview, No Extension). Also,
VCEMANIP and FAXMANIP use _outtext() for the help line, and take ESC.

082 is a freeze of 081. 081 has changed a lot in a short time; the
purpose of 082 is to never change. There will most likely be an 083,
of course...

083 has some changes in the PCX conversion section of VIEWPCX.C,
strictly for elegance and clarity. I was pursuing a crashy-bug. Never
found it, but the crashing stopped. Oh, how I long to see the words,
"Segmentation Violation!" I also made the aspect ratio of the
"loading" message less distressing. MOBYHOST.SSC also has another
linefeed in the insult-cracker section; I just noticed it was needed.
Also, 0RISE.VCE, 6RISE.VCE and 6FALL.VCE have been retransfered from
cassette. They seemed to be missing some of their tails before. The
EQ may be a little different.  I've actually re-EQd everything. More
on that later; please don't ask yet.

Also, I fixed the 'C' in PCCPSTOK.FXF to be rounder and the 'R' and
'&' prettier. Also, SNDFAX now also takes the /m flag for more pages,
same document, and lets you specify the first header page number.
Good for generating a cover page from touchtones and then sending a
big document. Also, ASCTOSFX now does not overwrite pagination
information on the screen, so you can see if it went as expected.  I
can't believe it; I was doing information-hiding!  Aaargh! It must be
contagious. Do they have mouse condoms for Macintosh? Also, MANUAL
now advises against begining symbols with punctuation.

Also, I have removed CPVNE.BAT! It kind of looks like maybe MS-DOS
doesn't work right when you malloc(), exit() and malloc() all from
within the same batch file. I was getting crashes, but only from the
batch file, never from doing the same thing by command line,
including calling VIEWPCX on exactly the same file. 083 is now a
freeze, since it has had good revision hygiene.

084 has TeX font(s) again, because I just tracked down the AMS and
found out it was OK (see README). The present TeX fonts, modified to
some extent, are CMTT12, which is really a bit too typewriter for
everyday use, and CMR12FW, Roman Fixed Width. Gool ol' PCCPSTOK is
still in there too. Looks kind of like hand printing, but it's damned
clear, anyway. FED is also modified to substitute glyphs from another
font into the one being edited by using ALT-F2. Also, CHRTOFXF is now
included. This is how I snarf TeX fonts. You may as well have it, but
I didn't write it to distribute it, and it's probably a bit of a dog.
084 is now a freeze.

085 has XMODEMS fixed; it was looking for initial C rather than NAK.
Also, xmodem send programs other than 16k now have a hit-and-run mode
option, which seems to be required with rx on unix. They probably
reinitialized the driver before the ACK got out of the buffer; I've
done that myself. 085 is now frozen.

086 is a total fresh compile, because I got caught by a bad clock
value earlier. Also, the g and the h in PCCPSTOK have been
fine-tuned.  This revision is frozen as of this sentence; internal
subrevisions should not have reached circulation.

087 has the 9 radically altered in the PCCPSTOK font, and the
demented capital W has been fixed. 087 is now a freeze.

088 had a bad bug fixed in TERM, TERMPLAY, VIEWPCX and FED, whereby,
among other things, _getvideoconfig() was being told to load struct
contents into god knows where. I guess it's not such a good technique
to just do what you did earlier all the time. 088 only exists at
work, because I needed VIEWPCX, and should not circulate. This
paragraph is different in 088.

089 is the official version of 088, and is frozen.
