
m4(1) | m4(1) |
NAME
m4 - macro processor
SYNOPSIS
m4 [options] [®le ...]
DESCRIPTION
m4 is a macro processor intended as a front end for Ratfor, C, and other languages. Each of the argument ®les is processed in order; if there are no ®les, or if a ®le name is
Options
m4 recognizes the following options:
Operate interactively. Interrupts are ignored and the output is unbuffered. Using this | |
| mode may be very dif®cult. |
Enable line sync output for the C preprocessor (#line ...) | |
Change the size of the | |
Change the size of the symbol table hash array from the default of 199. The size should be | |
| prime. |
Change the size of the call stack from the default of 100 slots. Macros take three slots, and | |
| nonmacro arguments take one. |
Change the size of the token buffer from the default of 512 bytes. |
To be effective, the options listed above must appear before any ®le names and before any
De®ne name as val or as null if val is omitted.
Macro Calls
Macro calls have the form:
name(arg1, arg2, ... ,argn)
The left parenthesis (() must immediately follow the name of the macro. If the name of a de®ned macro is not followed by a (, it is deemed to be a call of that macro with no arguments. Potential macro names consist of alphabetic letters, digits, and underscore (_); the ®rst character cannot be a digit.
Leading unquoted blanks, tabs, and newlines are ignored while collecting arguments. Left and right single quotes (` and ') are used to quote strings. The value of a quoted string is the string stripped of the quotes.
When a macro name is recognized, its arguments are collected by searching for a matching right parenthesis. If fewer arguments are supplied than are in the macro de®nition, the trailing arguments are taken to be null. Macro evaluation proceeds normally during the collection of the arguments, and any commas or right parentheses which happen to turn up within the value of a nested call are as effective as those in the original input text. After argument collection, the value of the macro is pushed back onto the input stream and rescanned.
m4 makes available the following
changecom Change left and right comment markers from the default # and newline. With no argu- ments, the comment mechanism is effectively disabled. With one argument, the left marker becomes the argument and the right marker becomes newline. With two argu- ments, both markers are affected. Comment markers may be up to ®ve characters long.
changequote Change quote symbols to the ®rst and second arguments. The symbols may be up to ®ve characters long. changequote without arguments restores the original values (i.e., ` and ').
m
− 1 − | Section 1−485 |