Changes between Version 3 and Version 4 of CodingConventions
- Timestamp:
- 11/13/08 15:56:23 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CodingConventions
v3 v4 1 = general =2 Function that only return a success/failure, return 0 on success and -1 on failure and update the trace error (using trace_set_err).1 = 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). 3 3 4 types start with "libtrace_" and end with "_t" and are typedef'd.4 Types start with "libtrace_" and end with "_t" and are typedef'd. 5 5 6 exported functions start with "trace_". 6 Values for enumerated types, such as libtrace_linktype_t or trace_option_t, begin with "TRACE_". 7 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! 9 10 All 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. 7 11 8 12 = libtraceio = 9 This compatibility layer is used to wrap decompression functions and various I/O strategies depending on what is available for your host. see libtraceio.h for more information. Also see format_helper's trace_file_open(). Generally the state of the file after10 an error has occured is undefined.13 This compatibility layer is used to wrap decompression functions and various I/O strategies depending on what is available for your host. See libtraceio.h for more information. Also see format_helper's trace_file_open(). Generally 14 the state of the file after an error has occurred is undefined. 11 15 12 16