home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / waffle / aser28.zip / TOADUU.DOC < prev    next >
Text File  |  1991-03-12  |  9KB  |  224 lines

  1. TOADUU.DOC
  2.  
  3. Author:        David Kirschbaum, Toad Hall
  4.         kirsch@usasoc.soc.mil
  5.         (See Credits below)
  6.  
  7. Function:    UUE.COM: Uuencode binary files to ASCII text files.
  8.         UUD.COM: Uudecode uuencoded files to original binary form.
  9.         Both are compatible with the Unix (and other) uuencode/
  10.         uudecode utilities.
  11.  
  12. Usage:        UUE.COM:
  13.           UUE<RETURN>
  14.             Displays usage message, prompts for input file name.
  15.           UUE [-o ][d:][\path\]filename.bin
  16.             Produces filename.uue in current directory.
  17.  
  18.           If you recompile, enabling the STDOUT switch,
  19.           redirection is enabled, requiring the following:
  20.           UUE [d:][\path\]filename.bin [>filename.uue]
  21.           Uuencodes filename.bin, sends uuencoded product to
  22.           standard output (console) or wherever redirected.
  23.  
  24.         UUD.COM:
  25.           UUD<RETURN>
  26.             Displays usage message, prompts for input file name.
  27.           UUD [-o ][d:][\path\]filename.uue
  28.             Produces a uudecoded file, with the filename taken from
  29.             within the uuencoded file (which might include a path).
  30.  
  31. |          Both programs will not overwrite existing files unless
  32. |          you use the "/O" (or "/o") switch.  (Not applicable
  33. |          for the STDOUT UUE, of course.)
  34. |          Both programs have a "/?" (or "-?") switch that will
  35. |          write a brief help screen to STDOUT and terminate.
  36.  
  37.         Both programs accept an input path\filename up to 80 chars
  38.         long, and will prompt if none is specified.
  39.  
  40.         A uuencoded filename is created by stripping the ".typ" (if
  41.         present) from the original filename and appending ".uue"
  42.         as the file type.
  43.         A uudecoded filename is taken from the uuencoded source file
  44.         and is written to the current directory (or to the path
  45.         included in the file header).
  46.  
  47.         You can recompile UUE.ASM to send output to the DOS standard
  48.         output ('>wherever') if you desire.  (It's currently compiled
  49.         as UUE.COM to produce "filename.uue".)
  50.  
  51.         Input files may be any length.
  52.  
  53.         When using UUD to decode uuencoded files:
  54.             Uuencoded file headers (mailing headers, etc.) need not
  55.           be removed.  However, any spurious lines between the
  56.           "begin" and "end" lines MUST be removed.
  57.           Anything beyond the "end" line is ignored.
  58.           If no "end" is found, the output file is saved,
  59.           but an error message is displayed.
  60.             Certain uuencoders append a "checksum" character to the
  61.           end of each uuencoded line.  UUD ignores these.
  62.             Uuencoded files generated or moved through a Unix system
  63.           may have LF (ASCII 10) line endings instead of the DOS-
  64.           convention CR/LF (ASCII 13/10) endings.  UD will handle
  65.           those LF ends of line as well.  You MAY get a "end not
  66.           found" message, but the uudecoded file will be intact.
  67.             Certain systems and mailers will strip off trailing
  68.           spaces on lines.  UUD now attempts to replace them.
  69.  
  70. Credits:    Credit to Theodore A. Kaldis (kaldis@topaz.rutgers.edu),
  71.         the original author of UU.ASM (the source and inspiration
  72.         of this code.
  73.         UUD is basically his UU, SEVERELY tweaked!  However, since
  74.         it significantly resembles UU, Theodore's copyright
  75.         constraints apply.
  76.         UUE is my own, so I freely release it to the public domain.
  77.  
  78.  
  79. UUE
  80.  
  81. v2.0, 10 Mar 91
  82. - Keith Petersen asked that the "no overwrite" feature from TOADXX
  83.   be incorporated in the TOADUU family.  Done.
  84.  
  85. - He also reported a problem with "no cmdline filename" handling,
  86.   usage reporting, filename prompting, etc.  Cleaned up, fixed.
  87.   Added the "-?" help just to be nice.
  88.  
  89. - Error msgs now to to STDERR (like TOADXX).  Except for the
  90.   "< DOS 2.0" error and "-?" help, which both are displayed
  91.   via Svc 9, INT 21H anyway).
  92.  
  93. v1.9, 29 Jul 89
  94. - Changes all in UUD, but bumped UUE's version number
  95.   just to stay in synch.
  96.  
  97. v1.8, 5 Jul 89
  98. - Version number bumped to v1.8 (skipping v1.4 thru v1.7)
  99.   just to get in synch with the companion uudecode program.
  100.  
  101. - Thanks to Karl-L. Noell <NOELL%DWIFH1.BITNET@CUNYVM.CUNY.EDU>
  102.   for two bug reports:
  103.     1 - Target filename prompt bug:
  104.  
  105. |  When I call up UUE12 or UUD17 without filename, a prompt appears:
  106. |  Input path/file:
  107. |  but answering to that prompt always yields the message
  108. |  "Input file error."
  109.  
  110.   Dumb error, fixed.
  111.  
  112.     2 - Excessive uuencoded line length at the 45000-byte input point:
  113.  
  114. |  There is one effect, but it doesn't cause any harm:
  115. |  when I uuencode large binary files, the resulting *.UUE always has
  116. |  line 1001 3 bytes longer as you'll see from the following cut:
  117.  
  118. |  Line
  119. |   1000:  M!)(0A")3S,<EVET'2%/THAT7@AOB$0AIY[+*1@)6S(I<)",-ZPD(\J`JAWPH
  120. |   1001:  P1SJAV\VFJ+/YP6:,0$$!-Q]T0J?D3%2F<XHO2V>&.=RN#%OYP!:<(H8\P$9*F"E#
  121. |   1002:  M%UA5L3N,TR%C\*86_8E$%!#4(E(JYY.BA$XSJ-.2`72G;K82@GDBQ9YEP"=S
  122.  
  123. |  Obviously it has to do with your "READSIZE 45000" which is reached in
  124. |  that line (1000 lines * 45 bytes).  Anyway the UUDECODE works fine, I've
  125. |  tried it with your UUD12 and with UUDECODE 2.14 .  The byte count 'P'
  126. |  (instead of 'M') tells us, that there are 3 bytes more in this line.
  127.  
  128.   Karl-L was right .. I should've checked to see if we had a full line
  129.   (60 chars) of uuencoded bytes BEFORE we check if our binary buffer's
  130.   been used up.  That'll insure the full line gets written out as soon
  131.   as it becomes full.
  132.  
  133.   The fix seems to be working fine, testing with various odd sized files
  134.   (to include monster ones that insure that 45000-byte refill).
  135.  
  136.   Added a little logo at the end (overrun by buffers) just to identify
  137.   the program.
  138.  
  139. v1.3
  140.  - Wasn't handling non-MOD 3 sized source files (e.g., wrong binary count
  141.    character in the uuencoded file for the last line).  Fixed.
  142.  - Tweaked more for speed.
  143.  
  144. v1.1
  145.  - Original release.
  146.  
  147. UUD
  148.  
  149. v2.0, 10 Mar 91
  150. - Keith Petersen asked that the "no overwrite" feature from TOADXX
  151.   be incorporated in the TOADUU family.  Done.
  152.  
  153. - Keith also reported a bug:  if the "begin 644 filename.typ" line
  154.   is something like "begin 0600 filename.typ", UUD fails!
  155.   He then found the bug.  Fixed.
  156.  
  157. - Keith also reported problems with "no commandline filename" states,
  158.   usage messages, prompting for target filenames, etc.  Fixed them,
  159.   cleaned up the logic a little, added better usage, tightened displays,
  160.   etc.
  161.  
  162. v1.9b, 01 Nov 1989 (TapirSoft, Gisbert W. Selke, Germany)
  163.  - tweaked for speed, or rather, style. No noticeable increase in
  164.    overall speed...
  165.  - fixed a bug with file names starting with a slash (and no other slashes
  166.    in the name) or consisting of one character only (without extension).
  167.  
  168. v1.9, 29 Jul 89 (TapirSoft, Gisbert W. Selke, Germany)
  169. - Had a strange bug in UUD.
  170.   In the process of fixing that, took a relook at this code
  171.   and did a little tweaking.
  172.  
  173. v1.8, 5 Jul 89
  174. Thanks to Karl-L. Noell <NOELL%DWIFH1.BITNET@CUNYVM.CUNY.EDU>
  175. for a bug report:
  176.  
  177. |  When I call up UUE12 or UUD17 without filename, a prompt appears:
  178. |  Input path/file:
  179. |  but answering to that prompt always yields the message
  180. |  "Input file error."
  181.  
  182. Karl-L's right .. stupid .. donno how I missed it.  Fixed.
  183.  
  184. Added a little logo at the end (overrun by buffers) just to identify
  185. the program.
  186.  
  187. v1.7
  188.  - Bugs weren't fixed, plus found new ones.  Turns out nothing's been
  189.    working right since about v1.3 (and that wasn't right either!).
  190.    - Now correctly creates an output file the same size as the original
  191.      file before uuencoding.
  192.    - Still handles 'truncated' lines, strips headers and trailers,
  193.      handles End-of-line types CR/LF, CR, LF.
  194.  - Tweaked a little for more speed.
  195.  - 'Dynamic' sizing of input buffer (to use most of available 64K
  196.    code segment.
  197.  
  198. v1.6
  199.   - Stupid bugs crept in with v1.4's "pad truncated line" function.
  200.     Fixed now.  More thanks to Brad Keister.
  201.  
  202. v1.5
  203.   - Added ability to process uuencoded files with LF end of lines
  204.     (from Unix systems).
  205.   - Added ability to accept (and ignore) checksum characters appended
  206.     to uuencoded lines.  (Had to sacrifice the ability to catch garbaged
  207.     uuencoded lines longer than expected.)
  208.   - Just noticed paths will work if they're part of the file name in the
  209.     uuencoded file's "begin" line.
  210.   - Was suggested UUD provide a default ".UUE" file type if none given.
  211.     Not gonna do that .. my Unix uudecode doesn't, so why should I?
  212.   Thanks to Brad Keister, P150BK19@VB.CC.CMU.EDU, for his bringing up these
  213.   problems (mainly with the UU219.ARC package on SIMTEL and his own Unix
  214.   host's uuencode).
  215.  
  216. v1.4
  217.   - General tightening
  218.   - Added checks for "truncated" uuencode files.  Some older uuencodes
  219.     (NOT my UUE) use space characters (which can be trimmed off by various
  220.     mailers and systems).
  221.     If such a truncated uuencoded line is found, it's padded back to its
  222.     original length with spaces.
  223.     Thanks to Keith Petersen for that suggestion.
  224.