dce@mips.UUCP (David Elliott) (08/20/87)
Does anyone have any programs or shell scripts to do the following? 1. Take C programs and add braces to all if, while, do, and for statements. For example, it should convert if (x == y) printf("x is y\n"); to if (x == y) { printf("x is y\n"); } Indentation is not important, since the indent command does all I need. 2. Take nroff input and separate sentences. It's a pain to take manual pages and try to remove a sentence when lines span sentences. For example, it should convert This is a sentence. This is a sentence that is fairly long and spans two lines. to This is a sentence. This is a sentence that is fairly long and spans two lines. -- David Elliott {decvax,ucbvax,ihnp4}!decwrl!mips!dce