|
0 A.D. | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
| Field Summary | |
static intptr_t |
active_data_structures
See lockfree.cpp |
static intptr_t |
active_threads
See lockfree.cpp |
static AppHooks |
ah
See app_hooks.cpp |
static const size_t |
ALIGN
See allocators.cpp |
static LibErrorAssociation* |
associations
========================================================================= File : lib_errors. |
const size_t |
BUCKET_SIZE
See allocators.cpp |
static TimerClient* |
clients
See timer.cpp |
const int |
DA_NOT_OUR_MEM
See allocators.cpp |
const size_t |
DBG_FILE_LEN
does the given pointer appear to point to code? |
const size_t |
DBG_SYMBOL_LEN
maximum number of characters (including trailing \0) written to user's buffers by debug_resolve_symbol. |
wchar_t[ LOG_CHARS ] |
debug_log
See debug.cpp |
wchar_t* |
debug_log_pos
See debug.cpp |
const size_t |
DEBUG_STL_MAX_ITERATOR_SIZE
no STL iterator is larger than this; see below. |
const u8 |
DEBUG_SUPPRESS
value for suppress flag once set by debug_display_error. |
static AppHooks |
default_ah
See app_hooks.cpp |
static bool |
exit_requested
See debug.cpp |
static LibError |
expected_err
See debug.cpp |
static uintptr_t |
expected_err_valid
See debug.cpp |
static const char* |
exts
========================================================================= File : ogl. |
static FILE* |
f
See input.cpp |
int |
fps
See timer.cpp |
u32 |
game_ticks
See input.cpp |
const size_t |
GiB
number of array elements |
static InHandler[ MAX_HANDLERS ] |
handler_stack
See input.cpp |
static uint |
handler_stack_top
See input.cpp |
static uint |
hash_jumps
See debug.cpp |
static bool |
have_12
See ogl.cpp |
static bool |
have_13
See ogl.cpp |
static bool |
have_14
See ogl.cpp |
static bool |
have_20
See ogl.cpp |
static ModuleInitState |
initState
See lockfree.cpp |
const size_t |
KiB
low-level aka "lib" ------------------- this codebase was grown from modules shared between several projects, i. |
static const size_t |
LOG_CHARS
See debug.cpp |
static const int |
MAX_CHARS
See debug.cpp |
const uint |
MAX_HANDLERS
========================================================================= File : input. |
static const size_t |
MAX_RETIRED
See lockfree.cpp |
static const uint |
MAX_SYMBOLS
See debug.cpp |
static const uint |
MAX_TAGS
See debug.cpp |
static const size_t |
message_size_bytes
See debug.cpp |
const size_t |
MiB
See lib.h |
static const int |
mmap_flags
See allocators.cpp |
static const ModuleInitState |
MODULE_ERROR
See module_init.cpp |
static const ModuleInitState |
MODULE_UNINITIALIZED
========================================================================= File : module_init. |
static u32 |
next_ev_time
See input.cpp |
static uint |
num_clients
See timer.cpp |
static const uint |
NUM_HPS
========================================================================= File : lockfree. |
static uint |
num_tags
See debug.cpp |
GLint |
ogl_max_tex_size
See ogl.cpp |
GLint |
ogl_max_tex_units
See ogl.cpp |
const size_t |
POOL_VARIABLE_ALLOCS
pass as pool_create's |
float |
spf
See timer.cpp |
|
state
See input.cpp |
static char* |
string_buf
See debug.cpp |
static char* |
string_buf_pos
See debug.cpp |
static const size_t |
STRING_BUF_SIZE
See debug.cpp |
static Symbol* |
symbols
See debug.cpp |
static u32[ MAX_TAGS ] |
tags
See debug.cpp |
static u32 |
time_adjust
See input.cpp |
static pthread_key_t |
tls_key
See debug.cpp |
static TLS* |
tls_list
See lockfree.cpp |
static pthread_once_t |
tls_once
See debug.cpp |
static uint |
total_symbols
See debug.cpp |
static const uint |
XRAND_MAX
========================================================================= File : rand. |
| Method Summary | |
u16 |
addusw( u16 x, u16 y )
========================================================================= File : lib. |
void |
ah_bundle_logs( FILE* f )
See app_hooks.cpp |
ErrorReaction |
ah_display_error( const wchar_t* text, uint flags )
See app_hooks.cpp |
const char* |
ah_get_log_dir( void )
See app_hooks.cpp |
void |
ah_log( const wchar_t* text )
See app_hooks.cpp |
void |
ah_override_gl_upload_caps( void )
See app_hooks.cpp |
const wchar_t* |
ah_translate( const wchar_t* text )
See app_hooks.cpp |
void |
ah_translate_free( const wchar_t* text )
See app_hooks.cpp |
bool |
app_hook_was_redefined( size_t offset_in_struct )
See app_hooks.cpp |
void |
app_hooks_update( AppHooks* new_ah )
See app_hooks.cpp |
static const LibErrorAssociation* |
AssociationFromErrno( errno_t errno_equivalent )
See lib_errors.cpp |
static const LibErrorAssociation* |
AssociationFromLibError( LibError err )
See lib_errors.cpp |
void |
base32( const size_t in_len, const u8* in, u8* out )
========================================================================= File : base32. |
inline uint |
bit_mask( uint num_bits )
a mask that includes the lowest N bits |
inline u64 |
bit_mask64( uint num_bits )
See bits.h |
inline uint |
bits( uint num, uint lo_idx, uint hi_idx )
extract the value of bits hi_idx:lo_idx within num example: bits(0x69, 2, 5) == 0x0A |
inline u64 |
bits64( u64 num, uint lo_idx, uint hi_idx )
See bits.h |
void* |
bucket_alloc( Bucket* b, size_t size )
See allocators.cpp |
LibError |
bucket_create( Bucket* b, size_t el_size )
See allocators.cpp |
void |
bucket_destroy( Bucket* b )
See allocators.cpp |
void |
bucket_free( Bucket* b, void* el )
See allocators.cpp |
void |
calc_fps()
See timer.cpp |
static ErrorReaction |
call_display_error( const wchar_t* text, uint flags )
See debug.cpp |
static ErrorReaction |
carry_out_ErrorReaction( ErrorReaction er, uint flags, u8* suppress )
See debug.cpp |
|
cassert( sizeof( int )* CHAR_BIT == 32 )
See bits.cpp |
uint |
ceil_log2( uint x )
See bits.cpp |
static LFList* |
chain( LFHash* hash, uintptr_t key )
See lockfree.cpp |
static bool |
container_valid( const void* front, size_t el_count )
See debug_stl.cpp |
LibError |
da_alloc( DynArray* da, size_t max_size )
See allocators.cpp |
LibError |
da_append( DynArray* da, const void* data, size_t size )
See allocators.cpp |
LibError |
da_free( DynArray* da )
See allocators.cpp |
LibError |
da_read( DynArray* da, void* data, size_t size )
See allocators.cpp |
LibError |
da_reserve( DynArray* da, size_t size )
See allocators.cpp |
LibError |
da_set_prot( DynArray* da, int prot )
See allocators.cpp |
LibError |
da_set_size( DynArray* da, size_t new_size )
See allocators.cpp |
LibError |
da_wrap_fixed( DynArray* da, u8* p, size_t size )
See allocators.cpp |
ErrorReaction |
debug_assert_failed( const char* expr, u8* suppress, const char* file, int line, const char* func )
See debug.cpp |
ErrorReaction |
debug_display_error( const wchar_t* description, uint flags, uint skip, void* context, const char* file, int line, const char* func, u8* suppress )
See debug.cpp |
void |
debug_display_msgw( const wchar_t* caption, const wchar_t* msg )
See debug.cpp |
const wchar_t* |
debug_error_message_build( const wchar_t* description, const char* fn_only, int line, const char* func, uint skip, void* context, ErrorMessageMem* emm )
See debug.cpp |
void |
debug_error_message_free( ErrorMessageMem* emm )
See debug.cpp |
void |
debug_filter_add( const char* tag )
See debug.cpp |
bool |
debug_filter_allows( const char* text )
See debug.cpp |
void |
debug_filter_clear()
See debug.cpp |
void |
debug_filter_remove( const char* tag )
See debug.cpp |
const char* |
debug_get_symbol_string( void* symbol, const char* name, const char* file, int line )
See debug.cpp |
const char* |
debug_get_thread_name()
See debug.cpp |
void |
debug_printf( const char* fmt,... )
See debug.cpp |
void |
debug_set_thread_name( const char* name )
See debug.cpp |
void |
debug_shutdown()
See debug.cpp |
void |
debug_skip_next_assert()
See debug.cpp |
void |
debug_skip_next_err( LibError err )
See debug.cpp |
char* |
debug_stl_simplify_name( char* name )
See debug_stl.cpp |
ErrorReaction |
debug_warn_err( LibError err, u8* suppress, const char* file, int line, const char* func )
See debug.cpp |
void |
debug_wprintf( const wchar_t* fmt,... )
See debug.cpp |
void |
debug_wprintf_mem( const wchar_t* fmt,... )
See debug.cpp |
LibError |
debug_write_crashlog( const wchar_t* text )
storage for and construction of strings describing a symbol |
static void |
def_bundle_logs( FILE* UNUSED( f ) )
See app_hooks.cpp |
static ErrorReaction |
def_display_error( const wchar_t* UNUSED( text ), uint UNUSED( flags ) )
See app_hooks.cpp |
static const char* |
def_get_log_dir()
See app_hooks.cpp |
static void |
def_log( const wchar_t* text )
See app_hooks.cpp |
static void |
def_override_gl_upload_caps()
========================================================================= File : app_hooks. |
static const wchar_t* |
def_translate( const wchar_t* text )
See app_hooks.cpp |
static void |
def_translate_free( const wchar_t* UNUSED( text ) )
See app_hooks.cpp |
static void |
dispatch_ev( const SDL_Event_* ev )
See input.cpp |
static void |
dump_gl_error( GLenum err )
See ogl.cpp |
int |
error_AddAssociation( LibErrorAssociation* lea )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_6,"Case 6",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_7,"Case 7",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::INVALID_HANDLE,"Invalid Handle (argument)",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_21,"Case 21",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_19,"Case 19",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::STRING_NOT_TERMINATED,"Invalid string (no 0 terminator found in buffer)",-1 )
========================================================================= File : secure_crt. |
|
ERROR_ASSOCIATE( ERR::PATH_COMPONENT_SEPARATOR,"Path component contains dir separator",-1 )
See path_util.cpp |
|
ERROR_ASSOCIATE( ERR::PATH_NON_CANONICAL,"Path contains unsupported .. or ./",-1 )
See path_util.cpp |
|
ERROR_ASSOCIATE( ERR::PATH_NON_PORTABLE,"Path contains OS-specific dir separator",-1 )
See path_util.cpp |
|
ERROR_ASSOCIATE( ERR::PATH_NOT_RELATIVE,"Path is not relative",-1 )
See path_util.cpp |
|
ERROR_ASSOCIATE( ERR::STL_CNT_UNKNOWN,"Unknown STL container type_name",-1 )
========================================================================= File : debug_stl. |
|
ERROR_ASSOCIATE( INFO::CANNOT_HANDLE,"Cannot handle (not an error)",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::NO_MEM,"Not enough memory", ENOMEM )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::NOT_SUPPORTED,"Feature isn't and won't be supported",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::PATH_EMPTY,"Path is an empty string",-1 )
See path_util.cpp |
|
ERROR_ASSOCIATE( ERR::NOT_IMPLEMENTED,"Feature currently not implemented", ENOSYS )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::PATH_LENGTH,"Path exceeds PATH_MAX characters", ENAMETOOLONG )
========================================================================= File : path_util. |
|
ERROR_ASSOCIATE( ERR::NO_SYS,"OS doesn't provide a required API",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::LIMIT,"Fixed limit exceeded",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::MEM_OVERWRITTEN,"Wrote to memory outside valid allocation",-1 )
See mmgr.cpp |
|
ERROR_ASSOCIATE( ERR::MEM_ALLOC_NOT_FOUND,"Not a valid allocated address",-1 )
========================================================================= File : mmgr. |
|
ERROR_ASSOCIATE( ERR::SYM_NO_STACK_FRAMES_FOUND,"No stack frames found",-1 )
========================================================================= File : debug. |
|
ERROR_ASSOCIATE( ERR::SYM_UNRETRIEVABLE_STATIC,"Value unretrievable (stored in external module)",-1 )
See debug.cpp |
|
ERROR_ASSOCIATE( ERR::SYM_UNRETRIEVABLE_REG,"Value unretrievable (stored in register)",-1 )
See debug.cpp |
|
ERROR_ASSOCIATE( ERR::SYM_TYPE_INFO_UNAVAILABLE,"Error getting type_info",-1 )
See debug.cpp |
|
ERROR_ASSOCIATE( ERR::SYM_INTERNAL_ERROR,"Exception raised while processing a symbol",-1 )
See debug.cpp |
|
ERROR_ASSOCIATE( ERR::SYM_UNSUPPORTED,"Symbol type not (fully) supported",-1 )
See debug.cpp |
|
ERROR_ASSOCIATE( ERR::SYM_CHILD_NOT_FOUND,"Symbol does not have the given child",-1 )
See debug.cpp |
|
ERROR_ASSOCIATE( ERR::SYM_NESTING_LIMIT,"Symbol nesting too deep or infinite recursion",-1 )
See debug.cpp |
|
ERROR_ASSOCIATE( ERR::SYM_SINGLE_SYMBOL_LIMIT,"Symbol has produced too much output",-1 )
See debug.cpp |
|
ERROR_ASSOCIATE( INFO::SYM_SUPPRESS_OUTPUT,"Symbol was suppressed",-1 )
See debug.cpp |
|
ERROR_ASSOCIATE( ERR::AGAIN,"Try again later",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::BUF_SIZE,"Buffer argument too small",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::INVALID_PARAM,"Invalid function argument", EINVAL )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::CORRUPTED,"File/memory data is corrupted",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::REENTERED,"Single-call function was reentered",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::TIMED_OUT,"Timed out",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::LOGIC,"Logic error in code",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( INFO::ALREADY_EXISTS,"Already exists (not an error)",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( INFO::ALL_COMPLETE,"All complete (not an error)",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_16,"Case 16",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( INFO::SKIPPED,"Skipped (not an error)",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( INFO::CB_CONTINUE,"Continue (not an error)",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::FAIL,"Function failed (no details available)",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( INFO::OK,"(but return value was 0 which indicates success)",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_2,"Case 2",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_1,"Case 1",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_3,"Case 3",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_4,"Case 4",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_5,"Case 5",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_29,"Case 29",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_28,"Case 28",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_27,"Case 27",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_26,"Case 26",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_25,"Case 25",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_24,"Case 24",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_23,"Case 23",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_22,"Case 22",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_9,"Case 9",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_8,"Case 8",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_18,"Case 18",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_17,"Case 17",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::STL_CNT_INVALID,"Container type is known but contents are invalid",-1 )
See debug_stl.cpp |
|
ERROR_ASSOCIATE( ERR::_14,"Case 14",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_11,"Case 11",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_12,"Case 12",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_13,"Case 13",-1 )
See lib_errors.cpp |
|
ERROR_ASSOCIATE( ERR::_15,"Case 15",-1 )
See lib_errors.cpp |
char* |
error_description_r( LibError err, char* buf, size_t max_chars )
See lib_errors.cpp |
inline bool |
feq( double d1, double d2, double epsilon = 0. 00001 )
are the given floats nearly "equal"? |
inline bool |
feqf( float f1, float f2, float epsilon = 0. 001f )
See lib.h |
int |
floor_log2( const float x )
See bits.cpp |
u32 |
fnv_hash( const void* buf, size_t len )
========================================================================= File : fnv_hash. |
u64 |
fnv_hash64( const void* buf, size_t len )
See fnv_hash.cpp |
u32 |
fnv_lc_hash( const char* str, size_t len )
See fnv_hash.cpp |
static void* |
freelist_pop( void** pfreelist )
See allocators.cpp |
static void |
freelist_push( void** pfreelist, void* el )
See allocators.cpp |
static size_t |
get_page_size()
========================================================================= File : allocators. |
double |
get_time()
See timer.cpp |
static uint |
hash( void* symbol )
See debug.cpp |
static void |
importExtensionFunctions()
See ogl.cpp |
void |
in_add_handler( InHandler handler )
See input.cpp |
void |
in_dispatch_event( const SDL_Event_* ev )
See input.cpp |
void |
in_dispatch_recorded_events()
See input.cpp |
LibError |
in_playback( const char* fn )
See input.cpp |
LibError |
in_record( const char* fn )
See input.cpp |
void |
in_stop()
See input.cpp |
static inline bool |
is_marked_as_deleted( Node* p )
See lockfree.cpp |
static bool |
is_node_referenced( Node* node, void** hps, size_t num_hps )
See lockfree.cpp |
static inline bool |
is_page_multiple( uintptr_t x )
See allocators.cpp |
bool |
is_pow2( uint n )
========================================================================= File : bits. |
static bool |
isImplementedInCore( const char* ext )
See ogl.cpp |
inline bool |
IsSimilarMagnitude( double d1, double d2, const double relativeErrorTolerance = 0. 05 )
return upper 32-bits |
static void |
LatchStartTime()
========================================================================= File : timer. |
LibError |
lfh_erase( LFHash* hash, uintptr_t key )
See lockfree.cpp |
void* |
lfh_find( LFHash* hash, uintptr_t key )
See lockfree.cpp |
void |
lfh_free( LFHash* hash )
See lockfree.cpp |
LibError |
lfh_init( LFHash* hash, size_t num_entries )
See lockfree.cpp |
void* |
lfh_insert( LFHash* hash, uintptr_t key, size_t additional_bytes, int* was_inserted )
See lockfree.cpp |
LibError |
lfl_erase( LFList* list, uintptr_t key )
lock-free hash table |
void* |
lfl_find( LFList* list, uintptr_t key )
See lockfree.cpp |
void |
lfl_free( LFList* list )
See lockfree.cpp |
LibError |
lfl_init( LFList* list )
See lockfree.cpp |
void* |
lfl_insert( LFList* list, uintptr_t key, size_t additional_bytes, int* was_inserted )
See lockfree.cpp |
LibError |
LibError_from_errno( bool warn_if_failed )
See lib_errors.cpp |
static inline LibError |
LibError_from_mmap( void* ret, bool warn_if_failed = true )
See allocators.cpp |
LibError |
LibError_from_posix( int ret, bool warn_if_failed )
See lib_errors.cpp |
void |
LibError_set_errno( LibError err )
See lib_errors.cpp |
static bool |
list_lookup( LFList* list, uintptr_t key, ListPos* pos )
See lockfree.cpp |
template< class Entries > float |
ll_calc_min_credit_density( const Entries& entries )
========================================================================= File : cache_adt. |
void |
lockfree_Init()
See lockfree.cpp |
void |
lockfree_Shutdown()
See lockfree.cpp |
int |
log2_of_pow2( uint n )
See bits.cpp |
int |
match_wildcard( const char* s, const char* w )
========================================================================= File : regex. |
int |
match_wildcardw( const wchar_t* s, const wchar_t* w )
See regex.cpp |
void** |
matrix_alloc( uint cols, uint rows, size_t el_size )
See allocators.cpp |
void |
matrix_free( void** matrix )
See allocators.cpp |
static LibError |
mem_commit( u8* p, size_t size, int prot )
See allocators.cpp |
static LibError |
mem_decommit( u8* p, size_t size )
See allocators.cpp |
static LibError |
mem_protect( u8* p, size_t size, int prot )
See allocators.cpp |
static LibError |
mem_release( u8* p, size_t size )
See allocators.cpp |
static LibError |
mem_reserve( size_t size, u8** pp )
See allocators.cpp |
void |
ModuleSetError( volatile ModuleInitState* pInitState )
See module_init.cpp |
bool |
ModuleShouldInitialize( volatile ModuleInitState* pInitState )
See module_init.cpp |
bool |
ModuleShouldShutdown( volatile ModuleInitState* pInitState )
See module_init.cpp |
i64 |
movsx_be64( const u8* p, size_t size_bytes )
See byte_order.cpp |
i64 |
movsx_le64( const u8* p, size_t size_bytes )
See byte_order.cpp |
u64 |
movzx_be64( const u8* p, size_t size_bytes )
See byte_order.cpp |
u64 |
movzx_le64( const u8* p, size_t size_bytes )
See byte_order.cpp |
static inline Node* |
node_alloc( size_t additional_bytes )
See lockfree.cpp |
static inline void |
node_free( Node* n )
See lockfree.cpp |
static inline void* |
node_user_data( Node* n )
thread-local storage for SMR |
const char* |
ogl_ExtensionString()
See ogl.cpp |
LibError |
ogl_get_gfx_info()
See ogl.cpp |
bool |
ogl_HaveExtension( const char* ext )
See ogl.cpp |
const char* |
ogl_HaveExtensions( int dummy,... )
See ogl.cpp |
bool |
ogl_HaveVersion( const char* desired_version )
See ogl.cpp |
void |
ogl_Init()
See ogl.cpp |
void |
ogl_SquelchError( GLenum err_to_ignore )
See ogl.cpp |
void |
ogl_WarnIfError()
See ogl.cpp |
void* |
page_aligned_alloc( size_t unaligned_size )
See allocators.cpp |
void |
page_aligned_free( void* p, size_t unaligned_size )
See allocators.cpp |
LibError |
path_append( char* dst, const char* path1, const char* path2, uint flags )
See path_util.cpp |
LibError |
path_component_validate( const char* name )
See path_util.cpp |
void |
path_copy( char* dst, const char* src )
See path_util.cpp |
void |
path_dir_only( const char* path, char* dir )
See path_util.cpp |
const char* |
path_extension( const char* fn )
See path_util.cpp |
LibError |
path_foreach_component( const char* path_org, PathComponentCb cb, void* ctx )
See path_util.cpp |
bool |
path_is_dir_sep( char c )
See path_util.cpp |
bool |
path_is_subpath( const char* s1, const char* s2 )
See path_util.cpp |
const char* |
path_last_component( const char* path )
See path_util.cpp |
const char* |
path_name_only( const char* path )
See path_util.cpp |
LibError |
path_package_append_file( PathPackage* pp, const char* path )
See path_util.cpp |
void |
path_package_copy( PathPackage* pp_dst, const PathPackage* pp_src )
See path_util.cpp |
LibError |
path_package_set_dir( PathPackage* pp, const char* dir )
See path_util.cpp |
LibError |
path_replace( char* dst, const char* src, const char* remove, const char* replace )
See path_util.cpp |
void |
path_strip_fn( char* path )
See path_util.cpp |
LibError |
path_validate( const char* path )
See path_util.cpp |
void* |
pool_alloc( Pool* p, size_t size )
See allocators.cpp |
bool |
pool_contains( Pool* p, void* el )
See allocators.cpp |
LibError |
pool_create( Pool* p, size_t max_size, size_t el_size )
See allocators.cpp |
LibError |
pool_destroy( Pool* p )
See allocators.cpp |
void |
pool_free( Pool* p, void* el )
See allocators.cpp |
void |
pool_free_all( Pool* p )
See allocators.cpp |
uint |
rand( uint min_inclusive, uint max_exclusive )
See rand.cpp |
u16 |
read_be16( const void* p )
See byte_order.cpp |
u32 |
read_be32( const void* p )
See byte_order.cpp |
u64 |
read_be64( const void* p )
See byte_order.cpp |
u16 |
read_le16( const void* p )
See byte_order.cpp |
u32 |
read_le32( const void* p )
See byte_order.cpp |
u64 |
read_le64( const void* p )
See byte_order.cpp |
static int |
return_errno_from_LibError( LibError err )
See lib_errors.cpp |
uintptr_t |
round_down( const uintptr_t n, const uintptr_t multiple )
See bits.cpp |
uintptr_t |
round_up( const uintptr_t n, const uintptr_t multiple )
See bits.cpp |
static inline size_t |
round_up_to_page( size_t size )
See allocators.cpp |
uint |
round_up_to_pow2( uint x )
See bits.cpp |
static bool |
should_skip_this_assert()
See debug.cpp |
static bool |
should_skip_this_error( LibError err )
See debug.cpp |
static bool |
should_suppress_error( u8* suppress )
See debug.cpp |
static inline i64 |
SignExtend( u64 bits, size_t size_bytes )
See byte_order.cpp |
void* |
single_calloc( void* storage, volatile uintptr_t* in_use_flag, size_t size )
See allocators.cpp |
void |
single_free( void* storage, volatile uintptr_t* in_use_flag, void* p )
See allocators.cpp |
static void |
smr_release_unreferenced_nodes( TLS* tls )
See lockfree.cpp |
static void |
smr_retire_node( Node* node )
See lockfree.cpp |
static void |
smr_shutdown()
lock-free singly linked list |
int |
sprintf_s( char* buf, size_t max_chars, const char* fmt,... )
See secure_crt.cpp |
void* |
static_calloc( StaticStorage* ss, size_t size )
See allocators.cpp |
int |
strcat_s( char* dst, size_t max_dst_chars, const char* src )
See secure_crt.cpp |
int |
strcpy_s( char* dst, size_t max_dst_chars, const char* src )
See secure_crt.cpp |
int |
strncat_s( char* dst, size_t max_dst_chars, const char* src, size_t max_src_chars )
See secure_crt.cpp |
int |
strncpy_s( char* dst, size_t max_dst_chars, const char* src, size_t max_src_chars )
See secure_crt.cpp |
size_t |
strnlen( const char* str, size_t max_len )
See secure_crt.cpp |
u16 |
subusw( u16 x, u16 y )
See lib.cpp |
u16 |
swap16( const u16 x )
========================================================================= File : byte_order. |
u32 |
swap32( const u32 x )
See byte_order.cpp |
u64 |
swap64( const u64 x )
See byte_order.cpp |
static void |
symbol_string_add_to_cache( const char* string, void* symbol )
See debug.cpp |
static const char* |
symbol_string_build( void* symbol, const char* name, const char* file, int line )
cache, mapping symbol address to its description string. |
static const char* |
symbol_string_from_cache( void* symbol )
See debug.cpp |
TimerClient* |
timer_add_client( TimerClient* tc, const char* description )
See timer.cpp |
void |
timer_bill_client( TimerClient* tc, TimerUnit dt )
See timer.cpp |
void |
timer_display_client_totals()
See timer.cpp |
void |
timer_Init()
See timer.cpp |
double |
timer_res()
See timer.cpp |
void |
timer_Shutdown()
See timer.cpp |
static TLS* |
tls_alloc()
See lockfree.cpp |
static TLS* |
tls_get()
"Safe Memory Reclamation for Lock-Free Objects" via hazard pointers |
static void |
tls_init()
See debug.cpp |
static void |
tls_retire( void* tls_ )
See lockfree.cpp |
static void |
tls_shutdown()
See debug.cpp |
u16 |
to_be16( u16 x )
See byte_order.cpp |
u32 |
to_be32( u32 x )
See byte_order.cpp |
u64 |
to_be64( u64 x )
See byte_order.cpp |
u16 |
to_le16( u16 x )
See byte_order.cpp |
u32 |
to_le32( u32 x )
See byte_order.cpp |
u64 |
to_le64( u64 x )
See byte_order.cpp |
template< typename T > std::vector< T > |
ts_make_vector( T* start, size_t size_bytes )
See self_test.h |
bool |
ts_str_contains( const std::string& str1, const std::string& str2 )
See self_test.h |
u16 |
u16_from_double( double in )
See lib.cpp |
template< typename T > u16 |
u16_from_larger( T x )
convert double to u8; verifies number is in range. |
template< typename T > u32 |
u32_from_larger( T x )
See lib.h |
u32 |
u32_from_u16( u16 hi, u16 lo )
See lib.cpp |
u16 |
u32_hi( u32 x )
See lib.cpp |
u16 |
u32_lo( u32 x )
See lib.cpp |
u64 |
u64_from_u32( u32 hi, u32 lo )
See lib.cpp |
u32 |
u64_hi( u64 x )
See lib.cpp |
u32 |
u64_lo( u64 x )
See lib.cpp |
u8 |
u8_from_double( double in )
See lib.cpp |
static void |
validate( LFHash* hash )
See lockfree.cpp |
static LibError |
validate_da( DynArray* da )
See allocators.cpp |
static inline Node* |
with_mark( Node* p )
See lockfree.cpp |
static inline Node* |
without_mark( Node* p )
See lockfree.cpp |
void |
write_be16( void* p, u16 x )
See byte_order.cpp |
void |
write_be32( void* p, u32 x )
See byte_order.cpp |
void |
write_be64( void* p, u64 x )
See byte_order.cpp |
void |
write_le16( void* p, u16 x )
See byte_order.cpp |
void |
write_le32( void* p, u32 x )
See byte_order.cpp |
void |
write_le64( void* p, u64 x )
See byte_order.cpp |
static uint |
xrand()
See rand.cpp |
| Symbol Summary | |
#define |
__FUNCTION__ 0
See mmgr.h |
#define |
_CRTDBG_MAP_ALLOC
See mmgr.h |
#define |
BIG_ENDIAN 0x1234
See config.h |
#define |
BYTE_ORDER BIG_ENDIAN
See config.h |
#define |
CALL_CONV
See ogl.h |
#define |
CONFIG_DISABLE_EXCEPTIONS 0
See config.h |
#define |
CONFIG_FINAL 0
See config.h |
#define |
CONFIG_OMIT_FP 0
See config.h |
#define |
CONFIG_OVERRUN_PROTECTION 0
See config.h |
#define |
CONFIG_PARANOIA 0
See config.h |
#define |
CONFIG_RETURN64_EDX_EAX 1
See config.h |
#define |
CONFIG_TIMER_ALLOW_RDTSC 0
See config.h |
#define |
CONFIG_TRACE 0
See config.h |
#define |
CONFIG_USE_MMGR 0
See config.h |
#define |
CPU_ALPHA 0
See config.h |
#define |
CPU_AMD64 0
See config.h |
#define |
CPU_ARM 0
See config.h |
#define |
CPU_IA32 0
See config.h |
#define |
CPU_IA64 0
See config.h |
#define |
CPU_MIPS 0
See config.h |
#define |
CXXTEST_HAVE_EH
See self_test.h |
#define |
CXXTEST_HAVE_STD
See self_test.h |
#define |
DEBUG_PRINTF_BRIEF if(debug_level >= DEBUG_LEVEL_BRIEF) debug_printf
See debug.h |
#define |
DEBUG_PRINTF_DETAILED if(debug_level >= DEBUG_LEVEL_DETAILED) debug_printf
See debug.h |
#define |
DEBUG_PRINTF_FULL if(debug_level >= DEBUG_LEVEL_FULL ) debug_printf
See debug.h |
#define |
FOURCC FOURCC_LE
See byte_order.h |
#define |
fscanf_s fscanf
See secure_crt.h |
#define |
GCC_VERSION 0
See config.h |
#define |
GL_TEXTURE_IMAGE_SIZE_ARB 0x86A0
See ogl.h |
#define |
HAVE_C99 1
See config.h |
#define |
HAVE_C99_MATH 0
See config.h |
#define |
HAVE_GNU_ASM 0
See config.h |
#define |
HAVE_MKDIR 1
See config.h |
#define |
HAVE_MS_ASM 0
See config.h |
#define |
HAVE_PCH 0
See config.h |
#define |
HAVE_SECURE_CRT 0
See config.h |
#define |
HAVE_STL_HASH 0
See config.h |
#define |
HAVE_STL_SLIST 0
See config.h |
#define |
HAVE_STRDUP 1
See config.h |
#define |
HAVE_VC_DEBUG_ALLOC 0
See config.h |
#define |
HAVE_WCSDUP 1
See config.h |
#define |
HAVE_X 0
See config.h |
#define |
i16 int16_t
See types.h |
#define |
i32 int32_t
See types.h |
#define |
i64 int64_t
See types.h |
#define |
i8 int8_t
See types.h |
#define |
ICC_VERSION 0
See config.h |
#define |
INCLUDED_ADTS
See adts.h |
#define |
INCLUDED_ALLOCATORS
See allocators.h |
#define |
INCLUDED_APP_HOOKS
See app_hooks.h |
#define |
INCLUDED_BASE32
See base32.h |
#define |
INCLUDED_BITS
See bits.h |
#define |
INCLUDED_BYTE_ORDER
See byte_order.h |
#define |
INCLUDED_CACHE_ADT
See cache_adt.h |
#define |
INCLUDED_CODE_ANNOTATION
See code_annotation.h |
#define |
INCLUDED_CONFIG
See config.h |
#define |
INCLUDED_DEBUG
See debug.h |
#define |
INCLUDED_DEBUG_STL
See debug_stl.h |
#define |
INCLUDED_FNV_HASH
See fnv_hash.h |
#define |
INCLUDED_INPUT
See input.h |
#define |
INCLUDED_LIB
See lib.h |
#define |
INCLUDED_LIB_ERRORS
See lib_errors.h |
#define |
INCLUDED_LOCKFREE
See lockfree.h |
#define |
INCLUDED_MMGR
See mmgr.h |
#define |
INCLUDED_MODULE_INIT
See module_init.h |
#define |
INCLUDED_OGL
See ogl.h |
#define |
INCLUDED_PATH_UTIL
See path_util.h |
#define |
INCLUDED_RAND
See rand.h |
#define |
INCLUDED_REGEX
See regex.h |
#define |
INCLUDED_SECURE_CRT
See secure_crt.h |
#define |
INCLUDED_SELF_TEST
See self_test.h |
#define |
INCLUDED_TIMER
See timer.h |
#define |
INCLUDED_TYPES
See types.h |
#define |
LCC_VERSION 0
See config.h |
#define |
LITTLE_ENDIAN 0x4321
See config.h |
#define |
MSC_VERSION 0
See config.h |
#define |
new new(_NORMAL_BLOCK, __FILE__, __LINE__)
See mmgr.h |
#define |
NODEFAULT default: UNREACHABLE
convenient specialization of UNREACHABLE for switch statements whose default can never be reached. |
#define |
ogl_WarnIfError
See ogl.h |
#define |
OS_AMIGA 0
See config.h |
#define |
OS_BEOS 0
See config.h |
#define |
OS_BSD 1
See config.h |
#define |
OS_LINUX 0
See config.h |
#define |
OS_MAC 0
See config.h |
#define |
OS_MACOSX 0
See config.h |
#define |
OS_SOLARIS 0
See config.h |
#define |
OS_UNIX 1
See config.h |
#define |
OS_WIN 0
See config.h |
#define |
OS_WIN64 0
See config.h |
#define |
REAL_GL_1_2
See ogl.h |
#define |
REAL_GL_1_3
See ogl.h |
#define |
REDEFINED_NEW
See mmgr.h |
#define |
SAFE_STRCPY str##cpy
equivalent to strcpy, but indicates that the programmer checked usage and promises it is safe. |
#define |
SAFE_WCSCPY wcs##cpy
See code_annotation.h |
#define |
STL_DINKUMWARE 0
See config.h |
#define |
STL_GCC 0
See config.h |
#define |
STL_ICC 0
See config.h |
#define |
swap16 _byteswap_ushort
See byte_order.h |
#define |
swap32 _byteswap_ulong
See byte_order.h |
#define |
swap64 _byteswap_uint64
See byte_order.h |
#define |
tcat_s strcat_s
See secure_crt.cpp |
#define |
tcmp strcmp
See secure_crt.cpp |
#define |
tcpy strcpy
See secure_crt.cpp |
#define |
tcpy_s strcpy_s
See secure_crt.cpp |
#define |
tfopen fopen
See secure_crt.cpp |
#define |
tfopen_s fopen_s
See secure_crt.cpp |
#define |
tncat_s strncat_s
See secure_crt.cpp |
#define |
tncpy_s strncpy_s
See secure_crt.cpp |
#define |
tnlen strnlen
See secure_crt.cpp |
#define |
tprintf_s sprintf_s
See secure_crt.cpp |
#define |
u16 uint16_t
See types.h |
#define |
u32 uint32_t
See types.h |
#define |
u64 uint64_t
See types.h |
#define |
u8 uint8_t
See types.h |
#define |
UID2__ PASTE3__(LINE_, __LINE__, _2)
See code_annotation.h |
#define |
UID__ PASTE3__(LINE_, __LINE__, _)
See code_annotation.h |
#define |
uint PS_uint
See types.h |
#define |
ulong PS_ulong
See types.h |
#define |
UNREACHABLE ASSUME_UNREACHABLE
See code_annotation.h |
#define |
USE_IA32_FLOAT_TO_INT 0
See config.h |
#define |
vtnprintf vsnprintf
See secure_crt.cpp |
#define |
WGL_HEADER_NEEDED
See ogl.h |
#define |
WSECURE_CRT
See wsecure_crt.cpp |
| Macro Summary | |
#define |
AH_IS_DEFINED(name) app_hook_was_redefined(offsetof(AppHooks, name))
See app_hooks.h |
#define |
ARRAY_SIZE(name) (sizeof(name) / sizeof(name[0]))
number of array elements |
#define |
AT_STARTUP(code__namespace) { struct UID__{UID__() { code__ }} UID2__ }
execute the code passed as a parameter before main is entered. |
#define |
BIT(n) (1ul << (n))
value of bit number |
#define |
BIT64(n) (1ull << (n))
value of bit number |
#define |
calloc(num, size) mmgr_calloc_dbg (num,size,__FILE__,__LINE__,__FUNCTION__)
See mmgr.h |
#define |
cassert(expr) struct UID__ { unsigned int CASSERT_FAILURE: (expr) }
compile-time debug_assert. |
#define |
cassert2(expr) extern char CASSERT_FAILURE[1][(expr)]
compile-time debug_assert. |
#define |
CHECK_DA(da) RETURN_ERR(validate_da(da))
See allocators.cpp |
#define |
CHECK_ERR(expressionSTMT(i64 err64__ = (i64expressionif(err64__ < 0{LibError err__ = (LibErrorerr64__ & UINT_MAXDEBUG_WARN_ERR(err__return (LibErrorerr__ & UINT_MAX})
See lib_errors.h |
#define |
CHECK_PATH(path) RETURN_ERR(path_validate(path))
return appropriate code if path is invalid, otherwise continue. |
#define |
CONTAINER(name, type_name_patternelse) if(match_wildcard(type_name, type_name_pattern)){handled = truevalid = get_container_info
See debug_stl.cpp |
#define |
debug_assert(expr) STMT(static u8 suppress__if(!(expr)){switch(debug_assert_failed(#expr, &suppress__, __FILE__, __LINE__, __func__)){case ER_BREAK:debug_break()breakdefault:break}})
make sure the expression |
#define |
debug_warn(expr) STMT(static u8 suppress__switch(debug_assert_failed(expr, &suppress__, __FILE__, __LINE__, __func__)){case ER_BREAK:debug_break()breakdefault:break})
show a dialog to make sure unexpected states in the program are noticed. |
#define |
DEBUG_WARN_ERR(errSTMT(static u8 suppress__switch(debug_warn_err(err, &suppress__, __FILE__, __LINE__, __func__{case ER_BREAK:debug_break(breakdefault:break})
if (LibError)err indicates an function failed, display the error dialog. |
#define |
DISPLAY_ERROR(text) debug_display_error(text, 0, 0,0, __FILE__,__LINE__,__func__, 0)
convenience version, in case the advanced parameters aren't needed. |
#define |
E(e) case e: debug_printf("%s\n", #e) break
See ogl.cpp |
#define |
ENFORCE(condition, err_to_warn, retval) STMT(if(!(condition)) { DEBUG_WARN_ERR(err_to_warn) return retval } )
See secure_crt.cpp |
#define |
ERROR_ASSOCIATE(err, description, errno_equivalentstatic) LibErrorAssociation UID__ = { err, description, errno_equivalent }static int UID2__ = error_AddAssociation(&UID__)
See lib_errors.h |
#define |
FOURCC_BE(a, b, c, d) ( ((u32)(u8)a) << 24 | ((u32)(u8)b) << 16 | ((u32)(u8)c) << 8 | ((u32)(u8)d) << 0 )
big-endian version of FOURCC |
#define |
FOURCC_LE(a, b, c, d) ( ((u32)(u8)a) << 0 | ((u32)(u8)b) << 8 | ((u32)(u8)c) << 16 | ((u32)(u8)d) << 24 )
little-endian version of FOURCC |
#define |
free(p) mmgr_free_dbg (p, __FILE__,__LINE__,__FUNCTION__)
See mmgr.h |
#define |
FUNC(ret, name, params) EXTERN_C ret (CALL_CONV *p##name) params
See ogl.h |
#define |
FUNC2(ret, nameARB, nameCore, version, params) EXTERN_C ret (CALL_CONV *p##nameARB) params
See ogl.h |
#define |
getcwd(p, size) mmgr_getcwd_dbg(p, size, __FILE__,__LINE__,__FUNCTION__)
See mmgr.h |
#define |
malloc(size) mmgr_malloc_dbg (size, __FILE__,__LINE__,__FUNCTION__)
See mmgr.h |
#define |
MATCH(known_extif(!strcmp(ext, #known_extreturn) true
See ogl.cpp |
#define |
ONCE(ONCE_code__STMT(static bool ONCE_done__ = falseif(!ONCE_done__{ONCE_done__ = trueONCE_code__})
execute the code passed as a parameter only the first time this is reached. |
#define |
ONCE_NOT(ONCE_code__STMT(static bool ONCE_done__ = falseif(!ONCE_done__ONCE_done__ = trueelseONCE_code__)
execute the code passed as a parameter except the first time this is reached. |
#define |
ONE_SIDE(x, x0, x1, x2) SIGN_EQ(x-x0, x-x1, x-x2)
See timer.cpp |
#define |
OVERRIDE_IF_NONZERO(HOOKNAME) if(new_ah->HOOKNAME) ah.HOOKNAME = new_ah->HOOKNAME
See app_hooks.cpp |
#define |
PASTE3__(a, b, c) PASTE3_HIDDEN__(a, b, c)
See code_annotation.h |
#define |
PASTE3_HIDDEN__(a, b, c) a ## b ## c
See code_annotation.h |
#define |
realloc(p, size) mmgr_realloc_dbg(p,size, __FILE__,__LINE__,__FUNCTION__)
See mmgr.h |
#define |
REL_ERR(correct, measured) (fabs((correct) - (measured)) / (correct))
See timer.cpp |
#define |
REPLACE(what, withelse) if(!strncmp(src, (what), sizeof(what)-1)){src += sizeof(what)-1-1 strcpy(dst, (with)) dst += sizeof(with)-1}
See debug_stl.cpp |
#define |
RETURN0_IF_ERR(expressionSTMT(i64 err64__ = (i64expressionif(err64__ < 0return 0)
See lib_errors.h |
#define |
RETURN_ERR(expressionSTMT(i64 err64__ = (i64expressionif(err64__ < 0{LibError err__ = (LibErrorerr64__ & UINT_MAXreturn err__})
See lib_errors.h |
#define |
RETURN_IF_FALSE(okSTMT(if(!(okreturn ERR::FAIL)
See lib_errors.h |
#define |
SAFE_ARRAY_DELETE(pSTMT(delete[] (p (p= 0)
delete memory ensuing from new[] and set the pointer to zero (thus making double-frees safe / a no-op) |
#define |
SAFE_DELETE(pSTMT(delete (p (p= 0)
delete memory ensuing from new and set the pointer to zero (thus making double-frees safe / a no-op) |
#define |
SAFE_FREE(pSTMT(free((void*p (p= 0)
free memory ensuing from malloc and set the pointer to zero (thus making double-frees safe / a no-op) |
#define |
SAFE_NEW(type, ptrtype*) ptrtry{ptr = new type()}catch(std::bad_alloc){ptr = 0}
C++ new wrapper: allocates an instance of the given type and stores a pointer to it. |
#define |
SIGN_EQ(x0, x1, x2) ( ((x0) * (x1)) > 0.0 && ((x1) * (x2)) > 0.0 )
See timer.cpp |
#define |
STATIC_STORAGE(name, sizestatic) u8 storage[(size)]static StaticStorage name = { storage, storage+(size) }
See allocators.h |
#define |
STD_CONTAINER(name) CONTAINER(name, "std::" #name "<*>")
See debug_stl.cpp |
#define |
STMT(STMT_code__) do { STMT_code__ } while(false)
package code into a single statement. |
#define |
strdup(p) mmgr_strdup_dbg(p, __FILE__,__LINE__,__FUNCTION__)
See mmgr.h |
#define |
STRINGIZE(id) STRINGIZE2(id)
See debug_stl.cpp |
#define |
STRINGIZE2(id) # id
See debug_stl.cpp |
#define |
STRIP(whatelse) if(!strncmp(src, (what), sizeof(what)-1)){src += sizeof(what)-1-1}
See debug_stl.cpp |
#define |
STRIP_NESTED(whatelse) if(!strncmp(src, (what), sizeof(what)-1)){if(src != name && src[-1] == ',')dst--src += sizeof(what)-1debug_assert(nesting == 0)nesting = 1}
See debug_stl.cpp |
#define |
T(string_literal) string_literal
See secure_crt.cpp |
#define |
THROW_ERR(expressionSTMT(i64 err64__ = (i64expressionif(err64__ < 0{LibError err__ = (LibErrorerr64__ & UINT_MAXDEBUG_WARN_ERR(err__throw err__})
See lib_errors.h |
#define |
TIMER(description) ScopeTimer UID__(description)
See timer.h |
#define |
TIMER_ACCRUE(client) ScopeTimerAccrue<> UID__(client)
See timer.h |
#define |
TIMER_ADD_CLIENT(idstatic) TimerClient UID__static TimerClient* id = timer_add_client(&UID__, #id)
See timer.h |
#define |
TIMER_BEGIN(description) { ScopeTimer UID__(description)
See timer.h |
#define |
TIMER_END(description) }
See timer.h |
#define |
TS_ASSERT_OK(expr) TS_ASSERT_EQUALS((expr), INFO::OK)
See self_test.h |
#define |
TS_ASSERT_STR_CONTAINS(str1, str2) TS_ASSERT(ts_str_contains(str1, str2))
See self_test.h |
#define |
TS_ASSERT_STR_EQUALS(str1, str2) TS_ASSERT_EQUALS(std::string(str1), std::string(str2))
See self_test.h |
#define |
TS_ASSERT_VECTOR_EQUALS_ARRAY(vec1, array) TS_ASSERT_EQUALS(vec1, ts_make_vector((array), sizeof(array)))
See self_test.h |
#define |
TS_ASSERT_WSTR_EQUALS(str1, str2) TS_ASSERT_EQUALS(std::wstring(str1), std::wstring(str2))
See self_test.h |
#define |
UNREACHABLESTMT(debug_warn("hit supposedly unreachable code"abort()
See code_annotation.h |
#define |
UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning. |
#define |
UNUSED2(param) (void)param
mark a function local variable or parameter as unused and avoid the corresponding compiler warning. |
#define |
WARN_ERR(expressionSTMT(i64 err64__ = (i64expressionif(err64__ < 0{LibError err__ = (LibErrorerr64__ & UINT_MAXDEBUG_WARN_ERR(err__})
See lib_errors.h |
#define |
WARN_ERR_RETURN(expressionSTMT(i64 err64__ = (i64expressionif(err64__ < 0{LibError err__ = (LibErrorerr64__ & UINT_MAXDEBUG_WARN_ERR(err__return})
See lib_errors.h |
#define |
WARN_IF_FALSE(okSTMT(if(!(okdebug_warn("FYI: WARN_IF_FALSE reports that a function failed.""feel free to ignore or suppress this warning.")
See lib_errors.h |
#define |
WARN_IF_PTR_LEN(len)
See secure_crt.cpp |
#define |
WARN_RETURN(errSTMT(DEBUG_WARN_ERR(errreturn err)
See lib_errors.h |
#define |
WARN_RETURN_IF_FALSE(okSTMT(if(!(ok{debug_warn("FYI: WARN_RETURN_IF_FALSE reports that a function failed.""feel free to ignore or suppress this warning."return ERR::FAIL})
See lib_errors.h |
#define |
wcsdup(p) mmgr_wcsdup_dbg(p, __FILE__,__LINE__,__FUNCTION__)
See mmgr.h |
| Field Detail |
static intptr_t active_data_structures;
static intptr_t active_threads;
static AppHooks ah;
static const size_t ALIGN;
static LibErrorAssociation* associations;
const size_t BUCKET_SIZE;
static TimerClient* clients;
const int DA_NOT_OUR_MEM;
const size_t DBG_FILE_LEN;
const size_t DBG_SYMBOL_LEN;
wchar_t debug_log[ LOG_CHARS ];
wchar_t* debug_log_pos;
const size_t DEBUG_STL_MAX_ITERATOR_SIZE;
const u8 DEBUG_SUPPRESS;
static AppHooks default_ah;
static bool exit_requested;
static LibError expected_err;
static uintptr_t expected_err_valid;
static const char* exts;
static FILE* f;
int fps;
u32 game_ticks;
const size_t GiB;
static InHandler handler_stack[ MAX_HANDLERS ];
static uint handler_stack_top;
static uint hash_jumps;
static bool have_12;
static bool have_13;
static bool have_14;
static bool have_20;
static ModuleInitState initState;
const size_t KiB;
static const size_t LOG_CHARS;
static const int MAX_CHARS;
const uint MAX_HANDLERS;
static const size_t MAX_RETIRED;
static const uint MAX_SYMBOLS;
static const uint MAX_TAGS;
static const size_t message_size_bytes;
const size_t MiB;
static const int mmap_flags;
static const ModuleInitState MODULE_ERROR;
static const ModuleInitState MODULE_UNINITIALIZED;
static u32 next_ev_time;
static uint num_clients;
static const uint NUM_HPS;
static uint num_tags;
GLint ogl_max_tex_size;
GLint ogl_max_tex_units;
const size_t POOL_VARIABLE_ALLOCS;
float spf;
state;
static char* string_buf;
static char* string_buf_pos;
static const size_t STRING_BUF_SIZE;
static Symbol* symbols;
static u32 tags[ MAX_TAGS ];
static u32 time_adjust;
static pthread_key_t tls_key;
static TLS* tls_list;
static pthread_once_t tls_once;
static uint total_symbols;
static const uint XRAND_MAX;
| Method Detail |
u16 addusw( u16 x, u16 y );
void ah_bundle_logs( FILE* f );
ErrorReaction ah_display_error( const wchar_t* text, uint flags );
const char* ah_get_log_dir( void );
void ah_log( const wchar_t* text );
void ah_override_gl_upload_caps( void );
const wchar_t* ah_translate( const wchar_t* text );
void ah_translate_free( const wchar_t* text );
bool app_hook_was_redefined( size_t offset_in_struct );
void app_hooks_update( AppHooks* new_ah );
static const LibErrorAssociation* AssociationFromErrno( errno_t errno_equivalent );
static const LibErrorAssociation* AssociationFromLibError( LibError err );
void base32( const size_t in_len, const u8* in, u8* out );
inline uint bit_mask( uint num_bits );
num_bits - number of bits in mask
inline u64 bit_mask64( uint num_bits );
inline uint bits( uint num, uint lo_idx, uint hi_idx );
num - number whose bits are to be extracted
lo_idx - bit index of lowest bit to include
hi_idx - bit index of highest bit to includeinline u64 bits64( u64 num, uint lo_idx, uint hi_idx );
void* bucket_alloc( Bucket* b, size_t size );
LibError bucket_create( Bucket* b, size_t el_size );
void bucket_destroy( Bucket* b );
void bucket_free( Bucket* b, void* el );
void calc_fps();
static ErrorReaction call_display_error( const wchar_t* text, uint flags );
static ErrorReaction carry_out_ErrorReaction( ErrorReaction er, uint flags, u8* suppress );
cassert( sizeof( int )* CHAR_BIT == 32 );
uint ceil_log2( uint x );
static LFList* chain( LFHash* hash, uintptr_t key );
static bool container_valid( const void* front, size_t el_count );
LibError da_alloc( DynArray* da, size_t max_size );
LibError da_append( DynArray* da, const void* data, size_t size );
LibError da_free( DynArray* da );
LibError da_read( DynArray* da, void* data, size_t size );
LibError da_reserve( DynArray* da, size_t size );
LibError da_set_prot( DynArray* da, int prot );
LibError da_set_size( DynArray* da, size_t new_size );
LibError da_wrap_fixed( DynArray* da, u8* p, size_t size );
ErrorReaction debug_assert_failed( const char* expr, u8* suppress, const char* file, int line, const char* func );
ErrorReaction debug_display_error( const wchar_t* description, uint flags, uint skip, void* context, const char* file, int line, const char* func, u8* suppress );
void debug_display_msgw( const wchar_t* caption, const wchar_t* msg );
const wchar_t* debug_error_message_build( const wchar_t* description, const char* fn_only, int line, const char* func, uint skip, void* context, ErrorMessageMem* emm );
void debug_error_message_free( ErrorMessageMem* emm );
void debug_filter_add( const char* tag );
bool debug_filter_allows( const char* text );
void debug_filter_clear();
void debug_filter_remove( const char* tag );
const char* debug_get_symbol_string( void* symbol, const char* name, const char* file, int line );
const char* debug_get_thread_name();
void debug_printf( const char* fmt,... );
void debug_set_thread_name( const char* name );
void debug_shutdown();
void debug_skip_next_assert();
void debug_skip_next_err( LibError err );
char* debug_stl_simplify_name( char* name );
ErrorReaction debug_warn_err( LibError err, u8* suppress, const char* file, int line, const char* func );
void debug_wprintf( const wchar_t* fmt,... );
void debug_wprintf_mem( const wchar_t* fmt,... );
LibError debug_write_crashlog( const wchar_t* text );
static void def_bundle_logs( FILE* UNUSED( f ) );
static ErrorReaction def_display_error( const wchar_t* UNUSED( text ), uint UNUSED( flags ) );
static const char* def_get_log_dir();
static void def_log( const wchar_t* text );
static void def_override_gl_upload_caps();
static const wchar_t* def_translate( const wchar_t* text );
static void def_translate_free( const wchar_t* UNUSED( text ) );
static void dispatch_ev( const SDL_Event_* ev );
static void dump_gl_error( GLenum err );
int error_AddAssociation( LibErrorAssociation* lea );
ERROR_ASSOCIATE( ERR::_6,"Case 6",-1 );
ERROR_ASSOCIATE( ERR::_7,"Case 7",-1 );
ERROR_ASSOCIATE( ERR::INVALID_HANDLE,"Invalid Handle (argument)",-1 );
ERROR_ASSOCIATE( ERR::_21,"Case 21",-1 );
ERROR_ASSOCIATE( ERR::_19,"Case 19",-1 );
ERROR_ASSOCIATE( ERR::STRING_NOT_TERMINATED,"Invalid string (no 0 terminator found in buffer)",-1 );
ERROR_ASSOCIATE( ERR::PATH_COMPONENT_SEPARATOR,"Path component contains dir separator",-1 );
ERROR_ASSOCIATE( ERR::PATH_NON_CANONICAL,"Path contains unsupported .. or ./",-1 );
ERROR_ASSOCIATE( ERR::PATH_NON_PORTABLE,"Path contains OS-specific dir separator",-1 );
ERROR_ASSOCIATE( ERR::PATH_NOT_RELATIVE,"Path is not relative",-1 );
ERROR_ASSOCIATE( ERR::STL_CNT_UNKNOWN,"Unknown STL container type_name",-1 );
ERROR_ASSOCIATE( INFO::CANNOT_HANDLE,"Cannot handle (not an error)",-1 );
ERROR_ASSOCIATE( ERR::NO_MEM,"Not enough memory", ENOMEM );
ERROR_ASSOCIATE( ERR::NOT_SUPPORTED,"Feature isn't and won't be supported",-1 );
ERROR_ASSOCIATE( ERR::PATH_EMPTY,"Path is an empty string",-1 );
ERROR_ASSOCIATE( ERR::NOT_IMPLEMENTED,"Feature currently not implemented", ENOSYS );
ERROR_ASSOCIATE( ERR::PATH_LENGTH,"Path exceeds PATH_MAX characters", ENAMETOOLONG );
ERROR_ASSOCIATE( ERR::NO_SYS,"OS doesn't provide a required API",-1 );
ERROR_ASSOCIATE( ERR::LIMIT,"Fixed limit exceeded",-1 );
ERROR_ASSOCIATE( ERR::MEM_OVERWRITTEN,"Wrote to memory outside valid allocation",-1 );
ERROR_ASSOCIATE( ERR::MEM_ALLOC_NOT_FOUND,"Not a valid allocated address",-1 );
ERROR_ASSOCIATE( ERR::SYM_NO_STACK_FRAMES_FOUND,"No stack frames found",-1 );
ERROR_ASSOCIATE( ERR::SYM_UNRETRIEVABLE_STATIC,"Value unretrievable (stored in external module)",-1 );
ERROR_ASSOCIATE( ERR::SYM_UNRETRIEVABLE_REG,"Value unretrievable (stored in register)",-1 );
ERROR_ASSOCIATE( ERR::SYM_TYPE_INFO_UNAVAILABLE,"Error getting type_info",-1 );
ERROR_ASSOCIATE( ERR::SYM_INTERNAL_ERROR,"Exception raised while processing a symbol",-1 );
ERROR_ASSOCIATE( ERR::SYM_UNSUPPORTED,"Symbol type not (fully) supported",-1 );
ERROR_ASSOCIATE( ERR::SYM_CHILD_NOT_FOUND,"Symbol does not have the given child",-1 );
ERROR_ASSOCIATE( ERR::SYM_NESTING_LIMIT,"Symbol nesting too deep or infinite recursion",-1 );
ERROR_ASSOCIATE( ERR::SYM_SINGLE_SYMBOL_LIMIT,"Symbol has produced too much output",-1 );
ERROR_ASSOCIATE( INFO::SYM_SUPPRESS_OUTPUT,"Symbol was suppressed",-1 );
ERROR_ASSOCIATE( ERR::AGAIN,"Try again later",-1 );
ERROR_ASSOCIATE( ERR::BUF_SIZE,"Buffer argument too small",-1 );
ERROR_ASSOCIATE( ERR::INVALID_PARAM,"Invalid function argument", EINVAL );
ERROR_ASSOCIATE( ERR::CORRUPTED,"File/memory data is corrupted",-1 );
ERROR_ASSOCIATE( ERR::REENTERED,"Single-call function was reentered",-1 );
ERROR_ASSOCIATE( ERR::TIMED_OUT,"Timed out",-1 );
ERROR_ASSOCIATE( ERR::LOGIC,"Logic error in code",-1 );
ERROR_ASSOCIATE( INFO::ALREADY_EXISTS,"Already exists (not an error)",-1 );
ERROR_ASSOCIATE( INFO::ALL_COMPLETE,"All complete (not an error)",-1 );
ERROR_ASSOCIATE( ERR::_16,"Case 16",-1 );
ERROR_ASSOCIATE( INFO::SKIPPED,"Skipped (not an error)",-1 );
ERROR_ASSOCIATE( INFO::CB_CONTINUE,"Continue (not an error)",-1 );
ERROR_ASSOCIATE( ERR::FAIL,"Function failed (no details available)",-1 );
ERROR_ASSOCIATE( INFO::OK,"(but return value was 0 which indicates success)",-1 );
ERROR_ASSOCIATE( ERR::_2,"Case 2",-1 );
ERROR_ASSOCIATE( ERR::_1,"Case 1",-1 );
ERROR_ASSOCIATE( ERR::_3,"Case 3",-1 );
ERROR_ASSOCIATE( ERR::_4,"Case 4",-1 );
ERROR_ASSOCIATE( ERR::_5,"Case 5",-1 );
ERROR_ASSOCIATE( ERR::_29,"Case 29",-1 );
ERROR_ASSOCIATE( ERR::_28,"Case 28",-1 );
ERROR_ASSOCIATE( ERR::_27,"Case 27",-1 );
ERROR_ASSOCIATE( ERR::_26,"Case 26",-1 );
ERROR_ASSOCIATE( ERR::_25,"Case 25",-1 );
ERROR_ASSOCIATE( ERR::_24,"Case 24",-1 );
ERROR_ASSOCIATE( ERR::_23,"Case 23",-1 );
ERROR_ASSOCIATE( ERR::_22,"Case 22",-1 );
ERROR_ASSOCIATE( ERR::_9,"Case 9",-1 );
ERROR_ASSOCIATE( ERR::_8,"Case 8",-1 );
ERROR_ASSOCIATE( ERR::_18,"Case 18",-1 );
ERROR_ASSOCIATE( ERR::_17,"Case 17",-1 );
ERROR_ASSOCIATE( ERR::STL_CNT_INVALID,"Container type is known but contents are invalid",-1 );
ERROR_ASSOCIATE( ERR::_14,"Case 14",-1 );
ERROR_ASSOCIATE( ERR::_11,"Case 11",-1 );
ERROR_ASSOCIATE( ERR::_12,"Case 12",-1 );
ERROR_ASSOCIATE( ERR::_13,"Case 13",-1 );
ERROR_ASSOCIATE( ERR::_15,"Case 15",-1 );
char* error_description_r( LibError err, char* buf, size_t max_chars );
inline bool feq( double d1, double d2, double epsilon = 0. 00001 );
inline bool feqf( float f1, float f2, float epsilon = 0. 001f );
int floor_log2( const float x );
u32 fnv_hash( const void* buf, size_t len );
u64 fnv_hash64( const void* buf, size_t len );
u32 fnv_lc_hash( const char* str, size_t len );
static void* freelist_pop( void** pfreelist );
static void freelist_push( void** pfreelist, void* el );
static size_t get_page_size();
double get_time();
static uint hash( void* symbol );
static void importExtensionFunctions();
void in_add_handler( InHandler handler );
void in_dispatch_event( const SDL_Event_* ev );
void in_dispatch_recorded_events();
LibError in_playback( const char* fn );
LibError in_record( const char* fn );
void in_stop();
static inline bool is_marked_as_deleted( Node* p );
static bool is_node_referenced( Node* node, void** hps, size_t num_hps );
static inline bool is_page_multiple( uintptr_t x );
bool is_pow2( uint n );
static bool isImplementedInCore( const char* ext );
inline bool IsSimilarMagnitude( double d1, double d2, const double relativeErrorTolerance = 0. 05 );
static void LatchStartTime();
LibError lfh_erase( LFHash* hash, uintptr_t key );
void* lfh_find( LFHash* hash, uintptr_t key );
void lfh_free( LFHash* hash );
LibError lfh_init( LFHash* hash, size_t num_entries );
void* lfh_insert( LFHash* hash, uintptr_t key, size_t additional_bytes, int* was_inserted );
LibError lfl_erase( LFList* list, uintptr_t key );
void* lfl_find( LFList* list, uintptr_t key );
void lfl_free( LFList* list );
LibError lfl_init( LFList* list );
void* lfl_insert( LFList* list, uintptr_t key, size_t additional_bytes, int* was_inserted );
LibError LibError_from_errno( bool warn_if_failed );
static inline LibError LibError_from_mmap( void* ret, bool warn_if_failed = true );
LibError LibError_from_posix( int ret, bool warn_if_failed );
void LibError_set_errno( LibError err );
static bool list_lookup( LFList* list, uintptr_t key, ListPos* pos );
template< class Entries > float ll_calc_min_credit_density( const Entries& entries );
void lockfree_Init();
void lockfree_Shutdown();
int log2_of_pow2( uint n );
int match_wildcard( const char* s, const char* w );
int match_wildcardw( const wchar_t* s, const wchar_t* w );
void** matrix_alloc( uint cols, uint rows, size_t el_size );
void matrix_free( void** matrix );
static LibError mem_commit( u8* p, size_t size, int prot );
static LibError mem_decommit( u8* p, size_t size );
static LibError mem_protect( u8* p, size_t size, int prot );
static LibError mem_release( u8* p, size_t size );
static LibError mem_reserve( size_t size, u8** pp );
void ModuleSetError( volatile ModuleInitState* pInitState );
bool ModuleShouldInitialize( volatile ModuleInitState* pInitState );
bool ModuleShouldShutdown( volatile ModuleInitState* pInitState );
i64 movsx_be64( const u8* p, size_t size_bytes );
i64 movsx_le64( const u8* p, size_t size_bytes );
u64 movzx_be64( const u8* p, size_t size_bytes );
u64 movzx_le64( const u8* p, size_t size_bytes );
static inline Node* node_alloc( size_t additional_bytes );
static inline void node_free( Node* n );
static inline void* node_user_data( Node* n );
const char* ogl_ExtensionString();
LibError ogl_get_gfx_info();
bool ogl_HaveExtension( const char* ext );
const char* ogl_HaveExtensions( int dummy,... );
bool ogl_HaveVersion( const char* desired_version );
void ogl_Init();
void ogl_SquelchError( GLenum err_to_ignore );
void ogl_WarnIfError();
void* page_aligned_alloc( size_t unaligned_size );
void page_aligned_free( void* p, size_t unaligned_size );
LibError path_append( char* dst, const char* path1, const char* path2, uint flags );
LibError path_component_validate( const char* name );
void path_copy( char* dst, const char* src );
void path_dir_only( const char* path, char* dir );
const char* path_extension( const char* fn );
LibError path_foreach_component( const char* path_org, PathComponentCb cb, void* ctx );
bool path_is_dir_sep( char c );
bool path_is_subpath( const char* s1, const char* s2 );
const char* path_last_component( const char* path );
const char* path_name_only( const char* path );
LibError path_package_append_file( PathPackage* pp, const char* path );
void path_package_copy( PathPackage* pp_dst, const PathPackage* pp_src );
LibError path_package_set_dir( PathPackage* pp, const char* dir );
LibError path_replace( char* dst, const char* src, const char* remove, const char* replace );
void path_strip_fn( char* path );
LibError path_validate( const char* path );
void* pool_alloc( Pool* p, size_t size );
bool pool_contains( Pool* p, void* el );
LibError pool_create( Pool* p, size_t max_size, size_t el_size );
LibError pool_destroy( Pool* p );
void pool_free( Pool* p, void* el );
void pool_free_all( Pool* p );
uint rand( uint min_inclusive, uint max_exclusive );
u16 read_be16( const void* p );
u32 read_be32( const void* p );
u64 read_be64( const void* p );
u16 read_le16( const void* p );
u32 read_le32( const void* p );
u64 read_le64( const void* p );
static int return_errno_from_LibError( LibError err );
uintptr_t round_down( const uintptr_t n, const uintptr_t multiple );
uintptr_t round_up( const uintptr_t n, const uintptr_t multiple );
static inline size_t round_up_to_page( size_t size );
uint round_up_to_pow2( uint x );
static bool should_skip_this_assert();
static bool should_skip_this_error( LibError err );
static bool should_suppress_error( u8* suppress );
static inline i64 SignExtend( u64 bits, size_t size_bytes );
void* single_calloc( void* storage, volatile uintptr_t* in_use_flag, size_t size );
void single_free( void* storage, volatile uintptr_t* in_use_flag, void* p );
static void smr_release_unreferenced_nodes( TLS* tls );
static void smr_retire_node( Node* node );
static void smr_shutdown();
int sprintf_s( char* buf, size_t max_chars, const char* fmt,... );
void* static_calloc( StaticStorage* ss, size_t size );
int strcat_s( char* dst, size_t max_dst_chars, const char* src );
int strcpy_s( char* dst, size_t max_dst_chars, const char* src );
int strncat_s( char* dst, size_t max_dst_chars, const char* src, size_t max_src_chars );
int strncpy_s( char* dst, size_t max_dst_chars, const char* src, size_t max_src_chars );
size_t strnlen( const char* str, size_t max_len );
u16 subusw( u16 x, u16 y );
u16 swap16( const u16 x );
u32 swap32( const u32 x );
u64 swap64( const u64 x );
static void symbol_string_add_to_cache( const char* string, void* symbol );
static const char* symbol_string_build( void* symbol, const char* name, const char* file, int line );
static const char* symbol_string_from_cache( void* symbol );
TimerClient* timer_add_client( TimerClient* tc, const char* description );
void timer_bill_client( TimerClient* tc, TimerUnit dt );
void timer_display_client_totals();
void timer_Init();
double timer_res();
void timer_Shutdown();
static TLS* tls_alloc();
static TLS* tls_get();
static void tls_init();
static void tls_retire( void* tls_ );
static void tls_shutdown();
u16 to_be16( u16 x );
u32 to_be32( u32 x );
u64 to_be64( u64 x );
u16 to_le16( u16 x );
u32 to_le32( u32 x );
u64 to_le64( u64 x );
template< typename T > std::vector< T > ts_make_vector( T* start, size_t size_bytes );
bool ts_str_contains( const std::string& str1, const std::string& str2 );
u16 u16_from_double( double in );
template< typename T > u16 u16_from_larger( T x );
template< typename T > u32 u32_from_larger( T x );
u32 u32_from_u16( u16 hi, u16 lo );
u16 u32_hi( u32 x );
u16 u32_lo( u32 x );
u64 u64_from_u32( u32 hi, u32 lo );
u32 u64_hi( u64 x );
u32 u64_lo( u64 x );
u8 u8_from_double( double in );
static void validate( LFHash* hash );
static LibError validate_da( DynArray* da );
static inline Node* with_mark( Node* p );
static inline Node* without_mark( Node* p );
void write_be16( void* p, u16 x );
void write_be32( void* p, u32 x );
void write_be64( void* p, u64 x );
void write_le16( void* p, u16 x );
void write_le32( void* p, u32 x );
void write_le64( void* p, u64 x );
static uint xrand();
| Symbol Detail |
#define __FUNCTION__ 0
#define _CRTDBG_MAP_ALLOC
#define BIG_ENDIAN 0x1234
#define BYTE_ORDER BIG_ENDIAN
#define CALL_CONV
#define CONFIG_DISABLE_EXCEPTIONS 0
#define CONFIG_FINAL 0
#define CONFIG_OMIT_FP 0
#define CONFIG_OVERRUN_PROTECTION 0
#define CONFIG_PARANOIA 0
#define CONFIG_RETURN64_EDX_EAX 1
#define CONFIG_TIMER_ALLOW_RDTSC 0
#define CONFIG_TRACE 0
#define CONFIG_USE_MMGR 0
#define CPU_ALPHA 0
#define CPU_AMD64 0
#define CPU_ARM 0
#define CPU_IA32 0
#define CPU_IA64 0
#define CPU_MIPS 0
#define CXXTEST_HAVE_EH
#define CXXTEST_HAVE_STD
#define DEBUG_PRINTF_BRIEF if(debug_level >= DEBUG_LEVEL_BRIEF) debug_printf
#define DEBUG_PRINTF_DETAILED if(debug_level >= DEBUG_LEVEL_DETAILED) debug_printf
#define DEBUG_PRINTF_FULL if(debug_level >= DEBUG_LEVEL_FULL ) debug_printf
#define FOURCC FOURCC_LE
#define fscanf_s fscanf
#define GCC_VERSION 0
#define GL_TEXTURE_IMAGE_SIZE_ARB 0x86A0
#define HAVE_C99 1
#define HAVE_C99_MATH 0
#define HAVE_GNU_ASM 0
#define HAVE_MKDIR 1
#define HAVE_MS_ASM 0
#define HAVE_PCH 0
#define HAVE_SECURE_CRT 0
#define HAVE_STL_HASH 0
#define HAVE_STL_SLIST 0
#define HAVE_STRDUP 1
#define HAVE_VC_DEBUG_ALLOC 0
#define HAVE_WCSDUP 1
#define HAVE_X 0
#define i16 int16_t
#define i32 int32_t
#define i64 int64_t
#define i8 int8_t
#define ICC_VERSION 0
#define INCLUDED_ADTS
#define INCLUDED_ALLOCATORS
#define INCLUDED_APP_HOOKS
#define INCLUDED_BASE32
#define INCLUDED_BITS
#define INCLUDED_BYTE_ORDER
#define INCLUDED_CACHE_ADT
#define INCLUDED_CODE_ANNOTATION
#define INCLUDED_CONFIG
#define INCLUDED_DEBUG
#define INCLUDED_DEBUG_STL
#define INCLUDED_FNV_HASH
#define INCLUDED_INPUT
#define INCLUDED_LIB
#define INCLUDED_LIB_ERRORS
#define INCLUDED_LOCKFREE
#define INCLUDED_MMGR
#define INCLUDED_MODULE_INIT
#define INCLUDED_OGL
#define INCLUDED_PATH_UTIL
#define INCLUDED_RAND
#define INCLUDED_REGEX
#define INCLUDED_SECURE_CRT
#define INCLUDED_SELF_TEST
#define INCLUDED_TIMER
#define INCLUDED_TYPES
#define LCC_VERSION 0
#define LITTLE_ENDIAN 0x4321
#define MSC_VERSION 0
#define new new(_NORMAL_BLOCK, __FILE__, __LINE__)
#define NODEFAULT default: UNREACHABLE
#define ogl_WarnIfError
#define OS_AMIGA 0
#define OS_BEOS 0
#define OS_BSD 1
#define OS_LINUX 0
#define OS_MAC 0
#define OS_MACOSX 0
#define OS_SOLARIS 0
#define OS_UNIX 1
#define OS_WIN 0
#define OS_WIN64 0
#define REAL_GL_1_2
#define REAL_GL_1_3
#define REDEFINED_NEW
#define SAFE_STRCPY str##cpy
#define SAFE_WCSCPY wcs##cpy
#define STL_DINKUMWARE 0
#define STL_GCC 0
#define STL_ICC 0
#define swap16 _byteswap_ushort
#define swap32 _byteswap_ulong
#define swap64 _byteswap_uint64
#define tcat_s strcat_s
#define tcmp strcmp
#define tcpy strcpy
#define tcpy_s strcpy_s
#define tfopen fopen
#define tfopen_s fopen_s
#define tncat_s strncat_s
#define tncpy_s strncpy_s
#define tnlen strnlen
#define tprintf_s sprintf_s
#define u16 uint16_t
#define u32 uint32_t
#define u64 uint64_t
#define u8 uint8_t
#define UID2__ PASTE3__(LINE_, __LINE__, _2)
#define UID__ PASTE3__(LINE_, __LINE__, _)
#define uint PS_uint
#define ulong PS_ulong
#define UNREACHABLE ASSUME_UNREACHABLE
#define USE_IA32_FLOAT_TO_INT 0
#define vtnprintf vsnprintf
#define WGL_HEADER_NEEDED
#define WSECURE_CRT
| Macro Detail |
#define AH_IS_DEFINED(name) app_hook_was_redefined(offsetof(AppHooks, name))
#define ARRAY_SIZE(name) (sizeof(name) / sizeof(name[0]))
#define AT_STARTUP(code__namespace) { struct UID__{UID__() { code__; }} UID2__; }
#define BIT(n) (1ul << (n))
#define BIT64(n) (1ull << (n))
#define calloc(num, size) mmgr_calloc_dbg (num,size,__FILE__,__LINE__,__FUNCTION__)
#define cassert(expr) struct UID__ { unsigned int CASSERT_FAILURE: (expr); }
#define cassert2(expr) extern char CASSERT_FAILURE[1][(expr)]
#define CHECK_DA(da) RETURN_ERR(validate_da(da))
#define CHECK_ERR(expressionSTMT(i64 err64__ = (i64expression;if(err64__ < 0{LibError err__ = (LibErrorerr64__ & UINT_MAX;DEBUG_WARN_ERR(err__;return (LibErrorerr__ & UINT_MAX;})
#define CHECK_PATH(path) RETURN_ERR(path_validate(path))
#define CONTAINER(name, type_name_patternelse) if(match_wildcard(type_name, type_name_pattern)){handled = true;valid = get_container_info((Any_##name*)p, size, el_size, el_count, el_iterator, it_mem);}
#define debug_assert(expr) STMT(static u8 suppress__;if(!(expr)){switch(debug_assert_failed(#expr, &suppress__, __FILE__, __LINE__, __func__)){case ER_BREAK:debug_break();break;default:break;}})
#define debug_warn(expr) STMT(static u8 suppress__;switch(debug_assert_failed(expr, &suppress__, __FILE__, __LINE__, __func__)){case ER_BREAK:debug_break();break;default:break;})
#define DEBUG_WARN_ERR(errSTMT(static u8 suppress__;switch(debug_warn_err(err, &suppress__, __FILE__, __LINE__, __func__{case ER_BREAK:debug_break(;break;default:break;})
#define DISPLAY_ERROR(text) debug_display_error(text, 0, 0,0, __FILE__,__LINE__,__func__, 0)
#define E(e) case e: debug_printf("%s\n", #e); break;
#define ENFORCE(condition, err_to_warn, retval) STMT(if(!(condition)) { DEBUG_WARN_ERR(err_to_warn); return retval; } )
#define ERROR_ASSOCIATE(err, description, errno_equivalentstatic) LibErrorAssociation UID__ = { err, description, errno_equivalent };static int UID2__ = error_AddAssociation(&UID__);
#define FOURCC_BE(a, b, c, d) ( ((u32)(u8)a) << 24 | ((u32)(u8)b) << 16 | ((u32)(u8)c) << 8 | ((u32)(u8)d) << 0 )
#define FOURCC_LE(a, b, c, d) ( ((u32)(u8)a) << 0 | ((u32)(u8)b) << 8 | ((u32)(u8)c) << 16 | ((u32)(u8)d) << 24 )
#define free(p) mmgr_free_dbg (p, __FILE__,__LINE__,__FUNCTION__)
#define FUNC(ret, name, params) EXTERN_C ret (CALL_CONV *p##name) params;
#define FUNC2(ret, nameARB, nameCore, version, params) EXTERN_C ret (CALL_CONV *p##nameARB) params;
#define getcwd(p, size) mmgr_getcwd_dbg(p, size, __FILE__,__LINE__,__FUNCTION__)
#define malloc(size) mmgr_malloc_dbg (size, __FILE__,__LINE__,__FUNCTION__)
#define MATCH(known_extif(!strcmp(ext, #known_extreturn) true;
#define ONCE(ONCE_code__STMT(static bool ONCE_done__ = false;if(!ONCE_done__{ONCE_done__ = true;ONCE_code__;})
#define ONCE_NOT(ONCE_code__STMT(static bool ONCE_done__ = false;if(!ONCE_done__ONCE_done__ = true;elseONCE_code__;)
#define ONE_SIDE(x, x0, x1, x2) SIGN_EQ(x-x0, x-x1, x-x2)
#define OVERRIDE_IF_NONZERO(HOOKNAME) if(new_ah->HOOKNAME) ah.HOOKNAME = new_ah->HOOKNAME;
#define PASTE3__(a, b, c) PASTE3_HIDDEN__(a, b, c)
#define PASTE3_HIDDEN__(a, b, c) a ## b ## c
#define realloc(p, size) mmgr_realloc_dbg(p,size, __FILE__,__LINE__,__FUNCTION__)
#define REL_ERR(correct, measured) (fabs((correct) - (measured)) / (correct))
#define REPLACE(what, withelse) if(!strncmp(src, (what), sizeof(what)-1)){src += sizeof(what)-1-1; strcpy(dst, (with)); dst += sizeof(with)-1;}
#define RETURN0_IF_ERR(expressionSTMT(i64 err64__ = (i64expression;if(err64__ < 0return 0;)
#define RETURN_ERR(expressionSTMT(i64 err64__ = (i64expression;if(err64__ < 0{LibError err__ = (LibErrorerr64__ & UINT_MAX;return err__;})
#define RETURN_IF_FALSE(okSTMT(if(!(okreturn ERR::FAIL;)
#define SAFE_ARRAY_DELETE(pSTMT(delete[] (p; (p= 0;)
#define SAFE_DELETE(pSTMT(delete (p; (p= 0;)
#define SAFE_FREE(pSTMT(free((void*p; (p= 0;)
#define SAFE_NEW(type, ptrtype*) ptr;try{ptr = new type();}catch(std::bad_alloc){ptr = 0;}
#define SIGN_EQ(x0, x1, x2) ( ((x0) * (x1)) > 0.0 && ((x1) * (x2)) > 0.0 )
#define STATIC_STORAGE(name, sizestatic) u8 storage[(size)];static StaticStorage name = { storage, storage+(size) }
#define STD_CONTAINER(name) CONTAINER(name, "std::" #name "<*>")
#define STMT(STMT_code__) do { STMT_code__; } while(false)
#define strdup(p) mmgr_strdup_dbg(p, __FILE__,__LINE__,__FUNCTION__)
#define STRINGIZE(id) STRINGIZE2(id)
#define STRINGIZE2(id) # id
#define STRIP(whatelse) if(!strncmp(src, (what), sizeof(what)-1)){src += sizeof(what)-1-1;}
#define STRIP_NESTED(whatelse) if(!strncmp(src, (what), sizeof(what)-1)){if(src != name && src[-1] == ',')dst--;src += sizeof(what)-1;debug_assert(nesting == 0);nesting = 1;}
#define T(string_literal) string_literal
#define THROW_ERR(expressionSTMT(i64 err64__ = (i64expression;if(err64__ < 0{LibError err__ = (LibErrorerr64__ & UINT_MAX;DEBUG_WARN_ERR(err__;throw err__;})
#define TIMER(description) ScopeTimer UID__(description)
#define TIMER_ACCRUE(client) ScopeTimerAccrue<> UID__(client)
#define TIMER_ADD_CLIENT(idstatic) TimerClient UID__;static TimerClient* id = timer_add_client(&UID__, #id);
#define TIMER_BEGIN(description) { ScopeTimer UID__(description)
#define TIMER_END(description) }
#define TS_ASSERT_OK(expr) TS_ASSERT_EQUALS((expr), INFO::OK)
#define TS_ASSERT_STR_CONTAINS(str1, str2) TS_ASSERT(ts_str_contains(str1, str2))
#define TS_ASSERT_STR_EQUALS(str1, str2) TS_ASSERT_EQUALS(std::string(str1), std::string(str2))
#define TS_ASSERT_VECTOR_EQUALS_ARRAY(vec1, array) TS_ASSERT_EQUALS(vec1, ts_make_vector((array), sizeof(array)))
#define TS_ASSERT_WSTR_EQUALS(str1, str2) TS_ASSERT_EQUALS(std::wstring(str1), std::wstring(str2))
#define UNREACHABLESTMT(debug_warn("hit supposedly unreachable code";abort(;)
#define UNUSED(param)
#define UNUSED2(param) (void)param;
#define WARN_ERR(expressionSTMT(i64 err64__ = (i64expression;if(err64__ < 0{LibError err__ = (LibErrorerr64__ & UINT_MAX;DEBUG_WARN_ERR(err__;})
#define WARN_ERR_RETURN(expressionSTMT(i64 err64__ = (i64expression;if(err64__ < 0{LibError err__ = (LibErrorerr64__ & UINT_MAX;DEBUG_WARN_ERR(err__;return;})
#define WARN_IF_FALSE(okSTMT(if(!(okdebug_warn("FYI: WARN_IF_FALSE reports that a function failed.""feel free to ignore or suppress this warning.";)
#define WARN_IF_PTR_LEN(len)
#define WARN_RETURN(errSTMT(DEBUG_WARN_ERR(err;return err;)
#define WARN_RETURN_IF_FALSE(okSTMT(if(!(ok{debug_warn("FYI: WARN_RETURN_IF_FALSE reports that a function failed.""feel free to ignore or suppress this warning.";return ERR::FAIL;})
#define wcsdup(p) mmgr_wcsdup_dbg(p, __FILE__,__LINE__,__FUNCTION__)
|
0 A.D.
Generated on September 04, 2007 at 18:13 CppDoc v2.4.0 |
|||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||