[PATCH 6/9] doc: Added \code tags around sample code in doxygen comments

Bill Spitzak spitzak at gmail.com
Wed Nov 26 10:32:56 PST 2014


On 11/25/2014 11:51 PM, Pekka Paalanen wrote:

> What \comment-line command are you looking for?
>
> I see you reformatted
>
>>>> - * wl_list_insert(&foo_list, &item1.link);   \comment{Pushes item1 at the head}
>
> but I assume you mean something else?

No I meant that. I thought somebody had made the comment command to 
produce "/* text */". Apparently however this is a holdover from javadoc 
or something and doxygen does not do it.

I did some web searching, and everybody says the only way to do a 
comment is to use a different comment style that can be nested. Since 
C-style comments don't nest you have to use something else if the 
doxygen comment is C-style. The doxygen code tag appears to make it 
entirely literal, the only thing it recognizes is \endcode.

Not sure if it would be acceptable to use C++ comments in Wayland 
source, but that would be a solution. It was how I got around this 
problem before.

Another solution is to get Doxygen to produce code-like output but where 
commands can be interpreted. Using <tt> and replacing every space with 
<sp/> and every newline with <br/> works but is really ugly.



More information about the wayland-devel mailing list