MkBufferListC - various functions to work on a MkBufferListS … More...
Macros | |
#define | MkBufferListSizeI(bfl) |
Functions | |
void | MkBufferListMove_RT (MK_RT mkrt, MK_BFL const to, MK_BFL const from) |
move all internal data from from to the end of to … | |
void | MkBufferListCopy_RT (MK_RT mkrt, MK_BFL const bfl, MK_BFLN const src) |
copy all internal data from src to tgt … | |
MK_BFL | MkBufferListPositionMerge_RT (MK_RT mkrt, MK_BFL const bfl, MK_BFL const source, MK_NUM position) |
merge a MkBufferListS list into an MkBufferListS object on position … | |
MK_NUM | MkBufferListSearchC_RT (MK_RT mkrt, MK_BFLN const bfl, MK_STRN const str, MK_NUM const len, MK_NUM const startindex) |
search MK_STR item from a MkBufferListS object starting at startindex … | |
MK_BFL | MkBufferListReset_RT (MK_RT mkrt, MK_BFL bfl) |
reset a MkBufferListC object … | |
MK_STRN | MkBufferListToString_RT (MK_RT mkrt, MK_BFLN const bfl) |
get a string representation of the bfl | |
MK_NAT_LIST | MkBufferListToList_RT (MK_RT mkrt, MK_BFLN const bfl) |
get a target-language list representation of the bfl … | |
MK_STRN_A | MkBufferListToStringList_RT (MK_RT mkrt, MK_BFLN const bfl, bool const unique) |
get a string-list representation of the bfl | |
MK_BUF | MkBufferListToBuffer_RT (MK_RT mkrt, MK_BFLN const bfl) |
Export a bfl into an MkBufferC using an MkBufferStreamC … | |
MK_I32 | MkBufferListCmp_RT (MK_RT mkrt, MK_BFLN const bfl, MK_BFLN const bfl2) |
compare two buffer-list … | |
MK_BFL | MkBufferListSort_RT (MK_RT mkrt, MK_BFL const bfl) |
sort a MkBufferListC … | |
void | MkBufferListReserve_RT (MK_RT mkrt, MK_BFL const bfl, MK_NUM const num) |
reserve num items in a MkBufferListC object … | |
MK_NUM | MkBufferListSize_RT (MK_RT mkrt, MK_BFLN const bfl) |
get the number-of-items in the bfl … | |
MK_BFL | MkBufferListFileGlob_RT (MK_RT mkrt, MK_STRN const pattern_match) |
create a new MkBufferListC using the result from a filesystem glob operation … | |
MkBufferListC - various functions to work on a MkBufferListS …
#define MkBufferListCmp | ( | ... | ) |
Definition at line 585 of file kernel_overload_mk.h.
#define MkBufferListCmp_NULL | ( | ... | ) |
Definition at line 584 of file kernel_overload_mk.h.
#define MkBufferListCopy | ( | ... | ) |
Definition at line 587 of file kernel_overload_mk.h.
#define MkBufferListCopy_NULL | ( | ... | ) |
Definition at line 586 of file kernel_overload_mk.h.
#define MkBufferListFileGlob | ( | ... | ) |
Definition at line 571 of file kernel_overload_mk.h.
#define MkBufferListFileGlob_NULL | ( | ... | ) |
Definition at line 570 of file kernel_overload_mk.h.
#define MkBufferListMove | ( | ... | ) |
Definition at line 589 of file kernel_overload_mk.h.
#define MkBufferListMove_NULL | ( | ... | ) |
Definition at line 588 of file kernel_overload_mk.h.
#define MkBufferListPositionMerge | ( | ... | ) |
Definition at line 575 of file kernel_overload_mk.h.
#define MkBufferListPositionMerge_NULL | ( | ... | ) |
Definition at line 574 of file kernel_overload_mk.h.
#define MkBufferListReserve | ( | ... | ) |
Definition at line 591 of file kernel_overload_mk.h.
#define MkBufferListReserve_NULL | ( | ... | ) |
Definition at line 590 of file kernel_overload_mk.h.
#define MkBufferListReset | ( | ... | ) |
Definition at line 577 of file kernel_overload_mk.h.
#define MkBufferListReset_NULL | ( | ... | ) |
Definition at line 576 of file kernel_overload_mk.h.
#define MkBufferListSearchC | ( | ... | ) |
Definition at line 593 of file kernel_overload_mk.h.
#define MkBufferListSearchC_2 | ( | bfl, | |
str ) |
Definition at line 595 of file kernel_overload_mk.h.
#define MkBufferListSearchC_3 | ( | bfl, | |
str, | |||
len ) |
Definition at line 594 of file kernel_overload_mk.h.
#define MkBufferListSearchC_NULL | ( | ... | ) |
Definition at line 592 of file kernel_overload_mk.h.
#define MkBufferListSize | ( | ... | ) |
Definition at line 597 of file kernel_overload_mk.h.
#define MkBufferListSize_NULL | ( | ... | ) |
Definition at line 596 of file kernel_overload_mk.h.
#define MkBufferListSizeI | ( | bfl | ) |
Definition at line 817 of file MkBufferListC_def_mk.h.
#define MkBufferListSort | ( | ... | ) |
Definition at line 579 of file kernel_overload_mk.h.
#define MkBufferListSort_NULL | ( | ... | ) |
Definition at line 578 of file kernel_overload_mk.h.
#define MkBufferListToBuffer | ( | ... | ) |
Definition at line 581 of file kernel_overload_mk.h.
#define MkBufferListToBuffer_NULL | ( | ... | ) |
Definition at line 580 of file kernel_overload_mk.h.
#define MkBufferListToList | ( | ... | ) |
Definition at line 599 of file kernel_overload_mk.h.
#define MkBufferListToList_NULL | ( | ... | ) |
Definition at line 598 of file kernel_overload_mk.h.
#define MkBufferListToString | ( | ... | ) |
Definition at line 601 of file kernel_overload_mk.h.
#define MkBufferListToString_NULL | ( | ... | ) |
Definition at line 600 of file kernel_overload_mk.h.
#define MkBufferListToStringList | ( | ... | ) |
Definition at line 603 of file kernel_overload_mk.h.
#define MkBufferListToStringList_NULL | ( | ... | ) |
Definition at line 602 of file kernel_overload_mk.h.
compare two buffer-list …
First the size is compared and if the size is equal every argument starting from 0 is compared with BufferCmp. The first BufferCmp with a result != 0 finish the comparison and this result is returned.
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | bfl | the MkBufferListS instance to work on |
[in] | bfl2 | buffer-list to compare |
copy all internal data from src to tgt …
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | bfl | the MkBufferListS instance to work on |
[in] | src | the source of the copy |
create a new MkBufferListC using the result from a filesystem glob operation …
move all internal data from from to the end of to …
after the move… the from is empty and only the shell exists
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | to | the target of the move |
[in] | from | the source of the move |
MK_BFL MkBufferListPositionMerge_RT | ( | MK_RT | mkrt, |
MK_BFL const | bfl, | ||
MK_BFL const | source, | ||
MK_NUM | position ) |
merge a MkBufferListS list into an MkBufferListS object on position …
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | bfl | the MkBufferListS instance to work on |
[in] | source | the object to be merged into bfl, afterwords the source is empty and can be deleted |
[in] | position | insert in at position, shift all following arguments one up. Set position to 0 to append to the beginning or set position to -1 to append to the end |
reserve num items in a MkBufferListC object …
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
bfl | the MkBufferListC object to reserve memory | |
num | reserve the number of items for later use. |
reset a MkBufferListC object …
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | bfl | the MkBufferListS instance to work on |
MK_NUM MkBufferListSearchC_RT | ( | MK_RT | mkrt, |
MK_BFLN const | bfl, | ||
MK_STRN const | str, | ||
MK_NUM const | len, | ||
MK_NUM const | startindex ) |
search MK_STR item from a MkBufferListS object starting at startindex …
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | bfl | the MkBufferListS instance to work on |
str | the string to search for | |
len | the length of str or -1 to calulate the length with strlen | |
startindex | start searching in buf from index startindex |
a typical usage for this code is parsing an MkBufferListS object for multiple occurrences of a string
get the number-of-items in the bfl …
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | bfl | the MkBufferListS instance to work on |
sort a MkBufferListC …
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | bfl | the MkBufferListS instance to work on |
Export a bfl into an MkBufferC using an MkBufferStreamC …
An buffer is able to hold all primitive types and LIST of primitive types. An buffer-list is an Indexed-LIST representation of a LIST of buffer.
To add a buffer-list into an buffer the buffer-list have to be converted into a buffer-stream and the buffer-stream have to be exported as buffer. The buffer is finally apended to the buffer-list.
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | bfl | the MkBufferListS instance to work on |
MK_NAT_LIST MkBufferListToList_RT | ( | MK_RT | mkrt, |
MK_BFLN const | bfl ) |
get a target-language list representation of the bfl …
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | bfl | the MkBufferListS instance to work on |
get a string representation of the bfl
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | bfl | the MkBufferListS instance to work on |
get a string-list representation of the bfl
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | bfl | the MkBufferListS instance to work on |
[out] | unique | if true the return belongs to the caller and have to be freed, if false the return belongs to the function and must NOT be freed. |