Re: C Question

Xiaotian Feng <[email protected]>
Newsgroups org.kernel.vger.linux-c-programming
Message-ID <[email protected]>
On Tue, May 25, 2010 at 6:08 PM, Randi Botse <[email protected]> wrote:
> Hi All,
>
> Im looking at lscpu.c shipped by util-linux-ng-2.17, can you explain
> me how the *vir_types[] declared, is this valid C declaration?
>

N_(blah) must be defined in some include files

> /* virtualization types */
> enum {
>        VIRT_NONE       = 0,
>        VIRT_PARA,
>        VIRT_FULL
> };
> const char *virt_types[] = {
>        [VIRT_NONE]     = N_("none"),
>        [VIRT_PARA]     = N_("para"),
>        [VIRT_FULL]     = N_("full")
> };
> --
> To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.