Changeset 806 for trunk/ithildin/doc/style.txt
- Timestamp:
- 06/01/07 11:09:07 (5 years ago)
- File:
-
- 1 edited
-
trunk/ithildin/doc/style.txt (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ithildin/doc/style.txt
r578 r806 3 3 # style.txt: guide to recommended programming style/practices 4 4 # 5 # Copyright 2002 the Ithildin Project.5 # Copyright 2002-2007 the Ithildin Project. 6 6 # See the COPYING file for more information on licensing and use. 7 7 # … … 31 31 * here), but should be properly spaced on the left and aligned. */ 32 32 33 /* All files have 4-space logical tab stops. Two tab-stops should be replaced 34 * with a single <tab>, not eight spaces. Text wraps at column 79 in all 35 * files. Long lines should be extended using the \<newline> mechanism. */ 33 /* All files have 4-space logical tab stops. There are no <tab> characters in 34 * files. Two logical tabs is eight spaces, not a <tab>. Text wraps at 35 * column 79 in all files. Long lines should be extended using the \<newline> 36 * mechanism. */ 36 37 37 38 /* Each C file (including headers) should contain the above notice with the … … 41 42 * file.name: brief summary of the purpose of the file 42 43 * 43 * Copyright 2002 the Ithildin Project.44 * Copyright 2002-2007 the Ithildin Project. 44 45 * See the COPYING file for more information on licensing and use. 45 46 * … … 59 60 60 61 /* include statements should go as follows: any necessary system-wide files 61 * should be included first, followed by "stand.h", followed by any other 62 * necessary local includes. The 'stand.h' include should be directly below 63 * the system includes (if they are used), and a blank line should be added 64 * before any necessary 'local' includes as demonstrated below: */ 62 * should be included first, followed by "ithildin.h", followed by any 63 * other necessary local includes. The 'ithildin.h' include should be 64 * directly below the system includes (if they are used), and a blank 65 * line should be added before any necessary 'local' includes as 66 * demonstrated below: */ 65 67 66 68 #include <system/header.h> 67 69 #include <ithildin/stand.h> 68 70 71 #include <module-header.h> 72 69 73 /* be sure to include an id in your file so it can be identified later. */ 70 74 IDSTRING(rcsid, "$Id$"); 71 75 72 #include <module-header.h>73 76 74 77 /* function and structure declarations are placed below include (and other pre … … 80 83 * should not, in most cases, be typedef'd. examples follow: */ 81 84 82 /* Comments about the use of 'foo', and it 's general purpose, go here.83 * additionally, types should be separated from variable names by up to two84 * tabstops. Comments about structure's member variables' functions should be85 * aligned whenever possible.*/85 /* Comments about the use of 'foo', and its general purpose, go here. 86 * Comments about structure's member variables' functions should be 87 * aligned whenever possible after the 28th column (or later as need 88 * dictates) */ 86 89 struct foo { 87 int bar;/* brief description of variable */88 struct baz abaz; /* a baz structure */89 longtypename avar; /* another variable.90 int bar; /* brief description of variable */ 91 struct baz abaz; /* a baz structure */ 92 longtypename avar; /* another variable. */ 90 93 91 LIST_ENTRY(foo) lp; /* a list entry. lists should be rolled with the92 macros in queue.h unless there is a pressing reason93 not to do so. */94 LIST_ENTRY(foo) lp; /* a list entry. lists should be rolled with the 95 macros in queue.h unless there is a pressing 96 reason not to do so. */ 94 97 }; 95 98 … … 120 123 121 124 /* If other questions remain, and the style is not evident from existing code, 122 * please see the style(9) manual page on your nearest FreeBSD system * .125 * please see the style(9) manual page on your nearest FreeBSD system */ 123 126
Note: See TracChangeset
for help on using the changeset viewer.
