On a semi-related note, I wrote a program called Reflow, available on my web
page (http://www.io.com/~ksethre/), that does the opposite, taking a
word-wrapped text file and putting one paragraph per line to prepere it for
printing from a word processor.
It's for DOS, it's written in Turbo Assembler, and source code is included
if anyone wants to mess with it. It also has a text file describing (for
anyone who cares) how it works, and speed comparisons to an early version I
wrote in Turbo Pascal 3 (can you say "700% speed increase"?).
i actually coded one of these a while back with this mailing list in mind.
then i went to speed it up by optimizing the disk access patterns...before
you know it, i had feof() lying to me about the end of the file (it would
return 1 at the end of the first paragraph). I can't figure out why it
doesn't work anymore. I'm recoding the prog now using c++ iostreams (had
to learn them.)
signed