[PATCH wayland] doc: Create \comment alias for C-style comments

Aaron Faanes dafrito at gmail.com
Tue Sep 17 14:40:49 PDT 2013

Since /* */ do not nest, documentation is forced to either use C++ style
// comments or some other foreign notation. This commit provides an alias
that allows C-style comments to be introduced in code blocks that support

It should be noted that this macro will not work within \code blocks, as
Doxygen commands are ignored there. Instead, Doxygen's fenced code
blocks (created via ~~~) must be used for proper output. To demonstrate:

struct example_node {
        int id;
        \comment{Other members ...}

will roughly yield the following HTML (excluding syntax highlighting):

struct example_node {
        int id;
        /* Other members ... */
 doc/doxygen/wayland.doxygen.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/doxygen/wayland.doxygen.in b/doc/doxygen/wayland.doxygen.in
index 7a2ac62..dd98594 100644
--- a/doc/doxygen/wayland.doxygen.in
+++ b/doc/doxygen/wayland.doxygen.in
@@ -193,7 +193,7 @@ TAB_SIZE               = 8
 # will result in a user-defined paragraph with heading "Side Effects:".
 # You can put \n's in the value part of an alias to insert newlines.
-ALIASES                =
+ALIASES                += comment{1}="/* \1 *<!-- -->/"
 # This tag can be used to specify a number of word-keyword mappings (TCL only).
 # A mapping has the form "name=value". For example adding

More information about the wayland-devel mailing list