Another version of UUX - written originally for SMail, but adapted for
Waffle to support all the switches of Waffle's UUX.

UUX is copyrighted software, and may be freely used for non-commercial
purposes. UUX may not be sold or bundled with a commercial application
package.

For commercial applications, please contatct the author (mack@joker.ruhr.de)

This UUX is binary clean, so there shouldn't be any problems transmitting
binary files (especially when sending compressed batches using CNews).

It also handles cases where the file specified by '-i' is on a different
drive as the resulting .dat-file. (Waffle-UUX doesn't!)

Note on sequence numbers: The highest sequence number possible with this
uux is '9,999,999'. The remote filename is _always_ truncated to a maximum
of 14 characters (example: D.longnamN2fee) due to problems of some UNIX
not handling longer names...

Supported options (these are the ones availalble in Waffle UUX, too:

  -p        Use stdin. This switch is needed when uux should _really_ read 
            stdin, and not just from a redirected file or pipe.

  -b        Binary mode for files. No CR/LF-translation during copying.
            Note: If a file can be linked (renamed), no translation takes
            place, since no copying is needed.

  -u user   Username to use for queued files

  -i file   Filename to use as input. 
            If the specified file and the spool directory are on the same
            drive the file isn't copied but just renamed.
            Otherwise the file will be copied and deleted.

  -g grade  Grade to use for spooling

  -v        Verbose. Prints some more or less interesting information.

  -j        print job number for this job

  -r        This option is available in the original Waffle-UUX. I do not
            know which purpose it serves, so it is accepted but ignored.

Options specific to my implementation of UUX:

  -s size   Specify size of buffer to use for copying data
            (for testing purposes, you should use uux.buffer instead)

  -n name   If you need to have a different hostname inside your .cmd-files,
            you can give it using this option.

  Options requiring an argument can be written as '-gd' or '-g d'.
  Single character-options may be grouped. Example: '-bvpj' 
  In combinations, the option requiring an argument must be last. 
  Example: '-bvi testfile' 

Notes:

  UUX creates all needed directories for spooling a request.

  Sitenames containing dots (for example ruhr.de) are munged to contain
  underscores (ruhr_de). This is to stay as close as possible to Waffle-UUX.
  It normally isn't good practice to UUX to a site containing dots, but if
  you really need to - I won't hold you from doing it.

Needed variables in your static:

  waffle    to determine the location of the files systems and sequence
  spool     to determine where to queue jobs
  uucpname  needed for constructing correct jobs


Supported variables for uux in your static:

  uux.exit      Exit code for normal termination
  uux.fail      Exit code for abnormal termination
  uux.buffer    Specify the size of the buffer used for copying. Default are
                8192 bytes, which should be sufficient. May be up to 32kB.
  uux.verbose   Putting anything into this is the same as using '-v'.
                Thanks, Roy :-)


Since <roy@cybrspc.mn.org> did this, too: Some speed comparisons

Using a 200kB-textfile, I got the following results using my 386DX/33 with
disk cache disabled:

            buffer   time in seconds
Waffle-UUX:     ??  15.69
SMail-UUX :  32000   1.98
             16384   2.25
              8192   2.91 (default if nothing specified)
              2048   4.84
              1024   8.3
                16  17.91

It looks like Waffle uses 80 bytes of buffer, as the SMail-UUX did at first.

The command line was: 'uux -s32000 -b -v horga!foo < testdata'
