home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / internet / ttfn / !TTFN / Docs / uuexplode < prev    next >
Text File  |  1994-10-29  |  4KB  |  108 lines

  1. This is a NEWS uudecoder ported from Unix.
  2.  
  3. Basically it is a file buffered smart uudecoder: here's the blurb from
  4. the header.
  5.  
  6.  * uuexplode-1.5.c (based on kiss 1.0)
  7.  * Author kiss 1.0: Kevin Yang
  8.  * Code cleanup and v1.5: Michael Bergman  (euambn@eua.ericsson.se)
  9.  * Released to the Public Domain, no warranty whatsoever implied.
  10.  * 
  11.  * This C program (UNIX) takes an unlimited number of uuencoded files
  12.  * and removes garbage lines. The uuencoded lines are decoded and written 
  13.  * to specific output files. It is quite verbose as opposed to e.g.
  14.  * uuconvert and tells you when things go well and when they don't.
  15.  * It can also handle garbage between the `/SPC line and the end line and
  16.  * warns if it suspects there is garbage between the last short data line
  17.  * and the SPC-line.
  18.  *
  19.  * New in v 1.3:
  20.  * Better format of warning messages, e.g. line numbers provided.
  21.  * Bogus space lines in data and at end of a uucode block is handled.
  22.  * See details below in ExplodeFile() if you're interested in exactly how
  23.  * this is done.
  24.  * New is v 1.4:
  25.  * Secure option implemented.
  26.  * New in v 1.5:
  27.  * Changed string and I/O buffer size. 128 char string buffers
  28.  * is not enough for long path names in news headers. This made
  29.  * the line numbers in warning messages be wrong.
  30.  *
  31.  * WARNING:
  32.  * If there is garbage between the short data line (if any) and the
  33.  * SPC-line, the output file *might* be corrupted, but most likely not!
  34.  *
  35.  * The format of the uucode is assumed to be more or less as described
  36.  * in uuencode(5) in the online UNIX manual with some exceptions:
  37.  * An M-line can be longer than necessary. Some coders put an extra
  38.  * checksum (character) after each line, this is ignored by uuexplode.
  39.  * It is assumed though that all lines have the same number of checksum
  40.  * chars after them.
  41.  * The last data line before end-line can be either SPC\n or `\n
  42.  * since SPC is equivalent to ` when decoding (both give 0).
  43.  *
  44.  * Any char in the range [a-~] is illegal uucode to this program
  45.  * until someone has shown that there are COMMONLY used uuencode 
  46.  * programs that produce correct uucode with small letters in it.
  47.  * There are such uuencode, e.g. for the Macintosh(?), which use the
  48.  * the range [>-}] by adding 96 to [0-29] and 32 to [30-63].
  49.  * Note that this code is transparent to the standard uudecode.
  50.  *
  51.  * It is assumed that the end line of a uucode-block is in the
  52.  * same input file as the corresponding begin and that the parts
  53.  * are in correct order (of course).
  54.  * 
  55.  * Some diagnostics mean that the current output file is removed.
  56.  * Others leave the output file, but check the input to be sure!
  57.  *
  58.  * To speed up the file handling, the file I/O buffers are re-set.
  59.  * I chose 16 KB because it is 4 whole pages in a SunOS 4.x system.
  60.  * The file I/O is by default buffered. If it is not in your system,
  61.  * change to setvbuf() instead. This is also the appropriate action
  62.  * to take if you don't have setbuffer().
  63.  *
  64.  
  65.  It is very quick, and means that one can dump several uuencoded files, including
  66.  comments news header comments, into one file and run it through the prog.
  67.  
  68.  
  69.  To run it simply Filer_boot the app in a desktop file.
  70.  
  71.  All uuencoded files (set to type 7FE) will be then decoded when double-clicked.
  72.  
  73.  
  74.  Modifications:
  75.    
  76.    Single-Tasking !Squeezed application.
  77.    
  78.    Log file and output automatically goto a rubbish bin, set with an environment variable 
  79.    "Rubish$dir" 
  80.  
  81.  Warning:
  82.    
  83.     Alter uuencoded files
  84.       
  85.        begin 600 <filename>.<ext> to
  86.        
  87.        begin 600 <filename>
  88.        
  89.  ------------------------------------------------------------
  90.  
  91.  31st August 1993
  92.   
  93.   Martin Glanvill,
  94.  
  95.  mcg@waikato.ac.nz.
  96.  
  97.  
  98.  ------------------------------------------------------------
  99.  
  100.  29 October 1994
  101.  
  102.  Modified code to generate RiscOS compatible filenames from the "begin"
  103.  line.  Also changed it to use <Wimp$ScrapDir> for output files.
  104.  
  105.  Robert Orwin (rob@wong.demon.co.uk).
  106.  
  107.  
  108.