libmkkernel 9.0
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
kernel_mk.h File Reference

kernel_mk.h - 30 May 2023 - aotto1968 More...

#include <inttypes.h>
#include <stdarg.h>
#include <stdio.h>
#include <time.h>
#include <limits.h>
#include <string.h>
#include <unistd.h>
#include <stdbool.h>
#include <assert.h>
#include "kernel_overload_mk.h"
+ Include dependency graph for kernel_mk.h:

Go to the source code of this file.

Data Structures

struct  MK_STRN_A
 array of MK_STRN values … More...
 
struct  MkBinaryR
 binary data default format … More...
 
struct  MkStringR
 string data default format … More...
 
union  MkBufferAtomU
 union used to set or modify native data from an MkBufferS object … More...
 
union  MkBufferU
 a union for all data items supported by MkBufferSMore...
 
struct  MkIdS
 data type for process/thread identification … More...
 
struct  MkCacheItemS
 a linked-list to opearate a storage of data items More...
 
struct  MkCacheS
 This is an circel storage of a linked-list connected with a "lock" at MkCacheSMore...
 
struct  MkLalS
 Interface between libmkkernel and the Operating-System … More...
 
struct  MkObjectProtectS
 the protect is used to "protect" data set by pAllocCreate if the new object is later initialized with a type specific object-initialization … More...
 
struct  MkObjectS
 object header … More...
 
struct  MkAllocDefS
 define the storage-allocator function More...
 
struct  MkTypeS
 define a Type object … More...
 
struct  MkDefTypeS
 BASE-TYPE all non specific types More...
 
struct  MkBufferS
 The ABSTRACT-CLASS used to store a native-type-data-item defined by PRIMITIVE TYPEMore...
 
struct  MkBufferS::ilsS
 instance storage predefined More...
 
struct  MkBuffer64S
 FINAL CLASS of MkBufferS with 64 byte ILS-SizeMore...
 
struct  MkBuffer256S
 FINAL CLASS of MkBufferS with 256 byte ILS-SizeMore...
 
struct  MkBuffer1024S
 FINAL CLASS of MkBufferS with 1024 byte ILS-SizeMore...
 
struct  MkBufferStreamS
 The ABSTRACT-CLASS MkBufferStreamS is used for package-based serialized IOMore...
 
struct  MkBufferStream16384S
 FINAL CLASS of MkBufferStreamS with focus on Package-IOMore...
 
struct  MkBufferStream256S
 FINAL CLASS of MkBufferStreamS with focus on Transaction-IOMore...
 
struct  MkBufferStream64S
 FINAL CLASS of MkBufferStreamS with focus on Small-Data-Io (internal usage) … More...
 
struct  MkBufferStream1024S
 FINAL CLASS of MkBufferStreamS with focus on Medium-Data-Io (default in META) … More...
 
struct  MkBufferListS
 The CLASS used to store a list of MkBufferS items into a flat array… More...
 
struct  MkLogFileS
 define a MkLogFileC object … More...
 
struct  MkExtensionS
 Base class for the extension technologie … More...
 
struct  MkErrorS
 The data-type to store and handle the error-conditionMore...
 
struct  MkErrExtS
 extension-slot for MkErrorSMore...
 
struct  MkErrorPanicS
 signal-slot for panic on errorMore...
 
struct  MkErrorIgnoreS
 signal-slot for ignore on errorMore...
 
struct  MkErrorPrintS
 signal-slot for print on errorMore...
 
struct  MkErrorDefaultS
 signal-slot for default on errorMore...
 
struct  MkRtExtS
 extend the MkRuntimeS with a library specific extension. … More...
 
struct  MkRuntimeS
 The MkRuntimeS provide a per-thread environment for LibMkKernelMore...
 
struct  MkRuntimeCallbackS
 keep callback related data … More...
 

Macros

#define MK_HDL_NONNULL_ATTR_1
 
#define MK_ATTR_HDL
 
#define MK_ATTR_HDL_CHECK(x)   assert(x!=0)
 
#define META_USE_SELF_REFCOUNT
 
#define __parser__(...)
 
#define __parser__define__(...)
 
#define __parser__global__define__(...)
 
#define __parser__push__(...)
 
#define __parser__pop__
 
#define __parser__alias   ALIAS
 Use alias as public-api-name
 
#define __parser__argument   yes
 Mark argument as ordinary argument and NOT as instance …
 
#define __parser__arg_type   TYPE
 redefine an already defined argument-type to arg-type at POSITION (0,1,2,…) …
 
#define __parser__arg_name   NAME
 rename an already defined argument to arg-name at POSITION (0,1,2,…) …
 
#define __parser__callback   CALLBACK
 A CALLBACK is a piece of code calling back from the C-API into the Target-Programming-Language
 
#define __parser__cast   TYPE
 Force to cast into a TYPE of the method-argument
 
#define __parser__class   CLASS
 Force to use class as CLASS of the instance-method
 
#define __parser__const   yes
 Add the const prefix in front of the Target-Programming-Language public API method …
 
#define __parser__constructor   yes
 Mark the function as instance-constructor
 
#define __parser__default   VALUE
 Add a default to a function-argument …
 
#define __parser__default_args   LIST
 
#define __parser__destructor   yes
 Mark function as instance destructor
 
#define __parser__doc   DOC
 Use the doc section in the doxygen documentation …
 
#define __parser__doc_index   INDEX
 Add sub-index doc-index to the doc section …
 
#define __parser__doc_no   yes
 Do not write a doc entry into the doxygen documentation …
 
#define __parser__enum_is_flag   yes
 Add enum-is-flag feature to a enum
 
#define __parser__error_check   yes
 Verify the enum-return-value of a function using the enum-error-check-code
 
#define __parser__flags   FLAGS
 Add flags in front of the target-programming-language public API method …
 
#define __parser__has_reference   yes
 Force a reference-type overload to be defined by the Programming-Language-Micro-Kernel-Compiler
 
#define __parser__hide   LIST
 hide a function from the public-api
 
#define __parser__ignore   yes
 Mark OBJECT to be ignore - not used in public-api
 
#define __parser__ignore_error   yes
 Ignore the MkErrorE error-indicator
 
#define __parser__inline   INLINE
 add inline function as alternativ function …
 
#define __parser__internal   yes
 Set internal attribute to object (function, argument, variable …) - no public-api access …
 
#define __parser__keep   yes
 keep the function if the default-behaviour is to hide the function …
 
#define __parser__keep_destr   yes
 Do not replace the keep-destr destructor with the lng-destr default-destructor …
 
#define __parser__keep_original_type   yes
 Do not try to map the type of an argument into a Programming-Language-Micro-Kernel type …
 
#define __parser__library   NAME@TYPE@NAMESPACE
 Define the new library name, namespace and usage …
 
#define __parser__lng_constr   yes
 Define a constructor as the default-constructor
 
#define __parser__lng_destr   yes
 Replace all destructors with the lng-destr default-destructor …
 
#define __parser__lng_dispose   yes
 Mark a function to be the default-dispose function …
 
#define __parser__macro   yes
 Define that a declaration belongs to a macro
 
#define __parser__no_alias   yes
 Delete the alias attribute for function …
 
#define __parser__no_rpc   yes
 Do not create a rpc-call for this function …
 
#define __parser__no_static   yes
 Do not add the static attibute to the Target-Programming-Language-wrapper. …
 
#define __parser__no_type_extension   yes
 Disable the type-extension feature from function …
 
#define __parser__no_size   yes
 Hide the size information from the binary-object
 
#define __parser__null_return_allow   yes
 Allow the function to return a NULL (None) value …
 
#define __parser__null_return_check   yes
 Mark the function as pseudo-instance-constructor
 
#define __parser__overload   OVERLOAD
 Add an additional overload function to the original-function in the Target-Programming-Language
 
#define __parser__overload_c_no   yes
 do not create the overload for function in C
 
#define __parser__prefix   PREFIX
 Force prefix to be prefix
 
#define __parser__return_type   TYPE
 Replace an already defined return-type
 
#define __parser__runtime   FUNC-NAME
 Add a public API function FUNC-NAME for a runtime-aware function…
 
#define __parser__static   yes
 Force a function to be a class-methode even if Programming-Language-Micro-Kernel-Compiler would chose an instance-method
 
#define __parser__template_require   yes
 Require a predefined template to implement the function
 
#define __parser__template_overload   yes
 Assume a predefined template to implement the function
 
#define __parser__type   META@DESCRIPTION
 Define the meta-type for the public-type
 
#define __parser__type_attr   LIST
 Define additional argument-type-attributes
 
#define __parser__wrapper   yes
 Add a wrapper to the default value of a function-argument
 
#define __parser__refdoc   yes
 TODO.
 
#define __parser__reference   yes
 
#define __parser__method   yes
 
#define __parser__enum_accept_integer   int32/int64
 
#define __parser__global   ATTRIBUTE
 Add the global keyword to the Programming-Language-Micro-Kernel-Compiler
 
#define __parser__global__pattern2prefix   PATTERN:PREFIX
 Add PREFIX attribute to all functions found by PATTERN*
 
#define __parser__global__prefix2doc   PREFIX:DOC
 Set the doc attribute for all functions found by ^PREFIX(:?[A-Z].*)?$
 
#define __parser__global__prefix2class   PREFIX:CLASS
 Set the defgroup attribute for all functions starting with prefix
 
#define __parser__global__formatter   VARIABLE
 Set the formatter attribute to all arguments with name VARIABLE
 
#define __parser__global__hide   REGEXP
 Hide all functions fond by REGEXP
 
#define __parser__global__native2class   EXTERNAL-STRUCT:INTERNAL-CLASS@HANDEL-NAME
 Use native2class to link an external-struct with an internal-class
 
#define __parser__global__native2alias   NATIVE-PREFIX:WRAPPER-PREFIX
 Use the native2alias feature to map a native-function to a wrapper-function with Programming-Language-Micro-Kernel-Support
 
#define __parser__global__doc_force   CLASS_or_PACKAGE:INDEX:?local?
 Force the doyygen-index to be build even if no function is available …
 
#define __parser__global__doc_db   DIRECTORY
 Set directory for external documentation lookup…
 
#define __parser__global__error_check   ERROR_RETURN_ENUM
 Verify the enum-return-value of a function using the enum-error-check-code
 
#define MK_CLRCALL
 
#define MK_STDCALL
 
#define MK_CDECL
 
#define mk_inline   static inline
 
#define mk_unlink   unlink
 
#define mk_snprintf   snprintf
 
#define mk_attr_hot   __attribute__((hot))
 
#define mk_attr_cold   __attribute__((cold))
 
#define MK_DECL   MK_CDECL
 
#define BEGIN_MK_C_DECLS   /* empty */
 
#define END_MK_C_DECLS   /* empty */
 
#define likely(x)   __builtin_expect((x),1)
 
#define unlikely(x)   __builtin_expect((x),0)
 
#define mk_timeval   timeval
 
#define mk_timezone   timezone
 
#define MK_UNUSED   __attribute__((unused))
 mark unnused variables and functions
 
#define MkThreadLocal   __thread
 
#define MK_RT_IS_ARG   1
 
#define MK_RT_ARGS_ONLY   MK_RT mkrt
 
#define MK_RT_ARGS   MK_RT_ARGS_ONLY,
 
#define MK_RT_CALL_ONLY   mkrt
 
#define MK_RT_CALL   MK_RT_CALL_ONLY,
 
#define MK_RT_CALL_O(o)   MkRT_O(o),
 
#define MK_RT_CALL_X(x)   MkRT_X(x),
 
#define MK_RT_CALL_NULL_ONLY   MkRT
 
#define MK_RT_CALL_NULL   MK_RT_CALL_NULL_ONLY,
 
#define MK_RT_NULL   NULL,
 
#define MK_RT_PTR   mkrt
 
#define MK_RT_REF   (*mkrt)
 
#define MK_RT_UNUSED   MK_UNUSED
 
#define MK_RT_CALL_RT(ptr)   ptr,
 
#define MK_RT_PARSER_ONLY   MK_RT_ARGS_ONLY __parser__(internal,default=N#RUNTIME)
 
#define MK_RT_PARSER   MK_RT_PARSER_ONLY,
 
#define MK_RT_ATTR_NONNULL_1   __attribute__((nonnull(2)))
 
#define MK_RT_ATTR_NONNULL_2   __attribute__((nonnull(3)))
 
#define MK_RT_ATTR_FORMAT_1   __attribute__((format (printf, 2, 3)))
 
#define MK_RT_ATTR_FORMAT_2   __attribute__((format (printf, 3, 4)))
 
#define MK_RT_ATTR_FORMAT_4   __attribute__((format (printf, 5, 6)))
 
#define MK_RT_ATTR_RUNTIME
 
#define MK_RT_ATTR_HDL   __attribute__((nonnull(2)))
 
#define MK_RT_ATTR_HDL
 
#define MK_RT_ATTR_HDL_CHECK(x)   assert(x!=NULL)
 
#define MK_RT_ATTR_RUNTIME_CHECK_XN(x)   MkRtSetup_XN_RT(x)
 
#define MK_RT_ATTR_RUNTIME_CHECK_ON(x)   MkRtSetup_ON_RT(x)
 
#define MK_RT_ATTR_NONNULL_1_CHECK(x)   assert(x!=NULL)
 
#define MK_RT_ATTR_NONNULL_2_CHECK(x)   assert(x!=NULL)
 
#define META_DIR_SEPARATOR   '/'
 
#define META_EOL   "\n"
 
#define MK_EXTERN
 static library
 
#define MK_EXTERN_DATA   extern
 
#define MK_CPPXSTR(s)   MK_CPPSTR(s)
 connecting of expressions, step 1 …
 
#define MK_CPPSTR(s)   #s
 connecting of expressions, step 2 …
 
#define MK_CONCAT(a, b)   a ## b
 concat of expressions, step 2 …
 
#define MK_CONCAT2(a, b)   MK_CONCAT(a,b)
 
#define MK_CONCAT3(a, b, c)   a ## b ## c
 
#define mk_append_fix_str(t, s)   t=strcpy(t,s)+sizeof(s)-1
 append fix string to storage and increment pointer …
 
#define mk_bit_compare(t, f)   (t&f)==f
 bitwise compare flag values …
 
#define MK_ALFA   '@'
 MK_ALFA the command-line separator between server and client …
 
#define MK_ALFA_STR   ((MkStringR){1,"@"})
 MK_ALFA the command-line separator as string …
 
#define bool2str(_bool)   (_bool?"true":"false")
 
#define MK_FORMAT_N   "%i"
 
#define MkCacheItemS_signature   0x44196912
 
#define MkCacheS_name_size   32
 
#define MkCacheS_MkCacheItemS_size   8
 
#define MkSysFree(pointer)
 
#define MkSysFreeNonNull(pointer)   (*MkLal.SysFree)((MK_PTR)pointer)
 
#define MkSysStringIsEQUAL(str, other)   (strcmp(str,other) == 0)
 
#define MK_NULL_SIGNATURE   0
 signature used to mark an invalid signature …
 
#define MkObjRaise(_obj)
 raise an error if class-instance is not valid
 
#define MkOBJ_R(x)   (*(x)).super.obj
 cast a known-object into an MkObjectS reference
 
#define MkOBJ(x)   (&MkOBJ_R(x))
 cast a known-object into an MkObjectS pointer
 
#define MkTypeS_name_size   32
 
#define MkTYP_R(x)   (*(x)).super.typ
 cast a known-managed-object into an MkTypeS reference
 
#define MkTYP(x)   (&MkTYP_R(x))
 cast a known-managed-object into an MkTypeS pointer
 
#define MkTypeSlotResolve(tt, fptr, force)
 search and return functionPtr(slot) for the tt-type.
 
#define MkObjInit2(rtmkV, rtExtV, sigV, typeV, refCountV, isLocalV)
 Initialize an MkObjectS.
 
#define MkObjInit(rtmkV, rtExtV, cls, refCountV, isLocalV)    MkObjInit2(rtmkV,rtExtV,cls##_SIGNATURE,cls##_TT,refCountV,isLocalV)
 
#define MkObjInitFromType(typeV, isLocalV)    MkObjInit2(MK_RT_PTR, NULL, (*typeV).objsig, typeV, 0, isLocalV)
 
#define MkObjInitFromInstance(instV)    MkObjInit2(MK_RT_PTR, NULL, MkOBJ_R(instV).type->objsig, MkOBJ_R(instV).type, 0, false)
 
#define MkObjectDelete_NULL(obj)   MkObjectDeleteToNull(MkObjectDelete_RT,obj)
 
#define MkObjectDelete_NULL_X(x)   MkObjectDeleteToNull_X(MkObjectDelete_RT,x)
 
#define MkObjectDelete_1X(x)   MkObjectDeleteToNull_X(MkObjectDelete_RT,x)
 
#define MkObjectDeleteToNull(fct, x)   if (x) { fct (MK_RT_CALL x); (x) = NULL ; }
 
#define MkObjectDeleteToNull_X(fct, x)   if (x) { fct (MK_RT_CALL MkOBJ(x)); (x) = NULL ; }
 
#define MkObjectDispose_NULL(obj)   MkObjectDeleteToNull(MkObjectDispose_RT,obj)
 
#define MkObjectDispose_NULL_X(x)   MkObjectDeleteToNull_X(MkObjectDispose_RT,x)
 
#define MkObjectDispose_1X(x)   MkObjectDispose_RT(MkOBJ(x))
 
#define MkObjectToName_1X(x)   MkObjectToName(MkOBJ(x))
 
#define MkObjectToNameOfType_1X(x)   MkObjectToNameOfType(MkOBJ(x))
 
#define MkObjectToNameOfClass_1X(x)   MkObjectToNameOfClass_RT(MK_RT_CALL MkOBJ(x))
 
#define MkObjectToString_1X(x)   MkObjectToString(MkOBJ(x))
 
#define MkObjectToString_1M(m)   MkObjectToString(MkObjN(m))
 
#define MkObjectToHandle_1X(x)   MkObjectToHandle(MkOBJ(x))
 
#define MkLogC_4X(x, message, debug, callfunc)   MkLogC(MkOBJ(x),message,debug,callfunc)
 
#define MkLogC_3X(x, message, debug)   MkLogC_3(MkOBJ(x),message,debug)
 
#define MkLogC_2X(x, message)   MkLogC_2(MkOBJ(x),message)
 
#define MkLogW(x, callfunc, _debug, message)   MkLogC(MkOBJ(x),message,_debug,callfunc)
 
#define MkLogV_lvl(x, debug, printfmt, ...)   MkLogV(MkOBJ(x),__func__,debug,printfmt,__VA_ARGS__)
 
#define MkLogV_4M(x, callfunc, debug, printfmt, ...)   MkLogV(MkObjN(x),callfunc,debug,printfmt,__VA_ARGS__)
 
#define MkLogV_4X(x, callfunc, debug, printfmt, ...)   MkLogV(MkOBJ(x),callfunc,debug,printfmt,__VA_ARGS__)
 
#define MkLogV_3X(x, callfunc, printfmt, ...)   MkLogV_3(MkOBJ(x),callfunc,printfmt,__VA_ARGS__)
 
#define MkLogV_2X(x, printfmt, ...)   MkLogV_2(MkOBJ(x),printfmt,__VA_ARGS__)
 
#define MkLogVL_5X(fmtobj, callfunc, debug, printfmt, var_list)    MkLogVL(MkOBJ(fmtobj),callfunc,debug,printfmt,var_list)
 
#define MkDDInit   const MK_INT __dbg = MK_RT_REF.debug
 
#define MkDDInitNum(n)   const MK_INT __dbg = n
 
#define MkLogHEX_4X(fmtobj, callfunc, data, len)   MkLogHEX_RT(MkOBJ(fmtobj),callfunc,data,len)
 
#define MkObjectLogSimple_1X(x)   MkObjectLogSimple(MkOBJ(x),NULL,0,__func__,0)
 
#define MkObjectLogDetail_1X(x)   MkObjectLogDetail(MkOBJ(x),NULL,0,__func__,0)
 
#define MkObjectLogDetail_1M(m)   MkObjectLogDetail(MkObj(m),NULL,0,__func__,0)
 
#define MkObjectLog_1X(x)   MkObjectLog(MkOBJ(x),NULL,0,__func__,0)
 
#define MkDbgL_2M(x, message)   MkDbgL(MkObj(x),message,0,__func__,-1)
 
#define MkDbgDump_2M(x, message)   MkDbgDump_2(MkObj(x),message)
 
#define MkDbgSTACK_3X(x, num, callfunc)   MkDbgSTACK_3(MkOBJ(x),num,callfunc)
 
#define MkDbgO_2X(x, callfunc)   MkDbgO(MkOBJ(x),callfunc)
 
#define MkDbgO_1X(x)   MkDbgO_2X(x,__func__)
 
#define MkDbgLogC_2X(x, callfunc)   MkDbgLogC_2(MkOBJ(x),callfunc)
 debug: write a short-obj-summary to MkLogFileC (default: stderr) …
 
#define MkBufferS_ils_size   0
 ILS size
 
#define MkBufRaise(_buf)
 raise an error if class-instance is not valid
 
#define MkBUF_R(x)   (*(x)).super.buf
 cast a known-object into an MkBufferS reference
 
#define MkBUF(x)   (&MkBUF_R(x))
 cast a known-object into an MkBufferS pointer
 
#define MkBuffer64S_ils_size   (64)
 ILS size 64
 
#define MkBuffer256S_ils_size   (256)
 ILS size 256
 
#define MkBuffer1024S_ils_size   (1024)
 ILS size 1024
 
#define MkString2O(s, l, r)   MkString2BOL_RT(MK_RT_CALL s,l,r)
 
#define MkString2Y(s, l, r)   MkString2BYT_RT(MK_RT_CALL s,l,r)
 
#define MkString2S(s, l, r)   MkString2SRT_RT(MK_RT_CALL s,l,r)
 
#define MkString2US(s, l, r)   MkString2USS_RT(MK_RT_CALL s,l,r)
 
#define MkString2I(s, l, r)   MkString2INT_RT(MK_RT_CALL s,l,r)
 
#define MkString2UI(s, l, r)   MkString2USI_RT(MK_RT_CALL s,l,r)
 
#define MkString2W(s, l, r)   MkString2WID_RT(MK_RT_CALL s,l,r)
 
#define MkString2X(s, l, r)   MkString2LLG_RT(MK_RT_CALL s,l,r)
 
#define MkString2F(s, l, r)   MkString2FLT_RT(MK_RT_CALL s,l,r)
 
#define MkString2D(s, l, r)   MkString2DBL_RT(MK_RT_CALL s,l,r)
 
#define MkBufferCreateTLS_T(cls, name, size)
 
#define MkBufferCreateLOCAL_T(cls, n, s)
 
#define MkBufferGetBYT(b, o)   MkBufferGetY(b,o)
 
#define MkBufferGetBOL(b, o)   MkBufferGetO(b,o)
 
#define MkBufferGetSRT(b, o)   MkBufferGetS(b,o)
 
#define MkBufferGetUSS(b, o)   MkBufferGetUS(b,o)
 
#define MkBufferGetINT(b, o)   MkBufferGetI(b,o)
 
#define MkBufferGetUSI(b, o)   MkBufferGetUI(b,o)
 
#define MkBufferGetFLT(b, o)   MkBufferGetF(b,o)
 
#define MkBufferGetWID(b, o)   MkBufferGetW(b,o)
 
#define MkBufferGetLLG(b, o)   MkBufferGetLL(b,o)
 
#define MkBufferGetDBL(b, o)   MkBufferGetD(b,o)
 
#define MkBufferLogS_2V(buf, fmt)   MkBufferLogS_3(buf,#fmt,MkOBJ(fmt))
 
#define MkBufferStreamS_ils_size   0
 
#define MkBusRaise(_bus)
 raise an error if class-instance is not valid
 
#define MkBUS_R(x)   (*(x)).super.bus
 cast a known-object into an MkBufferStreamS reference
 
#define MkBUS(x)   (&MkBUS_R(x))
 cast a known-object into an MkBufferStreamS pointer
 
#define MkBufferStream16384S_ils_size   (16384)
 ILS size = 16384
 
#define MkBufferStream256S_ils_size   (256)
 ILS size = 256
 
#define MkBufferStream64_ils_size   (64)
 ILS size = 64
 
#define MkBufferStream1024_ils_size   (1024)
 ILS size = 1024
 
#define MkBufferStreamCreateLOCAL_T(cls, name, size)
 
#define MkBufferStreamCreateSTATIC_T(cls, name)
 
#define MkBufferStreamCreateTLS_T(cls, name)
 
#define MkBufferStreamLog_5F(bus, fmt, ...)   MkBufferStreamLog(bus,MkObj(fmt),__VA_ARGS__)
 
#define MkBufferStreamLog_2F(bus, fmt)   MkBufferStreamLog_5F(bus,fmt,0,__func__,0)
 
#define MkBufferStreamLog_3F(bus, fmt, pfx)   MkBufferStreamLog_5F(bus,fmt,0,pfx,0)
 
#define MkBufferListS_bls_size   32
 ILS size
 
#define MkBflRaise(_bfl)
 raise an error if class-instance is not valid
 
#define MkBFL_R(x)   (*(x)).super.bfl
 cast a known-object into an MkBufferListS reference
 
#define MkBFL(x)   (&MkBFL_R(x))
 cast a known-object into an MkBufferListS pointer
 
#define MkBufferListCreateTLS_T(name, num)
 
#define MkBufferListCreateTLS_inout_T(name, num, inout)
 
#define MkBufferListCreateSTATIC_T(name, num)
 
#define MkBufferListCreateLOCAL_T(name, num)
 
#define MkBufferListCheckOptionO_3E(bfl, opt, val_out)   MkErrorCheck(MkBufferListCheckOptionO(bfl,opt,false,true,val_out))
 
#define MkBufferListCheckOptionI_3E(bfl, opt, val_out)   MkErrorCheck(MkBufferListCheckOptionI(bfl,opt,0,true,val_out))
 
#define MkBufferListSizeI(bfl)   (bfl)->cursize
 
#define MkLflRaise(_lfl)
 raise an error if class-instance is not valid
 
#define MkLFL_R(x)   (*(x)).super.lfl
 cast a known-object into an MkLogFileS reference
 
#define MkLFL(x)   (&MkLFL_R(x))
 cast a known-object into an MkLogFileS pointer
 
#define MkLogFileOpen_3M(errobj, file, lfh_out)   MkLogFileOpen(MkOBJ(x),file,lfh_out)
 
#define MkExtRaise(_ext)
 raise an error if class-instance is not valid
 
#define MkEXT_R(x)   (*(x)).super.ext
 cast a known-object into an MkExtensionS reference
 
#define MkEXT(x)   (&MkEXT_R(x))
 cast a known-object into an MkExtensionS pointer
 
#define MkErrRaise(_err)
 raise an error if class-instance is not valid
 
#define MkERR_R(x)   (*(x)).super.err
 cast a known-object into an MkErrorS reference
 
#define MkERR(x)   (&MkERR_R(x))
 cast a known-object into an MkErrorS pointer
 
#define MK_ERREXT_ARGS   MK_RT_ARGS MK_ERR const mkerr, MK_ERREXT const errext
 
#define MK_ERREXT_CALL   MK_RT_CALL err, errext
 
#define MK_ERREXT_ARGS_N   MK_RT_ARGS MK_ERRN const mkerr, MK_ERREXT const errext
 
#define MK_ERREXT_CALL_N   MK_RT_CALL err, errext
 
#define MkErrExtRaise(_errext)
 raise an error if class-instance is not valid
 
#define MkERREXT_R(x)   (*(x)).super.errext
 cast a known-object into an MkErrExtS reference
 
#define MkERREXT(x)   (&MkERREXT_R(x))
 cast a known-object into an MkErrExtS pointer
 
#define MkErrExtAdd(_mkerrR, add)
 
#define MkErrExtDel(_mkerrR, del)
 
#define MkErrorGetCodeI(e)   ((*e).code)
 get the value of MkErrorS::code
 
#define MkErrorGetCodeE_NULL()   (MkERROR_NULL.code)
 get the value of MkErrorS::code
 
#define MkErrorGetCode_O(o)   (MkERROR_O(o).code)
 get the value of MkErrorS::code
 
#define MkErrorGetTextI(e)   (MkBUF_R(&(*e).text).storage.first.C)
 get the MkErrorS::text
 
#define MkErrorGetSizeI(e)   ((MK_SIZE)MkBUF_R(&(*e).text).var.cursize)
 get the error-message-size from the exception-object
 
#define MkErrorGetNumI(e)   ((*e).num)
 get the MkErrorS::num. The number can be used as exit-code …
 
#define MkErrorCheck(err)   if (MkErrorCheckI(err)) goto error
 check return-code and goto error on error …
 
#define MkErrorE_Check(err)   if (MkErrorCheckI(err)) goto error
 check return-code and goto error on error …
 
#define MkErrorCheck_RT()   if (MkErrorCheckE_RT()) goto error
 check return-code and goto error on error …
 
#define MkErrorBreak(err)   if (MkErrorCheckI(err)) break
 check return-code and break on error …
 
#define MkContinueCheck(err)
 check on MK_ERROR and MK_CONTINUE - jump to label …
 
#define MkErrorSwitch(PROC)
 process error message …
 
#define MkErrorReturnAppend(PROC)
 process error message …
 
#define MkErrorReturnX(mngx, PROC)
 process error message …
 
#define MkErrorReturn(PROC)   MkErrorReturnX(META_CONTEXT_S,PROC)
 process error message …
 
#define check_MkErrorE(PROC)   if (MkErrorCheckI(PROC))
 check MkErrorE macro …
 
#define MkPanicVL_5M(errobj, callfunc, errnum, printfmt, var_list)    MkPanicVL(MkObj(errobj),callfunc,errnum,printfmt,var_list)
 
#define MkPanicV_4M(errobj, callfunc, errnum, printfmt, ...)    MkPanicV(MkObj(errobj),callfunc,errnum,printfmt,__VA_ARGS__)
 
#define MkPanicV_2M(x, printfmt, ...)    MkPanicV_2(MkObj(x),printfmt,__VA_ARGS__)
 
#define MkPanicC_4M(errobj, callfunc, errnum, message)    MkPanicC(MkObj(errobj),callfunc,errnum,message)
 
#define MkPanicC_2M(x, message)   MkPanicC_2(MkObj(x),message)
 
#define MkPanicSYS(mngx)
 do a panic with a system error message …
 
#define MkErrorSetC_1XS(message)   MkErrorSetC_4M(META_CONTEXT_S,message,__func__,-1)
 
#define MkErrorSetC_2E_E(caller, message)   MkErrorCheck(MkErrorSetC_2E(message,caller))
 
#define MkErrorSetC_NULL(...)   MkErrorSetC_RT(MK_RT_NULL __VA_ARGS__)
 
#define MkErrorSetC_4M_NULL(m, ...)   MkErrorSetC_NULL(MkErrorDEFAULT_1M(m),__VA_ARGS__)
 
#define MkErrorSetC_2M_NULL(m, message)   MkErrorSetC_4M_NULL(m,message,__func__,-1)
 
#define MkErrorSetV_4OE(o, ...)   MkErrorSetV_RT(MK_RT_CALL_O(o) MkErrorDEFAULT_1O(o), __VA_ARGS__)
 
#define MkErrorSetV_NULL(...)   MkErrorSetV_RT(MK_RT_NULL __VA_ARGS__)
 
#define MkErrorSetV_4M_NULL(m, ...)   MkErrorSetV_NULL(MkErrorDEFAULT_1M(m),__VA_ARGS__)
 
#define MkErrorSetV_2M_NULL(m, ...)   MkErrorSetV_4M_NULL(m,__func__,-1,__VA_ARGS__)
 
#define MkErrorSetV_2X(x, ...)   MkErrorSetV(MkErrorDEFAULT_1X(x),__func__,-1,__VA_ARGS__)
 
#define MkErrorSetV_1XS(printfmt, ...)    MkErrorSetV_4M(META_CONTEXT_S,__func__,-1,printfmt,__VA_ARGS__)
 
#define MkErrorSetV_2E_E(caller, printfmt, ...)    MkErrorCheck(MkErrorSetV_2E(caller,printfmt,__VA_ARGS__))
 
#define MkErrorSet_ObjectIsNullError(m, printfmt, ...)    MkErrorSetV_4M(m,"ObjectIsNullError",-1,printfmt,__VA_ARGS__)
 
#define MkErrorPrintln_0()   MkErrorPrintln(MkErrorPRINT())
 
#define MkErrorLog_1EF_NULL(fmt)   MkErrorLog(&MkERROR_NULL,MkObj(fmt),0,__func__,0)
 
#define MkObjectErrorCatch_3X(x, ...)   MkObjectErrorCatch(MkOBJ(x),__VA_ARGS__)
 inline for ObjectErrorCatch
 
#define MkErrorReset_0M()   MkErrorReset_4M(NULL,__func__,__LINE__,0);
 
#define MkErrorResetFORCE(m)   MkErrorReset_4M(m,__func__,__LINE__,1);
 
#define MkErrorReset_4X(x, ...)   MkErrorReset(MkErrorDEFAULT_1X(x),__VA_ARGS__)
 
#define MkErrorReset_1X(x)   MkErrorReset_4X(x,__func__,__LINE__,0)
 
#define MkErrorStack_E(m)   (MkErrorCheckE_RT() ? MkErrorStack_1M(m) : MkErrorGetCode_0E())
 
#define MkErrorStack_IE()   (MkErrorCheckE_RT() ? MkErrorStack_0E() : MkErrorGetCode_0E())
 
#define MkErrorStack_4X(x, ...)   MkErrorStack_RT(MK_RT_CALL MkErrorDEFAULT_1X(x),__VA_ARGS__)
 
#define MkErrorStack_3X(...)   MkErrorStack_4X(__VA_ARGS__,__LINE__)
 
#define MkErrorStack_2X(...)   MkErrorStack_4X(__VA_ARGS__,__FILE__,__LINE__)
 
#define MkErrorStack_1X(...)   MkErrorStack_4X(__VA_ARGS__,__func__,__FILE__,__LINE__)
 
#define MkErrorStack_NULL(...)   MkErrorStack_RT(MK_RT_NULL __VA_ARGS__)
 
#define MkErrorStack_4X_NULL(x, ...)   MkErrorStack_NULL(MkErrorDEFAULT_1X(x),__VA_ARGS__)
 
#define MkErrorStack_3X_NULL(...)   MkErrorStack_4X_NULL(__VA_ARGS__,__LINE__)
 
#define MkErrorStack_2X_NULL(...)   MkErrorStack_4X_NULL(__VA_ARGS__,__FILE__,__LINE__)
 
#define MkErrorStack_1X_NULL(...)   MkErrorStack_4X_NULL(__VA_ARGS__,__func__,__FILE__,__LINE__)
 
#define MkErrorStack_NUM   50
 
#define MkErrorStack_STR   "50"
 
#define MkRtExtRaise(_rtext)
 raise an error if class-instance is not valid
 
#define MkRTEXT_R(x)   (*(x)).super.rtext
 cast a known-object into an MkRtExtS reference
 
#define MkRTEXT(x)   (&MkRTEXT_R(x))
 cast a known-object into an MkRtExtS pointer
 
#define MkRtExtAdd(_mkrtR, add)
 
#define MkRtExtDel(_mkrtR, del)
 
#define MkRtRaise(_rt)
 raise an error if class-instance is not valid
 
#define MkRuntimeCallbackS_ident_size   30
 
#define MkObjectToError_1X(obj)   MkObjectToError(MkOBJ(obj))
 
#define META_TIMEOUT_REF   900
 
macros to support types
#define MkType_O   MK_BOL
 
#define MkType_Y   MK_BYT
 
#define MkType_S   MK_SRT
 
#define MkType_I   MK_INT
 
#define MkType_W   MK_WID
 
#define MkType_F   MK_FLT
 
#define MkType_D   MK_DBL
 
#define MkType_C   MK_STRN
 
#define MkType_B   MK_BIN
 
#define MkType_U   MK_BUF
 
#define MkType_L   MK_BFL
 
MkObjectC type check
#define __MkCheckTO(t, o)   (((*o).signature & (*t).objmask) == (*t).objsig)
 
#define _MkCheckTO(t, o)   ((o) && __MkCheckTO((t),(o)))
 
#define __MkCheckO(cls, o)   (((*o).signature & cls##_MASK) == cls##_SIGNATURE)
 
#define __MkCheckX(cls, x)   __MkCheckO(cls,(cls##_X2obj(x)))
 
#define _MkCheckX(cls, x)   ((x) && __MkCheckO(cls,(cls##_X2obj(x))))
 
#define __MkCheckM(cls, m)   __MkCheckO(cls,((MK_OBJ)(m)))
 
#define _MkCheckM(cls, m)   ((m) && __MkCheckM(cls,m))
 
#define MkCheckNN(cls, x)   __MkCheckO(cls,(cls##_X2obj(x)))
 
#define MkSanitizeCheck(_root, _m)   _MkCheckM(_root,_m)
 
#define toTT(_type)   (MkTYP(_type))
 
MkObjectC signature define
#define MkObjectC_SIGNATURE   (0x59B3u<<16)
 
#define MkObjectC_MASK   (((1u<<16)-1)<<16)
 
MkObjectC cast to superclass
#define MkObjectC_X2obj(x)   (x)
 
MkTypeC signature define
#define MkTypeC_SIGNATURE   (MkObjectC_SIGNATURE ^ (10u<<10))
 
#define MkTypeC_MASK   (((1u<<22)-1)<<10)
 
MkTypeC cast to superclass
#define MkTypeC_X2typ(x)   (x)
 
#define MkTypeC_X2obj(x)   MkOBJ(x)
 
MkDefTypeC signature define
#define MkDefTypeC_SIGNATURE   (MkTypeC_SIGNATURE ^ (1u<<6))
 
#define MkDefTypeC_MASK   (((1u<<26)-1)<<6)
 
MkDefTypeC cast to superclass
#define MkDefTypeC_X2typ(x)   MkTYP(x)
 
#define MkDefTypeC_X2obj(x)   MkOBJ(x)
 
evaluate CODE in debug …

_debug

#define MkDCheck(_debug)   if (unlikely(MK_RT_REF.debug >= _debug))
 
#define MkDDCheck(_debug)   if (unlikely(__dbg >= _debug))
 
log a plain string …
Parameters
[in]fmtobjmanaged object used to format the log-message (default=NULL = use default format) _debug
strthe message to log
#define MkDLogC_O(fmtobj, _debug, str)    if (unlikely(MK_RT_REF.debug >= _debug)) MkLogC(fmtobj,str,_debug,__func__)
 
#define MkDLogC(x, _debug, str)   MkDLogC_O(MkOBJ(x),_debug,str)
 
#define MkDDLogC(x, _debug, str)    if (unlikely(__dbg >= _debug)) MkLogC_4X(x,str,_debug,__func__)
 
log a vararg string using formatting and checking for logging debug …
Parameters
[in]fmtobjmanaged object used to format the log-message (default=NULL = use default format) _debug
[in]printfmtis a c-string used as printf like format string
...vararg string argument
#define MkDLogV_O(fmtobj, _debug, printfmt, ...)    if (unlikely(MK_RT_REF.debug >= _debug)) MkLogV(fmtobj,__func__,_debug,printfmt,__VA_ARGS__)
 
#define MkDLogV(x, _debug, printfmt, ...)   MkDLogV_O(MkOBJ(x),_debug,printfmt,__VA_ARGS__)
 
#define MkDDLogV(fmtobj, _debug, printfmt, ...)    if (unlikely(__dbg >= _debug)) MkLogV_4M(fmtobj,__func__,_debug,printfmt,__VA_ARGS__)
 
MkBufferC signature define
#define MkBufferC_SIGNATURE   (MkObjectC_SIGNATURE ^ (1u<<10))
 
#define MkBufferC_MASK   (((1u<<22)-1)<<10)
 
MkBufferC cast to superclass
#define MkBufferC_X2buf(x)   (x)
 
#define MkBufferC_X2obj(x)   MkOBJ(x)
 
MkBuffer64C signature define
#define MkBuffer64C_SIGNATURE   (MkBufferC_SIGNATURE ^ (1u<<6))
 
#define MkBuffer64C_MASK   (((1u<<26)-1)<<6)
 
MkBuffer64C cast to superclass
#define MkBuffer64C_X2buf(x)   MkBUF(x)
 
#define MkBuffer64C_X2obj(x)   MkOBJ(x)
 
MkBuffer256C signature define
#define MkBuffer256C_SIGNATURE   (MkBufferC_SIGNATURE ^ (2u<<6))
 
#define MkBuffer256C_MASK   (((1u<<26)-1)<<6)
 
MkBuffer256C cast to superclass
#define MkBuffer256C_X2buf(x)   MkBUF(x)
 
#define MkBuffer256C_X2obj(x)   MkOBJ(x)
 
MkBuffer1024C signature define
#define MkBuffer1024C_SIGNATURE   (MkBufferC_SIGNATURE ^ (3u<<6))
 
#define MkBuffer1024C_MASK   (((1u<<26)-1)<<6)
 
MkBuffer1024C cast to superclass
#define MkBuffer1024C_X2buf(x)   MkBUF(x)
 
#define MkBuffer1024C_X2obj(x)   MkOBJ(x)
 
MkBuf2TTfast

get a native PRIMITIVE TYPE from a MkBufferC

Attention
these function is only required in an non-alignment environment …
#define MkBuf2XXXfast(buf)   (*(buf)->storage.first.A)
 
#define MkBuf2BOLfast(buf)   MkBuf2XXXfast(buf).O
 
#define MkBuf2BYTfast(buf)   MkBuf2XXXfast(buf).Y
 
#define MkBuf2SRTfast(buf)   MkBuf2XXXfast(buf).S
 
#define MkBuf2INTfast(buf)   MkBuf2XXXfast(buf).I
 
#define MkBuf2WIDfast(buf)   MkBuf2XXXfast(buf).W
 
#define MkBuf2FLTfast(buf)   MkBuf2XXXfast(buf).F
 
#define MkBuf2DBLfast(buf)   MkBuf2XXXfast(buf).D
 
MkBuf2TT

get a native PRIMITIVE TYPE from a non-aligned MkBufferC

the alligned would be: ((*buf->storage.first.A).?)

#define MkBuf2XXX(xxx, len, buf)   ({MK_##xxx __tmp; memcpy(&__tmp,buf->storage.first.B,len); __tmp;})
 
#define MkBuf2BOL(buf)   MkBuf2XXX(BOL,1,buf)
 
#define MkBuf2BYT(buf)   MkBuf2XXX(BYT,1,buf)
 
#define MkBuf2SRT(buf)   MkBuf2XXX(SRT,2,buf)
 
#define MkBuf2INT(buf)   MkBuf2XXX(INT,4,buf)
 
#define MkBuf2WID(buf)   MkBuf2XXX(WID,8,buf)
 
#define MkBuf2FLT(buf)   MkBuf2XXX(FLT,4,buf)
 
#define MkBuf2DBL(buf)   MkBuf2XXX(DBL,8,buf)
 
#define MkBuf2Ptr(len, ptr, buf)   memcpy((void*)ptr,buf->storage.first.B,len)
 
#define MkBuf2BOL_P(ptr, buf)   MkBuf2Ptr(1,ptr,buf)
 
#define MkBuf2BYT_P(ptr, buf)   MkBuf2Ptr(1,ptr,buf)
 
#define MkBuf2SRT_P(ptr, buf)   MkBuf2Ptr(2,ptr,buf)
 
#define MkBuf2INT_P(ptr, buf)   MkBuf2Ptr(4,ptr,buf)
 
#define MkBuf2WID_P(ptr, buf)   MkBuf2Ptr(8,ptr,buf)
 
#define MkBuf2FLT_P(ptr, buf)   MkBuf2Ptr(4,ptr,buf)
 
#define MkBuf2DBL_P(ptr, buf)   MkBuf2Ptr(8,ptr,buf)
 
#define MkBuf2Ptr_A(l, a, b)   memcpy(a.B##l,b->storage.first.B,l)
 
#define MkBuf2BOL_A(ato, buf)   MkBuf2Ptr_A(1,ato,buf)
 
#define MkBuf2BYT_A(ato, buf)   MkBuf2Ptr_A(1,ato,buf)
 
#define MkBuf2SRT_A(ato, buf)   MkBuf2Ptr_A(2,ato,buf)
 
#define MkBuf2INT_A(ato, buf)   MkBuf2Ptr_A(4,ato,buf)
 
#define MkBuf2WID_A(ato, buf)   MkBuf2Ptr_A(8,ato,buf)
 
#define MkBuf2FLT_A(ato, buf)   MkBuf2Ptr_A(4,ato,buf)
 
#define MkBuf2DBL_A(ato, buf)   MkBuf2Ptr_A(8,ato,buf)
 
MkBufferStreamC signature define
#define MkBufferStreamC_SIGNATURE   (MkBufferC_SIGNATURE ^ (4u<<6))
 
#define MkBufferStreamC_MASK   (((1u<<26)-1)<<6)
 
MkBufferStreamC cast to superclass
#define MkBufferStreamC_X2bus(x)   (x)
 
#define MkBufferStreamC_X2buf(x)   MkBUF(x)
 
#define MkBufferStreamC_X2obj(x)   MkOBJ(x)
 
MkBufferStream16384C signature define
#define MkBufferStream16384C_SIGNATURE   (MkBufferStreamC_SIGNATURE ^ (1u<<3))
 
#define MkBufferStream16384C_MASK   (((1u<<29)-1)<<3)
 
MkBufferStream16384C cast to superclass
#define MkBufferStream16384C_X2bus(x)   MkBUS(x)
 
#define MkBufferStream16384C_X2buf(x)   MkBUF(x)
 
#define MkBufferStream16384C_X2obj(x)   MkOBJ(x)
 
MkBufferStream256C signature define
#define MkBufferStream256C_SIGNATURE   (MkBufferStreamC_SIGNATURE ^ (2u<<3))
 
#define MkBufferStream256C_MASK   (((1u<<29)-1)<<3)
 
MkBufferStream256C cast to superclass
#define MkBufferStream256C_X2bus(x)   MkBUS(x)
 
#define MkBufferStream256C_X2buf(x)   MkBUF(x)
 
#define MkBufferStream256C_X2obj(x)   MkOBJ(x)
 
MkBufferStream64C signature define
#define MkBufferStream64C_SIGNATURE   (MkBufferStreamC_SIGNATURE ^ (3u<<3))
 
#define MkBufferStream64C_MASK   (((1u<<29)-1)<<3)
 
MkBufferStream64C cast to superclass
#define MkBufferStream64C_X2bus(x)   MkBUS(x)
 
#define MkBufferStream64C_X2buf(x)   MkBUF(x)
 
#define MkBufferStream64C_X2obj(x)   MkOBJ(x)
 
MkBufferStream1024C signature define
#define MkBufferStream1024C_SIGNATURE   (MkBufferStreamC_SIGNATURE ^ (4u<<3))
 
#define MkBufferStream1024C_MASK   (((1u<<29)-1)<<3)
 
MkBufferStream1024C cast to superclass
#define MkBufferStream1024C_X2bus(x)   MkBUS(x)
 
#define MkBufferStream1024C_X2buf(x)   MkBUF(x)
 
#define MkBufferStream1024C_X2obj(x)   MkOBJ(x)
 
Overload
#define MkBufferStreamCreate_1(size)   MkBufferStreamCreate(NULL,size)
 
#define MkErrorSetCONTINUE_0E()   MkErrorSetCONTINUE(&MkERROR)
 
#define MkErrorPrintln_1M(m)   MkErrorPrintln(MkErrorDEFAULT_1M(m))
 
MkBufferListC signature define
#define MkBufferListC_SIGNATURE   (MkObjectC_SIGNATURE ^ (2u<<10))
 
#define MkBufferListC_MASK   (((1u<<22)-1)<<10)
 
MkBufferListC cast to superclass
#define MkBufferListC_X2bfl(x)   (x)
 
#define MkBufferListC_X2obj(x)   MkOBJ(x)
 
MkLogFileC signature define
#define MkLogFileC_SIGNATURE   (MkObjectC_SIGNATURE ^ (3u<<10))
 
#define MkLogFileC_MASK   (((1u<<22)-1)<<10)
 
MkLogFileC cast to superclass
#define MkLogFileC_X2lfl(x)   (x)
 
#define MkLogFileC_X2obj(x)   MkOBJ(x)
 
MkExtensionC signature define
#define MkExtensionC_SIGNATURE   (MkObjectC_SIGNATURE ^ (8u<<10))
 
#define MkExtensionC_MASK   (((1u<<22)-1)<<10)
 
MkExtensionC cast to superclass
#define MkExtensionC_X2ext(x)   (x)
 
#define MkExtensionC_X2obj(x)   MkOBJ(x)
 
MkErrorC signature define
#define MkErrorC_SIGNATURE   (MkObjectC_SIGNATURE ^ (4u<<10))
 
#define MkErrorC_MASK   (((1u<<22)-1)<<10)
 
MkErrorC cast to superclass
#define MkErrorC_X2err(x)   (x)
 
#define MkErrorC_X2obj(x)   MkOBJ(x)
 
MkErrExtC signature define
#define MkErrExtC_SIGNATURE   (MkExtensionC_SIGNATURE ^ (1u<<6))
 
#define MkErrExtC_MASK   (((1u<<26)-1)<<6)
 
MkErrExtC cast to superclass
#define MkErrExtC_X2errext(x)   (x)
 
#define MkErrExtC_X2ext(x)   MkEXT(x)
 
#define MkErrExtC_X2obj(x)   MkOBJ(x)
 
MkErrorPanicC signature define
#define MkErrorPanicC_SIGNATURE   (MkObjectC_SIGNATURE ^ (7u<<10))
 
#define MkErrorPanicC_MASK   (((1u<<22)-1)<<10)
 
MkErrorPanicC cast to superclass
#define MkErrorPanicC_X2obj(x)   MkOBJ(x)
 
MkErrorIgnoreC signature define
#define MkErrorIgnoreC_SIGNATURE   (MkObjectC_SIGNATURE ^ (5u<<10))
 
#define MkErrorIgnoreC_MASK   (((1u<<22)-1)<<10)
 
MkErrorIgnoreC cast to superclass
#define MkErrorIgnoreC_X2obj(x)   MkOBJ(x)
 
MkErrorPrintC signature define
#define MkErrorPrintC_SIGNATURE   (MkObjectC_SIGNATURE ^ (6u<<10))
 
#define MkErrorPrintC_MASK   (((1u<<22)-1)<<10)
 
MkErrorPrintC cast to superclass
#define MkErrorPrintC_X2obj(x)   MkOBJ(x)
 
MkErrorDefaultC signature define
#define MkErrorDefaultC_SIGNATURE   (MkErrorC_SIGNATURE ^ (1u<<6))
 
#define MkErrorDefaultC_MASK   (((1u<<26)-1)<<6)
 
MkErrorDefaultC cast to superclass
#define MkErrorDefaultC_X2err(x)   MkERR(x)
 
#define MkErrorDefaultC_X2obj(x)   MkOBJ(x)
 
MkERROR

access the predefined error from MkRuntimeC as MK_ERR

#define MkERROR_R(r)   ((*r).error_mk)
 
#define MkERROR   MkERROR_R(&MK_RT_REF)
 
#define MkERROR_O(o)   MkERROR_R(MkRT_O(o))
 
#define MkERROR_X(x)   MkERROR_R(MkRT_X(x))
 
#define MkERROR_XN(x)   MkERROR_R(MkRT_XN(x))
 
#define MkERROR_NULL   MkERROR_R(&MkRuntimeRLS)
 
MkErrorCheck...

check on different aspects of an error …

Parameters
[in]mngxthe MkObjectS instance to work on
Returns
an boolean values… true or false
#define MkErrorCheckI(err)   ((err) >= MK_ERROR)
 
MkErrorCheck
Returns
on MK_OK and MK_CONTINUE return 0 and an MK_ERROR return 1
#define MkErrorCheckE_RT()   (MkErrorCheckI(MkErrorGetCode_0E()))
 
#define MkErrorCheckE_NULL()   (MkErrorCheckI(MkErrorGetCodeE_NULL()))
 
#define MkErrorCheckE_O(o)   (MkErrorCheckI(MkErrorGetCode_O(o)))
 
MkRtExtC signature define
#define MkRtExtC_SIGNATURE   (MkExtensionC_SIGNATURE ^ (2u<<6))
 
#define MkRtExtC_MASK   (((1u<<26)-1)<<6)
 
MkRtExtC cast to superclass
#define MkRtExtC_X2rtext(x)   (x)
 
#define MkRtExtC_X2ext(x)   MkEXT(x)
 
#define MkRtExtC_X2obj(x)   MkOBJ(x)
 
MkRuntimeC signature define
#define MkRuntimeC_SIGNATURE   (MkObjectC_SIGNATURE ^ (9u<<10))
 
#define MkRuntimeC_MASK   (((1u<<22)-1)<<10)
 
MkRuntimeC cast to superclass
#define MkRuntimeC_X2rt(x)   (x)
 
#define MkRuntimeC_X2obj(x)   MkOBJ(x)
 
MkRtSetup
#define MkRT   (&MkRuntimeRLS)
 
#define MkRT_R   (MkRuntimeRLS)
 
#define MkRT_O(o)   ((o) && (*o).objRt ? (*o).objRt : MkRuntimeGet())
 
#define MkRT_X(x)   ((x) && MkOBJ_R(x).objRt ? MkOBJ_R(x).objRt : MkRuntimeGet())
 
#define MkRT_ONN(o)   ((*o).objRt)
 
#define MkRT_ON(o)   ( (*o).objRt ? (*o).objRt : MkRuntimeGet())
 
#define MkRT_XN(x)   ( MkOBJ_R(x).objRt ? MkOBJ_R(x).objRt : MkRuntimeGet())
 
#define MkRtSetup_O(o)   MK_RT_UNUSED MK_RT const mkrt = MkRT_O(o)
 
#define MkRtSetup_X(x)   MK_RT_UNUSED MK_RT const mkrt = MkRT_X(x)
 
#define MkRtSetup_XN(x)   MK_RT_UNUSED MK_RT const mkrt = MkRT_XN(x)
 
#define MkRtSetup_ON(o)   MK_RT_UNUSED MK_RT const mkrt = MkRT_ON(o)
 
#define MkRtSetup_NULL   MK_RT_UNUSED MK_RT const mkrt = MkRuntimeGet();
 
#define MkRtSetup_RT(r)   MK_RT_UNUSED MK_RT const mkrt = r;
 
#define MkRtSetupFromRtExt(rtx)   MK_RT_UNUSED MK_RT const mkrt = MkRTEXT_R(rtx).mkrthead;
 
#define MkRtSetup_O_RT(o)   if (mkrt == NULL) mkrt = MkRT_O(o)
 
#define MkRtSetup_X_RT(x)   if (mkrt == NULL) mkrt = MkRT_X(x)
 
#define MkRtSetup_XN_RT(x)   if (mkrt == NULL) mkrt = MkRT_XN(x)
 
#define MkRtSetup_ON_RT(o)   if (mkrt == NULL) mkrt = MkRT_ON(o)
 
#define MkRtSetup_NULL_RT   if (mkrt == NULL) mkrt = MkRT
 

Typedefs

typedef void * MK_MACRO_TYP
 helper-type used to declare a prototype for a macro
 
typedef unsigned char MK_BOL
 1 byte boolean data-type
 
typedef signed char MK_BYT
 1 byte byte data-type
 
typedef signed short MK_SRT
 2 byte short data-type
 
typedef signed int MK_INT
 4 byte integer data-type
 
typedef float MK_FLT
 4 byte float data-type
 
typedef int64_t MK_WID
 8 byte wide integer data-type
 
typedef long MK_SIZE
 
typedef long long MK_LLG
 min 8 byte long long
 
typedef double MK_DBL
 8 byte double data-type
 
typedef long MK_LONG
 4/8 byte long data-type
 
typedef bool MK_BOOL
 real bool data-type
 
typedef union MkBufferAtomU MK_ATO
 8 byte atom data-type
 
typedef int32_t MK_NUM
 array size data-type ('num' items in array …
 
typedef int MK_DBG
 debug-level data-type …
 
typedef void MK_PTRB
 pointer type data-type
 
typedef char MK_STRB
 string type data-type
 
typedef unsigned char MK_BINB
 byte-array type data-type
 
typedef unsigned char MK_LSTB
 list type data-type
 
typedef MK_PTRBMK_PTR
 generic pointer data-type
 
typedef const MK_PTRBMK_PTRN
 const generic pointer data-type
 
typedef MK_PTRBMK_CCP
 class constructor/destructor data type
 
typedef MK_PTRBMK_CBP
 generic pointer to call-back data
 
typedef MK_STRBMK_STR
 string pointer data-type
 
typedef MK_PTRBMK_MNG
 managed object pointer, datatype will be checked on runtime
 
typedef const MK_PTRBMK_MNGN
 const - a managed object pointer, datatype will be checked on runtime
 
typedef MK_PTRB const * MK_EXP
 exception object pointer
 
typedef MK_PTRBMK_MXP
 MkExceptionC object pointer.
 
typedef const MK_STRBMK_STRN
 constant string pointer data-type
 
typedef MK_BINBMK_BIN
 byte-array pointer data-type
 
typedef MK_BINB const * MK_BINN
 const byte-array pointer data-type
 
typedef MK_LSTBMK_LST
 list pointer data-type
 
typedef MK_STRB const * MK_FST
 const format string pointer data-type
 
typedef unsigned int MK_SIG
 signature datatype
 
typedef struct MkBufferListSMK_BAC
 a list of 'buffer' as last argument in function …
 
typedef const struct MkBufferListSMK_BACN
 const - a list of 'buffer' as last argument in function …
 
typedef uintptr_t MK_IDNT
 process or thread identifier …
 
typedef MK_PTR(* MkCacheCF) (MK_RT const mkrt, MK_PTR const)
 
typedef void(* MkCacheDF) (MK_RT const mkrt, MK_PTR *const)
 
typedef void(* MkMarkF) (MK_RT const mkrt, MK_PTR data)
 prototype for a Garbage-Collection mark function …
 
typedef MK_PTR(* MkSysCallocF) (size_t, size_t)
 calloc syscall …
 
typedef MK_PTR(* MkSysMallocF) (size_t)
 malloc syscall …
 
typedef MK_STR(* MkSysStrDupF) (MK_STRN)
 strdup syscall …
 
typedef MK_STR(* MkSysStrNCpyF) (char *, const char *, size_t)
 strdup strncpy …
 
typedef MK_STR(* MkSysStrNDupF) (MK_STRN, size_t)
 strndup syscall …
 
typedef MK_PTR(* MkSysReallocF) (MK_PTR, size_t)
 realloc syscall …
 
typedef void(* MkSysFreeF) (MK_PTR)
 free syscall …
 
typedef pid_t(* MkSysForkF) (void)
 fork syscall …
 
typedef struct MkBufferStream16384S MkBufferStream16384R
 reference type of MkBufferStream16384S
 
typedef struct MkExtensionS MkExtensionS
 Base class for the extension technologie …
 
typedef bool(* MkErrorAppendF) (MK_ERREXT_ARGS, MK_OBJN const fmtobj)
 
typedef void(* MkErrorResetF) (MK_ERREXT_ARGS, MK_OBJN const fmtobj)
 
typedef bool(* MkErrorResetOnExitF) (MK_ERREXT_ARGS, MK_OBJN const fmtobj)
 
typedef void(* MkErrorPanikF) (MK_ERREXT_ARGS_N, MK_OBJN const errobj, MK_STRN const prefix, MK_INT const errnum, MK_STRN const fmt, va_list ap)
 MK_OBJN const errobj because of MK_ERROR_FORMAT value.
 
typedef void(* MkErrorLogF) (MK_ERREXT_ARGS_N, MK_OBJN const, MK_DBG const, MK_STRN const, MK_INT const, MK_STRN const, MK_OBJ const)
 
typedef MK_OBJN(* MkErrorFormatOfF) (MK_ERREXT_ARGS_N, int const dummy)
 
typedef void(* MkErrorSetRF) (MK_ERREXT_ARGS, MK_MNGN const errctx, MK_OBJN const fmtobj)
 
typedef void(* MkErrorSetEF) (MK_ERREXT_ARGS, MK_ERREXT const newerr, MK_OBJN const fmtobj)
 
typedef bool(* MkErrorSetVLF) (MK_ERREXT_ARGS, MK_OBJN const fmtobj, MK_STRN const)
 
typedef void(* MkErrorInit) (MK_ERREXT_ARGS, MK_OBJN const fmtobj)
 
typedef void(* MkRuntimeInitF) (struct MkRuntimeS *mkRt)
 additional runtime initialization function …
 
helper type for target language implementation
typedef void * MK_NAT_OBJECT
 
typedef void * MK_NAT_LIST
 
unsigned integer data-type
typedef uint64_t MK_USW
 
typedef unsigned int MK_USI
 
typedef unsigned short MK_USS
 
typedef unsigned char MK_USB
 
typedef unsigned long long MK_UXN
 
typedef unsigned long MK_ULN
 
MkObjectC


typedef struct MkObjectSMK_OBJ
 class-shortcut for struct MkObjectS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct MkObjectSMK_OBJN
 class-shortcut for const struct MkObjectS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct MkObjectS MK_OBJR
 reference-shortcut for struct MkObjectS, all shortcut using the XX_YYYR syntax (only for public API) …
 
MkBufferC


typedef struct MkBufferSMK_BUF
 class-shortcut for struct MkBufferS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct MkBufferSMK_BUFN
 class-shortcut for const struct MkBufferS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct MkBufferS MK_BUFR
 reference-shortcut for struct MkBufferS, all shortcut using the XX_YYYR syntax (only for public API) …
 
MkBufferStreamC


typedef struct MkBufferStreamSMK_BUS
 class-shortcut for struct MkBufferStreamS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct MkBufferStreamSMK_BUSN
 class-shortcut for const struct MkBufferStreamS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct MkBufferStreamS MK_BUSR
 reference-shortcut for struct MkBufferStreamS, all shortcut using the XX_YYYR syntax (only for public API) …
 
MkBufferListC


typedef struct MkBufferListSMK_BFL
 class-shortcut for struct MkBufferListS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct MkBufferListSMK_BFLN
 class-shortcut for const struct MkBufferListS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct MkBufferListS MK_BFLR
 reference-shortcut for struct MkBufferListS, all shortcut using the XX_YYYR syntax (only for public API) …
 
MkLogFileC


typedef struct MkLogFileSMK_LFL
 class-shortcut for struct MkLogFileS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct MkLogFileSMK_LFLN
 class-shortcut for const struct MkLogFileS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct MkLogFileS MK_LFLR
 reference-shortcut for struct MkLogFileS, all shortcut using the XX_YYYR syntax (only for public API) …
 
MkErrorC


typedef struct MkErrorSMK_ERR
 class-shortcut for struct MkErrorS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct MkErrorSMK_ERRN
 class-shortcut for const struct MkErrorS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct MkErrorS MK_ERRR
 reference-shortcut for struct MkErrorS, all shortcut using the XX_YYYR syntax (only for public API) …
 
MkExtensionC


typedef struct MkExtensionSMK_EXT
 class-shortcut for struct MkExtensionS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct MkExtensionSMK_EXTN
 class-shortcut for const struct MkExtensionS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct MkExtensionS MK_EXTR
 reference-shortcut for struct MkExtensionS, all shortcut using the XX_YYYR syntax (only for public API) …
 
MkErrExtC


typedef struct MkErrExtSMK_ERREXT
 class-shortcut for struct MkErrExtS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct MkErrExtSMK_ERREXTN
 class-shortcut for const struct MkErrExtS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct MkErrExtS MK_ERREXTR
 reference-shortcut for struct MkErrExtS, all shortcut using the XX_YYYR syntax (only for public API) …
 
MkRtExtC


typedef struct MkRtExtSMK_RTEXT
 class-shortcut for struct MkRtExtS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct MkRtExtSMK_RTEXTN
 class-shortcut for const struct MkRtExtS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct MkRtExtS MK_RTEXTR
 reference-shortcut for struct MkRtExtS, all shortcut using the XX_YYYR syntax (only for public API) …
 
MkRuntimeC


typedef struct MkRuntimeSMK_RT
 class-shortcut for struct MkRuntimeS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct MkRuntimeSMK_RTN
 class-shortcut for const struct MkRuntimeS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct MkRuntimeS MK_RTR
 reference-shortcut for struct MkRuntimeS, all shortcut using the XX_YYYR syntax (only for public API) …
 
MkTypeC


typedef struct MkTypeSMK_TYP
 class-shortcut for struct MkTypeS *, all shortcut using the XX_YYY syntax (only for public API) …
 
typedef const struct MkTypeSMK_TYPN
 class-shortcut for const struct MkTypeS *, all const shortcut using the XX_YYYC syntax (only for public API) …
 
typedef struct MkTypeS MK_TYPR
 reference-shortcut for struct MkTypeS, all shortcut using the XX_YYYR syntax (only for public API) …
 
MkObjectC slot definition
typedef MK_OBJ(* MkConstructorF) (MK_RT const mkrt, MK_TYP type, MK_PTR nat, MK_PTR lnk)
 
typedef void(* MkDestructorF) (MK_RT const mkrt, MK_OBJ const obj)
 
typedef MK_OBJ(* MkDupF) (MK_RT const mkrt, MK_OBJ const obj)
 
typedef MK_OBJ(* MkDup2F) (MK_RT const mkrt, MK_OBJ const obj, MK_STRN const ident)
 
typedef MK_OBJ(* MkMergeF) (MK_RT const mkrt, MK_OBJ const obj)
 
typedef MK_OBJ(* MkCopyF) (MK_RT const mkrt, MK_OBJ const obj, MK_OBJN const src)
 
typedef void(* MkResetF) (MK_RT const mkrt, MK_OBJ const obj)
 
typedef MK_PTR(* MkSelfCreateF) (MK_RT const mkrt, MK_OBJ const obj, MK_PTR const env)
 
typedef void(* MkSelfDeleteF) (MK_RT const mkrt, MK_PTR self, MK_PTR const env)
 
typedef void(* MkSelfUnlinkF) (MK_RT const mkrt, MK_PTR self, MK_PTR const env)
 
typedef void(* MkLogF) (MK_RT const mkrt, MK_OBJN const obj, MK_OBJ fmt, MK_INT const debug, MK_STRN const prefix, MK_INT const lvl)
 
typedef MK_STRN(* MkToStringF) (MK_RT const mkrt, MK_OBJN const obj)
 
typedef MK_PTR(* MkAllocCreateF) (MK_RT const mkrt, MK_TYP const type)
 
typedef void(* MkAllocDeleteF) (MK_RT const mkrt, MK_TYP const type, MK_PTR ptr)
 
typedef void(* MkTypeInitF) (MK_RT const mkrt, MK_TYP const type)
 
typedef bool(* MkLogFormatF) (MK_RT const mkrt, char *header, MK_SIZE const headerSize, MK_OBJN const obj, MK_STRN const caller, MK_INT const debug, MK_STRN const fmt)
 

Enumerations

enum  MkIdSE { MK_ID_UNUSED = 0 , MK_ID_PROCESS = 1 , MK_ID_THREAD = 2 }
 signal type of the MkIdS data valMore...
 

Functions

MkBinaryR MkBinaryCreate (MK_SIZE size, MK_BINN data)
 create a binary from data and size ...
 
MkBinaryR MkBinaryCreateSlice (MkBinaryR const bin, MK_SIZE start, MK_SIZE wide)
 create a binary slice ...
 
MkBinaryR MkBinaryDup (MkBinaryR const bin)
 create a binary as duplicate from an already existsing MkBinaryR ...
 
MK_BINN MkBinaryDataGet (MkBinaryR const bin)
 get data pointer from the binary ...
 
MK_SIZE MkBinarySizeGet (MkBinaryR const bin)
 get size from the binary ...
 
void MkBinaryLog (MkBinaryR const bin)
 log the binary ...
 
MkStringR MkStringCreate (MK_NUM len, MK_STRN str)
 create a string from ptr and len ...
 
MkStringR MkStringCreate_1 (MK_STRN str)
 
MkStringR MkStringDup (MkStringR const str)
 create a string as duplicate from an already existsing MkBinaryR ...
 
MK_STRN MkStringDataGet (MkStringR const str)
 get ptr pointer from the string ...
 
MK_NUM MkStringSizeGet (MkStringR const str)
 get len from the string ...
 
void MkStringLog (MkStringR const str)
 log the string ...
 
MK_EXTERN void MkSetup (void)
 setup libmkkernel internal memory …
 
MK_EXTERN void MkCleanup (void)
 cleanup libmkkernel internal memory …
 
MK_EXTERN bool MkHasThread (void)
 
MK_EXTERN bool MkHasFork (void)
 
MK_EXTERN MK_PTR MkSysCalloc (MK_OBJN const fmtobj, size_t const nmemb, size_t const size)
 calloc syscall with libmkkernel error plugin
 
MK_EXTERN MK_PTR MkSysMalloc (MK_OBJN const fmtobj, size_t const size)
 malloc syscall with libmkkernel error plugin
 
MK_EXTERN MK_STR MkSysStrDup (MK_OBJ const fmtobj, MK_STRN const str)
 strdup syscall with libmkkernel error plugin
 
MK_EXTERN MK_STR MkSysStrNDup (MK_OBJ const fmtobj, MK_STRN const str, MK_SIZE const len)
 strndup syscall with libmkkernel error plugin
 
MK_EXTERN enum MkErrorE MkSysStrNCpy (MK_OBJ const fmtobj, MK_STR const to, MK_STRN const from, MK_SIZE const len)
 strncpy syscall with libmkkernel error plugin
 
MK_EXTERN MK_PTR MkSysRealloc (MK_OBJ const fmtobj, MK_PTR const buf, size_t const size)
 realloc syscall with libmkkernel error plugin
 
MK_EXTERN MK_PTR MkSysReCalloc (MK_OBJN const fmtobj, MK_PTR const buf, MK_NUM const oldnum, MK_NUM const addnum, size_t const size)
 realloc syscall with libmkkernel error plugin
 
MK_EXTERN MK_PTR MkSysMemDup (MK_OBJN const fmtobj, MK_PTRN const blck, size_t const size)
 memdup syscall with libmkkernel error plugin
 
MK_EXTERN MK_STRN_A MkSysStringArrayDup (MK_OBJN const fmtobj, MK_STRN_A const strA)
 strdup syscall with libmkkernel error plugin
 
void MkSysFree (MK_PTR pointer)
 free syscall …
 
void MkSysFreeNonNull (MK_PTR pointer)
 
MK_EXTERN void MkSysFreeP (MK_PTR data)
 free syscall with libmkkernel error plugin
 
MK_EXTERN void MkSysPrintTrace_RT (MK_RT const mkrt, MK_OBJN fmtobj, MK_INT skip, MK_INT const num, MK_INT const debug, MK_STRN const callfunc, MK_INT const lvl)
 backtrace syscall with libmkkernel error plugin
 
enum MkErrorE MkSysWait (MK_OBJ const fmtobj, const struct MkIdS *idP)
 wait for process or thread syscall with libmkkernel error plugin
 
enum MkErrorE MkSysUSleep (MK_OBJ const fmtobj, useconds_t const usec)
 usleep syscall with libmkkernel error plugin
 
enum MkErrorE MkSysSleep (MK_OBJ const fmtobj, MK_INT const sec)
 sleep syscall with libmkkernel error plugin
 
void MkSysExit (int isThread, int num)
 exit syscall with libmkkernel error plugin
 
MK_EXTERN MK_STR MkSysBasename_RT (MK_RT const mkrt, MK_STRN const pathName, bool const includeExtension)
 basename syscall with libmkkernel error plugin
 
MK_EXTERN MK_STR MkSysDirname_RT (MK_RT const mkrt, MK_STRN const pathName)
 dirname syscall with libmkkernel error plugin
 
MK_EXTERN MK_STR MkSysPrintF_RT (MK_RT const mkrt, MK_STRN const format,...)
 sprintf syscall with libmkkernel error plugin
 
MK_EXTERN enum MkErrorE MkSysGetTimeOfDay (MK_OBJ const fmtobj, struct mk_timeval *tv_out, struct mk_timezone *tz_out)
 gettimeofday syscall with libmkkernel error plugin
 
MK_EXTERN enum MkErrorE MkSysKill (MK_OBJ const fmtobj, MK_INT pid, MK_INT signal)
 kill syscall with libmkkernel error plugin
 
MK_EXTERN enum MkErrorE MkSysGetPid (MK_OBJ const fmtobj, MK_INT *pid_out)
 getpid syscall with libmkkernel error plugin
 
bool MkSysStringIsNULL (MK_STRN str)
 test if string is NULL or EMPTY
 
bool MkSysStringIsNotNULL (MK_STRN str)
 test if string is NOT NULL or EMPTY
 
bool MkSysStringIsEQUAL (MK_STRN str, MK_STRN other)
 test if string(s) are euql …
 
MK_STRN MkSysStringGet (MK_STRN str)
 get string NULL or VALUE
 
MK_STRN MkSysStringGetNoNULL (MK_STRN str)
 get string "" or VALUE
 
MK_EXTERN MK_USI MkSysHash (MK_STRN key, MK_NUM length, MK_STR hex)
 compute the HASH from a string …
 
MK_OBJ MkObj (MK_MNG mng)
 cast a unknown-object into an MkObjectS pointer or NULL if not possible
 
MK_OBJN MkObjN (MK_MNGN mng)
 (const) cast a unknown-object into an MkObjectS pointer or NULL if not possible
 
MK_TYP MkTyp (const MK_MNG mng)
 type-check and cast a unknown-managed-object into an MkTypeS pointer or NULL if not possible
 
MK_TYPN MkTypN (const MK_MNGN mng)
 type-check and cast a unknown-managed-object into an MkTypeS pointer or NULL if not possible
 
MK_EXTERN MK_PTR MkTypeSlotResolveP (MK_RT const mkrt, MK_TYPN const type, size_t const offset, bool const force)
 hidden function for MkTypeSlotResolve
 
MK_EXTERN MK_OBJ MkObjDup_RT (MK_RT const mkrt, MK_OBJ const srcobj) MK_RT_ATTR_HDL
 call the Dup-Constructor from the object
 
MK_EXTERN MK_OBJ MkObjDup2_RT (MK_RT const mkrt, MK_OBJ const srcmng, MK_STRN const ident) MK_RT_ATTR_HDL
 call the Dup2-Constructor from the object
 
MK_EXTERN MK_OBJ MkObjMerge_RT (MK_RT const mkrt, MK_OBJ const obj) MK_RT_ATTR_HDL
 Constructor - create a new object as a merge from an existing object
 
MK_EXTERN MK_OBJ MkObjCreate_RT (MK_RT const mkrt, MK_TYP type, MK_PTR nat, MK_PTR lnk)
 call the Constructor from the object
 
MK_EXTERN void MkObjectDelete_RT (MK_RT const mkrt, MK_OBJ obj) MK_RT_ATTR_HDL
 Delete-Slot - delete an instance.
 
MK_EXTERN void MkObjectDispose_RT (MK_RT const mkrt, MK_OBJ obj) MK_RT_ATTR_HDL
 Dispose-Slot - untie the connection between the Native-C-Instance and the LibMsgque-Instance.
 
MK_EXTERN MK_OBJ MkObjCopy_RT (MK_RT const mkrt, MK_OBJ const tgtmng, MK_OBJN const srcmng) MK_RT_ATTR_HDL
 call the copy from the object
 
MK_EXTERN void MkObjReset_RT (MK_RT const mkrt, MK_OBJ const obj) MK_RT_ATTR_HDL
 free the internal memory of an object and initialize the local variables to default values
 
MK_EXTERN MK_STRN const MkObjectToName_RT (MK_RT const mkrt, MK_OBJN const obj) MK_RT_ATTR_HDL
 Info-Slot - returns brief information about the obj as a string
 
MK_EXTERN MK_STRN MkObjectToNameOfType_RT (MK_RT const mkrt, MK_OBJN const obj) MK_RT_ATTR_HDL
 Type-Slot - returns the LibMkKernel-Type-Name of the obj as a string
 
MK_EXTERN MK_STRN MkObjectToNameOfClass_RT (MK_RT const mkrt, MK_OBJ const obj) MK_RT_ATTR_HDL
 Class-Slot - returns the C-Class-Name of the obj as string
 
MK_EXTERN MK_STRN MkObjectToString_RT (MK_RT const mkrt, MK_OBJN const obj) MK_RT_ATTR_HDL
 String-Slot - returns the string representation of the obj
 
MK_ATTR_HDL MK_LONG MkObjectToHandle (MK_OBJ const obj)
 Export-Slot - returns a reference to the obj useable for external storage
 
MK_OBJ MkObjectFromHandle (MK_LONG const exporthdl)
 Import-Slot - returns a obj from a former exported handle
 
MK_EXTERN void MkLogC_RT (MK_RT const mkrt, MK_OBJN fmtobj, MK_STRN const message, MK_DBG const debug, MK_STRN const callfunc)
 write a logging-message to MkLogFileC (default: stderr) using the internal format …
 
MK_EXTERN void MkLogV_RT (MK_RT const mkrt, MK_OBJN fmtobj, MK_STRN const callfunc, MK_DBG debug, MK_FST const printfmt,...)
 write a printf style logging-message to MkLogFileC (default: stderr) using the internal format …
 
MK_EXTERN void MkLogVL_RT (MK_RT const mkrt, MK_OBJN fmtobj, MK_STRN const callfunc, MK_DBG debug, MK_FST const printfmt, va_list var_list)
 write a vprintf style logging-message to MkLogFileC using the internal format …
 
MK_EXTERN void MkLogHEX_RT (MK_RT const mkrt, MK_OBJN fmtobj, MK_STRN const callfunc, MkBinaryR const data)
 log binaray data as HEX into the MkLogFileC (default: stderr) …
 
MK_EXTERN void MkObjectLogSimple_RT (MK_RT const mkrt, MK_OBJN const obj, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_INT const lvl)
 log the MkObjectS into the MkLogFileC (default: stderr) …
 
MK_EXTERN void MkObjectLogDetail_RT (MK_RT const mkrt, MK_OBJN const obj, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_INT const lvl)
 log the MkObjectS verbose into the MkLogFileC (default: stderr) …
 
MK_EXTERN void MkObjectLog_RT (MK_RT const mkrt, MK_OBJN const obj, MK_OBJ fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_INT const lvl) MK_RT_ATTR_HDL
 Log-Slot - log the entire object to the MkLogFileC (default: stderr) target …
 
MK_EXTERN void MkDbgL_RT (MK_RT const mkrt, MK_OBJN fmtobj, MK_STRN const message, MK_DBG const debug, MK_STRN const callfunc, MK_INT const lvl) MK_RT_ATTR_HDL
 debug: write a instance-marker to the MkLogFileC (default: stderr) using the fmtobj as prefix …
 
MK_EXTERN enum MkErrorE MkDbgDump_RT (MK_RT const mkrt, MK_OBJN const obj, MK_STRN const message, MK_STRN const callfunc) MK_RT_ATTR_HDL
 debug: Dump a instance to stderr with LNG and MQ internal data…
 
MK_EXTERN void MkDbgM_RT (MK_RT const mkrt, MK_STRN const message, MK_DBG const debug, MK_STRN const callfunc, MK_INT const lvl)
 debug: write a static-marker to the MkLogFileC (default: stderr) …
 
MK_EXTERN void MkDbgSTACK_RT (MK_RT const mkrt, MK_OBJN const fmtobj, MK_INT const skip, MK_INT const num, MK_STRN const callfunc) MK_RT_ATTR_HDL
 debug: write the stack-trace to MkLogFileC (default: stderr) …
 
MK_EXTERN void MkDbgO_RT (MK_RT const mkrt, MK_OBJN const obj, MK_STRN const callfunc) MK_RT_ATTR_HDL
 idebug: write the object-details to MkLogFileC (default: stderr) …
 
MK_EXTERN void MkDbgLogC_RT (MK_RT const mkrt, MK_OBJN const obj, MK_STRN const callfunc) MK_RT_ATTR_HDL
 debug: write a short-obj-summary to MkLogFileC (default: stderr) …
 
MK_BUF MkBuf (MK_MNG mng)
 cast a unknown-object into an MkBufferS pointer or NULL if not possible
 
MK_BUFN MkBufN (MK_MNGN mng)
 (const) cast a unknown-object into an MkBufferS pointer or NULL if not possible
 
MK_EXTERN enum MkErrorE MkString2BOL_RT (MK_RT const mkrt, MK_STRN const str, MK_NUM const length, MK_BOL *val_out)
 convert a string into a native
 
MK_EXTERN enum MkErrorE MkString2BYT_RT (MK_RT const mkrt, MK_STRN const str, MK_NUM const length, MK_BYT *val_out)
 
MK_EXTERN enum MkErrorE MkString2SRT_RT (MK_RT const mkrt, MK_STRN const str, MK_NUM const length, MK_SRT *val_out)
 
MK_EXTERN enum MkErrorE MkString2USS_RT (MK_RT const mkrt, MK_STRN const str, MK_NUM const length, MK_USS *val_out)
 
MK_EXTERN enum MkErrorE MkString2INT_RT (MK_RT const mkrt, MK_STRN const str, MK_NUM const length, MK_INT *val_out)
 
MK_EXTERN enum MkErrorE MkString2USI_RT (MK_RT const mkrt, MK_STRN const str, MK_NUM const length, MK_USI *val_out)
 
MK_EXTERN enum MkErrorE MkString2WID_RT (MK_RT const mkrt, MK_STRN const str, MK_NUM const length, MK_WID *val_out)
 
MK_EXTERN enum MkErrorE MkString2LLG_RT (MK_RT const mkrt, MK_STRN const str, MK_NUM const length, MK_LLG *val_out)
 
MK_EXTERN enum MkErrorE MkString2FLT_RT (MK_RT const mkrt, MK_STRN const str, MK_NUM const length, MK_FLT *val_out)
 
MK_EXTERN enum MkErrorE MkString2DBL_RT (MK_RT const mkrt, MK_STRN const str, MK_NUM const length, MK_DBL *val_out)
 
MK_EXTERN enum MkErrorE MkString2LONG_RT (MK_RT const mkrt, MK_STRN const str, MK_NUM const length, MK_LONG *val_out)
 
MK_EXTERN enum MkErrorE MkString2BOOL_RT (MK_RT const mkrt, MK_STRN const str, MK_NUM const length, MK_BOOL *val_out)
 
MK_EXTERN enum MkErrorE MkString2ATO_RT (MK_RT const mkrt, MK_STRN const str, MK_NUM const length, enum MkTypeE type, MK_ATO *val_out)
 
MK_EXTERN MK_BUF MkBufferCreate_RT (MK_RT const mkrt, MK_TYP type, MK_NUM const size)
 Constructor - create a new MkBufferC with minimum size of internal storage …
 
MK_EXTERN MK_BUF MkBufferCreate64_RT (MK_RT const mkrt, MK_NUM const size)
 call the BufferCreate with default type MkBuffer64S (64 byte) …
 
MK_EXTERN MK_BUF MkBufferCreate256_RT (MK_RT const mkrt, MK_NUM const size)
 call the BufferCreate with default type MkBuffer256S (256 byte) …
 
MK_EXTERN MK_BUF MkBufferCreate1024_RT (MK_RT const mkrt, MK_NUM const size)
 call the BufferCreate with default type MkBuffer1024S (1024 byte) …
 
MK_EXTERN MK_BUF MkBufferCreateTLS_RT (MK_RT const mkrt, MK_INT const tlsid)
 same as BufferCreate but require no cleanup
 
void MkBufferCreateTLS_T (MK_MACRO_TYP cls, MK_MACRO_TYP name, MK_NUM const size)
 create an new MkBufferC object as T)hread L)ocal S)torage…
 
void MkBufferCreateLOCAL_T (MK_MACRO_TYP cls, MK_MACRO_TYP name, MK_NUM const size)
 create an new MkBufferC object as L)ocal S)torage…
 
MK_EXTERN MK_BUF MkBufferCreateY_RT (MK_RT const mkrt, MK_BYT const val)
 Constructor - create a new MkBufferC with an PRIMITIVE TYPE
 
MK_EXTERN MK_BUF MkBufferCreateO_RT (MK_RT const mkrt, MK_BOL const val)
 Constructor - create a new MkBufferC with an PRIMITIVE TYPE
 
MK_EXTERN MK_BUF MkBufferCreateS_RT (MK_RT const mkrt, MK_SRT const val)
 Constructor - create a new MkBufferC with an PRIMITIVE TYPE
 
MK_EXTERN MK_BUF MkBufferCreateI_RT (MK_RT const mkrt, MK_INT const val)
 Constructor - create a new MkBufferC with an PRIMITIVE TYPE
 
MK_EXTERN MK_BUF MkBufferCreateF_RT (MK_RT const mkrt, MK_FLT const val)
 Constructor - create a new MkBufferC with an PRIMITIVE TYPE
 
MK_EXTERN MK_BUF MkBufferCreateW_RT (MK_RT const mkrt, MK_WID const val)
 Constructor - create a new MkBufferC with an PRIMITIVE TYPE
 
MK_EXTERN MK_BUF MkBufferCreateD_RT (MK_RT const mkrt, MK_DBL const val)
 Constructor - create a new MkBufferC with an PRIMITIVE TYPE
 
MK_EXTERN MK_BUF MkBufferCreateC_RT (MK_RT const mkrt, MK_STRN const val)
 Constructor - create a new MkBufferC with an PRIMITIVE TYPE
 
MK_EXTERN MK_BUF MkBufferCreateB_RT (MK_RT const mkrt, MkBinaryR const val)
 Constructor - create a new MkBufferC with an PRIMITIVE TYPE
 
MK_EXTERN MK_BUF MkBufferCreateU_RT (MK_RT const mkrt, MK_BUFN const val)
 Constructor - create a new MkBufferC with an PRIMITIVE TYPE
 
MK_BUF MkBufferFromHandle (MK_LONG const exporthdl)
 Import-Slot - returns a obj from a former exported handle
 
MK_EXTERN void MkBufferFree_RT (MK_RT const mkrt, MK_BUF const buf) MK_RT_ATTR_HDL
 initialize or free an MkBufferC reference-instance
 
MK_EXTERN void MkBufferInit_RT (MK_RT const mkrt, MK_BUF const buf, MK_TYP type, MK_NUM const size) MK_RT_ATTR_HDL
 initialize or free an MkBufferC reference-instance
 
MK_EXTERN void MkBufferDelete_RT (MK_RT const mkrt, MK_BUF const buf) MK_RT_ATTR_HDL
 Destructor - delete a MkBufferC instance …
 
MK_EXTERN MK_BUF MkBufferDup_RT (MK_RT const mkrt, MK_BUFN const buf) MK_RT_ATTR_HDL
 Dup-Constructor - create a new MkBufferC instance as copy from an existing MkBufferC instance
 
MK_EXTERN MK_BUF MkBufferMerge_RT (MK_RT const mkrt, MK_BUF const buf) MK_RT_ATTR_HDL
 Merge-Constructor - create a new MkBufferC as a merge from an existing object …
 
MK_EXTERN enum MkErrorE MkBufferGetY_RT (MK_RT const mkrt, MK_BUFN const buf, MK_BYT *const val_out) MK_RT_ATTR_HDL
 get a val_out from a MkBufferC
 
MK_EXTERN enum MkErrorE MkBufferGetO_RT (MK_RT const mkrt, MK_BUFN const buf, MK_BOL *const val_out) MK_RT_ATTR_HDL
 get a val_out from a MkBufferC
 
MK_EXTERN enum MkErrorE MkBufferGetS_RT (MK_RT const mkrt, MK_BUFN const buf, MK_SRT *const val_out) MK_RT_ATTR_HDL
 get a val_out from a MkBufferC
 
MK_EXTERN enum MkErrorE MkBufferGetUS_RT (MK_RT const mkrt, MK_BUFN const buf, MK_USS *const val_out) MK_RT_ATTR_HDL
 get a val_out from a MkBufferC
 
MK_EXTERN enum MkErrorE MkBufferGetI_RT (MK_RT const mkrt, MK_BUFN const buf, MK_INT *const val_out) MK_RT_ATTR_HDL
 get a val_out from a MkBufferC
 
MK_EXTERN enum MkErrorE MkBufferGetUI_RT (MK_RT const mkrt, MK_BUFN const buf, MK_USI *const val_out) MK_RT_ATTR_HDL
 get a val_out from a MkBufferC
 
MK_EXTERN enum MkErrorE MkBufferGetF_RT (MK_RT const mkrt, MK_BUFN const buf, MK_FLT *const val_out) MK_RT_ATTR_HDL
 get a val_out from a MkBufferC
 
MK_EXTERN enum MkErrorE MkBufferGetW_RT (MK_RT const mkrt, MK_BUFN const buf, MK_WID *const val_out) MK_RT_ATTR_HDL
 get a val_out from a MkBufferC
 
MK_EXTERN enum MkErrorE MkBufferGetLL_RT (MK_RT const mkrt, MK_BUFN const buf, MK_LLG *const val_out) MK_RT_ATTR_HDL
 get a val_out from a MkBufferC
 
MK_EXTERN enum MkErrorE MkBufferGetD_RT (MK_RT const mkrt, MK_BUFN const buf, MK_DBL *const val_out) MK_RT_ATTR_HDL
 get a val_out from a MkBufferC
 
MK_EXTERN enum MkErrorE MkBufferGetB_RT (MK_RT const mkrt, MK_BUFN const buf, MkBinaryR *const val_out) MK_RT_ATTR_HDL
 get a val_out from a MkBufferC
 
MK_EXTERN enum MkErrorE MkBufferGetC_RT (MK_RT const mkrt, MK_BUFN const buf, MK_STRN *const val_out) MK_RT_ATTR_HDL
 get a val_out from a MkBufferC
 
MK_EXTERN enum MkErrorE MkBufferGetU_RT (MK_RT const mkrt, MK_BUF const buf, MK_BUF *const val_out) MK_RT_ATTR_HDL
 get a val_out from a MkBufferC
 
MK_EXTERN enum MkErrorE MkBufferGetL_RT (MK_RT const mkrt, MK_BUFN const buf, MK_BFL *val_inout) MK_RT_ATTR_HDL
 function to read an MkBufferListC from an MkBufferC object …
 
MK_EXTERN enum MkErrorE MkBufferGetLONG_RT (MK_RT const mkrt, MK_BUFN const buf, MK_LONG *const val_out) MK_RT_ATTR_HDL
 get a val_out from a MkBufferC
 
MK_EXTERN enum MkErrorE MkBufferGetBOOL_RT (MK_RT const mkrt, MK_BUFN const buf, MK_BOOL *const val_out) MK_RT_ATTR_HDL
 get a val_out from a MkBufferC
 
MK_EXTERN MK_BUF MkBufferSetY_RT (MK_RT const mkrt, MK_BUF const buf, MK_BYT const val) MK_RT_ATTR_HDL
 Set the MkBufferC to the val
 
MK_EXTERN MK_BUF MkBufferSetO_RT (MK_RT const mkrt, MK_BUF const buf, MK_BOL const val) MK_RT_ATTR_HDL
 Set the MkBufferC to the val
 
MK_EXTERN MK_BUF MkBufferSetS_RT (MK_RT const mkrt, MK_BUF const buf, MK_SRT const val) MK_RT_ATTR_HDL
 Set the MkBufferC to the val
 
MK_EXTERN MK_BUF MkBufferSetI_RT (MK_RT const mkrt, MK_BUF const buf, MK_INT const val) MK_RT_ATTR_HDL
 Set the MkBufferC to the val
 
MK_EXTERN MK_BUF MkBufferSetF_RT (MK_RT const mkrt, MK_BUF const buf, MK_FLT const val) MK_RT_ATTR_HDL
 Set the MkBufferC to the val
 
MK_EXTERN MK_BUF MkBufferSetW_RT (MK_RT const mkrt, MK_BUF const buf, MK_WID const val) MK_RT_ATTR_HDL
 Set the MkBufferC to the val
 
MK_EXTERN MK_BUF MkBufferSetD_RT (MK_RT const mkrt, MK_BUF const buf, MK_DBL const val) MK_RT_ATTR_HDL
 Set the MkBufferC to the val
 
MK_EXTERN MK_BUF MkBufferSetC_RT (MK_RT const mkrt, MK_BUF const buf, MK_STRN const val) MK_RT_ATTR_HDL
 Set the MkBufferC to the val
 
MK_EXTERN MK_BUF MkBufferSetB_RT (MK_RT const mkrt, MK_BUF const buf, MkBinaryR const val) MK_RT_ATTR_HDL
 Set the MkBufferC to the val
 
MK_EXTERN MK_BUF MkBufferSetU_RT (MK_RT const mkrt, MK_BUF const buf, MK_BUFN const val) MK_RT_ATTR_HDL
 Set the MkBufferC to the val
 
MK_EXTERN MK_BUF MkBufferSetVL_RT (MK_RT const mkrt, MK_BUF const buf, MK_FST const val, va_list var_list) MK_RT_ATTR_HDL
 Set the MkBufferC to the val
 
MK_EXTERN MK_BUF MkBufferSetV_RT (MK_RT const mkrt, MK_BUF const buf, MK_FST const val,...) MK_RT_ATTR_HDL
 Set the MkBufferC to the val
 
MK_EXTERN MK_STRB MkBufferGetType1_RT (MK_RT const mkrt, MK_BUFN const buf) MK_RT_ATTR_HDL
 return the type from a MkBufferC as single character value …
 
MK_EXTERN enum MkTypeE MkBufferGetType2_RT (MK_RT const mkrt, MK_BUFN const buf) MK_RT_ATTR_HDL
 return the MkTypeE from a MkBufferC
 
MK_EXTERN MK_STRN MkBufferGetType3_RT (MK_RT const mkrt, MK_BUFN const buf) MK_RT_ATTR_HDL
 return the type from a MkBufferC as single character string …
 
MK_EXTERN bool MkBufferIsLocal_RT (MK_RT const mkrt, MK_BUFN const buf) MK_RT_ATTR_HDL
 Check if the MkBufferC is local (temporary), not local mean global
 
MK_EXTERN void MkBufferLog_RT (MK_RT const mkrt, MK_BUFN const buf, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_INT const lvl)
 log the MkBufferC
 
MK_EXTERN void MkBufferLogSS_RT (MK_RT const mkrt, MK_BUFN const buf, MK_STRN const varname, MK_OBJN fmtobj, MK_STRN const callfunc)
 log the whole MkBufferC object to the MkLogFileC (default: stderr) …
 
MK_EXTERN void MkBufferLogS_RT (MK_RT const mkrt, MK_BUFN const buf, MK_STRN const varname, MK_OBJN fmtobj, MK_STRN const callfunc)
 log the short MkBufferC object data to the MkLogFileC (default: stderr) …
 
MK_EXTERN MK_INT MkBufferCmp_RT (MK_RT const mkrt, MK_BUFN const buf1, MK_BUFN const buf2) MK_RT_ATTR_HDL
 compare TWO MkBufferC objects like strcmp do it for strings …
 
MK_EXTERN enum MkErrorE MkBufferCastTo_RT (MK_RT const mkrt, MK_BUF const buf, enum MkTypeE const typ) MK_RT_ATTR_HDL
 change the type of an MkBufferC to type
 
MK_EXTERN MK_STRN MkBufferToString_RT (MK_RT const mkrt, MK_BUFN const buf) MK_RT_ATTR_HDL
 get the string representation of the buf
 
MK_EXTERN MK_BUF MkBufferSizeNew_RT (MK_RT const mkrt, MK_BUF const buf, MK_NUM const size) MK_RT_ATTR_HDL
 alloc min size storage to the buf
 
MK_EXTERN MK_BUF MkBufferSizeAdd_RT (MK_RT const mkrt, MK_BUF const buf, MK_NUM const size) MK_RT_ATTR_HDL
 add size storage to the buf
 
MK_EXTERN void MkBufferReset_RT (MK_RT const mkrt, MK_BUF const buf) MK_RT_ATTR_HDL
 reset a MkBufferC to the length zero …
 
MK_EXTERN void MkBufferResetFull_RT (MK_RT const mkrt, MK_BUF const buf) MK_RT_ATTR_HDL
 reset a MkBufferC to the length zero and free allocated storage…
 
MK_EXTERN MK_BUF MkBufferCopy_RT (MK_RT const mkrt, MK_BUF const buf, MK_BUFN const srce) MK_RT_ATTR_HDL
 copy the MkBufferC from srce to dest
 
MK_EXTERN MK_BUF MkBufferTemp_RT (MK_RT const mkrt, MK_BUFN const buf) MK_RT_ATTR_HDL
 create a temporary copy of the MkBufferC buf …
 
MK_EXTERN MK_BUF MkBufferAppendC_RT (MK_RT const mkrt, MK_BUF const buf, MK_STRN const val) MK_RT_ATTR_HDL
 append a single string to a MkBufferC object …
 
MK_EXTERN MK_INT MkBufferAppendVL_RT (MK_RT const mkrt, MK_BUF const buf, MK_FST const printfmt, va_list var_list) MK_RT_ATTR_HDL
 append a single string with format and var_list arguments to a MkBuffer64S
 
MK_EXTERN MK_INT MkBufferAppendV_RT (MK_RT const mkrt, MK_BUF const buf, MK_FST const printfmt,...) MK_RT_ATTR_HDL
 append a single string with format and ... arguments to a MkBuffer64S
 
MK_EXTERN MK_NUM MkBufferPush_RT (MK_RT const mkrt, MK_BUF const buf, MK_STRN const val) MK_RT_ATTR_HDL
 add str to the MkBufferC
 
MK_EXTERN MK_NUM MkBufferPop_RT (MK_RT const mkrt, MK_BUF const buf, MK_STRN const val) MK_RT_ATTR_HDL
 delete str from the MkBufferC
 
MK_EXTERN enum MkErrorE MkBufferToObject_RT (MK_RT const mkrt, MK_BUF const buf, MK_NAT_OBJECT *obj_out) MK_RT_ATTR_HDL
 return the native language object from a MkBufferC
 
MK_BUS MkBus (MK_MNG mng)
 cast a unknown-object into an MkBufferStreamS pointer or NULL if not possible
 
MK_BUSN MkBusN (MK_MNGN mng)
 (const) cast a unknown-object into an MkBufferStreamS pointer or NULL if not possible
 
MK_EXTERN MK_BUS MkBufferStreamCreate_RT (MK_RT const mkrt, MK_TYP type, MK_NUM const size)
 create and initialize an MkBufferStreamC instance …
 
MK_EXTERN MK_BUS MkBufferStreamCreate64_RT (MK_RT const mkrt, MK_NUM const size)
 call the BufferStreamCreate with default type MkBufferStream64S (64 byte) …
 
MK_EXTERN MK_BUS MkBufferStreamCreate256_RT (MK_RT const mkrt, MK_NUM const size)
 call the BufferStreamCreate with default type MkBufferStream256S (256 byte) …
 
MK_EXTERN MK_BUS MkBufferStreamCreate1024_RT (MK_RT const mkrt, MK_NUM const size)
 call the BufferStreamCreate with default type MkBufferStream1024S (1024 byte) …
 
MK_EXTERN MK_BUS MkBufferStreamCreate16384_RT (MK_RT const mkrt, MK_NUM const size)
 call the BufferStreamCreate with default type MkBufferStream16384S (16384 byte) …
 
MK_EXTERN MK_BUS MkBufferStreamCreateTLS_RT (MK_RT const mkrt, MK_NUM const tlsid)
 same as BufferStreamCreate but require no cleanup …
 
void MkBufferStreamCreateLOCAL_T (MK_MACRO_TYP cls, MK_MACRO_TYP name, MK_NUM const size)
 Constructs a MkBufferStreamC instance as L)ocal S)torage …
 
void MkBufferStreamCreateSTATIC_T (MK_MACRO_TYP cls, MK_MACRO_TYP name)
 Constructs a MkBufferStreamC instance as S)tatic S)torage …
 
void MkBufferStreamCreateTLS_T (MK_MACRO_TYP cls, MK_MACRO_TYP name)
 Constructs a MkBufferStreamC instance as T)hread L)ocal S)torage …
 
MK_EXTERN void MkBufferStreamFree_RT (MK_RT const mkrt, MK_BUS const bus) MK_RT_ATTR_HDL
 init and free a MkBufferStreamS reference
 
MK_EXTERN void MkBufferStreamInit_RT (MK_RT const mkrt, MK_BUS const bus, MK_TYP type, MK_NUM const size) MK_RT_ATTR_HDL
 init and free a MkBufferStreamS reference
 
MK_EXTERN void MkBufferStreamDelete_RT (MK_RT const mkrt, MK_BUS const bus) MK_RT_ATTR_HDL
 Destructor - delete a MkBufferStreamC instance …
 
MK_EXTERN MK_BUS MkBufferStreamMerge_RT (MK_RT const mkrt, MK_BUS const bus) MK_RT_ATTR_HDL
 Merge-Constructor - create a new MkBufferStreamC as a merge from an existing object …
 
MK_EXTERN MK_BUS MkBufferStreamDup_RT (MK_RT const mkrt, MK_BUSN const src) MK_RT_ATTR_HDL
 Dup-Constructor - create a new MkBufferStreamC instance as copy from an existing MkBufferStreamC instance …
 
MK_BUS MkBufferStreamFromHandle (MK_LONG const exporthdl)
 Import-Slot - returns a obj from a former exported handle
 
MK_EXTERN MK_BUS MkBufferStreamCopy_RT (MK_RT const mkrt, MK_BUS const bus, MK_BUSN const src) MK_RT_ATTR_HDL
 copy the MkBufferStreamC from src to bus
 
MK_EXTERN void MkBufferStreamReset_RT (MK_RT const mkrt, MK_BUS const bus) MK_RT_ATTR_HDL
 reset a MkBufferStreamC to the length zero …
 
MK_EXTERN void MkBufferStreamResetFull_RT (MK_RT const mkrt, MK_BUS const bus)
 reset a MkBufferStreamC to the length zero and free allocated storage…
 
MK_EXTERN void MkBufferStreamLogS_RT (MK_RT const mkrt, MK_BUS const bus, MK_OBJ fmtobj, MK_STRN const callfunc) MK_RT_ATTR_HDL
 
MK_EXTERN void MkBufferStreamLog_RT (MK_RT const mkrt, MK_BUS const bus, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_INT const lvl)
 log the MkBufferStreamC
 
MK_EXTERN void MkBufferStreamPosToStart_RT (MK_RT const mkrt, MK_BUS const bus) MK_RT_ATTR_HDL
 set the current-access-position to the start of MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamWriteY_RT (MK_RT const mkrt, MK_BUS const bus, MK_BYT const val) MK_RT_ATTR_HDL
 write a PRIMITIVE TYPE into the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamWriteO_RT (MK_RT const mkrt, MK_BUS const bus, MK_BOL const val) MK_RT_ATTR_HDL
 write a PRIMITIVE TYPE into the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamWriteI_RT (MK_RT const mkrt, MK_BUS const bus, MK_INT const val) MK_RT_ATTR_HDL
 write a PRIMITIVE TYPE into the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamWriteF_RT (MK_RT const mkrt, MK_BUS const bus, MK_FLT const val) MK_RT_ATTR_HDL
 write a PRIMITIVE TYPE into the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamWriteW_RT (MK_RT const mkrt, MK_BUS const bus, MK_WID const val) MK_RT_ATTR_HDL
 write a PRIMITIVE TYPE into the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamWriteD_RT (MK_RT const mkrt, MK_BUS const bus, MK_DBL const val) MK_RT_ATTR_HDL
 write a PRIMITIVE TYPE into the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamWriteC_RT (MK_RT const mkrt, MK_BUS const bus, MK_STRN const val) MK_RT_ATTR_HDL
 write a PRIMITIVE TYPE into the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamWriteB_RT (MK_RT const mkrt, MK_BUS const bus, MkBinaryR const val) MK_RT_ATTR_HDL
 write a PRIMITIVE TYPE into the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamWriteU_RT (MK_RT const mkrt, MK_BUS const bus, MK_BUF const val) MK_RT_ATTR_HDL
 write a PRIMITIVE TYPE into the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamWriteLONG_RT (MK_RT const mkrt, MK_BUS const bus, MK_LONG const val) MK_RT_ATTR_HDL
 write the long native object into the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamWriteVL_RT (MK_RT const mkrt, MK_BUS const bus, MK_STRN const fmt, va_list ap) MK_RT_ATTR_HDL
 write format-string into the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamWriteV_RT (MK_RT const mkrt, MK_BUS const bus, MK_STRN const fmt,...) MK_RT_ATTR_HDL
 write format-string into the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamWriteL_RT (MK_RT const mkrt, MK_BUS const bus, MK_BFL const bfl) MK_RT_ATTR_HDL
 write a MkBufferListC into the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamWriteL_FLAT_RT (MK_RT const mkrt, MK_BUS const bus, MK_BFL const bfl) MK_RT_ATTR_HDL
 write a MkBufferListC FLAT into the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamWriteL_START_RT (MK_RT const mkrt, MK_BUS const bus) MK_RT_ATTR_HDL
 START write a list-item-type into the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamWriteL_END_RT (MK_RT const mkrt, MK_BUS const bus) MK_RT_ATTR_HDL
 END write a list-item-type into the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamReadL_START_RT (MK_RT const mkrt, MK_BUS const bus, MK_BUF buf) MK_RT_ATTR_HDL
 START read a list-item-type from the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamReadL_END_RT (MK_RT const mkrt, MK_BUS const bus) MK_RT_ATTR_HDL
 END read a list-item-type from the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamReadALL_RT (MK_RT const mkrt, MK_BUS const bus, MK_BFL *const val_inout) MK_RT_ATTR_HDL
 get a temporary MkBufferListC from all data in the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamReadL_RT (MK_RT const mkrt, MK_BUS const bus, MK_BFL *const val_out) MK_RT_ATTR_HDL
 read a MkBufferListC from the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamReadLIST_RT (MK_RT const mkrt, MK_BUS const bus, MK_NAT_LIST *const val_out) MK_RT_ATTR_HDL
 
MK_EXTERN enum MkErrorE MkBufferStreamReadNEXT_RT (MK_RT const mkrt, MK_BUS const bus, MK_NAT_OBJECT *const val_out) MK_RT_ATTR_HDL
 
MK_EXTERN enum MkErrorE MkBufferStreamReadLONG_RT (MK_RT const mkrt, MK_BUS const bus, MK_LONG *const val_out) MK_RT_ATTR_HDL
 read the long native object from the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamReadY_RT (MK_RT const mkrt, MK_BUS const bus, MK_BYT *const val_out) MK_RT_ATTR_HDL
 read a val_out from the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamReadO_RT (MK_RT const mkrt, MK_BUS const bus, MK_BOL *const val_out) MK_RT_ATTR_HDL
 read a val_out from the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamReadI_RT (MK_RT const mkrt, MK_BUS const bus, MK_INT *const val_out) MK_RT_ATTR_HDL
 read a val_out from the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamReadF_RT (MK_RT const mkrt, MK_BUS const bus, MK_FLT *const val_out) MK_RT_ATTR_HDL
 read a val_out from the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamReadW_RT (MK_RT const mkrt, MK_BUS const bus, MK_WID *const val_out) MK_RT_ATTR_HDL
 read a val_out from the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamReadD_RT (MK_RT const mkrt, MK_BUS const bus, MK_DBL *const val_out) MK_RT_ATTR_HDL
 read a val_out from the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamReadC_RT (MK_RT const mkrt, MK_BUS const bus, MK_STRN *const val_out) MK_RT_ATTR_HDL
 read a val_out from the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamReadB_RT (MK_RT const mkrt, MK_BUS const bus, MkBinaryR *const val_out) MK_RT_ATTR_HDL
 read a val_out from the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamReadU_RT (MK_RT const mkrt, MK_BUS const bus, MK_BUF *const val_out) MK_RT_ATTR_HDL
 read a val_out from the MkBufferStreamC
 
MK_EXTERN bool MkBufferStreamReadItemExists_RT (MK_RT const mkrt, MK_BUSN const bus) MK_RT_ATTR_HDL
 check if an item exists in the read-data-package
 
MK_EXTERN enum MkTypeE MkBufferStreamReadGetNextType_RT (MK_RT const mkrt, MK_BUSN const bus) MK_RT_ATTR_HDL
 get the type (MkTypeE) of the next Item in the MkBufferStreamC or "0" if not available
 
MK_EXTERN MK_NUM MkBufferStreamReadGetNumItems_RT (MK_RT const mkrt, MK_BUSN const bus) MK_RT_ATTR_HDL
 get the number of items left in the MkBufferStreamC
 
MK_EXTERN enum MkErrorE MkBufferStreamReadUndo_RT (MK_RT const mkrt, MK_BUS const bus) MK_RT_ATTR_HDL
 undo the last MkBufferStreamC READ function call …
 
MK_BFL MkBfl (MK_MNG mng)
 cast a unknown-object into an MkBufferListS pointer or NULL if not possible
 
MK_BFLN MkBflN (MK_MNGN mng)
 (const) cast a unknown-object into an MkBufferListS pointer or NULL if not possible
 
MK_EXTERN MK_BFL MkBufferListCreate_RT (MK_RT const mkrt, MK_NUM const size)
 Constructs a MkBufferC instance with size storage…
 
MK_EXTERN MK_BFL MkBufferListCreateTLS_RT (MK_RT const mkrt, MK_NUM const tlsid)
 same as BufferListCreate but require no cleanup …
 
void MkBufferListCreateTLS_T (MK_MACRO_TYP name, MK_NUM const num)
 Constructs a MkBufferListC instance as T)hread L)ocal S)torage …
 
void MkBufferListCreateTLS_inout_T (MK_MACRO_TYP name, MK_NUM const num, MK_BFL *inout)
 Constructs a MkBufferListC instance as T)hread L)ocal S)torage, reuse inout if possible…
 
void MkBufferListCreateSTATIC_T (MK_MACRO_TYP name, MK_NUM const num)
 Constructs a MkBufferListC instance as S)tatic S)torage…
 
void MkBufferListCreateLOCAL_T (MK_MACRO_TYP name, MK_NUM const num)
 Constructs a MkBufferListC instance as L)ocal S)torage (reference-type)…
 
MK_EXTERN MK_BFL MkBufferListCreateVC_RT (MK_RT const mkrt, MK_NUM const argc, MK_STRN const argv[])
 Constructs a MkBufferListC instance with a argc/argv data from a list of strings …
 
MK_EXTERN MK_BFL MkBufferListCreateVAL_RT (MK_RT const mkrt, MK_STRN const arg0, va_list var_list)
 Constructs a MkBufferListC instance with a va_list argument …
 
MK_EXTERN MK_BFL MkBufferListCreateVA_RT (MK_RT const mkrt, MK_STRN const arg0,...)
 Constructs a MkBufferListC instance with a varargs argument that ends with NULL
 
MK_EXTERN MK_BFL MkBufferListCreateLA_RT (MK_RT const mkrt, MK_BAC const args) MK_RT_ATTR_HDL
 Constructs a MkBufferListC instance with an other MkBufferListC OR a list of arguments (only in NON MK_STR)
 
MK_EXTERN MK_BFL MkBufferListDup_RT (MK_RT const mkrt, MK_BFLN const bfl) MK_RT_ATTR_HDL
 Dup-Constructor - create a new MkBufferListC instance as copy from an existing MkBufferListC instance …
 
MK_EXTERN MK_BFL MkBufferListMerge_RT (MK_RT const mkrt, MK_BFL const bfl) MK_RT_ATTR_HDL
 Merge-Constructor - constructs a MkBufferListC instance as a merge from an existing MkBufferListC instance …
 
MK_BFL MkBufferListFromHandle (MK_LONG const exporthdl)
 Import-Slot - returns a obj from a former exported handle
 
MK_EXTERN MK_BFL MkBufferListFileGlob_RT (MK_RT const mkrt, MK_STRN const pattern_match)
 create a new MkBufferListC using the result from a filesystem glob operation …
 
MK_EXTERN void MkBufferListInit_RT (MK_RT const mkrt, MK_BFL const bfl, MK_NUM const num) MK_RT_ATTR_HDL
 initialize an already allocated MkBufferListC
 
MK_EXTERN void MkBufferListFree_RT (MK_RT const mkrt, MK_BFL const bfl) MK_RT_ATTR_HDL
 free the internal data but keep the outher shell alive
 
MK_EXTERN void MkBufferListDelete_RT (MK_RT const mkrt, MK_BFL bfl) MK_RT_ATTR_HDL
 Destructor - delete a MkBufferListC instance …
 
MK_EXTERN void MkBufferListMove_RT (MK_RT const mkrt, MK_BFL const to, MK_BFL const from) MK_RT_ATTR_HDL
 move all internal data from from to the end of to
 
MK_EXTERN void MkBufferListCopy_RT (MK_RT const mkrt, MK_BFL const bfl, MK_BFLN const src) MK_RT_ATTR_HDL
 copy all internal data from src to tgt
 
MK_EXTERN MK_NUM MkBufferListSearchC_RT (MK_RT const mkrt, MK_BFLN const bfl, MK_STRN const str, MK_NUM const len, MK_NUM const startindex) MK_RT_ATTR_HDL
 search MK_STR item from a MkBufferListS object starting at startindex
 
MK_EXTERN void MkBufferListReset_RT (MK_RT const mkrt, MK_BFL bfl) MK_RT_ATTR_HDL
 reset a MkBufferListC object …
 
MK_EXTERN MK_STRN MkBufferListToString_RT (MK_RT const mkrt, MK_BFLN const bfl) MK_RT_ATTR_HDL
 get a string representation of the bfl
 
MK_EXTERN MK_NAT_LIST MkBufferListToList_RT (MK_RT const mkrt, MK_BFLN const bfl) MK_RT_ATTR_HDL
 get a target-language list representation of the bfl
 
MK_EXTERN MK_STRN_A MkBufferListToStringList_RT (MK_RT const mkrt, MK_BFLN const bfl, bool const unique) MK_RT_ATTR_HDL
 get a string-list representation of the bfl
 
MK_EXTERN MK_BUF MkBufferListToBuffer_RT (MK_RT const mkrt, MK_BFLN const bfl) MK_RT_ATTR_HDL
 Export a bfl into an MkBufferC using an MkBufferStreamC
 
MK_EXTERN MK_INT MkBufferListCmp_RT (MK_RT const mkrt, MK_BFLN const bfl, MK_BFLN const bfl2) MK_RT_ATTR_HDL
 compare two buffer-list
 
MK_EXTERN MK_BFL MkBufferListSort_RT (MK_RT const mkrt, MK_BFL const bfl) MK_RT_ATTR_HDL
 sort a MkBufferListC
 
MK_EXTERN MK_BFL MkBufferListAppendLP_RT (MK_RT const mkrt, MK_BFL const bfl, MK_BFL const addBufL, MK_NUM position) MK_RT_ATTR_HDL
 copy a MkBufferListS list into an MkBufferListS object on position
 
MK_EXTERN MK_BFL MkBufferListAppendVC_RT (MK_RT const mkrt, MK_BFL const bfl, MK_NUM const argc, MK_STRN argv[]) MK_RT_ATTR_HDL
 append a argc/argv list of strings to an MkBufferListS object …
 
MK_EXTERN MK_BFL MkBufferListAppendVAL_RT (MK_RT const mkrt, MK_BFL const bfl, MK_STRN arg0, va_list var_list) MK_RT_ATTR_HDL
 append a variable number of strings to an MkBufferListS object …
 
MK_EXTERN MK_BFL MkBufferListAppendVA_RT (MK_RT const mkrt, MK_BFL const bfl, MK_STRN arg0,...) MK_RT_ATTR_HDL
 append a variable number of strings to an MkBufferListS object …
 
MK_EXTERN MK_BFL MkBufferListAppendLA_RT (MK_RT const mkrt, MK_BFL const bfl, MK_BAC const args) MK_RT_ATTR_HDL
 append a variable number of MkBufferC object's to an MkBufferListC object using an other MkBufferListC OR a list of arguments (only in NON MK_STR)
 
MK_EXTERN MK_BFL MkBufferListPositionMerge_RT (MK_RT const mkrt, MK_BFL const bfl, MK_BFL const source, MK_NUM position) MK_RT_ATTR_HDL
 merge a MkBufferListS list into an MkBufferListS object on position
 
MK_EXTERN void MkBufferListAppendY_RT (MK_RT const mkrt, MK_BFL const bfl, MK_BYT const val) MK_RT_ATTR_HDL
 append a native PRIMITIVE TYPE object to a MkBufferListC
 
MK_EXTERN void MkBufferListAppendO_RT (MK_RT const mkrt, MK_BFL const bfl, MK_BOL const val) MK_RT_ATTR_HDL
 append a native PRIMITIVE TYPE object to a MkBufferListC
 
MK_EXTERN void MkBufferListAppendS_RT (MK_RT const mkrt, MK_BFL const bfl, MK_SRT const val) MK_RT_ATTR_HDL
 append a native PRIMITIVE TYPE object to a MkBufferListC
 
MK_EXTERN void MkBufferListAppendI_RT (MK_RT const mkrt, MK_BFL const bfl, MK_INT const val) MK_RT_ATTR_HDL
 append a native PRIMITIVE TYPE object to a MkBufferListC
 
MK_EXTERN void MkBufferListAppendF_RT (MK_RT const mkrt, MK_BFL const bfl, MK_FLT const val) MK_RT_ATTR_HDL
 append a native PRIMITIVE TYPE object to a MkBufferListC
 
MK_EXTERN void MkBufferListAppendW_RT (MK_RT const mkrt, MK_BFL const bfl, MK_WID const val) MK_RT_ATTR_HDL
 append a native PRIMITIVE TYPE object to a MkBufferListC
 
MK_EXTERN void MkBufferListAppendG_RT (MK_RT const mkrt, MK_BFL const bfl, MK_LONG const val) MK_RT_ATTR_HDL
 append a native PRIMITIVE TYPE object to a MkBufferListC
 
MK_EXTERN void MkBufferListAppendD_RT (MK_RT const mkrt, MK_BFL const bfl, MK_DBL const val) MK_RT_ATTR_HDL
 append a native PRIMITIVE TYPE object to a MkBufferListC
 
MK_EXTERN void MkBufferListAppendC_RT (MK_RT const mkrt, MK_BFL const bfl, MK_STRN const val) MK_RT_ATTR_HDL
 append a native PRIMITIVE TYPE object to a MkBufferListC
 
MK_EXTERN void MkBufferListAppendU_RT (MK_RT const mkrt, MK_BFL const bfl, MK_BUF const val) MK_RT_ATTR_HDL
 append a native PRIMITIVE TYPE object to a MkBufferListC
 
MK_EXTERN void MkBufferListAppendUP_RT (MK_RT const mkrt, MK_BFL const bfl, MK_BUF const addBuf, MK_NUM position) MK_RT_ATTR_HDL
 append a MkBufferC item into an MkBufferListC object on position
 
MK_EXTERN void MkBufferListAppendVL_RT (MK_RT const mkrt, MK_BFL const bfl, MK_FST const printfmt, va_list var_list) MK_RT_ATTR_HDL
 append an printf like format object to the end of an MkBufferListS object …
 
MK_EXTERN void MkBufferListAppendV_RT (MK_RT const mkrt, MK_BFL const bfl, MK_FST const printfmt,...) MK_RT_ATTR_HDL
 append an printf like format object to the end of an MkBufferListS object …
 
MK_EXTERN bool MkBufferListCheckOption_RT (MK_RT const mkrt, MK_BFL const bfl, MK_STRN const opt, bool const onlyFirst) MK_RT_ATTR_HDL
 search for boolean option in MkBufferListS list and return MK_BOL value …
 
MK_EXTERN enum MkErrorE MkBufferListCheckOptionO_RT (MK_RT const mkrt, MK_BFL const bfl, MK_STRN const opt, bool const defval, bool const onlyFirst, bool *const val_out) MK_RT_ATTR_HDL
 search for opt in MkBufferListS list and fill var with opt_argument or the defval value …
 
MK_EXTERN enum MkErrorE MkBufferListCheckOptionY_RT (MK_RT const mkrt, MK_BFL const bfl, MK_STRN const opt, MK_BYT const defval, bool const onlyFirst, MK_BYT *const val_out) MK_RT_ATTR_HDL
 search for opt in MkBufferListS list and fill var with opt_argument or the defval value …
 
MK_EXTERN enum MkErrorE MkBufferListCheckOptionS_RT (MK_RT const mkrt, MK_BFL const bfl, MK_STRN const opt, MK_SRT const defval, bool const onlyFirst, MK_SRT *const val_out) MK_RT_ATTR_HDL
 search for opt in MkBufferListS list and fill var with opt_argument or the defval value …
 
MK_EXTERN enum MkErrorE MkBufferListCheckOptionI_RT (MK_RT const mkrt, MK_BFL const bfl, MK_STRN const opt, MK_INT const defval, bool const onlyFirst, MK_INT *const val_out) MK_RT_ATTR_HDL
 search for opt in MkBufferListS list and fill var with opt_argument or the defval value …
 
MK_EXTERN enum MkErrorE MkBufferListCheckOptionF_RT (MK_RT const mkrt, MK_BFL const bfl, MK_STRN const opt, MK_FLT const defval, bool const onlyFirst, MK_FLT *const val_out) MK_RT_ATTR_HDL
 search for opt in MkBufferListS list and fill var with opt_argument or the defval value …
 
MK_EXTERN enum MkErrorE MkBufferListCheckOptionW_RT (MK_RT const mkrt, MK_BFL const bfl, MK_STRN const opt, MK_WID const defval, bool const onlyFirst, MK_WID *const val_out) MK_RT_ATTR_HDL
 search for opt in MkBufferListS list and fill var with opt_argument or the defval value …
 
MK_EXTERN enum MkErrorE MkBufferListCheckOptionD_RT (MK_RT const mkrt, MK_BFL const bfl, MK_STRN const opt, MK_DBL const defval, bool const onlyFirst, MK_DBL *const val_out) MK_RT_ATTR_HDL
 search for opt in MkBufferListS list and fill var with opt_argument or the defval value …
 
MK_EXTERN enum MkErrorE MkBufferListCheckOptionC_RT (MK_RT const mkrt, MK_BFL const bfl, MK_STRN const opt, MK_STRN const defval, bool const onlyFirst, MK_STRN *const val_out) MK_RT_ATTR_HDL
 search for opt in MkBufferListS list and fill var with opt_argument or the defval value …
 
MK_EXTERN enum MkErrorE MkBufferListCheckOptionU_RT (MK_RT const mkrt, MK_BFL const bfl, MK_STRN const opt, MK_BUF const defval, bool const onlyFirst, MK_BUF *const val_out) MK_RT_ATTR_HDL
 search for opt in MkBufferListS list and fill var with opt_argument or the defval value …
 
MK_EXTERN void MkBufferListReserve_RT (MK_RT const mkrt, MK_BFL const bfl, MK_NUM const num) MK_RT_ATTR_HDL
 reserve num items in a MkBufferListC object …
 
MK_EXTERN MK_NUM MkBufferListSize_RT (MK_RT const mkrt, MK_BFLN const bfl) MK_RT_ATTR_HDL
 get the number-of-items in the bfl
 
MK_EXTERN enum MkErrorE MkBufferListIndexDelete_RT (MK_RT const mkrt, MK_BFL const bfl, const MK_NUM index, const MK_NUM numitems, const bool doDelete) MK_RT_ATTR_HDL
 delete the index'th list item from the MkBufferListS object …
 
MK_EXTERN enum MkErrorE MkBufferListIndexExtract_RT (MK_RT const mkrt, MK_BFL const bfl, MK_NUM const index, MK_BUF *const val_out) MK_RT_ATTR_HDL
 extract (read & delete) the index object from bfl
 
MK_EXTERN enum MkErrorE MkBufferListIndexGet_RT (MK_RT const mkrt, MK_BFLN const bfl, MK_NUM const index, MK_BUF *const val_out) MK_RT_ATTR_HDL
 get (read only) the index object from bfl
 
MK_EXTERN enum MkErrorE MkBufferListIndexSet_RT (MK_RT const mkrt, MK_BFL const bfl, MK_NUM const index, MK_BUF const buf) MK_RT_ATTR_HDL
 set the index object from bfl
 
MK_EXTERN MK_BUF MkBufferListIndexGetU_RT (MK_RT const mkrt, MK_BFL const bfl, MK_NUM index) MK_RT_ATTR_HDL
 get the index element from MkBufferListC ... if not available… create it. …
 
MK_EXTERN void MkBufferListIndexSetU_RT (MK_RT const mkrt, MK_BFL const bfl, MK_NUM const index, MK_BUF const buf) MK_RT_ATTR_HDL
 set the index element from MkBufferListC ... if not available… createspace …
 
MK_EXTERN MK_STRN MkBufferListIndexGetC_RT (MK_RT const mkrt, MK_BFL const bfl, MK_NUM const index) MK_RT_ATTR_HDL
 get the index element from MkBufferListC ... as string. …
 
MK_EXTERN void MkBufferListIndexSetC_RT (MK_RT const mkrt, MK_BFL const bfl, MK_NUM const index, MK_STRN const str) MK_RT_ATTR_HDL
 set the index element from MkBufferListC ... to string… if not available… create space …
 
MK_EXTERN void MkBufferListLog_RT (MK_RT const mkrt, MK_BFLN bfl, MK_OBJN const fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_INT const lvl)
 write the detail-summary of the MkBufferListC to MkLogFileC (default: stderr) …
 
MK_EXTERN void MkBufferListLogS_RT (MK_RT const mkrt, MK_BFLN const bfl, MK_STRN const varname, MK_OBJN fmtobj, MK_STRN const callfunc)
 write the short-summary of the MkBufferListC to MkLogFileC (default: stderr) …
 
MK_EXTERN void MkBufferListLogSS_RT (MK_RT const mkrt, MK_BFLN const bfl, MK_STRN const varname, MK_OBJN fmtobj, MK_STRN const callfunc)
 write the very-short-summary of the MkBufferListC to MkLogFileC (default: stderr) …
 
MK_EXTERN void MkBufferListLogSSS_RT (MK_RT const mkrt, MK_BFLN const bfl, MK_STRN const varname, MK_OBJN fmtobj, MK_STRN const callfunc)
 write the very-very-short-summary of the MkBufferListC to MkLogFileC (default: stderr) …
 
MK_LFL MkLfl (MK_MNG mng)
 cast a unknown-object into an MkLogFileS pointer or NULL if not possible
 
MK_LFLN MkLflN (MK_MNGN mng)
 (const) cast a unknown-object into an MkLogFileS pointer or NULL if not possible
 
MK_EXTERN enum MkErrorE MkLogFileOpen_RT (MK_RT const mkrt, MK_OBJ const errobj, MK_STRN const file, MK_LFL *lfh_out)
 open the log-file in append mode …
 
MK_EXTERN void MkLogFileClose_RT (MK_RT const mkrt, MK_LFL lfh) MK_RT_ATTR_HDL
 Destructor - delete a MkLogFileC instance …
 
MK_LFL MkLogFileFromHandle (MK_LONG const exporthdl)
 Import-Slot - returns a obj from a former exported handle
 
MK_EXTERN enum MkErrorE MkLogFileWriteVL_RT (MK_RT const mkrt, MK_LFLN lfl, MK_FST printfmt, va_list var_list) MK_RT_ATTR_HDL
 write to log-file
 
MK_EXTERN enum MkErrorE MkLogFileWriteV_RT (MK_RT const mkrt, MK_LFLN lfl, MK_FST printfmt,...) MK_RT_ATTR_HDL
 write to log-file
 
MK_EXTERN enum MkErrorE MkLogFileWriteC_RT (MK_RT const mkrt, MK_LFLN lfl, MK_STRN text) MK_RT_ATTR_HDL
 write to log-file
 
MK_EXTERN enum MkErrorE MkLogFileGetFile_RT (MK_RT const mkrt, MK_LFLN lfl, MK_STRN *file_out) MK_RT_ATTR_HDL
 get the log-file
 
MK_EXT MkExt (MK_MNG mng)
 cast a unknown-object into an MkExtensionS pointer or NULL if not possible
 
MK_EXTN MkExtN (MK_MNGN mng)
 (const) cast a unknown-object into an MkExtensionS pointer or NULL if not possible
 
MK_EXTERN bool MkExtensionDeleteAll_RT (MK_RT const mkrt, MK_EXT head)
 
MK_EXTERN MK_EXT MkExtensionAdd_RT (MK_RT const mkrt, MK_EXT head, MK_EXT add)
 this is an update to head, use: head = MkExtensionAdd(head, add)
 
MK_EXTERN MK_EXT MkExtensionDel_RT (MK_RT const mkrt, MK_EXT head, MK_EXT del)
 this is an update to head, use: head = MkExtensionDel(head, del)
 
MK_ERR MkErr (MK_MNG mng)
 cast a unknown-object into an MkErrorS pointer or NULL if not possible
 
MK_ERRN MkErrN (MK_MNGN mng)
 (const) cast a unknown-object into an MkErrorS pointer or NULL if not possible
 
MK_ERREXT MkErrExt (MK_MNG mng)
 cast a unknown-object into an MkErrExtS pointer or NULL if not possible
 
MK_ERREXTN MkErrExtN (MK_MNGN mng)
 (const) cast a unknown-object into an MkErrExtS pointer or NULL if not possible
 
MK_EXTERN void MkErrorDelete_RT (MK_RT const mkrt, MK_ERR err) MK_RT_ATTR_HDL
 Destructor - delete a MkErrorS object …
 
MK_EXTERN MK_ERR MkErrorDup_RT (MK_RT const mkrt, MK_ERRN const srce) MK_RT_ATTR_HDL
 Dup-Constructor - create a new MkErrorC instance as copy from an existing MkErrorC instance …
 
MK_ERR MkErrorFromHandle (MK_LONG const exporthdl)
 Import-Slot - returns a obj from a former exported handle
 
MK_EXTERN enum MkErrorE MkErrorGetCode (MK_ERRN const err) MK_ATTR_HDL
 get the value of MkErrorS::code
 
MK_EXTERN MK_STRN MkErrorGetText (MK_ERRN const err) MK_ATTR_HDL
 get the MkErrorS::text
 
MK_EXTERN MK_SIZE MkErrorGetSize (MK_ERRN const err) MK_ATTR_HDL
 get the error-message-size from the exception-object
 
MK_EXTERN MK_INT MkErrorGetNum (MK_ERRN const err) MK_ATTR_HDL
 get the MkErrorS::num. The number can be used as exit-code …
 
MK_EXTERN void MkErrorSetCONTINUE_RT (MK_RT const mkrt, MK_ERR const err) MK_RT_ATTR_HDL
 signal end of processing in an MqIEvent callback …
 
MK_EXTERN enum MkErrorE MkErrorSetEXIT_RT (MK_RT const mkrt, MK_ERR const err, MK_STRN const callfunc) MK_RT_ATTR_HDL
 finish the current callback, return to toplevel and MqExit the application …
 
MK_EXTERN enum MkErrorE MkErrorSetSOCKET_RT (MK_RT const mkrt, MK_ERR const err, MK_STRN const detail, MK_STRN const callfunc) MK_RT_ATTR_HDL
 create SOCKET-DOWN error …
 
MK_EXTERN void MkErrorSetCode_RT (MK_RT const mkrt, MK_ERR const err, enum MkErrorE code) MK_RT_ATTR_HDL
 set the MkErrorS::code value …
 
MK_EXTERN bool MkErrorIsSOCKET (MK_ERRN const err) MK_ATTR_HDL
 check on SOCKET-DOWN error …
 
MK_EXTERN bool MkErrorIsEXIT (MK_ERR const err) MK_ATTR_HDL
 check on APPLICATION-EXIT error …
 
MK_EXTERN void MkPanicVL_RT (MK_RT const mkrt, MK_OBJN const errobj, MK_STRN const callfunc, MK_INT const errnum, MK_FST const printfmt, va_list var_list) MK_RT_ATTR_HDL
 do a panic with a vararg-list as argument …
 
MK_EXTERN void MkPanicV_RT (MK_RT const mkrt, MK_OBJN const errobj, MK_STRN const callfunc, MK_INT const errnum, MK_FST const printfmt,...) MK_RT_ATTR_HDL
 do a panic with a vararg as argument …
 
MK_EXTERN void MkPanicC_RT (MK_RT const mkrt, MK_OBJN const errobj, MK_STRN const callfunc, MK_INT const errnum, MK_STRN const message) MK_RT_ATTR_HDL
 do a panic with string as argument …
 
MK_EXTERN void MkDisasterSignal (MK_INT signal)
 called if something get REALLY wrong …
 
MK_EXTERN void MkErrorAppendVL_RT (MK_RT const mkrt, MK_ERR const err, MK_FST const printfmt, va_list var_list) MK_RT_ATTR_HDL
 append a va_list string to the MkErrorC
 
MK_EXTERN void MkErrorAppendV_RT (MK_RT const mkrt, MK_ERR const err, MK_FST const printfmt,...) MK_RT_ATTR_HDL
 append a vararg string to the MkErrorC
 
MK_EXTERN void MkErrorAppendC_RT (MK_RT const mkrt, MK_ERR const err, MK_STRN const message) MK_RT_ATTR_HDL
 append the message to the MkErrorS::text
 
MK_EXTERN MK_ERR MkErrorNoRaise_RT (MK_RT const mkrt, MK_ERR const err) MK_RT_ATTR_HDL
 ignore the next return of MK_ERROR and do not raise an target-language-exception
 
MK_EXTERN enum MkErrorE MkErrorSetR_RT (MK_RT const mkrt, MK_ERR const err, MK_STRN const message, enum MkErrorE const errcode, MK_INT const errnum, MK_MNG const errctx) MK_RT_ATTR_HDL
 set the MkErrorC and raise the error …
 
MK_EXTERN enum MkErrorE MkErrorSetE_RT (MK_RT const mkrt, MK_ERR const err, MK_ERR const newerr) MK_RT_ATTR_HDL
 set the MkErrorC from a MkErrorC copy and raise an error …
 
MK_EXTERN enum MkErrorE MkErrorSetC_RT (MK_RT const mkrt, MK_ERR err, MK_STRN const message, MK_STRN const callfunc, MK_INT const errnum) MK_RT_ATTR_HDL
 'set' and 'raise' the MkErrorC using a string-message and a errnum-number
 
MK_EXTERN enum MkErrorE MkErrorSetVL_RT (MK_RT const mkrt, MK_ERR err, MK_STRN const callfunc, MK_INT const errnum, MK_FST const printfmt, va_list var_list) MK_RT_ATTR_HDL
 'set' and 'raise' the MkErrorC using a vararg-list message …
 
MK_EXTERN enum MkErrorE MkErrorSetV_RT (MK_RT const mkrt, MK_ERR err, MK_STRN const callfunc, MK_INT const errnum, MK_FST const printfmt,...) MK_RT_ATTR_HDL
 set the MkErrorS object using a format string argument list and raise an error …
 
MK_EXTERN void MkErrorPrintln_RT (MK_RT const mkrt, MK_ERR const err) MK_RT_ATTR_HDL
 print the default-error to the MkLogFileC (default: stderr) and clear the error afterwards …
 
MK_EXTERN void MkErrorLog_RT (MK_RT const mkrt, MK_ERRN const err, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_INT const lvl)
 log the error to MkLogFileC (default: stderr) …
 
MK_EXTERN MK_ERR MkErrorCatch_RT (MK_RT const mkrt, MK_ERR const err, MK_EXP const exception, MK_STRN const callfunc) MK_RT_ATTR_HDL
 convert a programming-language-error into an libmkkernel error …
 
MK_EXTERN MK_ERR MkObjectErrorCatch_RT (MK_RT const mkrt, MK_OBJN const obj, MK_EXP const exception, MK_STRN const callfunc) MK_RT_ATTR_HDL
 convert a programming-language-error into an libmkkernel error …
 
MK_EXTERN enum MkErrorE MkErrorRaise_RT (MK_RT const mkrt, MK_ERRN const err) MK_RT_ATTR_HDL
 convert an libmkkernel error into an programming-language-error and raise afterwards. …
 
MK_EXTERN enum MkErrorE MkErrorReset_RT (MK_RT const mkrt, MK_ERR const err, MK_STRN const callfunc, MK_INT const callline, bool const force) MK_RT_ATTR_HDL
 This function clears the err and resets to MK_OK
 
MK_EXTERN void MkErrorStackFormat_RT (MK_RT const mkrt, MK_ERR const err, MK_STRN callfunc, MK_STRN callfile, MK_INT const callline) MK_RT_ATTR_HDL
 append an ensemble of func, file and line to the error-message
 
MK_EXTERN enum MkErrorE MkErrorStack_RT (MK_RT const mkrt, MK_ERR const err, MK_STRN const callfunc, MK_STRN const callfile, MK_INT const callline) MK_RT_ATTR_HDL
 check on error and if yes append an ErrorStackFormat to the error-message
 
MK_EXTERN MK_STRN MkErrorToString_RT (MK_RT const mkrt, MK_ERR const err) MK_RT_ATTR_HDL
 get the string representation of the err
 
bool MkExceptionCheck (MK_EXP exception)
 Checks if Exception is of type MkExceptionC and returns MK_YES or MK_NO
 
void MkExceptionRaise (MK_MNG const expobj, MK_STRN const callfunc, MK_INT const callline)
 convert an MkErrorC into a target-programming-language (C,C++,C#,VB.NET,Java,Python,Ruby,Perl,PHP,Tcl or GO) exception …
 
MK_ERR MkExceptionCatch (MK_MNG const expobj, MK_EXP const exception, MK_STRN const callfunc)
 convert an target-programming-language (C,C++,C#,VB.NET,Java,Python,Ruby,Perl,PHP,Tcl or GO) exception into an MkErrorC
 
MK_RTEXT MkRtExt (MK_MNG mng)
 cast a unknown-object into an MkRtExtS pointer or NULL if not possible
 
MK_RTEXTN MkRtExtN (MK_MNGN mng)
 (const) cast a unknown-object into an MkRtExtS pointer or NULL if not possible
 
MK_RT MkRt (MK_MNG mng)
 cast a unknown-object into an MkRuntimeS pointer or NULL if not possible
 
MK_RTN MkRtN (MK_MNGN mng)
 (const) cast a unknown-object into an MkRuntimeS pointer or NULL if not possible
 
MK_EXTERN MK_RT MkRuntimeInit (MK_RT const mkrt)
 initialize MkRuntimeRLS
 
MK_RT MkRuntimeGet (void)
 return a initialized MkRuntimeRLS
 
bool MkRuntimeGetIsSilent (void)
 get the MkRuntimeS::isSilent value …
 
void MkRuntimeSetIsSilent (bool silent)
 set the MkRuntimeS::isSilent value …
 
MK_INT MkRuntimeGetDebug (void)
 get the MkRuntimeS::debug value …
 
void MkRuntimeSetDebug (MK_INT dbg)
 set the MkRuntimeS::debug value …
 
MK_STRN MkRuntimeGetLogfile (void)
 get the MkRuntimeS::logfile value …
 
MK_EXTERN enum MkErrorE MkRuntimeSetLogfile_RT (MK_RT const mkrt, MK_STRN logfile)
 set the MkRuntimeS::logfile value and cleanup old value …
 
MK_EXTERN void MkRuntimeSetCID (MK_OBJ const cid)
 CID == context-in-duty.
 
MK_EXTERN void MkRuntimeDebug (MK_RT mkrt, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_INT const lvl)
 log the MkRuntimeC
 
MK_OBJ MkObjectInstances (void)
 get head-instance from linked-list of MkObjectS type …
 
MK_OBJ MkObjectNext (MK_OBJ const obj)
 get next instance from linked-list of MkObjectS type
 
MK_OBJ MkObjectPrev (MK_OBJ const obj)
 get previous instance from linked-list of MkObjectS type
 
MK_BUF MkBufferInstances (void)
 get head-instance from linked-list of MkBufferS type …
 
MK_BUF MkBufferNext (MK_BUF const buf)
 get next instance from linked-list of MkBufferS type
 
MK_BUF MkBufferPrev (MK_BUF const buf)
 get previous instance from linked-list of MkBufferS type
 
MK_BUS MkBufferStreamInstances (void)
 get head-instance from linked-list of MkBufferStreamS type …
 
MK_BUS MkBufferStreamNext (MK_BUS const bus)
 get next instance from linked-list of MkBufferStreamS type
 
MK_BUS MkBufferStreamPrev (MK_BUS const bus)
 get previous instance from linked-list of MkBufferStreamS type
 
MK_BFL MkBufferListInstances (void)
 get head-instance from linked-list of MkBufferListS type …
 
MK_BFL MkBufferListNext (MK_BFL const bfl)
 get next instance from linked-list of MkBufferListS type
 
MK_BFL MkBufferListPrev (MK_BFL const bfl)
 get previous instance from linked-list of MkBufferListS type
 
MK_LFL MkLogFileInstances (void)
 get head-instance from linked-list of MkLogFileS type …
 
MK_LFL MkLogFileNext (MK_LFL const lfl)
 get next instance from linked-list of MkLogFileS type
 
MK_LFL MkLogFilePrev (MK_LFL const lfl)
 get previous instance from linked-list of MkLogFileS type
 
MK_ERR MkErrorInstances (void)
 get head-instance from linked-list of MkErrorS type …
 
MK_ERR MkErrorNext (MK_ERR const err)
 get next instance from linked-list of MkErrorS type
 
MK_ERR MkErrorPrev (MK_ERR const err)
 get previous instance from linked-list of MkErrorS type
 
MK_RT_ATTR_HDL MK_ERR MkObjectToError_RT (MK_RT const mkrt, MK_OBJ const obj)
 Error-Slot - return an error-object pre initialized with obj data.
 
MkErrorC signature check
bool MkErrCheck (MK_MNGN mng)
 check MkErrorS%->Mk{ObjectS::signature} …
 
MkRuntimeCallback

Register callback used to setup library-local runtime attributes …

Sometimes the features provided by MkRuntimeRLS are not fullfilling the requirements of the implementation. Sometimes the functions provided by the MkRuntimeRLS do not meet the implementation requirements. Two methods are offered to retrofit the missing capability:

Example from "LibLcConfig_java.c": add a runtime-callback to implement a specific type.
// LC classes
MkThreadLocal MK_TYP LcConfigC_TT = NULL;
MkThreadLocal MK_TYP LcSettingC_TT = NULL;
...
static struct MkRuntimeCallbackS sLcRuntimeCallback = {0};
...
static void sConfigRuntimeCallback ( struct MkRuntimeS * mkrt ) {
LcConfigC_TT = MkTypeCreate(LcConfigC, MkObjectC, "LcConfigC");
LcConfigC_TT->constructor = pConfigCreate;
LcConfigC_TT->destructor = pConfigDelete;
LcSettingC_TT = MkTypeCreate(LcSettingC, MkObjectC, "LcSettingC");
LcSettingC_TT->constructor = pSettingCreate;
LcSettingC_TT->destructor = pSettingDelete;
if (LcSetupThread) {
(*LcSetupThread)(MK_RT_CALL_ONLY);
}
}
...
void LcSetup(void) {
...
sLcRuntimeCallback.mkrt = mkrt;
sLcRuntimeCallback.cb = NS(sLcRuntimeCallback);
// class specific initialization
MkRuntimeCallbackAdd( &sLcRuntimeCallback );
...
}
#define MkTypeCreate(clsV, basicV, identV)
Definition kernel_mk.h:5588
#define MkThreadLocal
Definition kernel_mk.h:2362
#define MK_RT_CALL_ONLY
Definition kernel_mk.h:2366
MK_EXTERN void MkRuntimeCallbackAdd(struct MkRuntimeCallbackS *cbdata, MK_RT mkrt, MkRuntimeInitF rt_callback, MK_STRN ident)
add a callback to the runtime …
keep callback related data …
MkRuntimeInitF cb
required data
struct MkRuntimeS * mkrt
required data
The MkRuntimeS provide a per-thread environment for LibMkKernel …
define a Type object …
Definition kernel_mk.h:4745
MK_EXTERN void MkRuntimeCallbackAdd (struct MkRuntimeCallbackS *cbdata, MK_RT mkrt, MkRuntimeInitF rt_callback, MK_STRN ident)
 add a callback to the runtime
 
MK_EXTERN void MkRuntimeCallbackDel (struct MkRuntimeCallbackS *cbdata)
 delete a callback from the runtime
 

Variables

MK_UNUSED static const MK_STRN_A MK_STRN_A_NULL = (MK_STRN_A) {0,0}
 
MK_EXTERN_DATA bool MkCleanupActive
 signal that code was triggert by MkCleanup
 
MK_EXTERN_DATA struct MkLalS MkLal
 Language Abstraction Layer in duty.
 
MK_EXTERN_DATA MkThreadLocal struct MkRuntimeS MkRuntimeRLS
 RLS …
 

OS wide MK_TIME_T

timeout in seconds as "integer" value

#define MK_FORMAT_TIME   "%li"
 
#define MK_TIME   ((MK_TIME_T)time(NULL))
 
#define MK_TIME_MAX   (365*24*60*60)
 one year
 
typedef time_t MK_TIME_T
 

MkTypeE

#define MK_TYPE_IS_1_BYTE   (1<<0)
 the type is native and has a size of 1 byte …
 
#define MK_TYPE_IS_2_BYTE   (1<<1)
 the type is native and has a size of 2 bytes …
 
#define MK_TYPE_IS_4_BYTE   (1<<2)
 the type is native and has a size of 4 bytes …
 
#define MK_TYPE_IS_8_BYTE   (1<<3)
 the type is native and has a size of 8 bytes …
 
#define MK_TYPE_IS_NATIVE
 the type is native …
 
#define MK_TYPE_SHIFT   4
 FIXED: type is only 8bit -> 4 bit=15 for type and 4 bit for flag …
 
enum  MkTypeE {
  MK_BYTT = ((1 << MK_TYPE_SHIFT) | MK_TYPE_IS_1_BYTE ) , MK_BOLT = ((2 << MK_TYPE_SHIFT) | MK_TYPE_IS_1_BYTE ) , MK_SRTT = ((3 << MK_TYPE_SHIFT) | MK_TYPE_IS_2_BYTE ) , MK_INTT = ((4 << MK_TYPE_SHIFT) | MK_TYPE_IS_4_BYTE ) ,
  MK_FLTT = ((5 << MK_TYPE_SHIFT) | MK_TYPE_IS_4_BYTE ) , MK_WIDT = ((6 << MK_TYPE_SHIFT) | MK_TYPE_IS_8_BYTE ) , MK_DBLT = ((7 << MK_TYPE_SHIFT) | MK_TYPE_IS_8_BYTE ) , MK_BINT = ((8 << MK_TYPE_SHIFT) ) ,
  MK_STRT = ((9 << MK_TYPE_SHIFT) ) , MK_LSTT = ((10 << MK_TYPE_SHIFT) )
}
 basic data-types supported by Programming-Language-Micro-KernelMore...
 
MK_EXTERN MK_STRN MkTypeE_ToString (enum MkTypeE value)
 return the MkTypeE as string …
 
MK_INT MkTypeE_ToInt (enum MkTypeE value)
 return the MkTypeE as integer …
 
MK_EXTERN enum MkErrorE MkTypeE_FromInt (MK_INT const value, enum MkTypeE *value_out)
 return the MkTypeE from integer …
 

MkObjectC type definition

#define MkObjectC_T   (&MK_RT_REF._MkObjectC_T)
 instance-type as specific-instance-type, useable in a class-macro as: class##_T
 
#define MkObjectC_TT   (MkTYP(MkObjectC_T))
 instance-type as common-instance-type, useable in a class-macro as: class##_TT
 
#define MkObjectST   MkObjectC_T
 instance-type as specific-instance-type
 
#define MkObjectSTT   (MkTYP(MkObjectST))
 instance-type as common-instance-type (cast from MkObjectST into MkTypeS) …
 
#define MkObjectC_type   MK_OBJ
 same as MkObjectS but useable in a class-macro as: class##_type
 
#define MkObjectCT_X(instance)   ( (struct MkDefTypeS *) (MkOBJ_R(instance).type) )
 cast from an instance into the specific-instance-type
 
#define MkObjectCTT_X(instance)   (MkOBJ_R(instance).type)
 cast from an instance into the common-instance-type
 
#define MkObjectCT_TT(typ)   ( (struct MkDefTypeS *) (typ) )
 cast from an common-instance-type into an specific-instance-type
 
#define MkObjectC_NS   MK
 map class to namespace …
 
#define MkObjectCTT   MkObjectCTT
 instance-type as common-instance-type for MkObjectC in the target-programming-language (C,C++,C#,VB.NET,Java,Python,Ruby,Perl,PHP,Tcl or GO)
 
#define MkObjectCT   ( (struct MkDefTypeS *) MkObjectCTT )
 instance-type as specific-instance-type for MkObjectC in the target-programming-language (C,C++,C#,VB.NET,Java,Python,Ruby,Perl,PHP,Tcl or GO)
 
typedef struct MkObjectS MkObjectCR
 instance-struct-reference same as struct MkObjectS, useable in a class-macro as: class##R
 
typedef const struct MkObjectS MkObjectCNR
 const instance-struct-reference same as const struct MkObjectS, useable in a class-macro as: class##R
 

MkObjectC signature check

#define MkObjectC_Check(mng)   MkObjCheck(mng)
 
bool MkObjCheck (MK_MNGN mng)
 check MkObjectS%->Mk{ObjectS::signature} …
 

MkTypeC type definition

#define MkTypeSTT   (&MK_RT_REF._MkTypeC_TT)
 instance-type as common-instance-type
 
#define MkTypeC_TT   (&MK_RT_REF._MkTypeC_TT)
 instance-type as common-instance-type, useable in a class-macro as: class##_TT
 
#define MkTypeC_type   MK_TYP
 same as MkTypeS but useable in a class-macro as: class##_type
 
#define MkTypeCT_X(instance)   ( (struct MkTypeS *) (MkOBJ_R(instance).type) )
 cast from an instance into the specific-instance-type
 
#define MkTypeCTT_X(instance)   (MkOBJ_R(instance).type)
 cast from an instance into the common-instance-type
 
#define MkTypeCT_TT(typ)   ( (struct MkTypeS *) (typ) )
 cast from an common-instance-type into an specific-instance-type
 
#define MkTypeC_NS   MK
 map class to namespace …
 
#define MkTypeCTT   MkTypeCTT
 instance-type as common-instance-type for MkTypeC in the target-programming-language (C,C++,C#,VB.NET,Java,Python,Ruby,Perl,PHP,Tcl or GO)
 
#define MkTypeCT   ( (struct MkTypeS *) MkTypeCTT )
 instance-type as specific-instance-type for MkTypeC in the target-programming-language (C,C++,C#,VB.NET,Java,Python,Ruby,Perl,PHP,Tcl or GO)
 
typedef struct MkTypeS MkTypeCR
 instance-struct-reference same as struct MkTypeS, useable in a class-macro as: class##R
 
typedef const struct MkTypeS MkTypeCNR
 const instance-struct-reference same as const struct MkTypeS, useable in a class-macro as: class##R
 

MkTypeC signature check

#define MkTypeC_Check(mng)   MkTypCheck(mng)
 
bool MkTypCheck (MK_MNGN mng)
 check MkTypeS%->Mk{ObjectS::signature} …
 

MkDefTypeC type definition

#define MkDefTypeSTT   (&MK_RT_REF._MkDefTypeC_TT)
 instance-type as common-instance-type
 
#define MkDefTypeC_TT   (&MK_RT_REF._MkDefTypeC_TT)
 instance-type as common-instance-type, useable in a class-macro as: class##_TT
 
#define MkDefTypeCT_X(instance)   ( (struct MkTypeS *) (MkOBJ_R(instance).type) )
 cast from an instance into the specific-instance-type
 
#define MkDefTypeCTT_X(instance)   (MkOBJ_R(instance).type)
 cast from an instance into the common-instance-type
 
#define MkDefTypeCT_TT(typ)   ( (struct MkTypeS *) (typ) )
 cast from an common-instance-type into an specific-instance-type
 
#define MkDefTypeC_NS   MK
 map class to namespace …
 
#define MkDefTypeCTT   MkDefTypeCTT
 instance-type as common-instance-type for MkDefTypeC in the target-programming-language (C,C++,C#,VB.NET,Java,Python,Ruby,Perl,PHP,Tcl or GO)
 
#define MkDefTypeCT   ( (struct MkTypeS *) MkDefTypeCTT )
 instance-type as specific-instance-type for MkDefTypeC in the target-programming-language (C,C++,C#,VB.NET,Java,Python,Ruby,Perl,PHP,Tcl or GO)
 
typedef struct MkDefTypeS MkDefTypeCR
 instance-struct-reference same as struct MkDefTypeS, useable in a class-macro as: class##R
 
typedef const struct MkDefTypeS MkDefTypeCNR
 const instance-struct-reference same as const struct MkDefTypeS, useable in a class-macro as: class##R
 

MkRef…

reference management functions

#define MkRefLOCK   999999
 unchangeable reference
 
#define MkRefIncr_1X(x)   MkRefIncr(MkOBJ(x))
 
#define MkRefIncr_1M(m)   MkRefIncr(MkObj(m))
 
#define MkRefIncr_FX(x)   MkRefIncr(MkOBJ(x))
 protect code-block, do not call the destructor…
 
#define MkRefDecr_O(o)   do { MkRefDecr_RT(MK_RT_CALL o); o=NULL; } while (0)
 
#define MkRefDecr_X(x)   do { MkRefDecr_RT(MK_RT_CALL MkOBJ(x)); x=NULL; } while (0)
 
#define MkRefDecr_X_NULL(x)   do { MkRefDecr_RT(MK_RT_NULL MkOBJ(x)); x=NULL; } while (0)
 
#define MkRefDecr_M(m)   do { MkRefDecr_RT(MK_RT_CALL MkObj(m)); m=NULL; } while (0)
 
#define MkRefDecr_M_NULL(m)   do { MkRefDecr_RT(MK_RT_NULL MkObj(m)); m=NULL; } while (0)
 
#define MkRefDecr_FX(x)   do { --(MkOBJ_R(x).refCount); } while(0)
 protect code-block, do not call the destructor…
 
#define MkRefIncrSelf_2X(x, s)   MkRefIncrSelf(MkOBJ(x),s)
 
#define MkRefDecrWithoutSelf_NULL(o)   MkRefDecrWithoutSelf_RT(MK_RT_NULL o)
 
#define MkRefGet_1X(x)   MkRefGet(MkOBJ(x))
 
#define MkRefLock_1X(x)   MkRefLock(MkOBJ(x))
 
#define MkRefIsLocked_1X(x)   MkRefIsLocked(MkOBJ(x))
 
#define MkRefSet(target, source)
 update target with source and keep the MkObjectS::refCount in sync
 
#define MkRefCidN_NULL()   MkRefCidN_RT(MK_RT_CALL_NULL_ONLY)
 
void MkRefIncr (MK_OBJ obj)
 increment the reference-count
 
MK_EXTERN void MkRefDecr_RT (MK_RT const mkrt, MK_OBJ obj) MK_RT_ATTR_HDL
 decrement the reference-count
 
MK_ATTR_HDL void MkRefIncrSelf (MK_OBJ const obj, MK_PTR const self, MK_PTR const env)
 ATOMIC operation -> link self with reference-count.
 
MK_EXTERN MK_OBJ MkRefDecrWithoutSelf_RT (MK_RT const mkrt, MK_OBJ const obj) MK_RT_ATTR_HDL
 ATOMIC operation -> unlink self with reference-count.
 
MK_ATTR_HDL MK_INT MkRefGet (MK_OBJ const obj)
 get the reference-count
 
MK_ATTR_HDL MK_INT MkRefLock (MK_OBJ const obj)
 lock the object
 
MK_ATTR_HDL bool MkRefIsLocked (MK_OBJ const obj)
 check if object is locked
 
MK_EXTERN MK_NUM MkRefCidN_RT (MK_RT_PARSER_ONLY)
 return the reference-count-recursion-level
 

MkSelf

#define MkSelfSet_3X(x, self, env)   MkSelfSet(MkOBJ(x),self,env)
 
#define MkSelfGet_1X(x)   MkSelfGet(MkOBJ(x))
 
#define MkSelfNew_3X(x, self_out, env)   MkSelfNew(MkOBJ(x),self_out,env)
 
#define MkSelfNew_NULL(...)   MkSelfNew_RT(MK_RT_NULL __VA_ARGS__)
 
#define MkSelfCreate_2X(x, env)   MkSelfCreate(MkOBJ(x),env)
 
#define MkSelfDelete_1X(x)   MkSelfDelete_RT(MK_RT_CALL MkOBJ(x))
 
#define MkSelfDeleteForce_1X(x)   MkSelfDeleteForce(MkOBJ(x))
 
#define MkSelfUnlink_1X(x)   MkSelfUnlink(MkOBJ(x))
 
MK_ATTR_HDL void MkSelfSet (MK_OBJ const obj, MK_PTR const self, MK_PTR const env)
 set the MkObjectS::self value
 
MK_PTR MkSelfGet (MK_OBJ const obj)
 get the MkObjectS::self value
 
mk_attr_hot enum MkErrorE MkSelfNew_RT (MK_RT const mkrt, MK_OBJ obj, MK_PTR *self_out, MK_PTR const env)
 return the self pointer for a given obj
 
MK_EXTERN MK_PTR MkSelfCreate_RT (MK_RT const mkrt, MK_OBJ const obj, MK_PTR const env) MK_RT_ATTR_HDL
 create the MkObjectS::self value
 
MK_EXTERN bool MkSelfDelete_RT (MK_RT const mkrt, MK_OBJ const obj) MK_RT_ATTR_HDL
 delete the MkObjectS::self value
 
MK_EXTERN bool MkSelfDeleteForce_RT (MK_RT const mkrt, MK_OBJ obj) MK_RT_ATTR_HDL
 force delete an instance, last step in instance-destructor
 
MK_EXTERN void MkSelfUnlink_RT (MK_RT const mkrt, MK_OBJ obj) MK_RT_ATTR_HDL
 Run the MkTypeS::selfUnlink slot from the instance...
 

MkType…

reference management functions

#define MkTypeCreate(clsV, basicV, identV)
 
MK_TYP MkTypeCreate (MK_MACRO_TYP const cls, MK_MACRO_TYP const basic, MK_STRN const ident)
 create a new type …
 
MK_EXTERN MK_TYP MkTypeDup2_RT (MK_RT const mkrt, MK_TYPN const typ, MK_STRN const ident) MK_RT_ATTR_HDL
 duplicate a type type as duplicate from existing type but the new name …
 
MK_EXTERN MK_OBJ MkTypeAlloc (MK_RT const mkrt, MK_TYPN const typ) MK_RT_ATTR_HDL
 alloc instance-memory for MkTypeS
 
MK_EXTERN MK_TYP MkTypeResolve (MK_RT const mkrt, MK_TYPN const typ) MK_RT_ATTR_HDL
 resolve a new type
 
MK_EXTERN void MkTypeDelete_RT (MK_RT const mkrt, MK_TYP const typ) MK_RT_ATTR_HDL
 delete a type object
 
MK_EXTERN void MkTypeLog_RT (MK_RT const mkrt, MK_TYPN const typ, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_INT const lvl)
 log the MkTypeS
 

MkBufferC type definition

#define MkBufferC_T   (&MK_RT_REF._MkBufferC_T)
 instance-type as specific-instance-type, useable in a class-macro as: class##_T
 
#define MkBufferC_TT   (MkTYP(MkBufferC_T))
 instance-type as common-instance-type, useable in a class-macro as: class##_TT
 
#define MkBufferST   MkBufferC_T
 instance-type as specific-instance-type
 
#define MkBufferSTT   (MkTYP(MkBufferST))
 instance-type as common-instance-type (cast from MkBufferST into MkTypeS) …
 
#define MkBufferC_type   MK_BUF
 same as MkBufferS but useable in a class-macro as: class##_type
 
#define MkBufferCT_X(instance)   ( (struct MkDefTypeS *) (MkOBJ_R(instance).type) )
 cast from an instance into the specific-instance-type
 
#define MkBufferCTT_X(instance)   (MkOBJ_R(instance).type)
 cast from an instance into the common-instance-type
 
#define MkBufferCT_TT(typ)   ( (struct MkDefTypeS *) (typ) )
 cast from an common-instance-type into an specific-instance-type
 
#define MkBufferC_NS   MK
 map class to namespace …
 
#define MkBufferCTT   MkBufferCTT
 instance-type as common-instance-type for MkBufferC in the target-programming-language (C,C++,C#,VB.NET,Java,Python,Ruby,Perl,PHP,Tcl or GO)
 
#define MkBufferCT   ( (struct MkDefTypeS *) MkBufferCTT )
 instance-type as specific-instance-type for MkBufferC in the target-programming-language (C,C++,C#,VB.NET,Java,Python,Ruby,Perl,PHP,Tcl or GO)
 
typedef struct MkBufferS MkBufferCR
 instance-struct-reference same as struct MkBufferS, useable in a class-macro as: class##R
 
typedef const struct MkBufferS MkBufferCNR
 const instance-struct-reference same as const struct MkBufferS, useable in a class-macro as: class##R
 

MkBufferC signature check

#define MkBufferC_Check(mng)   MkBufCheck(mng)
 
bool MkBufCheck (MK_MNGN mng)
 check MkBufferS%->Mk{ObjectS::signature} …
 

MkBuffer64C type definition

#define MkBuffer64C_T   (&MK_RT_REF._MkBuffer64C_T)
 instance-type as specific-instance-type, useable in a class-macro as: class##_T
 
#define MkBuffer64C_TT   (MkTYP(MkBuffer64C_T))
 instance-type as common-instance-type, useable in a class-macro as: class##_TT
 
#define MkBuffer64ST   MkBuffer64C_T
 instance-type as specific-instance-type
 
#define MkBuffer64STT   (MkTYP(MkBuffer64ST))
 instance-type as common-instance-type (cast from MkBuffer64ST into MkTypeS) …
 
#define MkBuffer64CT_X(instance)   ( (struct MkDefTypeS *) (MkOBJ_R(instance).type) )
 cast from an instance into the specific-instance-type
 
#define MkBuffer64CTT_X(instance)   (MkOBJ_R(instance).type)
 cast from an instance into the common-instance-type
 
#define MkBuffer64CT_TT(typ)   ( (struct MkDefTypeS *) (typ) )
 cast from an common-instance-type into an specific-instance-type
 
#define MkBuffer64C_NS   MK
 map class to namespace …
 
#define MkBuffer64CTT   MkBuffer64CTT
 instance-type as common-instance-type for MkBuffer64C in the target-programming-language (C,C++,C#,VB.NET,Java,Python,Ruby,Perl,PHP,Tcl or GO)
 
#define MkBuffer64CT   ( (struct MkDefTypeS *) MkBuffer64CTT )
 instance-type as specific-instance-type for MkBuffer64C in the target-programming-language (C,C++,C#,VB.NET,Java,Python,Ruby,Perl,PHP,Tcl or GO)
 
typedef struct MkBuffer64S MkBuffer64CR
 instance-struct-reference same as struct MkBuffer64S, useable in a class-macro as: class##R
 
typedef const struct MkBuffer64S MkBuffer64CNR
 const instance-struct-reference same as const struct MkBuffer64S, useable in a class-macro as: class##R
 

MkBuffer256C type definition

#define MkBuffer256C_T   (&MK_RT_REF._MkBuffer256C_T)
 instance-type as specific-instance-type, useable in a class-macro as: class##_T
 
#define MkBuffer256C_TT   (MkTYP(MkBuffer256C_T))
 instance-type as common-instance-type, useable in a class-macro as: class##_TT
 
#define MkBuffer256ST   MkBuffer256C_T
 instance-type as specific-instance-type
 
#define MkBuffer256STT   (MkTYP(MkBuffer256ST))
 instance-type as common-instance-type (cast from MkBuffer256ST into MkTypeS) …
 
#define MkBuffer256CT_X(instance)   ( (struct MkDefTypeS *) (MkOBJ_R(instance).type) )
 cast from an instance into the specific-instance-type
 
#define MkBuffer256CTT_X(instance)   (MkOBJ_R(instance).type)
 cast from an instance into the common-instance-type
 
#define MkBuffer256CT_TT(typ)   ( (struct MkDefTypeS *) (typ) )
 cast from an common-instance-type into an specific-instance-type
 
#define MkBuffer256C_NS   MK
 map class to namespace …
 
#define MkBuffer256CTT   MkBuffer256CTT
 instance-type as common-instance-type for MkBuffer256C in the target-programming-language (C,C++,C#,VB.NET,Java,Python,Ruby,Perl,PHP,Tcl or GO)
 
#define MkBuffer256CT   ( (struct MkDefTypeS *) MkBuffer256CTT )
 instance-type as specific-instance-type for MkBuffer256C in the target-programming-language (C,C++,C#,VB.NET,Java,Python,Ruby,Perl,PHP,Tcl or GO)
 
typedef struct MkBuffer256S MkBuffer256CR
 instance-struct-reference same as struct MkBuffer256S, useable in a class-macro as: class##R
 
typedef const struct MkBuffer256S MkBuffer256CNR
 const instance-struct-reference same as const struct MkBuffer256S, useable in a class-macro as: class##R
 

MkBuffer1024C type definition

#define MkBuffer1024C_T   (&MK_RT_REF._MkBuffer1024C_T)
 instance-type as specific-instance-type, useable in a class-macro as: class##_T
 
#define MkBuffer1024C_TT   (MkTYP(MkBuffer1024C_T))
 instance-type as common-instance-type, useable in a class-macro as: class##_TT
 
#define MkBuffer1024ST   MkBuffer1024C_T
 instance-type as specific-instance-type
 
#define MkBuffer1024STT   (MkTYP(MkBuffer1024ST))
 instance-type as common-instance-type (cast from MkBuffer1024ST into MkTypeS) …
 
#define MkBuffer1024CT_X(instance)   ( (struct MkDefTypeS *) (MkOBJ_R(instance).type) )
 cast from an instance into the specific-instance-type
 
#define MkBuffer1024CTT_X(instance)   (MkOBJ_R(instance).type)
 cast from an instance into the common-instance-type
 
#define MkBuffer1024CT_TT(typ)   ( (struct MkDefTypeS *) (typ) )
 cast from an common-instance-type into an specific-instance-type
 
#define MkBuffer1024C_NS   MK
 map class to namespace …
 
#define MkBuffer1024CTT   MkBuffer1024CTT
 instance-type as common-instance-type for MkBuffer1024C in the target-programming-language (C,C++,C#,VB.NET,Java,Python,Ruby,Perl,PHP,Tcl or GO)
 
#define MkBuffer1024CT   ( (struct MkDefTypeS *) MkBuffer1024CTT )
 instance-type as specific-instance-type for MkBuffer1024C in the target-programming-language (C,C++,C#,VB.NET,Java,Python,Ruby,Perl,PHP,Tcl or GO)
 
typedef struct MkBuffer1024S MkBuffer1024CR
 instance-struct-reference same as struct MkBuffer1024S, useable in a class-macro as: class##R
 
typedef const struct MkBuffer1024S MkBuffer1024CNR
 const instance-struct-reference same as const struct MkBuffer1024S, useable in a class-macro as: class##R
 

MkBufferStreamC type definition

#define MkBufferStreamC_T   (&MK_RT_REF._MkBufferStreamC_T)
 instance-type as specific-instance-type, useable in a class-macro as: class##_T
 
#define MkBufferStreamC_TT   (MkTYP(MkBufferStreamC_T))
 instance-type as common-instance-type, useable in a class-macro as: class##_TT