Use a macro for array copies

This commit is contained in:
Scott Lahteine
2017-03-04 19:19:06 -06:00
parent e141f3a03f
commit 87b03b16bd
3 changed files with 18 additions and 17 deletions

View File

@ -79,6 +79,7 @@
#define NUMERIC_SIGNED(a) (NUMERIC(a) || (a) == '-')
#define COUNT(a) (sizeof(a)/sizeof(*a))
#define ZERO(a) memset(a,0,sizeof(a))
#define COPY(a,b) memcpy(a,b,min(sizeof(a),sizeof(b)))
// Macros for initializing arrays
#define ARRAY_6(v1, v2, v3, v4, v5, v6, ...) { v1, v2, v3, v4, v5, v6 }