What mean the dots? Why are they on there? I know that nv20_context_create and nv20_context_destroy are functions, or should I say pointer to functions? Thank's in advance.
const struct nouveau_driver nv20_driver = {
.context_create = nv20_context_create,
.context_destroy = nv20_context_destroy,
...
This is a feature of C99 called designators. It's essentially equivalent to:
const struct nouveau_driver nv20_driver;
nv20_driver.context_create = nv20_context_create;
nv20_driver.context_destroy = nv20_context_destroy;
There are several key differences, however. Since the designators are
part of the initializer for nv20_driver, the fact that it's declared
'const' doesn't violate a constraint, the way the assignment expressions
above would. Also, you can use designators for objects with file scope,
where the assignment expressions would not be allowed, or for block
scope objects with static storage duration, where the corresponding
assignment expressions would be executed every time the block is
entered, whereas the designators would only be evaluated once, before
the start of the program.
Another form of the same feature applies to arrays:
int array[5000] = {[1234] = 4321};
which is essentially equivalent to
int array[5000] = {0};
array[1234] = 4321;