Changes between Version 4 and Version 5 of CodingConventions


Ignore:
Timestamp:
11/13/08 16:04:56 (13 years ago)
Author:
perry
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CodingConventions

    v4 v5  
    11= General =
    2 Functions that only return a success/failure, return 0 on success and -1 on failure and update the trace error (using trace_set_err).
     2Functions that only return a success/failure, return 0 on success and -1 on failure and update the trace error (using {{{trace_set_err}}}).
    33
    4 Types start with "libtrace_" and end with "_t" and are typedef'd.
     4Types start with "{{{libtrace_}}}" and end with "_t" and are typedef'd.
    55
    6 Values for enumerated types, such as libtrace_linktype_t or trace_option_t, begin with "TRACE_".
     6Values for enumerated types, such as {{{libtrace_linktype_t}}} or {{{trace_option_t}}}, begin with "TRACE_".
    77
    8 Exported functions start with "trace_" and typically follow the format "trace_<verb>_[<subject>]". However, we recommend looking up the name of a function you're not certain of rather than trying to guess!
     8Exported functions start with "trace_" and typically follow the format "trace_''<verb>''_[''<subject>'']". Functions that deal with output traces should have an {{{_output}}} suffix. However, we recommend looking up the name of a function you're not certain of rather than trying to guess!
    99
    1010All exported functions and types should be declared in libtrace.h (with the exception of libpacketdump-related functions and types which are declared in libpacketdump.h). This means that libtrace programmers only need to include one header file to gain access to all of the libtrace API and that there is a single point of call to examine the format of any libtrace data structure or function prototype.