Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!julius.cs.uiuc.edu!ux1.cso.uiuc.edu!mp.cs.niu.edu!rickert From: rickert@mp.cs.niu.edu (Neil Rickert) Newsgroups: comp.unix.questions Subject: Re: question about m4 - macro preprocessor Message-ID: <1990Nov25.142916.7684@mp.cs.niu.edu> Date: 25 Nov 90 14:29:16 GMT References: <3201@mrsvr.UUCP> Distribution: usa Organization: Northern Illinois University Lines: 21 In article <3201@mrsvr.UUCP> carl@gemed.ge.com (Carl Crawford) writes: >i am using the macro preprocessor m4 with files that are >subsequently passed to troff. m4 replaces lines that >contain m4 commands with blank lines. the blank lines >disrupt the text that is passed to troff. does anyone know >how to run m4 so that the blank lines can be eliminated? > m4 appears to 'replace lines that contain m4 commands with blank lines', but actually this is a misinterpretation of what m4 is doing. m4 acts on the commands and substitutions, but leaves everything else untouched. Consequently it leaves untouched the '\n' at the end of the line containing the command. Solution: Liberal use of the command 'dnl' (delete to new line). -- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= Neil W. Rickert, Computer Science Northern Illinois Univ. DeKalb, IL 60115. +1-815-753-6940