[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 13-m4-undivert-culprit.patch
From: |
Gary V. Vaughan |
Subject: |
Re: 13-m4-undivert-culprit.patch |
Date: |
Thu, 30 Aug 2001 20:04:18 +0100 |
User-agent: |
Mutt/1.3.21i |
On Mon, Aug 20, 2001 at 06:08:43PM +0200, Akim Demaille wrote:
>
> - for (i = 1; i < argc; i++)
> - {
> - if (sscanf (M4ARG (i), "%d", &file) == 1)
> - m4_insert_diversion (file);
> - else if (no_gnu_extensions)
> - M4ERROR ((warning_status, 0,
> - _("Non-numeric argument to %s"),
> - M4_TOKEN_DATA_TEXT (argv[0])));
> - else
> - {
> - fp = m4_path_search (M4ARG (i), (char **)NULL);
> - if (fp != NULL)
> - {
> - m4_insert_file (fp);
> - fclose (fp);
> - }
> - else
> - M4ERROR ((warning_status, errno,
> - _("Cannot undivert %s"), M4ARG (i)));
> - }
> - }
> + {
> + if (sscanf (M4ARG (1), "%d", &i) == 1)
> + m4_insert_diversion (i);
> + else if (no_gnu_extensions)
> + m4_numeric_arg (argv[0], M4ARG (1), &i);
> + else
> + {
> + FILE *fp = m4_path_search (M4ARG (1), (char **) NULL);
> + if (fp != NULL)
> + {
> + m4_insert_file (fp);
> + fclose (fp);
> + }
> + else
> + M4ERROR ((warning_status, errno,
> + _("Cannot undivert %s"), M4ARG (1)));
> + }
> + }
>
> I understand this can be unwelcome, please tell me. But my experience
> with Autoconf gave me some simple rules, and one of the main
> conclusion is really `never compromise useful future extension of
> macro when it can be done straightforwardly with existing macros'.
>
> And the 1-ary -> n-ary as a simple for-loop extension is the most
> attractive of these, IMHO, extremely useless extensions. Beware of
> the dark side.
It took me a while to absorb this. But, having dwelt on it for a
while, I agree with you.
Cheers,
Gary.
--
())_. Gary V. Vaughan gary@(oranda.demon.co.uk|gnu.org)
( '/ Research Scientist http://www.oranda.demon.co.uk ,_())____
/ )= GNU Hacker http://www.gnu.org/software/libtool \' `&
`(_~)_ Tech' Author http://sources.redhat.com/autobook =`---d__/