(Dr.R.K.) Various Patche Files - Modified m4


Go to Bottom blank blank Go up one level To frames R.K.'s Home Page Keyword Index Site Map Help Linux

``Modified'' m4 macro package patch

The mm4 program is a ``modified'' GNU m4 macro program, that adds two new keywords to the macro language ... namely redirect & rednum. These new keywords add redirection capability to the macro language. So instead of outputting only to stdout the redirect keyword allows the output to be shunted off to another file descriptor between 1 & 10. (Note that 1=stdout & 2=stderr, 0 corresponds to stdin which would cause endless problems).

The patch is built on top of the GNU m4 version 1.4 macro package available from the prep.ai.mit.edu anonymous ftp site in the pub/gnu/m4 directory. A good mirror site is ftp.cdrom.com and you can grab the GNU m4 version 1.4 macro package from there.

One of the ``bugs/features'' is that the redirection only works when actually outputting to divert(0) (normally stdout). By the nature of m4 diversions are sent to temporary files, hence any redirections made when text is being sent to a ``diversion'' has no effect on that text. The redirection is remembered and becomes effective when undiverting diversion 0. If this is confusing then you're probably not familiar enough with the m4 macro package and need further practice with the language to discern the distinction.

Place the uncompressed patch in the m4-1.4/src directory and run
patch < mm4.patch
This will modified some of the sources and Makefile.in and then proceed as usual to start the compilation & installation. The end results should be an executable named ``mm4'', not the usual m4.


Last Modified:
Go to Top blank blank Go up one level To frames R.K.'s Home Page Keyword Index Site Map Help Linux
Brought to you by: R.K. Owen,Ph.D.
This page is http://owen.sj.ca.us/rkowen/sources/patches/mm4.patch.html