[Cogl] [PATCH] Use <literal> not <pre> in the comments
Robert Bragg
robert at sixbynine.org
Wed Jun 20 07:34:04 PDT 2012
Assuming it results in sensible formatting for the html documentation,
then this looks good to land to me.
Reviewed-by: Robert Bragg <robert at linux.intel.com>
thanks,
- Robert
On Wed, Jun 20, 2012 at 2:31 PM, Damien Lespiau
<damien.lespiau at gmail.com> wrote:
> From: Damien Lespiau <damien.lespiau at intel.com>
>
> Comments are interpreted as docbook snippets and <pre> is from html. The
> closest maching tag for inline content seems to be <literal>.
> ---
> cogl/cogl-attribute.h | 23 +++++++++++------------
> cogl/cogl-quaternion.h | 2 +-
> 2 files changed, 12 insertions(+), 13 deletions(-)
>
> diff --git a/cogl/cogl-attribute.h b/cogl/cogl-attribute.h
> index f9316a6..7011707 100644
> --- a/cogl/cogl-attribute.h
> +++ b/cogl/cogl-attribute.h
> @@ -56,10 +56,10 @@ G_BEGIN_DECLS
> * @name: The name of the attribute (used to reference it from GLSL)
> * @stride: The number of bytes to jump to get to the next attribute
> * value for the next vertex. (Usually
> - * <pre>sizeof (MyVertex)</pre>)
> + * <literal>sizeof (MyVertex)</literal>)
> * @offset: The byte offset from the start of @attribute_buffer for
> * the first attribute value. (Usually
> - * <pre>offsetof (MyVertex, component0)</pre>
> + * <literal>offsetof (MyVertex, component0)</literal>
> * @components: The number of components (e.g. 4 for an rgba color or
> * 3 for and (x,y,z) position)
> * @type: FIXME
> @@ -95,23 +95,22 @@ G_BEGIN_DECLS
> * ]|
> *
> * In this case, to describe either the position or texture coordinate
> - * attribute you have to move <pre>sizeof (MyVertex)</pre> bytes to
> + * attribute you have to move <literal>sizeof (MyVertex)</literal> bytes to
> * move from one vertex to the next. This is called the attribute
> * @stride. If you weren't interleving attributes and you instead had
> * a packed array of float x, y pairs then the attribute stride would
> - * be <pre>(2 * sizeof (float))</pre>. So the @stride is the number of
> + * be <literal>(2 * sizeof (float))</literal>. So the @stride is the number of
> * bytes to move to find the attribute value of the next vertex.
> *
> * Normally a list of attributes starts at the beginning of an array.
> - * So for the <pre>MyVertex</pre> example above the @offset is the
> - * offset inside the <pre>MyVertex</pre> structure to the first
> + * So for the <literal>MyVertex</literal> example above the @offset is the
> + * offset inside the <literal>MyVertex</literal> structure to the first
> * component of the attribute. For the texture coordinate attribute
> - * the offset would be <pre>offsetof (MyVertex, s)</pre> or instead of
> - * using the offsetof macro you could use <pre>sizeof (float) * 3</pre>.
> - * If you've divided your @array into blocks of non-interleved
> - * attributes then you will need to calculate the @offset as the
> - * number of bytes in blocks preceding the attribute you're
> - * describing.
> + * the offset would be <literal>offsetof (MyVertex, s)</literal> or instead of
> + * using the offsetof macro you could use <literal>sizeof (float) *
> + * 3</literal>. If you've divided your @array into blocks of non-interleved
> + * attributes then you will need to calculate the @offset as the number of
> + * bytes in blocks preceding the attribute you're describing.
> *
> * An attribute often has more than one component. For example a color
> * is often comprised of 4 red, green, blue and alpha @components, and a
> diff --git a/cogl/cogl-quaternion.h b/cogl/cogl-quaternion.h
> index 2a00741..7683633 100644
> --- a/cogl/cogl-quaternion.h
> +++ b/cogl/cogl-quaternion.h
> @@ -59,7 +59,7 @@ G_BEGIN_DECLS
> * component. The scalar component is normally referred to as w and the
> * vector might either be referred to as v or a (for axis) or expanded
> * with the individual components: (x, y, z) A full quaternion would
> - * then be written as <pre>[w (x, y, z)]</pre>.
> + * then be written as <literal>[w (x, y, z)]</literal>.
> *
> * Quaternions can be considered to represent an axis and angle
> * pair although sadly these numbers are buried somewhat under some
> --
> 1.7.7.5
>
> _______________________________________________
> Cogl mailing list
> Cogl at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/cogl
More information about the Cogl
mailing list