icedb
version 0.5.1
Snow particle scattering database API
|
#include "../icedb/defs.h"
#include "../icedb/util.h"
#include "../icedb/util.hpp"
#include <cstring>
#include <cwchar>
#include <signal.h>
Go to the source code of this file.
Namespaces | |
icedb | |
Functions | |
ICEDB_BEGIN_DECL_C ICEDB_SYMBOL_SHARED size_t | ICEDB_COMPAT_strncpy_s (char *dest, size_t destSz, const char *src, size_t srcSz) |
ICEDB_SYMBOL_SHARED char * | ICEDB_COMPAT_strdup_s (const char *src, size_t srcSz) |
ICEDB_SYMBOL_SHARED size_t | ICEDB_COMPAT_wcsncpy_s (wchar_t *dest, size_t destSz, const wchar_t *src, size_t srcSz) |
ICEDB_SYMBOL_SHARED wchar_t * | ICEDB_COMPAT_wcsdup_s (const wchar_t *src, size_t srcSz) |
ICEDB_SYMBOL_SHARED void * | ICEDB_malloc (size_t numBytes) |
Allocate memory in bytes. Generally this is just malloced, but a custom allocator may be substituted. More... | |
ICEDB_SYMBOL_SHARED void | ICEDB_free (void *obj) |
Free memory region. Should not be double-freed. More... | |
ICEDB_SYMBOL_SHARED void | ICEDB_DEBUG_RAISE_EXCEPTION_HANDLER_WC (const wchar_t *file, int line, const wchar_t *fsig) |
ICEDB_SYMBOL_SHARED void | ICEDB_DEBUG_RAISE_EXCEPTION_HANDLER_A (const char *file, int line, const char *fsig) |
ICEDB_SYMBOL_SHARED void * | icedb::_malloc (size_t numBytes) |
ICEDB_SYMBOL_SHARED void | icedb::_free (void *obj) |
ICEDB_SYMBOL_SHARED char* ICEDB_COMPAT_strdup_s | ( | const char * | src, |
size_t | srcSz | ||
) |
Safe char array initialization and copy. Null appended at end (added to srcSz).
Definition at line 42 of file util.cpp.
References ICEDB_COMPAT_strncpy_s(), ICEDB_DEBUG_RAISE_EXCEPTION, and ICEDB_malloc().
Referenced by error_context_add_string(), and ICEDB_enumModules().
ICEDB_BEGIN_DECL_C ICEDB_SYMBOL_SHARED size_t ICEDB_COMPAT_strncpy_s | ( | char * | dest, |
size_t | destSz, | ||
const char * | src, | ||
size_t | srcSz | ||
) |
Safe char array copy.
dest | is the pointer to the destination. Always null terminated. |
destSz | is the size of the destination buller, including the trailing null character. |
src | is the pointer to the source. Characters from src are copied either until the first null character or until srcSz. Note that null termination comes later. |
srcSz | is the max size of the source buffer. |
Definition at line 14 of file util.cpp.
References ICEDB_DEBUG_RAISE_EXCEPTION.
Referenced by error_code_to_message(), error_context_append(), error_context_copy(), error_context_create_impl(), error_context_to_message(), error_context_to_message_size(), error_context_widen(), icedb::versioning::genVersionInfo(), ICEDB_COMPAT_strdup_s(), ICEDB_findModuleByFunc(), ICEDB_getAppDir(), ICEDB_getAppPath(), ICEDB_getCWD(), ICEDB_getLibDir(), ICEDB_getLibPath(), ICEDB_getPluginDir(), and ICEDB_WriteLibVersionInfoC().
ICEDB_SYMBOL_SHARED wchar_t* ICEDB_COMPAT_wcsdup_s | ( | const wchar_t * | src, |
size_t | srcSz | ||
) |
Safe char array initialization and copy. Null appended at end (added to srcSz).
Definition at line 80 of file util.cpp.
References ICEDB_COMPAT_wcsncpy_s(), ICEDB_DEBUG_RAISE_EXCEPTION, and ICEDB_malloc().
ICEDB_SYMBOL_SHARED size_t ICEDB_COMPAT_wcsncpy_s | ( | wchar_t * | dest, |
size_t | destSz, | ||
const wchar_t * | src, | ||
size_t | srcSz | ||
) |
Safe char array copy.
dest | is the pointer to the destination. Always null terminated. |
destSz | is the size of the destination buller, including the trailing null character. |
src | is the pointer to the source. Characters from src are copied either until the first null character or until srcSz. Note that null termination comes later. |
srcSz | is the max size of the source buffer. |
Definition at line 52 of file util.cpp.
References ICEDB_DEBUG_RAISE_EXCEPTION.
Referenced by ICEDB_COMPAT_wcsdup_s().
ICEDB_SYMBOL_SHARED void ICEDB_DEBUG_RAISE_EXCEPTION_HANDLER_A | ( | const char * | file, |
int | line, | ||
const char * | fsig | ||
) |
Definition at line 113 of file util.cpp.
References ICEDB_BEGIN_DECL, ICEDB_COMPAT_fprintf_s, and ICEDB_END_DECL_C.
ICEDB_SYMBOL_SHARED void ICEDB_DEBUG_RAISE_EXCEPTION_HANDLER_WC | ( | const wchar_t * | file, |
int | line, | ||
const wchar_t * | fsig | ||
) |
Definition at line 102 of file util.cpp.
References ICEDB_COMPAT_fwprintf_s.
ICEDB_SYMBOL_SHARED void ICEDB_free | ( | void * | obj | ) |
Free memory region. Should not be double-freed.
Definition at line 97 of file util.cpp.
References icedb::free(), and ICEDB_DEBUG_RAISE_EXCEPTION.
Referenced by icedb::_free(), error_context_append(), error_context_create_impl(), error_context_deallocate(), error_context_to_message(), error_context_to_message_size(), error_context_widen(), ICEDB_free_enumModulesRes(), and icedb::os_functions::populateOSstrings().
ICEDB_SYMBOL_SHARED void* ICEDB_malloc | ( | size_t | numBytes | ) |
Allocate memory in bytes. Generally this is just malloced, but a custom allocator may be substituted.
Definition at line 90 of file util.cpp.
References ICEDB_DEBUG_RAISE_EXCEPTION, and icedb::malloc().
Referenced by icedb::_malloc(), error_context_append(), error_context_copy(), error_context_create_impl(), error_context_to_message(), error_context_to_message_size(), error_context_widen(), ICEDB_COMPAT_strdup_s(), ICEDB_COMPAT_wcsdup_s(), ICEDB_enumModules(), and icedb::os_functions::populateOSstrings().