[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: semantique de m4 mal definie

From: Tim Van Holder
Subject: Re: semantique de m4 mal definie
Date: Thu, 26 Jun 2003 17:28:22 +0200

> It's not that gnu-m4 does not adhere to single unix, it's 
> more that single unix does not say what behavior is correct.
> Re-read Susv3 description, doesn't look that clear-cut to me:
> > define
> >     The second argument shall become the defining text of the macro
> >     whose name is the first argument.

Note: _the_ defining text, not _the current_.

> > defn
> >     The defining text of the defn macro shall be the quoted definition
> >    (using the current quoting strings) of its arguments.
> > popdef
> >     The popdef macro shall delete the current definition of its
> >     arguments, replacing that definition with the previous one. If
> >    there is no previous definition, the macro is undefined.
> > pushdef
> >     The pushdef macro shall be equivalent to the define macro with the
> >     exception that it shall preserve any current definition for future
> >     retrieval using the popdef macro.

Here the spec says, fairly clearly IMO, that unlike pushdef, define DOES NOT
"preserve any current definition for future retrieval using the popdef
In other words, the 'undefine(a)pushdef(a)' behaviour is the 'correct' one.
I'll admit that it would have been more clear if it had been explicitly
stated with the definition of 'define' above, but it's sufficiently
clear-cut as it is.

> > undefine
> >     The undefine macro shall delete all definitions (including those
> >     preserved using the pushdef macro) of the macros named by its
> >     arguments.
> > 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]