X-Git-Url: http://git.openafs.org/?p=openafs-wiki.git;a=blobdiff_plain;f=CodingStyle.mdwn;h=9d126f484b6a5b67ac71d7e9513753374fc9b060;hp=d8c809b50b65e66dada7974aa65972e23d7a3989;hb=a84928554afc5f39b85c53771aeedf74ef72ad81;hpb=3689bb9a049747df60e3277ab4cd67f70ae33ff2 diff --git a/CodingStyle.mdwn b/CodingStyle.mdwn index d8c809b..9d126f4 100644 --- a/CodingStyle.mdwn +++ b/CodingStyle.mdwn @@ -103,8 +103,8 @@ For example: static int ValueOfNothing(afs_int32 nothing) { - ... - } + ... + } Prototypes for functions which are shared within a module should go into the a header file named _module_ \_internal.h @@ -139,21 +139,21 @@ Header files should not contain macros or other definitions unless they are used - Use braces where it aids readability. - Closing and opening braces go on the same line as the control statement - if (foo) { - ... - } else { - ... - } + if (foo) { + ... + } else { + ... + } - Code surrounded by brackets should have its continuation lines lined up with the relevant opening brace - value = CostOfEverything(ValueOfNothing(0), - fudge); + value = CostOfEverything(ValueOfNothing(0), + fudge); - Loops with an empty body should have their trailing semicolon on the following line, to make the empty body explicit, and suppress a compiler warning - for (...; ...; ...) - ; + for (...; ...; ...) + ; - Lines should be wrapped within 80 characters