Byron Hawkins - 2014-03-11

I'm trying to generate docs for a simple vector in C, which uses preprocessor statements to simulate a C++ template. For example, the init() function looks like:

bool
VECTOR_NAME(,NAME_KEY,_init)(VECTOR_TYPE *vec, uint initial_capacity, bool synch
    _IF_ELEMENT_POINTER(, void (*free_data_func)(ELEMENT_TYPE))
    _IF_SORTED(, int (*comparator)(ELEMENT_TYPE, COMPARISON_TYPE)));

All the tokens in capitals are defined above the #include, so for example a source file might have:

#define NAME_KEY account_vector
#define ELEMENT_TYPE account_t*
#define COMPARISON_TYPE unsigned int
#define SORTED 1
#include "tvectorx.h"

This would generate a function:

bool
account_vector_init(account_vector_t *vec, unsigned int initial_capacity, bool synch,
    void (*free_data_func)(account_t*),
    int (*comparator)(account_t*, unsigned int));

Not surprisingly, doxygen is not able to parse all the preprocessor stuff. It comes out like this in the html:

bool tvector_init (VECTOR_NAME(, NAME_KEY, _t)*vec, uint initial_capacity, 
    bool synch, void(*free_data_func)(void *), 
    int(*comparator)(void *, VECTOR_COMPARISON_TYPE))

(Some default substitutions have been made.) Is there a way to just override the doxygen function declaration with a plain string, so that doxygen displays the string instead of what it would normally parse out of the code? Thanks for your help.