On Thu, Aug 28, 2008 at 03:21:18PM -0400, Richard Lowe wrote: > Milan Jurik <[EMAIL PROTECTED]> writes: > > > Hi, > > > > I (or hg nits) have problem with this code: > > > > 409 (void) fprintf(stderr, gettext( > > 410 "usage: %s [-acm] [-r ref_file] file...\n" > > 411 " %s [-acm] [MMDDhhmm[yy]] file...\n" > > 412 " %s [-acm] [-t [[CC]YY]MMDDhhmm[.SS]] > > file...\n"), > > 413 myname, myname, myname); > > > > C style check: > > usr/src/cmd/touch/touch.c: 413: continuation line improperly indented > > > > I think such code was OK for wx, as the result of one point of view on > > chapter 13. in C style doc. Where am I doing the mistake? How should it > > look like? I tried to move lines 410-412, I tried several formats of line > > 413, no success. > > The code wouldn't have been Ok with wx, they both use cstyle -cPp > > cstyle is unfortunately inspecific about what it wants with nested > continuation lines.
The old one was lacking specificity (and correctness). The new one is much more specific: file: line: continuation should be indented 4 spaces You can also add the '-v' flag, which, for each error, prints the initial line and the "broken" line. For example, if tabs had been used to indent line 413, above, cstyle -pPcv would output: usr/src/cmd/touch/touch.c: 413: continuation should be indented 4 spaces (void) fprintf(stderr, gettext( myname, myname, myname); > (here, you're continuing from the gettext() not the fprintf()...) It doesn't matter; cstyle.ms.ps specifies that it is always a four-space indent, and that's what cstyle -c enforces. Cheers, - jonathan _______________________________________________ tools-discuss mailing list tools-discuss@opensolaris.org