X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/b2e465d6d32d2dc884f58b94acb7e35f671a87fe..0d303f1764645284b33924c9be8bf29f0a32ca5c:/doc/style.txt?ds=inline diff --git a/doc/style.txt b/doc/style.txt index 8d0778b4a..7658b0314 100644 --- a/doc/style.txt +++ b/doc/style.txt @@ -9,7 +9,7 @@ Ver - A version Indenting, Comments, Etc ~~~~~~~~~~~~~~~~~~~~~~~~ Would make Linus cry :P However it is what I prefer. 3 space indent, -8 space tab all braces on seperate lines, function return on the same line +8 space tab all braces on separate lines, function return on the same line as the function, cases aligned with their code. The 'indent' options for this style are: indent -bl -bli0 -di1 -i3 -nsc -ts8 -npcs -npsl @@ -17,8 +17,8 @@ this style are: Each file gets a block at the top that should describe what the file does, basically a summary of purpose along with any special notes and attributions. The }}} and {{{ are folding marks if you have a folding -editor such as jed, the function seperators are intended to give -a visual seperate between functions for easier browsing of the larger files, +editor such as jed, the function separators are intended to give +a visual separate between functions for easier browsing of the larger files, or indexed folding if you have such an editor. Each file should have 1 or 0 primary include files, that include @@ -60,16 +60,16 @@ almost always designates a change in ownership rules). * Pass by non-const reference may be used to indicate a OUT type variable * Pass by pointer (except in the case where the pointer is really an array) should be used when the object will be retained or ownership will be - transfered. Ownership transference should be rare and noted by a comment. + transferred. Ownership transference should be rare and noted by a comment. * Standard C things (FILE * etc) should be left as is. * Return by references should indicate a borrowed object * Return by pointer (except arrays) should indicate ownership is - transfered. Return by pointer should not be used unless ownership is - transfered. + transferred. Return by pointer should not be used unless ownership is + transferred. * Return by pointer to variable indicates ownership transfer unless the pointer is an 'input' parameter (designated generally by an =0, indicating a default of 'none') -Non-ownership transfering arrays/lists should probably return an iterator +Non-ownership transferring arrays/lists should probably return an iterator typedef or references..