summaryrefslogtreecommitdiffstats
path: root/docs/codingstyle.html
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2019-05-28 13:14:03 +0200
committerErik Faye-Lund <[email protected]>2019-06-05 23:48:44 +0200
commit392c083377fca82ebfbdc559a6a0c6933df422db (patch)
tree077578a7163587274b75035f75627241c56eef8e /docs/codingstyle.html
parent0ee366960c32067b528077c49362c468364d0206 (diff)
docs: add more more code-tags
It's easier to read function-names, file-names and other "machine"-related strings if they are formatted in a monospace font. So let's mark these up with code-tags. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'docs/codingstyle.html')
-rw-r--r--docs/codingstyle.html14
1 files changed, 8 insertions, 6 deletions
diff --git a/docs/codingstyle.html b/docs/codingstyle.html
index e8832e7967c..aa1e09cba32 100644
--- a/docs/codingstyle.html
+++ b/docs/codingstyle.html
@@ -120,10 +120,11 @@ the opening brace goes on the next line by itself (see above.)
_mesa_foo_bar() - an internal non-static Mesa function
</pre>
-<li>Constants, macros and enum names are ALL_UPPERCASE, with _ between
-words.
-<li>Mesa usually uses camel case for local variables (Ex: "localVarname")
-while gallium typically uses underscores (Ex: "local_var_name").
+<li>Constants, macros and enum names are <code>ALL_UPPERCASE</code>, with _
+between words.
+<li>Mesa usually uses camel case for local variables (Ex:
+<code>localVarname</code>) while gallium typically uses underscores (Ex:
+<code>local_var_name</code>).
<li>Global variables are almost never used because Mesa should be thread-safe.
<li>Booleans. Places that are not directly visible to the GL API
@@ -131,8 +132,9 @@ should prefer the use of <code>bool</code>, <code>true</code>, and
<code>false</code> over <code>GLboolean</code>, <code>GL_TRUE</code>, and
<code>GL_FALSE</code>. In C code, this may mean that
<code>#include &lt;stdbool.h&gt;</code> needs to be added. The
-<code>try_emit_</code>* methods in src/mesa/program/ir_to_mesa.cpp and
-src/mesa/state_tracker/st_glsl_to_tgsi.cpp can serve as examples.
+<code>try_emit_</code>* methods in <code>src/mesa/program/ir_to_mesa.cpp</code>
+and <code>src/mesa/state_tracker/st_glsl_to_tgsi.cpp</code> can serve as
+examples.
</ul>