#include <stdio.h> #include <string.h>
#define LMAP_ENTRIES 100 struct lmap { const char *name; void *data; }; struct luther_gliethttp { struct lmap lmap[LMAP_ENTRIES]; const char *name; };
static struct luther_gliethttp luther = { .lmap = { [0 ... LMAP_ENTRIES-1] = { "gliethttp", NULL } }, .name = "luther", }; int main(int argc, char *argv[]) { int i; for (i = 0; i < LMAP_ENTRIES; i++) { printf("luther.lmap[%d].name = %s/n", i, luther.lmap[i].name); } printf("%p/n", ((unsigned int)(0x01 << ((sizeof(int) * 8) - 1)) - 1)); }
|