doc: Mark up some code examples
authorBenjamin Herr <ben@0x539.de>
Mon, 29 Sep 2014 15:26:11 +0000 (17:26 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Mon, 3 Nov 2014 13:09:06 +0000 (15:09 +0200)
These blocks were misformatted in normal paragraph style in the
generated docs. Also, added \comment{} for comments within one code
example.

Signed-off-by: Benjamin Herr <ben@0x539.de>
src/wayland-util.h

index fd32826..05e50dd 100644 (file)
@@ -89,27 +89,31 @@ struct wl_interface {
  *
  * The following code will initialize a list:
  *
- *     struct wl_list foo_list;
+ * ~~~
+ * struct wl_list foo_list;
  *
- *     struct item_t {
- *             int foo;
- *             struct wl_list link;
- *     };
- *     struct item_t item1, item2, item3;
+ * struct item_t {
+ *     int foo;
+ *     struct wl_list link;
+ * };
+ * struct item_t item1, item2, item3;
  *
- *     wl_list_init(&foo_list);
- *     wl_list_insert(&foo_list, &item1.link); Pushes item1 at the head
- *     wl_list_insert(&foo_list, &item2.link); Pushes item2 at the head
- *     wl_list_insert(&item2.link, &item3.link); Pushes item3 after item2
+ * wl_list_init(&foo_list);
+ * wl_list_insert(&foo_list, &item1.link);   \comment{Pushes item1 at the head}
+ * wl_list_insert(&foo_list, &item2.link);   \comment{Pushes item2 at the head}
+ * wl_list_insert(&item2.link, &item3.link); \comment{Pushes item3 after item2}
+ * ~~~
  *
  * The list now looks like [item2, item3, item1]
  *
  * Will iterate the list in ascending order:
  *
- *     item_t *item;
- *     wl_list_for_each(item, foo_list, link) {
- *             Do_something_with_item(item);
- *     }
+ * \code
+ * item_t *item;
+ * wl_list_for_each(item, foo_list, link) {
+ *     Do_something_with_item(item);
+ * }
+ * \endcode
  */
 struct wl_list {
        struct wl_list *prev;