Compare commits
2 Commits
f1e64b44f5
...
3f5189f221
Author | SHA1 | Date |
---|---|---|
Sara | 3f5189f221 | |
Sara | 63c6a536e8 |
6
debug.h
6
debug.h
|
@ -1,5 +1,5 @@
|
|||
#ifndef _fencer_debug_h
|
||||
#define _fencer_debug_h
|
||||
#ifndef CUTES_DEBUG_H
|
||||
#define CUTES_DEBUG_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -66,4 +66,4 @@ extern int g_debug_log_lvl;
|
|||
}\
|
||||
} while(0)
|
||||
|
||||
#endif // !_fencer_debug_h
|
||||
#endif // !CUTES_DEBUG_H
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef _fencer_hash_map_h
|
||||
#define _fencer_hash_map_h
|
||||
#ifndef CUTES_DICTIONARY_H
|
||||
#define CUTES_DICTIONARY_H
|
||||
|
||||
#include "list.h"
|
||||
|
||||
|
@ -43,4 +43,4 @@ dictionary_new(sizeof(Type_))
|
|||
#define dictionary_get_value(Type_, Dict_, Key_)\
|
||||
*((Type_*)dictionary_get_raw(Dict_, Key_))
|
||||
|
||||
#endif // !_fencer_hash_map_h
|
||||
#endif // !CUTES_DICTIONARY_H
|
||||
|
|
6
drop.h
6
drop.h
|
@ -1,5 +1,5 @@
|
|||
#ifndef _fencer_drop_h
|
||||
#define _fencer_drop_h
|
||||
#ifndef CUTES_DROP_H
|
||||
#define CUTES_DROP_H
|
||||
|
||||
#include "typeclass_helpers.h"
|
||||
|
||||
|
@ -30,4 +30,4 @@ Drop T##_as_Drop(T* x) {\
|
|||
};\
|
||||
return (Drop){.tc = &tc, .data = x};\
|
||||
}
|
||||
#endif // !_fencer_drop_h
|
||||
#endif // !CUTES_DROP_H
|
||||
|
|
6
list.h
6
list.h
|
@ -1,5 +1,5 @@
|
|||
#ifndef _fencer_list_h
|
||||
#define _fencer_list_h
|
||||
#ifndef CUTES_LIST_H
|
||||
#define CUTES_LIST_H
|
||||
|
||||
#include "stddef.h"
|
||||
|
||||
|
@ -38,4 +38,4 @@ extern size_t list_contains(List* self, void* query);
|
|||
|
||||
#define list_iterator_begin_as(T, __list) ((T*)(list_iterator_begin(__list)))
|
||||
|
||||
#endif // !_fencer_list_h
|
||||
#endif // !CUTES_LIST_H
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#ifndef CUTES_MATHEXT_H
|
||||
#define CUTES_MATHEXT_H
|
||||
|
||||
#define MIN(x__, min__) (((x__)<=(min__))?(min__):(x__))
|
||||
#define MAX(x__, max__) (((x__)>=(max__))?(max__):(x__))
|
||||
|
||||
#define CLAMP(x__, min__, max__) MIN(MAX(x__, max__), min__)
|
||||
|
||||
#endif // !CUTES_MATHEXT_H
|
6
mirror.h
6
mirror.h
|
@ -1,5 +1,5 @@
|
|||
#ifndef _fencer_mirror_h
|
||||
#define _fencer_mirror_h
|
||||
#ifndef CUTES_MIRROR_H
|
||||
#define CUTES_MIRROR_H
|
||||
|
||||
#include "typeclass_helpers.h"
|
||||
#include "stdint.h"
|
||||
|
@ -123,4 +123,4 @@ Dictionary* T##_get_typeclasses(T* self) {\
|
|||
}\
|
||||
impl_Mirror_for(T, T##_get_typestring, T##_get_typeid, T##_get_typeclasses)
|
||||
|
||||
#endif // !_fencer_mirror_h
|
||||
#endif // !CUTES_MIRROR_H
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef _fencer_strutil_h
|
||||
#define _fencer_strutil_h
|
||||
#ifndef CUTES_STRUTIL_H
|
||||
#define CUTES_STRUTIL_H
|
||||
|
||||
#include "stdlib.h"
|
||||
#include "stdint.h"
|
||||
|
@ -14,4 +14,4 @@ extern long strcount(const char* begin, const char* end, char search);
|
|||
extern long strfirst_pred(const char* begin, const char* end, CharPredFn pred);
|
||||
extern long strlast_pred(const char* rbegin, const char* rend, CharPredFn pred);
|
||||
|
||||
#endif // !_fencer_strutil_h
|
||||
#endif // !CUTES_STRUTIL_H
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef _fencer_typeclass_helpers_h
|
||||
#define _fencer_typeclass_helpers_h
|
||||
#ifndef CUTES_TYPECLASS_HELPERS_H
|
||||
#define CUTES_TYPECLASS_HELPERS_H
|
||||
|
||||
#define TC_FN_TYPECHECK(__Return, __Name, ...)\
|
||||
__Return (*const __Name##_)(__VA_ARGS__) = __Name; (void)__Name##_
|
||||
|
@ -7,4 +7,4 @@ __Return (*const __Name##_)(__VA_ARGS__) = __Name; (void)__Name##_
|
|||
#define decl_typeclass_impl(__Typeclass, __Type)\
|
||||
extern __Typeclass __Type##_as_##__Typeclass(__Type*);
|
||||
|
||||
#endif // !_fencer_typeclass_helpers_h
|
||||
#endif // !CUTES_TYPECLASS_HELPERS_H
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef _fencer_variant_h
|
||||
#define _fencer_variant_h
|
||||
#ifndef CUTES_VARIANT_H
|
||||
#define CUTES_VARIANT_H
|
||||
|
||||
#include "vmath.h"
|
||||
#include "mirror.h"
|
||||
|
@ -33,4 +33,4 @@ extern void destroy_contained(Variant* self);
|
|||
#define StringVariant(Value_, BufSize_) (Variant){.type = Variant_String, .as_string = Value_, .string_size = BufSize_}
|
||||
#define UndefinedVariant() (Variant){.type = Variant_Undefined }
|
||||
|
||||
#endif // !_fencer_variant_h
|
||||
#endif // !CUTES_VARIANT_H
|
||||
|
|
6
vmath.h
6
vmath.h
|
@ -1,5 +1,5 @@
|
|||
#ifndef _fencer_vmath_h
|
||||
#define _fencer_vmath_h
|
||||
#ifndef CUTES_VMATH_H
|
||||
#define CUTES_VMATH_H
|
||||
|
||||
#include "stddef.h"
|
||||
#include <math.h>
|
||||
|
@ -178,4 +178,4 @@ IVector vmuli(IVector a, IVector b) {
|
|||
return (IVector){a.x * b.x, a.y * b.y};
|
||||
}
|
||||
|
||||
#endif // !_fencer_vmath_h
|
||||
#endif // !CUTES_VMATH_H
|
||||
|
|
Loading…
Reference in New Issue