|
|
@ -237,6 +237,38 @@ |
|
|
|
memcpy(&a[0],&b[0],_MIN(sizeof(a),sizeof(b))); \ |
|
|
|
}while(0) |
|
|
|
|
|
|
|
#define CODE_9( A,B,C,D,E,F,G,H,I,...) A; B; C; D; E; F; G; H; I |
|
|
|
#define CODE_8( A,B,C,D,E,F,G,H,...) A; B; C; D; E; F; G; H |
|
|
|
#define CODE_7( A,B,C,D,E,F,G,...) A; B; C; D; E; F; G |
|
|
|
#define CODE_6( A,B,C,D,E,F,...) A; B; C; D; E; F |
|
|
|
#define CODE_5( A,B,C,D,E,...) A; B; C; D; E |
|
|
|
#define CODE_4( A,B,C,D,...) A; B; C; D |
|
|
|
#define CODE_3( A,B,C,...) A; B; C |
|
|
|
#define CODE_2( A,B,...) A; B |
|
|
|
#define CODE_1( A,...) A |
|
|
|
#define _CODE_N(N,V...) CODE_##N(V) |
|
|
|
#define CODE_N(N,V...) _CODE_N(N,V) |
|
|
|
|
|
|
|
#define GANG_16(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,...) A B C D E F G H I J K L M N O P |
|
|
|
#define GANG_15(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,...) A B C D E F G H I J K L M N O |
|
|
|
#define GANG_14(A,B,C,D,E,F,G,H,I,J,K,L,M,N,...) A B C D E F G H I J K L M N |
|
|
|
#define GANG_13(A,B,C,D,E,F,G,H,I,J,K,L,M...) A B C D E F G H I J K L M |
|
|
|
#define GANG_12(A,B,C,D,E,F,G,H,I,J,K,L...) A B C D E F G H I J K L |
|
|
|
#define GANG_11(A,B,C,D,E,F,G,H,I,J,K,...) A B C D E F G H I J K |
|
|
|
#define GANG_10(A,B,C,D,E,F,G,H,I,J,...) A B C D E F G H I J |
|
|
|
#define GANG_9( A,B,C,D,E,F,G,H,I,...) A B C D E F G H I |
|
|
|
#define GANG_8( A,B,C,D,E,F,G,H,...) A B C D E F G H |
|
|
|
#define GANG_7( A,B,C,D,E,F,G,...) A B C D E F G |
|
|
|
#define GANG_6( A,B,C,D,E,F,...) A B C D E F |
|
|
|
#define GANG_5( A,B,C,D,E,...) A B C D E |
|
|
|
#define GANG_4( A,B,C,D,...) A B C D |
|
|
|
#define GANG_3( A,B,C,...) A B C |
|
|
|
#define GANG_2( A,B,...) A B |
|
|
|
#define GANG_1( A,...) A |
|
|
|
#define _GANG_N(N,V...) GANG_##N(V) |
|
|
|
#define GANG_N(N,V...) _GANG_N(N,V) |
|
|
|
#define GANG_N_1(N,K) _GANG_N(N,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K) |
|
|
|
|
|
|
|
// Macros for initializing arrays
|
|
|
|
#define LIST_16(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,...) A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P |
|
|
|
#define LIST_15(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,...) A,B,C,D,E,F,G,H,I,J,K,L,M,N,O |
|
|
@ -254,10 +286,13 @@ |
|
|
|
#define LIST_3( A,B,C,...) A,B,C |
|
|
|
#define LIST_2( A,B,...) A,B |
|
|
|
#define LIST_1( A,...) A |
|
|
|
#define LIST_0(...) |
|
|
|
|
|
|
|
#define _LIST_N(N,V...) LIST_##N(V) |
|
|
|
#define LIST_N(N,V...) _LIST_N(N,V) |
|
|
|
#define LIST_N_1(N,K) _LIST_N(N,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K) |
|
|
|
#define ARRAY_N(N,V...) { _LIST_N(N,V) } |
|
|
|
#define ARRAY_N_1(N,K) { LIST_N_1(N,K) } |
|
|
|
|
|
|
|
#define _JOIN_1(O) (O) |
|
|
|
#define JOIN_N(N,C,V...) (DO(JOIN,C,LIST_N(N,V))) |
|
|
@ -465,6 +500,9 @@ |
|
|
|
#define ADD8(N) ADD4(ADD4(N)) |
|
|
|
#define ADD9(N) ADD4(ADD5(N)) |
|
|
|
#define ADD10(N) ADD5(ADD5(N)) |
|
|
|
#define SUM(A,B) _CAT(ADD,A)(B) |
|
|
|
#define DOUBLE_(n) ADD##n(n) |
|
|
|
#define DOUBLE(n) DOUBLE_(n) |
|
|
|
|
|
|
|
// Macros for subtracting
|
|
|
|
#define DEC_0 0 |
|
|
|