init commit

This commit is contained in:
dzruyk
2022-04-09 03:21:15 +03:00
commit 6720dc58cd
7 changed files with 319 additions and 0 deletions

15
macro.h Normal file
View File

@@ -0,0 +1,15 @@
#pragma once
#define ARRSZ(arr) (sizeof(arr) / sizeof(*arr))
#define SWAP(a, b, type) do { \
type tmp; \
tmp = a; \
a = b; \
b = tmp; \
} while(0)
#define ARR_FOREACH(arr, item) \
for (item = arr; item != arr + ARRSZ(arr) * sizeof(*item); item++)