[illumos-Developer] Webrev for bug 844: m4 should say something useful...
Garrett D'Amore
garrett at nexenta.com
Sun Apr 3 21:55:22 PDT 2011
On Sun, 2011-04-03 at 21:19 -0500, Gary Mills wrote:
> On Sun, Apr 03, 2011 at 09:58:51PM -0400, Richard Lowe wrote:
> > It was by way of example, ditching the \n will lose you translation
> > (unless/until someone adds one) but if it's the right way to do it,
> > that's that.
>
> Okay, I agree. This is now my test output:
>
> $ usr/src/cmd/sgs/m4/i386/m4 sample.m4
>
> usr/src/cmd/sgs/m4/i386/m4:sample.m4:2 cannot open file: No such file or directory
> include(foobar.m4)
> $ env LC_MESSAGES=fr_CA.UTF-8 usr/src/cmd/sgs/m4/i386/m4 samp>
>
> usr/src/cmd/sgs/m4/i386/m4:sample.m4:2 cannot open file: Ce fichier ou ce répertoire n'existe pas
> include(foobar.m4)
>
> The webrev for this is at:
>
> http://cr.illumos.org/view/th72io09/illumos844-2/
>
Sorry to point out nits, but...
The indent at m4macs.c:301 is weird. The correct indent is 4
characters from the line above, and the subsequent line (302) should be
aligned... Plus you can easily join the lines more sanely. Here's what
I'd do:
errorf(gettext("cannot open file: %s"),
strerror(errno));
Likewise, the indent at m4.c:809 is not right. The line should be
indented 4 spaces from the line above it.
cstyle -cPp <file> will catch many of these, although you can still
pass that command not be fully conformant.
Please fix the above indent issues. Also update the copyright notice on
each file changed (if you like, and I strongly encourage you to do so by
adding a line "Copyright 2011 <your name>. All rights reserved." after
the Sun copyright.) You also should remove #pragma ident lines from
every file you touch. (We are removing those "as we go", so since
you're updating these files, its time do that for these too.) For
example, see m4.c:30 for a line that needs to be removed.
When you're done, send me a link to your webrev (or the output from hg
export), output from hg pbchk, and a mail_msg file from a nightly build
*including lint*.
Once that's done, I'll integrate your change.
- Garrett
More information about the Developer
mailing list