These are definitions specific to libbu, used throughout the library.
More...
These are definitions specific to libbu, used throughout the library.
◆ BU_ASSERT
#define BU_ASSERT |
( |
|
expression_ | ) |
|
Value:
const char *expression_buf_ = #expression_; \
bu_log("BU_ASSERT(%s) failure in file %s, line %d\n", \
expression_buf_, __FILE__, __LINE__); \
bu_bomb("BU_ASSERT FAILED\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
#define BRLCAD_ERROR 0x0001 |
something went wrong
Definition at line 50 of file defines.h.
◆ BU_DIR_SEPARATOR
#define BU_DIR_SEPARATOR '/' |
the default directory separator character
Definition at line 65 of file defines.h.
◆ BU_PATH_SEPARATOR
#define BU_PATH_SEPARATOR ':' |
set to the path list separator character
Definition at line 79 of file defines.h.
◆ _BU_ATTR_PRINTF12
#define _BU_ATTR_PRINTF12 |
shorthand declaration of a printf-style functions
Definition at line 90 of file defines.h.
◆ _BU_ATTR_PRINTF23
#define _BU_ATTR_PRINTF23 |
◆ _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 111 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 124 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 137 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 147 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 158 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 169 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 182 of file defines.h.
◆ BU_FORTRAN
#define BU_FORTRAN |
( |
|
lc, |
|
|
|
uc |
|
) |
| lc ## _ |
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 191 of file defines.h.