On Tue, Apr 04, 2006 at 10:08:22PM +0100, Paul Jakma wrote:
> On Sun, 2 Apr 2006, Joerg Schilling wrote:
> 
> >     if (dp == &notable) {
> >             /* BEGIN CSTYLED */
> >             printf("Manufacturer is unknown because of the orange forum 
> >             embargo.\n");
> >             printf("As the orange forum likes to get money for recent 
> >             information,\n");
> >             printf("it may be that this media does not use illegal 
> >             manufacturer coding.\n");
> >             /* END CSTYLED */
> >     }
> 
> C99 mandates concatenation of adjacent string literals into one, GCC 
> and Sun Studio both do so. So you could write the above as:
> 
>       if (dp == &notable) {
>               /* BEGIN CSTYLED */
There is no need for /* BEGIN CSTYLED */ here.
>               printf("Manufacturer is unknown because of the"
>                      "orange forum embargo.\n");
                ^^^^
As long as the indentation is four spaces, not seven.
>               printf("As the orange forum likes to get money"
>                      "for recent information,\n");
>               printf("it may be that this media does not use"
>                      "illegal manufacturer coding.\n");
>               /* END CSTYLED */
>       }

You could also do:
        if (dp == &notable) {
                printf(
"Manufacturer is unknown because of the orange forum embargo.\n"
"As the orange forum likes to get money for recent information,\n"
"it may be that this media does not use illegal manufacturer coding.\n");
        }

and still be cstyle-compliant.


Cheers,
- jonathan

-- 
Jonathan Adams, Solaris Kernel Development
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to