By the C standard from 1999 (which isn't too widely used even yet), one can initialize `not-atomic object' (i.e. arrays, structs and unions) by writing
Code:
<how to access the member> = <value>
for instance,
Code:
struct {
int i;
double j;
} pt = { .j = 2.3, .i = 5 };
is equivalent to
Code:
struct {
int i;
double j;
} pt = {5, 2.3};
for array elements, it's
Code:
static int array99[10] = {[1] = [1], [3] = 2};
/* is equivalent to */
static int array89[10] = {0, 1, 0, 2};
Note that (only) because they're static, unspecified values are 0.
So, your specific code just initializes specific members of your array with struct values where specific components are given values.
hth --Jonas
Unrelated: you can also cast brace-notation to structs without it being used in an initializer:
Code:
static struct point
foo() {
return (struct point) {640, 400};
}