The preprocessor trick of passing function macros as parameters is not that obscure. I have seen it used and I've used it myself. It is very useful when you have a list of static "things" that you need to operate on.
Say I have a static list of names and I would like to declare some struct type for each name. I also would like to create variables of these structs at some point, and I would always do so for the entire block of names. You could do something like this:
#define apply(fn) \
fn(name1) \
fn(name2) \
fn(name3) \
...
fn(nameN)
#define make_struct(name) struct name##_t { ... }
#define make_variable_of(name) name##_t name;
...
apply(make_struct); // This defines all the structs.
void some_function(...) {
apply(make_variable_of); // And this defines one variable of each type.
}
Yes, it is not pretty (it is the C preprocessor after all), but it can be very useful and clean.