This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BIterator iterator, iterator_end; | |
| BIterator_FindEqualOrGreaterItem(&iterator, &tree, key_begin); | |
| BIterator_FindEqualOrGreaterItem(&iterator_end, &tree, key_end); | |
| Value sum = 0; | |
| while (!BIterator_Equals(&iterator, &iterator_end)) { | |
| sum += *iterator.value; | |
| BIterator_FindNextItem(&iterator); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct BTree; | |
| struct BIterator; | |
| void BTree_Initialize(BTree *tree); | |
| void BTree_Destroy(BTree *tree); | |
| Value *BTree_Get(BTree *tree, Key key); | |
| void BTree_Add(BTree *tree, Key key, Value value); | |
| void BTree_Remove(BTree *tree, Key key); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// zzz - very sleepy replacement, based on etw | |
| #define INITGUID | |
| #include <windows.h> | |
| #include <psapi.h> | |
| #include <tdh.h> | |
| #include <evntrace.h> | |
| #include <guiddef.h> | |
| #pragma warning(disable: 4091) | |
| #include <dbghelp.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Xeno | |
| enum Xeno_Kind { | |
| XENO_POINTER, | |
| XENO_AGGREGATE, | |
| XENO_FIRST_PRIMITIVE_TYPE, | |
| XENO_UINT8 = XENO_FIRST_PRIMITIVE_TYPE, | |
| XENO_UINT16, | |
| XENO_UINT32, | |
| XENO_UINT64, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define _CRT_SECURE_NO_WARNINGS | |
| #include <stdio.h> | |
| #include <windows.h> | |
| #include <stdint.h> | |
| #define Assert(x) \ | |
| if (!(x)) { MessageBoxA(0, #x, "Assertion Failure", MB_OK); __debugbreak(); } | |
| enum Register { | |
| RAX = 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define _CRT_SECURE_NO_WARNINGS | |
| #include <string.h> | |
| #include <stdio.h> | |
| #include <windows.h> | |
| #pragma warning (disable: 4146) | |
| #include <stdint.h> | |
| #ifdef _DEBUG | |
| #define Assert(x) \ | |
| if (!(x)) { MessageBoxA(0, #x, "Assertion Failure", MB_OK); __debugbreak(); } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "mu.h" | |
| #define _CRT_SECURE_NO_WARNINGS | |
| #include <malloc.h> | |
| #define _USE_MATH_DEFINES | |
| #include <math.h> | |
| #define _NO_CRT_STDIO_INLINE | |
| #include <stdio.h> | |
| #include <stdarg.h> | |
| #define NO_STRICT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // My investigations on the C standard compliance of Gob and related techniques: | |
| // https://gist.github.com/pervognsen/5249a405fe7d76ded1cf08ed50fa9176 | |
| #pragma once | |
| #include <stdint.h> | |
| #pragma pack(push, 8) | |
| #if __cplusplus >= 201103L || (__cplusplus && _MSC_VER >= 1900) |