2 Over time, I am moving all of the IPFilter code to what I consider a better
3 coding style than it had before. If you submit patches, I expect them to
4 conform as appropriate.
8 Preceeding each and every function, a comment block like this should
11 /* ------------------------------------------------------------------------ */
12 /* Function: function-name */
13 /* Returns: return-type */
14 /* Parameters: param1(I) - param1 is an input parameter */
15 /* p2(O) - p2 is an output parameter passed as an arg */
16 /* par3(IO) - par3 is a parameter which is both input and */
17 /* output. Pointers to things which are used and */
18 /* then get a result stored in them qualify here. */
20 /* Description about what the function does. This comment should explain */
21 /* any gotchas or algorithms that are used which aren't obvious to the */
22 /* casual reader. It should not be an excuse to not use comments inside */
24 /* ------------------------------------------------------------------------ */
29 Tabs are to be at 8 characters.
34 All expressions which evaluate to a boolean for a test condition, such as
35 in an if()/while() statement must involve a boolean operation. Since C
36 has no native boolean type, this means that one of <,>,<=,>=,==,!= must
37 be present. Implied boolean evaluations are out.
39 In code, the following is banned:
45 and should be replaced by:
51 If pointers are involved, always compare with NULL, ie.:
55 while ((a = b) != NULL)