These are definitions specific to libbu, used throughout the library.
More...
These are definitions specific to libbu, used throughout the library.
◆ BU_ASSERT
Value:
bu_log(
"BU_ASSERT(%s) failure in file %s, line %d\n", \
}
#define UNLIKELY(expression)
Alternative for assert(3) that calls LIBBU logging+bombing.
This is a simple macro wrapper that logs an assertion-failure error message and aborts application execution if the specified expression is not hold true. While it is similar in use, this wrapper does not utilize assert(3) or NDEBUG but is disabled if NO_BOMBING_MACROS is defined by the configuration.
Definition at line 47 of file assert.h.
◆ BRLCAD_OK
logic worked as expected
Definition at line 49 of file defines.h.
◆ BRLCAD_ERROR
something went wrong
Definition at line 50 of file defines.h.
◆ BU_DIR_SEPARATOR
the default directory separator character
Definition at line 65 of file defines.h.
◆ BU_PATH_SEPARATOR
set to the path list separator character
Definition at line 79 of file defines.h.
◆ _BU_ATTR_PRINTF12
shorthand declaration of a printf-style functions
Definition at line 90 of file defines.h.
◆ _BU_ATTR_PRINTF23
◆ _BU_ATTR_PRINTF34
◆ _BU_ATTR_SCANF23
◆ _BU_ATTR_ALWAYS_INLINE
#define _BU_ATTR_ALWAYS_INLINE |
shorthand declaration of a function that should always be inline
Definition at line 116 of file defines.h.
◆ _BU_ATTR_CONST
shorthand declaration of a function that will return the exact same value for the exact same arguments. this implies it's a function that doesn't examine into any pointer values, doesn't call any non-cost functions, doesn't read globals, and has no effects except the return value.
Definition at line 129 of file defines.h.
◆ _BU_ATTR_PURE
shorthand declaration of a function that depends only on its parameters and/or global variables. this implies it's a function that has no effects except the return value and, as such, can be subject to common subexpression elimination and loop optimization just as an arithmetic operator would be.
Definition at line 142 of file defines.h.
◆ _BU_ATTR_COLD
shorthand declaration of a function that is not likely to be called. this is typically for debug logging and error routines.
Definition at line 152 of file defines.h.
◆ _BU_ATTR_NONNULL
shorthand declaration of a function that doesn't accept NULL pointer arguments. if a null pointer is detected during compilation, a warning/error can be emitted.
Definition at line 163 of file defines.h.
◆ _BU_ATTR_WARN_UNUSED_RESULT
#define _BU_ATTR_WARN_UNUSED_RESULT |
shorthand declaration of a function whose return value should not be ignored. a warning / error will be emitted if the caller does not use the return value.
Definition at line 174 of file defines.h.
◆ _BU_ATTR_FLATTEN
shorthand placed before a function definition indicating to some compilers that it should inline most of the function calls within the function. this should be used sparingly on functions that are demonstrably hot, as indicated by a profiler.
Definition at line 187 of file defines.h.
◆ BU_FORTRAN
This macro is used to take the 'C' function name, and convert it at compile time to the FORTRAN calling convention.
Lower case, with a trailing underscore.
Definition at line 196 of file defines.h.
◆ BU_CLBK_PRE
When callbacks are used, there are different points during the execution process when the callback may need to be triggered. Establish common definitions so various libraries can use a consistent convention.
Definition at line 212 of file defines.h.
◆ BU_CLBK_DURING
◆ BU_CLBK_POST
◆ BU_CLBK_LINGER
◆ bu_clbk_t
There are a fair number of callback mechanisms defined in BRL-CAD code. Many use a common function prototype, so define it here to provide all the various libraries a common type to use.
Definition at line 204 of file defines.h.