Compare commits

..

No commits in common. "3f5189f2219ef42bcd98e0c271d05830563d4332" and "f1e64b44f5cbb1553775d9207917c0a68b084a20" have entirely different histories.

10 changed files with 27 additions and 36 deletions

View File

@ -1,5 +1,5 @@
#ifndef CUTES_DEBUG_H #ifndef _fencer_debug_h
#define CUTES_DEBUG_H #define _fencer_debug_h
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -66,4 +66,4 @@ extern int g_debug_log_lvl;
}\ }\
} while(0) } while(0)
#endif // !CUTES_DEBUG_H #endif // !_fencer_debug_h

View File

@ -1,5 +1,5 @@
#ifndef CUTES_DICTIONARY_H #ifndef _fencer_hash_map_h
#define CUTES_DICTIONARY_H #define _fencer_hash_map_h
#include "list.h" #include "list.h"
@ -43,4 +43,4 @@ dictionary_new(sizeof(Type_))
#define dictionary_get_value(Type_, Dict_, Key_)\ #define dictionary_get_value(Type_, Dict_, Key_)\
*((Type_*)dictionary_get_raw(Dict_, Key_)) *((Type_*)dictionary_get_raw(Dict_, Key_))
#endif // !CUTES_DICTIONARY_H #endif // !_fencer_hash_map_h

6
drop.h
View File

@ -1,5 +1,5 @@
#ifndef CUTES_DROP_H #ifndef _fencer_drop_h
#define CUTES_DROP_H #define _fencer_drop_h
#include "typeclass_helpers.h" #include "typeclass_helpers.h"
@ -30,4 +30,4 @@ Drop T##_as_Drop(T* x) {\
};\ };\
return (Drop){.tc = &tc, .data = x};\ return (Drop){.tc = &tc, .data = x};\
} }
#endif // !CUTES_DROP_H #endif // !_fencer_drop_h

6
list.h
View File

@ -1,5 +1,5 @@
#ifndef CUTES_LIST_H #ifndef _fencer_list_h
#define CUTES_LIST_H #define _fencer_list_h
#include "stddef.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))) #define list_iterator_begin_as(T, __list) ((T*)(list_iterator_begin(__list)))
#endif // !CUTES_LIST_H #endif // !_fencer_list_h

View File

@ -1,9 +0,0 @@
#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

View File

@ -1,5 +1,5 @@
#ifndef CUTES_MIRROR_H #ifndef _fencer_mirror_h
#define CUTES_MIRROR_H #define _fencer_mirror_h
#include "typeclass_helpers.h" #include "typeclass_helpers.h"
#include "stdint.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) impl_Mirror_for(T, T##_get_typestring, T##_get_typeid, T##_get_typeclasses)
#endif // !CUTES_MIRROR_H #endif // !_fencer_mirror_h

View File

@ -1,5 +1,5 @@
#ifndef CUTES_STRUTIL_H #ifndef _fencer_strutil_h
#define CUTES_STRUTIL_H #define _fencer_strutil_h
#include "stdlib.h" #include "stdlib.h"
#include "stdint.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 strfirst_pred(const char* begin, const char* end, CharPredFn pred);
extern long strlast_pred(const char* rbegin, const char* rend, CharPredFn pred); extern long strlast_pred(const char* rbegin, const char* rend, CharPredFn pred);
#endif // !CUTES_STRUTIL_H #endif // !_fencer_strutil_h

View File

@ -1,5 +1,5 @@
#ifndef CUTES_TYPECLASS_HELPERS_H #ifndef _fencer_typeclass_helpers_h
#define CUTES_TYPECLASS_HELPERS_H #define _fencer_typeclass_helpers_h
#define TC_FN_TYPECHECK(__Return, __Name, ...)\ #define TC_FN_TYPECHECK(__Return, __Name, ...)\
__Return (*const __Name##_)(__VA_ARGS__) = __Name; (void)__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)\ #define decl_typeclass_impl(__Typeclass, __Type)\
extern __Typeclass __Type##_as_##__Typeclass(__Type*); extern __Typeclass __Type##_as_##__Typeclass(__Type*);
#endif // !CUTES_TYPECLASS_HELPERS_H #endif // !_fencer_typeclass_helpers_h

View File

@ -1,5 +1,5 @@
#ifndef CUTES_VARIANT_H #ifndef _fencer_variant_h
#define CUTES_VARIANT_H #define _fencer_variant_h
#include "vmath.h" #include "vmath.h"
#include "mirror.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 StringVariant(Value_, BufSize_) (Variant){.type = Variant_String, .as_string = Value_, .string_size = BufSize_}
#define UndefinedVariant() (Variant){.type = Variant_Undefined } #define UndefinedVariant() (Variant){.type = Variant_Undefined }
#endif // !CUTES_VARIANT_H #endif // !_fencer_variant_h

View File

@ -1,5 +1,5 @@
#ifndef CUTES_VMATH_H #ifndef _fencer_vmath_h
#define CUTES_VMATH_H #define _fencer_vmath_h
#include "stddef.h" #include "stddef.h"
#include <math.h> #include <math.h>
@ -178,4 +178,4 @@ IVector vmuli(IVector a, IVector b) {
return (IVector){a.x * b.x, a.y * b.y}; return (IVector){a.x * b.x, a.y * b.y};
} }
#endif // !CUTES_VMATH_H #endif // !_fencer_vmath_h