[BRLTTY] readable struct initialisation

Nicolas Pitre nico at cam.org
Fri Mar 3 16:34:16 EST 2006


On Fri, 3 Mar 2006, Mario Lang wrote:

> Hi.
> 
> Wouldn't this kind of syntax make more sense to use?  The kernel does
> all struct initialisations that way, and I have to say, I find the readability
> of code extremely pleasant.
> 
[...]
> +    name: "Modular 20+4",
> +    identifier: 0X80,
> +    columns: 20,

Actually, that format is not used by the kernel anymore.  That was a 
non-standard gcc extension which is being deprecated.

What you probably want is the C99 standard equivalent:

    .name = "Modular 20+4",
    .identifier = 0X80,
    .columns = 20,

etc.


Nicolas


More information about the BRLTTY mailing list