summaryrefslogtreecommitdiff
path: root/source3/CodingSuggestions
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2002-08-11 08:06:14 +0000
committerJelmer Vernooij <jelmer@samba.org>2002-08-11 08:06:14 +0000
commite598f1332ef59d0ddbb4e7d114b5b24a7b90a879 (patch)
tree243d8e3ea7ef2a5a906f4959c1287e2bd4467214 /source3/CodingSuggestions
parentdd5615c04241ec09e6b877a0670a957fa7702902 (diff)
downloadsamba-e598f1332ef59d0ddbb4e7d114b5b24a7b90a879.tar.gz
samba-e598f1332ef59d0ddbb4e7d114b5b24a7b90a879.tar.bz2
samba-e598f1332ef59d0ddbb4e7d114b5b24a7b90a879.zip
Update CodingSuggestions to include 'indent' arguments for the samba coding
style (This used to be commit 5f2c2a114b9d3739381e4ad683413a7db0187999)
Diffstat (limited to 'source3/CodingSuggestions')
-rw-r--r--source3/CodingSuggestions16
1 files changed, 14 insertions, 2 deletions
diff --git a/source3/CodingSuggestions b/source3/CodingSuggestions
index eda2bee6d0..84166e179f 100644
--- a/source3/CodingSuggestions
+++ b/source3/CodingSuggestions
@@ -25,7 +25,11 @@ documents are:
http://www.fsf.org/prep/standards_toc.html
but note that coding style in Samba varies due to the many different
-programmers who have contributed.
+programmers who have contributed.
+
+The indent utility can be used to format C files in the general
+samba coding style. The arguments you should give to indent are:
+-bad -bap -br -ce -cdw -nbc -brs -bbb -nbc
Following are some considerations you should use when adding new code to
Samba. First and foremost remember that:
@@ -137,12 +141,20 @@ Here are some other suggestions:
to and maintain your code. If it would be hard for someone else to
maintain then do it another way.
+26) Always keep the declaration of a function on one line. The autoprototyper
+ doesn't catch declarations spread over multiple lines.
+ Use:
+static char foo(int bar)
+ and not:
+static char
+foo(int bar)
+
The suggestions above are simply that, suggestions, but the information may
help in reducing the routine rework done on new code. The preceeding list
is expected to change routinely as new support routines and macros are
added.
Written by Steve French, with contributions from Simo Sorce, Andrew
-Bartlett, Tim Potter and Martin Pool.
+Bartlett, Tim Potter, Martin Pool and Jelmer Vernooij.
**/