aboutsummaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-03-11 18:21:52 -0500
committerRob Landley <rob@landley.net>2019-03-11 18:21:52 -0500
commit8bdef75d75f991cb89640b8e0e823ecc1c3e9caf (patch)
treec2e6aed8cd08445174095f255a885c5957923788 /www
parentd1f51490ee7349fe104bf21e6cd76a0df431d3f9 (diff)
downloadtoybox-8bdef75d75f991cb89640b8e0e823ecc1c3e9caf.tar.gz
Add a code style note.
Diffstat (limited to 'www')
-rw-r--r--www/design.html4
1 files changed, 4 insertions, 0 deletions
diff --git a/www/design.html b/www/design.html
index 707596bc..d1531e87 100644
--- a/www/design.html
+++ b/www/design.html
@@ -442,6 +442,10 @@ the declaration and the code using it to make you uncomfortable, maybe the
function's too big, or is there an if statement or something you can
use as an excuse to start a new closer block?</p>
+<p>An * binds to a variable name not a type name, so space it that way.
+(In C "char *a, b;" and "char* a, b;" mean the same thing: "a" is a pointer
+but "b" is not. Spacing it the second way is not how C works.)</p>
+
<p>If statments with a single line body go on the same line if the result
fits in 80 columns, on a second line if it doesn't. We usually only use
curly brackets if we need to, either because the body is multiple lines or