
  ConCat - Concatenate multi-line file descriptions into one line

  Many BBSs make available a list of all files available on the system.
  The format of the file listing varies from system to system.  After
  downloading several files, I like to use 4OS/2's file description
  feature to keep track of what I have.

  The ALLFILES.TXT file from Pete Norloff's OS/2 ShareWare BBS uses
  a format in which each file has a full-line description, sometimes
  followed by additional lines of description.  These lines begin
  with enough spaces to make the descriptions line-up neatly beginning
  in column thirty.  This looks very sharp, but makes it difficult to
  pick out a complete description to give to 4OS/2.

  I found that I was using a text editor to copy the description pieces
  line-by-line into the buffer, then pasting them into the 4OS/2
  window where 4OS/2's DESCRIBE was waiting.

  I know, I could do it with PERL and AWK and SED, but I didn't have
  time to learn any of the above, so I wrote a kludge to do the job
  for me.

  ConCat copies all characters from stdin to stdout until it sees a
  CR.  When it sees a CR it begins absorbing characters, starting
  after the next (expected) LF, until it sees a non-space or has
  absorbed thirty characters.  If it reaches thirty, ConCat discards
  the absorbed characters and resumes copying stdin to stdout.  If
  ConCat sees a non-space before it reaches thirty absorbed characters,
  it copies all of the absorbed characters to stdout and resumes
  copying stdin to stdout.

  The net effect is that any sequence of CR/LF followed by twenty-eight
  spaces is deleted, leaving entire file descriptions on one line.

  It's a Pretty Dumb Algorithm (can you say 'brute-force?') but it 
  works relatively fast, 11.6 seconds on a 486DX2-66 on ALLFILES.TXT.

  Oh yes, the other reason I had to write this is that neither Boxer
  nor RimStar (my two favorite editors) could (easily, at least) search
  for and delete an end-of-line followed by something.

  USAGE:
 --------

  Pretty simple, actually.  ConCat is a filter, so use it something
  like this:

    ConCat < ALLFILES.TXT > ALLFILES.CAT


  Please note the comments in the code, including the ones that look
  like this:

 *   Copyright (c) 1995 J. Daniel Ashton                               *
 *                                                                     *
 *   You are free to redistribute this code in its present format.     *
 *   If you use this code in your program, please give appropriate     *
 *   credit somewhere in your package, and please drop a note to me.   *
 *   (I could use the ego boost!)                                      *
 *                                                                     *
 *   If you see any bugs or design issues, please let me know--I'm     *
 *   still growing in the language (as are most of us ;-)  I'd like    *
 *   to hear how you react to this program.                            *
 *                                                                     *
 *   jdashton@southern.edu                                             *
 *   72401,1667@compuserve.com                                         *
 *   (615) 238-7111 x2319 days (Eastern Time)                          *
 *   (615) 559-1026       nights                                       *
 *                                                                     *
 *   J. Daniel Ashton                                                  *
 *   PO Box 1327                                                       *
 *   Collegedale, TN  37315-1327                                       *

  More than anything I'd like to get feedback on this:  Is the code
  good, how would you have done it, which tools already do this sort
  of thing, which words did I misspell, etc.  

  Enjoy! I look forward to hearing from you!

  Daniel
