Wednesday, April 20, 2011

Working on GDB


GNU Coding Standards (Recap):

A short recap of the GNU formatting and naming conventions, partly borrowed from XEmacs:

  • Put a space after every comma.
  • Put a space before the parenthesis that begins a function call, macro call, function declaration or definition, or control statement (if,whileswitchfor). (do not do this for macro definitions; this is invalid preprocessor syntax.)
  • The brace that begins a control statement (ifwhileswitchfor) or a function definition should go on a line by itself.
  • In function definitions, put the return type and all other qualifiers on a line before the function name. Thus, the function name is always at the beginning of a line.
  • Indentation level is two spaces. (However, the first and following statements of a while/for/if/etc. block are indented four spaces from thewhile/for/if keyword. The opening and closing braces are indented two spaces.)
  • Variable and function names should be all lowercase, with underscores separating words, except for a prefixing tag, which may be in uppercase. Do not use the mixed-case convention (e.g. SetVariableToValue ()) and especially do not use Microsoft Hungarian notation (char **rgszRedundantTag).
  • Preprocessor constants and enumerations should be all uppercase, and should be prefixed with a tag that groups related constants together.
GNU Coding Standards Compatibility test:

No comments:

Post a Comment