I'm writing a manpage for a library and want to describe a function
which returns a pointer to a function.
Specifically, it takes a handler of type void (*)(const char *, int)
and returns the previous handler. If we call it foo, then:
extern void (*foo(void (*)(const char *, int)))(const char *, int);
How should this be described in SYNOPSIS? The .Ft/.Fn paradigm does
not seem to me to have any obvious way to describe function return
types that aren't textually entirely before the function name, that is,
which don't fit the textual paradigm $RETURNTYPE $FUNCTIONNAME($ARGS).
I tried
.Ft void
.Fn ( * foo "void (*)(const char *, int)" ) "const char *" "int"
but that failed rather badly, worse than I was expecting; I got
void
(*(foo, void (*)(const char *, int));) const char * int
with assorted portions highlighted.
What's the Right way to write such a thing?
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML [email protected]
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B