home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume11 / mailsplit2.7 / part01 / undoc < prev   
Text File  |  1990-03-29  |  7KB  |  145 lines

  1. Since I tore the comments out of the code, and it is not customary to send
  2. SCCS files around the net, I made this auxiliary file of documentation.
  3.  
  4. An alphabetical list of variables, their use and meaning:
  5.  
  6. AR = argument
  7. CM = command line
  8. CO = compress program may be arc, etc.
  9. DB = Debug level (Verbosity level)
  10. DE = Delay between pieces
  11. FC = file count
  12. FL = File list (build up file list from params on command line in
  13. FL = any order (see /usr/bin/spell) for a good example of obfuscated,
  14. FL = clever parsing code 
  15. LI = the number of lines to split pieces into
  16. MA = mail transport agent
  17. ME = the name of the program running
  18. MF = Mail flags to send to transport
  19. R  = range of pieces to be re-sent during parse stage
  20. RA = range of pieces to be re-sent if mailers on the way failed
  21. SE = send flag; if true, send the piece.  If false, don't
  22. SP = the name of the split program
  23. SU = subject of message  (defaults to first file name)
  24. T1 = temporary file containing output of tar and compress.
  25. T2 = temporary file containing uuencoded stuff
  26. T3 = temporary file(s) containing  split pieces
  27. TA = tar program (may be shar, tar, cat, etc ;-)
  28. TD = Temporary directory in which temp files should go can be . or /tmp.
  29. TM =  Test-mode flag (-n option of make)  Don't do anything, just
  30. TM = echo what you would have done if testmode option not on.
  31. TO = recipient(s) of message
  32. UU = the uuencode program (may be replaced with btoa / atob ;-)
  33. VE = version number
  34. f  = file name (piece) during loop which sends pieces
  35. i  = a loop index used during parse of the range of files to be re-sent
  36. max=  The loop-limit used in parse of range of files to be re-sent
  37. max= is assumed to be 99 if no top-of-range is given.
  38. n  = piece number during the loop which sends pieces via mail
  39. ne =  next param on command line (after flag is set, next param gets
  40. ne = eval'd to the var set in ne  (see above)
  41. t  = a specific token containing a range to be expanded (n-m)
  42. tok= Token during parse of range of files to be re-sent
  43.  
  44.  
  45. History:
  46. # Coder        Date      Comments
  47. #------------  -------- ---------------------------------------------------
  48. # M F Wyle     02nov87    Shamelessly stolen from tarmail :-)
  49. # WRU          18feb88    changed variable MAILER, added SPLITTER,
  50. #                         LINES, USER and a warning about uudecode
  51. # M F Wyle     25mar88    Add tar, extract join-script in 1st msg
  52. # WRU          03apr88  fixed some quoting problems in "echo"-strings
  53. #            cosmetic changes: renamed "mailsplit"
  54. #            created THISNAME
  55. #                       fixed some typos, added Email-addresses, example,
  56. #                       section for suggested improvements
  57. # MFW          05apr88  Fix more quoting problems in echo strings (shell
  58. #                       variables); added /bin/rm cleanup to join-script
  59. # MFW          21jun88  based on WRU's suggestions:
  60. #                       1) add file-name to subject
  61. #                       2) verbose explanations
  62. #                       3) add parts-order checking!  Yippeee!
  63. # MFW          08jul88  Fix uudecode setuid bug
  64. # MFW          12jul88  Fix empty or no files bug, added FILECOUNT
  65. # MFW          17jul88  Added umask 0, delay before mail, check after split
  66. # MFW          19jul88  Major re-write for flags, verbose, sccs control
  67. # MFW          25jul88  Added a range-parser, more flags, some documentation
  68. #                       Up'd release to 2.0 for distribution
  69. # MFW          29jul88  Fixed 8 separate bugs; upgraded join-script
  70. #                       to accept pieces out of order and duplicate pieces.
  71. # MFW          04Aug88  Fixed more bugs; added comments, put sys-specific
  72. #                       stuff at the top for configuring.  hacked join
  73. #                       script because it leaks bugs like an ant-hill.
  74. #
  75. #                       All the comments from the net about parsing ranges
  76. #                       won't fix the *@&$#& bugs in join.
  77. # MFW          11Aug88  Fixed joinr.  Added -N flag, wrote Configure script,
  78. #                       tested on a slew of machines
  79. # MFW          18Aug88  made joinr compatible with old awk, added exit
  80.  
  81. Verbal description of algorithm:
  82. ====== =========== == ==========
  83. When the program starts, it initializes some variables, then parses the
  84. entire command line.  It builds up a list of non-flag options in the F
  85. variable.  The first parameter in F is the e-mail path.  All others are
  86. files or directories.
  87.  
  88. If no subject is set via the "-s subject"  flag, the subect is assigned
  89. from the first file to send.  The three temporary file names (variables
  90. T1, T2, and T3) are then assigned.
  91.  
  92. The range of pieces to be re-sent is parsed.
  93.  
  94. Debugging output is echo'd to standard out as appropriate for the
  95. debugging level.  If the -t or -n option is set, nothing is really
  96. done, except printing out what would have happened.
  97.  
  98. The tar, compress, split commands are performed, with appropriate
  99. verbosity for the debugging level.  Certain checks are made along the
  100. way to verify that the commands did not fail.  If one fails, the
  101. program exits with an appropriate failure message.
  102.  
  103. The files created in $T3* are sent via mail one at a time, with
  104. delays.  The first file sent has a join-script pre-pended.  A file
  105. counter $n is used to label the subject lines.
  106.  
  107. The temporary files are deleted.
  108.  
  109. * * *
  110.  
  111. The join script which comes with each 1st message sent by mailsplit was
  112. upgraded to accept out-of-order pieces and repeated sequences of
  113. pieces.  It ignores repeats, and glues the pieces together in their
  114. proper order.  These features involve saving each piece in a separate
  115. file named by it's part number, and saving it only once.  awk(1) can
  116. accomplish this task easily.  An associative array is formed,
  117. containing all of the pieces seen by the script.  If a piece comes
  118. through a second time, the script notices by looking in the associative
  119. array.  Duplicate pieces are piped into the file /tmp/garbage (perhaps
  120. I should parameterize this name?) and later deleted.  Since the first
  121. pass is now really a sort filter of the pieces, cat(1) is used to push
  122. the sorted pieces together into uudecode.  
  123.  
  124. The join script in 2.4 sucks rocks.  I'm re-writing the @#*@ with
  125. more error-checking, comments, configurable variables, and maybe it'll
  126. work on somebody else's *@&#&$ machine!  Can you say, "Test?"
  127.  
  128. New features in 2.5:  
  129. - There is a flag for turning off sending the joinr script.
  130. - The joinr script is a "here" document and is spit into a temp directory
  131.   at startup.
  132. - The package comes with a Configure script (a la Larry Wall) which will
  133.   configure site-specific commands, parameters and install the sucker!
  134. - sccs blew up.  I may move to rcs.
  135. - Expect a better Configure script from metaconfig by 3.0
  136.  
  137. New features in 2.6:
  138. + joinr is LESS robust for compatibility with old awk.  Expect machine-
  139.   specific joinr scripts from an intelligent Config script in 3.0
  140.  
  141. New features in 2.7:
  142.  
  143. -Use a generic subject name "archive" to strip directory names in long
  144.  paths.
  145.