On 6/14/2017 10:18 AM, marc espie wrote:
> on wed, jun 14, 2017 at 09:58:54am -0400, brian callahan wrote:
>> hi marc --
>>
>> how's this version?
>> also includes a slight tweak to the single -e flag regress test.
>>
>> ~brian
> comment nit, otherwise good.
>
>> +extern int error_warns;
on wed, jun 14, 2017 at 09:58:54am -0400, brian callahan wrote:
> hi marc --
>
> how's this version?
> also includes a slight tweak to the single -e flag regress test.
>
> ~brian
comment nit, otherwise good.
> +extern int error_warns; /* make warnings cause exit_code > 0 */
Hi Marc --
How's this version?
Also includes a slight tweak to the single -E flag regress test.
~Brian
Index: usr.bin/m4/eval.c
===
RCS file: /cvs/src/usr.bin/m4/eval.c,v
retrieving revision 1.74
diff -u -p -u -p -r1.74 eval.c
---
On Tue, Jun 13, 2017 at 05:05:56PM -0400, Brian Callahan wrote:
> Hi --
>
> Whoops, that was unintentional. Fixed.
>
> ~Brian
Sorry for not looking sooner.
I would rather you use two variables for -E flags. e.g., set
error_warns for one -E flag, and fatal_warns for multiple -E flags.
That
On Tue, 13 Jun 2017 17:05:56 -0400, Brian Callahan wrote:
> Whoops, that was unintentional. Fixed.
Looks good to me.
- todd
Hi --
Whoops, that was unintentional. Fixed.
~Brian
Index: usr.bin/m4/eval.c
===
RCS file: /cvs/src/usr.bin/m4/eval.c,v
retrieving revision 1.74
diff -u -p -u -p -r1.74 eval.c
--- usr.bin/m4/eval.c 5 Feb 2015 12:59:57 -
Hi --
Updated diff attached. Wrapped everything up in an m4_warnx() call
and added a regress test for single -E. Thanks!
The one fatal_warns check in eval.c seems like a special case, so
I left that one as it was.
~Brian
Index: usr.bin/m4/eval.c
On Tue, Jun 13, 2017 at 03:35:54PM -0400, Brian Callahan wrote:
> This diff comes with man page additions explaining the new flag,
> as well as a regress test for -E -E behavior. I could not figure
> out how to write a regress test that checks for exit status, so
> there is no test for single -E
I don't have an objection to this but wouldn't it be less error-prone
to include the check_fatal_warns() checks in a warnx() wrapper?
There are some fprintf() calls in tokenizer.l that would need to
be converted but that still seems simpler than requiring callers
of warnx() or the equivalent to
The decisions taken seem correct. I'll let m4 people judge the rest of it.
Hi tech --
I've shared this with a few developers, and have been advised to
share now with a wider audience.
This diff adds -E flag functionality to m4(1). I wrote this diff
after noticing a patch in ports/devel/scons by jasper@ with the
comment:
XXX: OpenBSD's m4(1) lacks the -E option (needs
11 matches
Mail list logo