Calculates the number of digits needed to represent a binary fraction.
static uint32_t calcfractionsize_decimalhelper( /*out*/uint32_t * leadingzerosize, uint32_t fractionalbits, uint32_t nrleadingzerobits )
Calculates the CRC-32 checkusm of a data block.
uint32_t calculate_crc32( size_t blocksize, const void * datablock/*[blocksize]*/ )
Udpates internal fields with content from buffer[buffer_size].
int calculate_sha1hash( sha1_hash_t * sha1, size_t buffer_size, const uint8_t buffer[buffer_size] )
Calls iocallback_t.iimpl with iocallback_t.object as its first parameter.
void call_iocallback( const iocallback_t * iocb, sys_iochannel_t fd, uint8_t ioevents )
Calls syncthread_t.mainfct with signalstate set to syncthread_signal_ABORT.
int callabort_syncthread( syncthread_t * sthread )
Wrapper to call callcmpkeyobj_typeadaptcomparator.
int callcmpkeyobj_typeadapt( typeadapt_t * typeadp, ... )
Calls function typeadapt_comparator_it.cmp_key_object.
int callcmpkeyobj_typeadaptcomparator( typeadapt_comparator_it * adpcmp, struct typeadapt_t * typeadp, const void * key, const struct typeadapt_object_t * robject )
See callcmpkeyobj_typeadapt.
int callcmpkeyobj_typeadaptmember( typeadapt_member_t * nodeadp, ... )
Wrapper to call callcmpobj_typeadaptcomparator.
int callcmpobj_typeadapt( typeadapt_t * typeadp, ... )
Calls function typeadapt_comparator_it.cmp_object.
int callcmpobj_typeadaptcomparator( typeadapt_comparator_it * adpcmp, struct typeadapt_t * typeadp, const struct typeadapt_object_t * lobject, const struct typeadapt_object_t * robject )
See callcmpobj_typeadapt.
int callcmpobj_typeadaptmember( typeadapt_member_t * nodeadp, ... )
Wrapper to call calldelete_typeadaptlifetime.
int calldelete_typeadapt( typeadapt_t * typeadp, ... )
Calls function typeadapt_lifetime_it.delete_object.
int calldelete_typeadaptlifetime( typeadapt_lifetime_it * adplife, struct typeadapt_t * typeadp, struct typeadapt_object_t ** object )
See calldelete_typeadapt.
int calldelete_typeadaptmember( typeadapt_member_t * nodeadp, ... )
Wrapper to call callgetbinarykey_typeadaptgetkey.
int callgetbinarykey_typeadapt( typeadapt_t * typeadp, ... )
Calls function typeadapt_getkey_it.getbinarykey.
void callgetbinarykey_typeadaptgetkey( typeadapt_getkey_it * adpgetkey, struct typeadapt_t * typeadp, struct typeadapt_object_t * node, /*out*/typeadapt_binarykey_t * binkey )
See callgetbinarykey_typeadapt.
void callgetbinarykey_typeadaptmember( typeadapt_member_t * nodeadp, ... )
Wrapper to call callhashkey_typeadaptgethash.
int callhashkey_typeadapt( typeadapt_t * typeadp, ... )
Calls function typeadapt_gethash_it.hashkey.
size_t callhashkey_typeadaptgethash( typeadapt_gethash_it * gethash, struct typeadapt_t * typeadp, const void * key )
See callhashkey_typeadapt.
int callhashkey_typeadaptmember( typeadapt_member_t * nodeadp, ... )
Wrapper to call callhashobject_typeadaptgethash.
int callhashobject_typeadapt( typeadapt_t * typeadp, ... )
Calls function typeadapt_gethash_it.hashobject.
size_t callhashobject_typeadaptgethash( typeadapt_gethash_it * gethash, struct typeadapt_t * typeadp, const struct typeadapt_object_t * node )
See callhashobject_typeadapt.
int callhashobject_typeadaptmember( typeadapt_member_t * nodeadp, ... )
Calls syncthread_t.mainfct with signalstate set to syncthread_signal_INIT.
int callinit_syncthread( syncthread_t * sthread )
Calls the main threads main function.
static void callmain_platform( void )
Wrapper to call callnewcopy_typeadaptlifetime.
int callnewcopy_typeadapt( typeadapt_t * typeadp, ... )
Calls function typeadapt_lifetime_it.newcopy_object.
int callnewcopy_typeadaptlifetime( typeadapt_lifetime_it * adplife, struct typeadapt_t * typeadp, /*out*/struct typeadapt_object_t ** destobject, const struct typeadapt_object_t * srcobject )
See callnewcopy_typeadapt.
int callnewcopy_typeadaptmember( typeadapt_member_t * nodeadp, ... )
Calls syncthread_t.mainfct with signalstate set to syncthread_signal_NULL.
int callrun_syncthread( syncthread_t * sthread )
Calls syncthread_t.mainfct with signalstate set to syncthread_signal_WAKEUP.
int callwakeup_syncthread( syncthread_t * sthread )
Casts pointer to syncwait_t into pointer to wait2queue_entry_t.
static inline wait2queue_entry_t * cast_wait2queueentry( syncwait_t * waitentry )
Casts pointer to syncwait_t into pointer to waitqueue_entry_t.
static inline waitqueue_entry_t * cast_waitqueueentry( syncwait_t * waitentry )
Casts pointer to osdisplay into pointer to display_t.
display_t * castfromos_display( const void * osdisplay )
Sets header and nodesize of offset to smaller or bigger size.
static void changesize_trienodeoffsets( trie_nodeoffsets_t * offsets, header_t headersize )
Returns the name of the character encoding of the current selected locale.
const char * charencoding_locale( void )
Returns child pointer for digit.
static inline trie_nodedata_t * child_triesubnode( trie_subnode_t * subnode, uint8_t digit )
Determines the index into the internal array arraysf_mwaybranch_t.childs.
unsigned childindex_arraysfmwaybranch( arraysf_mwaybranch_t * branch, size_t pos )
Determines the index into the internal array arraystf_mwaybranch_t.childs.
unsigned childindex_arraystfmwaybranch( arraystf_mwaybranch_t * branch, size_t data )
Execute this test in child to make changing environment safe.
static int childprocess_environment( void * dummy )
Sets the value to 0.
void clear_bigint( bigint_t * big )
Sets size of string to 0.
void clear_cstring( cstring_t * cstr )
Sets the value to 0.
void clear_decimal( decimal_t * dec )
Clears the flags indicating an exceptional condition.
int clear_fpuexcept( fpu_except_e exception_flags )
Clears flags in header.
static inline header_t clear_header( const header_t header, header_e flags )
Clears the buffer without writting it out.
void clear_logbuffer( logbuffer_t * logbuf )
Sets the content of the memory block to 0.
void clear_memblock( memblock_t * mblock )
Restores the default signal handler of the platform.
static int clear_signalhandler( unsigned signr )
All contained suffixes are removed and all internal memory is freed.
int clear_suffixtree( suffixtree_t * tree )
Removes all appended content from wbuffer.
void clear_wbuffer( wbuffer_t * wbuf )
Clears log buffer (sets length of logbuffer to 0).
void clearbuffer_logwriter( logwriter_t * lgwrt, uint8_t channel )
Set all syncevent_t.waiting pointer to 0 which reference threads in the wait queues.
static int clearevents_syncrun( syncrun_t * srun )
Sets the first digit to 0 and decrements the number of digits.
void clearfirstdigit_bigint( bigint_t * big )
Sets all nrbits least significant bits of ptr to zero.
ptr_t clearlsbits_ptr( const ptr_t ptr, unsigned nrbits )
Clears the current token string.
int cleartoken_utf8scanner( utf8scanner_t * scan, struct filereader_t * frd )
Compares two big integers and returns -1,0 or +1.
int cmp_bigint( const bigint_t * lbig, const bigint_t * rbig )
Compares two decimal numbers and returns result.
int cmp_decimal( const decimal_t * ldec, const decimal_t * rdec )
Compares magnitude of two big integers and returns -1,0 or +1.
int cmpmagnitude_bigint( const bigint_t * lbig, const bigint_t * rbig )
Compares magnitude of two decimal numbers returns result.
int cmpmagnitude_decimal( const decimal_t * ldec, const decimal_t * rdec )
Returns the start address of the mapped program code.
uint8_t * codeaddr_module( const module_t * mod )
Returns the size of the mapped program code.
size_t codesize_module( const module_t * mod )
The name of a column.
int colname_csvfilereader( const csvfilereader_t * csvfile, size_t column/*0..nrcolumns-1*/, /*out*/struct string_t * colname )
Returns the current column number beginning from 0.
size_t column_textpos( const textpos_t * txtpos )
Returns the column nr of the current reading position.
size_t column_utf8reader( const utf8reader_t * utfread )
Returns the value of a single column in a certain row.
int colvalue_csvfilereader( const csvfilereader_t * csvfile, size_t row/*1..nrrows-1*/, size_t column/*0..nrcolumns-1*/, /*out*/struct string_t * colvalue )
Moves elements from the end of queue to elements stored in freelist.
int compact_syncqueue( syncqueue_t * syncqueue, IDNAME elem_t, struct dlist_t * freelist, void (*initmove_elem)(void * dest, void * src) )
Called from macro compact_syncqueue.
int compact2_syncqueue( syncqueue_t * syncqueue, uint16_t elemsize, struct dlist_t * freelist, void (*initmove_elem)(void * dest, void * src) )
Compares expect with node.
static int compare_expectnode( expect_node_t * expect, trie_node_t * node, trie_nodeoffsets_t * nodeoffsets/*could be 0*/, uint8_t cmpnodesize, uint8_t cmpsubnodesize )
Returns result of comparison (0 == equal).
int compare_ipaddr( const ipaddr_t * left, const ipaddr_t * right )
Returns 0 if logbuffer compares equal to content in logbuf.
int compare_logbuffer( const logbuffer_t * logbuf, size_t logsize, const uint8_t logbuffer[logsize] )
Returns 0 if logbuffer compares equal to channel content of lgwrt.
int compare_logwriter( const logwriter_t * lgwrt, uint8_t channel, size_t logsize, const uint8_t logbuffer[logsize] )
Returns 0 if sigstate1 and sigstate2 contains equal settings.
int compare_signalstate( const signalstate_t * sigstate1, const signalstate_t * sigstate2 )
Returns 0 if all regions stored in left and right container compare equal.
int compare_vmmappedregions( const vm_mappedregions_t * left, const vm_mappedregions_t * right )
Returns 0 if left and right regions compare equal.
int compare_vmregion( const vm_region_t * left, const vm_region_t * right )
Compares stored errlog file with content of current error log.
static int comparelogfile_unittest( const char * testname )
Checks that arraystf_node_t can be castet into string_t.
static inline void compiletime_assert( void )
Tests that suffixtree_node_t inherits from suffixtree_leaf_t.
static inline void compiletime_tests( void )
Adapts tcontext to chosen maincontext_e type.
static int config_threadcontext( threadcontext_t * tcontext, maincontext_e context_type )
Returns a gconfig_filter_f which helps to filter for a specific window visual.
int configfilter_x11window( /*out*/struct gconfig_filter_t * filter, const int32_t config_attributes[] )
Returns the ID of configuration eglconf in id.
int configid_eglconfig( eglconfig_t eglconf, struct opengl_display_t * egldisp, /*out*/uint32_t * id )
Returns id of the configuration used during context creation in configid.
int configid_eglcontext( const eglcontext_t eglcont, struct opengl_display_t * egldisp, /*out*/uint32_t * configid )
Returns the configuration ID of eglpbuf in configid.
int configid_eglpbuffer( const eglpbuffer_t eglpbuf, struct opengl_display_t * egldisp, /*out*/uint32_t * configid )
Returns the configuration ID of gconf.
int configid_gconfig( const gconfig_t * gconf, struct display_t * display, /*out*/uint32_t * configid )
Returns id of the configuration cont in configid used during context creation.
int configid_gcontext( const gcontext_t * cont, struct display_t * disp, /*out*/uint32_t * configid )
Returns the configuration ID of pbuf in configid.
int configid_pixelbuffer( const pixelbuffer_t * pbuf, struct display_t * disp, /*out*/uint32_t * configid )
Returns pointer to threadcontext_t stored in thread local storage.
struct threadcontext_t * context_threadtls( const thread_tls_t * tls )
Jumps to state_syncthread which was set with setcontinuelabel_syncthread.
void continue_syncthread( syncthread_t * sthread )
Returns address where execution should continue after wakeup.
void * continuelabel_syncrun( const syncrun_t * srun )
Returns pointer to syncwait->continuelabel (see syncwait_t.continuelabel).
void * continuelabel_syncwait( const syncwait_t * syncwait )
Converts ipsocket_async_t into ipsocket_t.
int convert_ipsocketasync( ipsocket_async_t * ipsockasync, /*out*/ipsocket_t * ipsock )
Converts ioevent_t into Linux struct epoll_event.
static inline void convert2epollevent_iopoll( /*out*/struct epoll_event * epevent, const ioevent_t * ioevent )
Converts ioevent_e into Linux epoll event bits.
static inline uint32_t convert2epolleventbits_iopoll( uint32_t ioevents )
Converts Linux specific epoll_event->events into ioevent_e.
static inline uint32_t convert2ioeventbits_iopoll( uint32_t events )
Switch header flags from header_CHILD to header_SUBNODE.
static void convert2subnode_trienodeoffsets( trie_nodeoffsets_t * offsets )
TODO: describe TODO: remove shrinknode
static int convertchild2sub_trienode( trie_node_t * node )
Copies the value from copyfrom to big.
int copy_bigint( bigint_t *restrict * big, const bigint_t * restrict copyfrom )
Copies the value from copyfrom to dec.
int copy_decimal( decimal_t *restrict * dec, const decimal_t * restrict copyfrom )
Copies the ip number, protocol and port from source to dest.
int copy_ipaddr( ipaddr_t * dest, const ipaddr_t * source )
Gibt den aktuellen OpenGL Kontext in eglcont zurück.
void current_eglcontext( /*out*/eglcontext_t * eglcont, /*out*/struct opengl_display_t ** egldisp, /*out*/struct opengl_surface_t ** drawsurf, /*out*/struct opengl_surface_t ** readsurf )
Returns the current native OpenGL context and associated native resources.
void current_gcontext( /*out*/struct opengl_context_t ** cont, /*out*/struct opengl_display_t ** disp, /*out*/struct opengl_surface_t ** drawsurf, /*out*/struct opengl_surface_t ** readsurf )
Returns the name of the current active locale.
const char * current_locale( void )
Returns the current active system user.
sysuser_id_t current_sysuser( sysuser_t * sysusr )
Returns thread_tls_t of the current thread.
thread_tls_t current_threadtls( void * local_var )
Returns the name of the current active locale for system messages.
const char * currentmsg_locale( void )
Returns next character position of multibyte string where conversion starts.
extern const char * currentpos_convertwchar( convert_wchar_t * conv )