Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!phri!bc-cis!pluto!warren From: warren@pluto.UUCP (Warren Burstein) Newsgroups: comp.unix.questions Subject: Re: nroff problems Message-ID: <479@pluto.UUCP> Date: Wed, 5-Aug-87 15:06:29 EDT Article-I.D.: pluto.479 Posted: Wed Aug 5 15:06:29 1987 Date-Received: Thu, 13-Aug-87 06:02:16 EDT References: <774@PSUECLB> <645@ora.UUCP> Reply-To: warren@pluto.UUCP (Warren Burstein) Organization: Industrial Automation Systems, New York, NY Lines: 44 Do you absolutely need formfeeds? Can't your printer break things up at the end of each page? If not, try a little program to insert a formfeed after every 66 lines, I had it hanging around from the last time I had such a problem. No way to change 66 save edit/recompile, it's a throwaway. /* * Copy stdin to stdout, insert formfeed every 66 lines. */ #include main() { int line = 0; int c; if ( (c = getchar()) == EOF) return; for (;;) { if (c == '\n') line++; putchar(c); /* * An odd place to leave the loop, but it keeps a final * formfeed from being generated when the last page * has exactly 66 lines. */ if ( (c = getchar()) == EOF) break; if (line >= 66) { putchar('\f'); line = 0; } } } -- /|/~\~~\ The entire world Warren Burstein |__/__/_/ is a very strange carrot. | But the farmer philabs!tg!pluto!warren / is not afraid at all. Why doesn't life come with subtitles?