Mon Dec 17 14:34:31 PST 2001

I've made available the Palm backup and restore program I use.  It's
derived from pilot-xfer but is different enough that I've changed the
name to `palmld'.  It's a native port, not using APE.  It's at

	http://www.collyer.net/~geoff/9/palmld.tar.gz

pilot-xfer is part of pilot-link, a collection of programs and library
interface implementations, in a variety of languages.  I discarded any
code not relevant to backup and restoral or not written in C, except
library code to deal with the various weird binary Palm data types, in
the `types' directory.  The protocol implementations are in the `slp'
directory.

I threw away a lot of over-engineered scaffolding, infrastructure and
plain silliness (and cb'ed it) such that compared to the original
34,856 lines of C, only 5,836 go into building palmld.  There are
another 1,636 lines in `types' and 1,578 in `_unused', much of which
is unused implementations of DLP functions.  It's still a lot of code
to do a fairly simple job, but Palm have done little to document their
protocols, and one has to wonder why they didn't just use SLIP and TCP
in the first place.

Palm OS does provide wonderful examples of how not to do things.  Once
you get files out of a Palm, if you want to see what's inside them,
you still have to crack Palm's binary formats, and each file has a
binary header.  pilot-xfer at least stores each Palm file on the host
as a header followed by the real contents.  I haven't got around to
changing the way files are stored on the host.

I added some instrumentation, invoked with -S, and it's not as slow as
I had thought.  When backing up, it's able to use over half the
available upstream bandwidth at 115,200 bps.  On the other hand, at
that speed, it takes 187 seconds (3:07) to backup a megabyte of Palm
data.  The Palm Ethernet cradle seems attractive.
