                        PDPZM 1.08
               
PDPZM is a public domain Zmodem program, with full source, and works
on both DOS and OS/2.  In fact, the guts of the Zmodem is isolated
and should be portable to any platform conforming to ISO/IEC 9899:1990.
To recompile this (and you WILL need to recompile it to use
it, and if you are using MSDOS you will need to change the IO 
address and IRQ), you will also need:
  PDCOM250.ZIP  (comms library)
  PDCRC210.ZIP  (CRC library)
  OZPD0007.ZIP  (miscellaneous PD source)
all from www.kerravon.w3.to, the author (Paul Edwards)'s web site.
Higher versions will presumably work too, but this is what was
used to compile against.


The package includes the following:

pdpzm.doc    - This file
pdpgoal.txt  - Goals of the Public Domain Project
testzm.c     - Example of how to use the routines
zmodem.*     - An example interface to the interface
zmcore.*     - Guts of Zmodem proper
zmext.*      - non-zmodem routines required by zmodem
zmfr.*       - routines that operate on zmcore + zmext
testzm.mak   - makefile for compiling example program for dos
testzmp.mak  - makefile for compiling example program for os/2


Rough Organization:

zmcore - if you know how to open files, do CRCs, write pretty
messages on the screen, read and write to the com port, and the
only thing you don't know is the zmodem protocol, then this 
file is all you need.  It expects to have a few external functions
available.  Basically, consider a black box, or an engine.  There
are things connected to the engine, e.g. a fuel line.  You need to
provide that fuel line.  Basically, it already knows the name of
the fuel line, it is a function with a particular name, which 
operates on two parameters (the function is basically a "friend"
function), ie a pointer to the core, and a pointer to an "zmext"
object.  zmcore expects to be provided with the pointer to the
zmext at startup, so that it can start calling the friend functions.

zmext - zmcore is designed to call external functions whenever
there is anything non-zmodem to do.  This file has the object
used to perform these functions.  Note that a future version of
this module will see all the file accesses replaced with some
sort of "channels", since zmodem can transfer any data that
needs transferring, not just files.

zmfr - zmfr has the friend functions in it.  Technically it could
probably go in zmext, but it is done this way to hopefully make
it simpler to conceptualize.

The file zmodem.c in this package may one day be expanded to 
provide a nice interface to zmcore + zmext, for programmers who
just want to send files, when zmext is changed to require "channels".

Thus the current zmodem.c should be considered a dubious example
of using the zmodem routines.  A better thing at the moment would
be to look at RSEND + DDC (available from www.kerravon.w3.to) 
for examples.

zmodem - this module is an interface to the zmodem protocol.  It 
contains the following functions:
zmodemDefaults();
zmodemInit();
zmodemSend();
zmodemReceive();
zmodemTerm();

Note that zmext is expected to require two CHANNELs to
communicate with.  One channel needs to be read/write which is
expected to have a zmodem-partner on the other end.  The other
channel (or channels as the case may be) are expected to be
returned by calls to another function.

In short, the first channel is the com port, the subsequent ones
are the files reading from/writing to (but the zmodem routines
won't open the files for you).


History:

1995-03-15 - Version 0.50, receive but no real send.
1996-11-05 - Version 0.90, both send + receive, rough implementations
1996-11-10 - Version 0.95, pretty clean compile under DOS
1996-12-01 - Version 1.00, first version to utilize PDCOMM 1.0
2001-01-09 - Version 1.01, incorporated several bug fixes from Dave
             Aronson (provided on 2000-03-24 but took me this long
             to incorporate sorry!).  One was a problem with 
             repositioning when sending, another was to do with not 
             handling an error condition at the start of transmission.
             DLEs weren't being used everywhere they should.  Not
             everything was being escaped that should be, and also
             there was a problem with retransmitting near the end
             of the file.
             I found a bug with repositioning of large files, plus
             I masked out all the printf debugs in zmcore.
2002-07-29 - Version 1.05, incorporated many bug fixes provided by
             Kalle Olavi Niemitalo.  Kalle has been heavily using
             the routines and has thus found the vast bulk of the
             remaining bugs.  The code has thus reached a whole
             new level of maturity, hence the larger change in
             version numbers.  I know exactly how difficult it is
             to track down these bugs, and Kalle's contribution
             cannot be underestimated.  I am only sorry that Kalle
             had to be the one to find them, unfortunately I never
             actually used PDPZM "live", my use for it ended shortly
             after writing it (long story).  The bug fixes were sent
             in quite some time ago, but I had lost my testing
             environment until recently.  I now have the ability
             to test the DOS version, and I sent some test files
             to/from both Telix and Hyperterminal.
2004-12-07 - version 1.07, timestamp preservation and other
             reorganization done by Scott Bronson.
2004-12-18 - version 1.08, bug fix
