diff --git a/.gitignore b/.gitignore index 0187b3d..ed09e27 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ build/ *~ +*.sublime-project +*.sublime-workspace diff --git a/fakegen.rb b/fakegen.rb index 6c4ac21..a393eed 100644 --- a/fakegen.rb +++ b/fakegen.rb @@ -423,17 +423,6 @@ def output_macro_counting_shortcuts #{generate_arg_sequence($MAX_ARGS - 1, '', true, ',')} -#define FAKE_VALUE_FUNC(...) \ - FUNC_VALUE_(PP_NARG_MINUS2(__VA_ARGS__), __VA_ARGS__) - -#define FUNC_VALUE_(N,...) \ - FUNC_VALUE_N(N,__VA_ARGS__) - -#define FUNC_VALUE_N(N,...) \ - FAKE_VALUE_FUNC ## N(__VA_ARGS__) - - - #define PP_NARG_MINUS1(...) \ PP_NARG_MINUS1_(__VA_ARGS__, PP_RSEQ_N_MINUS1()) @@ -446,6 +435,19 @@ def output_macro_counting_shortcuts #{generate_arg_sequence($MAX_ARGS, '', true, ',')} + +/* DECLARE AND DEFINE FAKE FUNCTIONS - PLACE IN TEST FILES */ + +#define FAKE_VALUE_FUNC(...) \ + FUNC_VALUE_(PP_NARG_MINUS2(__VA_ARGS__), __VA_ARGS__) + +#define FUNC_VALUE_(N,...) \ + FUNC_VALUE_N(N,__VA_ARGS__) + +#define FUNC_VALUE_N(N,...) \ + FAKE_VALUE_FUNC ## N(__VA_ARGS__) + + #define FAKE_VOID_FUNC(...) \ FUNC_VOID_(PP_NARG_MINUS1(__VA_ARGS__), __VA_ARGS__) @@ -475,6 +477,92 @@ def output_macro_counting_shortcuts #define FUNC_VOID_VARARG_N(N,...) \ FAKE_VOID_FUNC ## N ## _VARARG(__VA_ARGS__) + + +/* DECLARE FAKE FUNCTIONS - PLACE IN HEADER FILES */ + +#define DECLARE_FAKE_VALUE_FUNC(...) \ + DEC_FUNC_VALUE_(PP_NARG_MINUS2(__VA_ARGS__), __VA_ARGS__) + +#define DEC_FUNC_VALUE_(N,...) \ + DEC_FUNC_VALUE_N(N,__VA_ARGS__) + +#define DEC_FUNC_VALUE_N(N,...) \ + DECLARE_FAKE_VALUE_FUNC ## N(__VA_ARGS__) + + +#define DECLARE_FAKE_VOID_FUNC(...) \ + DEC_FUNC_VOID_(PP_NARG_MINUS1(__VA_ARGS__), __VA_ARGS__) + +#define DEC_FUNC_VOID_(N,...) \ + DEC_FUNC_VOID_N(N, __VA_ARGS__) + +#define DEC_FUNC_VOID_N(N,...) \ + DECLARE_FAKE_VOID_FUNC ## N(__VA_ARGS__) + + +#define DECLARE_FAKE_VALUE_FUNC_VARARG(...) \ + DEC_FUNC_VALUE_VARARG_(PP_NARG_MINUS2(__VA_ARGS__), __VA_ARGS__) + +#define DEC_FUNC_VALUE_VARARG_(N,...) \ + DEC_FUNC_VALUE_VARARG_N(N, __VA_ARGS__) + +#define DEC_FUNC_VALUE_VARARG_N(N,...) \ + DECLARE_FAKE_VALUE_FUNC ## N ## _VARARG(__VA_ARGS__) + + +#define DECLARE_FAKE_VOID_FUNC_VARARG(...) \ + DEC_FUNC_VOID_VARARG_(PP_NARG_MINUS1(__VA_ARGS__), __VA_ARGS__) + +#define DEC_FUNC_VOID_VARARG_(N,...) \ + DEC_FUNC_VOID_VARARG_N(N, __VA_ARGS__) + +#define DEC_FUNC_VOID_VARARG_N(N,...) \ + DECLARE_FAKE_VOID_FUNC ## N ## _VARARG(__VA_ARGS__) + + + +/* DEFINE FAKE FUNCTIONS - PLACE IN SOURCE FILES */ + +#define DEFINE_FAKE_VALUE_FUNC(...) \ + DEF_FUNC_VALUE_(PP_NARG_MINUS2(__VA_ARGS__), __VA_ARGS__) + +#define DEF_FUNC_VALUE_(N,...) \ + DEF_FUNC_VALUE_N(N,__VA_ARGS__) + +#define DEF_FUNC_VALUE_N(N,...) \ + DEFINE_FAKE_VALUE_FUNC ## N(__VA_ARGS__) + + +#define DEFINE_FAKE_VOID_FUNC(...) \ + DEF_FUNC_VOID_(PP_NARG_MINUS1(__VA_ARGS__), __VA_ARGS__) + +#define DEF_FUNC_VOID_(N,...) \ + DEF_FUNC_VOID_N(N,__VA_ARGS__) + +#define DEF_FUNC_VOID_N(N,...) \ + DEFINE_FAKE_VOID_FUNC ## N(__VA_ARGS__) + + +#define DEFINE_FAKE_VALUE_FUNC_VARARG(...) \ + DEF_FUNC_VALUE_VARARG(PP_NARG_MINUS2(__VA_ARGS__), __VA_ARGS__) + +#define DEF_FUNC_VALUE_VARARG(N,...) \ + DEF_FUNC_VALUE_VARARG_N(N,__VA_ARGS__) + +#define DEF_FUNC_VALUE_VARARG_N(N,...) \ + DEFINE_FAKE_VALUE_FUNC ## N ## _VARARG(__VA_ARGS__) + + +#define DEFINE_FAKE_VOID_FUNC_VARARG(...) \ + DEF_FUNC_VOID_VARARG(PP_NARG_MINUS1(__VA_ARGS__), __VA_ARGS__) + +#define DEF_FUNC_VOID_VARARG(N,...) \ + DEF_FUNC_VOID_VARARG_N(N,__VA_ARGS__) + +#define DEF_FUNC_VOID_VARARG_N(N,...) \ + DEFINE_FAKE_VOID_FUNC ## N ## _VARARG(__VA_ARGS__) + MACRO_COUNTING end diff --git a/fff.h b/fff.h index ee664dd..4094b91 100644 --- a/fff.h +++ b/fff.h @@ -29,7 +29,7 @@ SOFTWARE. #include #include /* For memset and memcpy */ -#define FFF_MAX_ARGS (25u) +#define FFF_MAX_ARGS (20u) #ifndef FFF_ARG_HISTORY_LEN #define FFF_ARG_HISTORY_LEN (50u) #endif @@ -1619,1096 +1619,24 @@ FFF_END_EXTERN_C \ DEFINE_FAKE_VOID_FUNC20(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE) \ -#define DECLARE_FAKE_VOID_FUNC21(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE) \ - FFF_EXTERN_C \ - typedef struct FUNCNAME##_Fake { \ - DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ - DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ - DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ - DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ - DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ - DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ - DECLARE_ARG(ARG19_TYPE, 19, FUNCNAME) \ - DECLARE_ARG(ARG20_TYPE, 20, FUNCNAME) \ - DECLARE_ALL_FUNC_COMMON \ - DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20); \ - } FUNCNAME##_Fake;\ - extern FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME##_reset(); \ - FFF_END_EXTERN_C \ - -#define DEFINE_FAKE_VOID_FUNC21(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE) \ - FFF_EXTERN_C \ - FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20){ \ - SAVE_ARG(FUNCNAME, 0); \ - SAVE_ARG(FUNCNAME, 1); \ - SAVE_ARG(FUNCNAME, 2); \ - SAVE_ARG(FUNCNAME, 3); \ - SAVE_ARG(FUNCNAME, 4); \ - SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ - SAVE_ARG(FUNCNAME, 18); \ - SAVE_ARG(FUNCNAME, 19); \ - SAVE_ARG(FUNCNAME, 20); \ - if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ - SAVE_ARG_HISTORY(FUNCNAME, 0); \ - SAVE_ARG_HISTORY(FUNCNAME, 1); \ - SAVE_ARG_HISTORY(FUNCNAME, 2); \ - SAVE_ARG_HISTORY(FUNCNAME, 3); \ - SAVE_ARG_HISTORY(FUNCNAME, 4); \ - SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ - SAVE_ARG_HISTORY(FUNCNAME, 18); \ - SAVE_ARG_HISTORY(FUNCNAME, 19); \ - SAVE_ARG_HISTORY(FUNCNAME, 20); \ - }\ - else{\ - HISTORY_DROPPED(FUNCNAME);\ - }\ - INCREMENT_CALL_COUNT(FUNCNAME); \ - REGISTER_CALL(FUNCNAME); \ - if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ - if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20); \ - } \ - else{ \ - FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20); \ - } \ - } \ - if (FUNCNAME##_fake.custom_fake) FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20); \ - } \ - DEFINE_RESET_FUNCTION(FUNCNAME) \ - FFF_END_EXTERN_C \ - -#define FAKE_VOID_FUNC21(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE) \ - DECLARE_FAKE_VOID_FUNC21(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE) \ - DEFINE_FAKE_VOID_FUNC21(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE) \ - - -#define DECLARE_FAKE_VOID_FUNC22(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE) \ - FFF_EXTERN_C \ - typedef struct FUNCNAME##_Fake { \ - DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ - DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ - DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ - DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ - DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ - DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ - DECLARE_ARG(ARG19_TYPE, 19, FUNCNAME) \ - DECLARE_ARG(ARG20_TYPE, 20, FUNCNAME) \ - DECLARE_ARG(ARG21_TYPE, 21, FUNCNAME) \ - DECLARE_ALL_FUNC_COMMON \ - DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21); \ - } FUNCNAME##_Fake;\ - extern FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME##_reset(); \ - FFF_END_EXTERN_C \ - -#define DEFINE_FAKE_VOID_FUNC22(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE) \ - FFF_EXTERN_C \ - FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21){ \ - SAVE_ARG(FUNCNAME, 0); \ - SAVE_ARG(FUNCNAME, 1); \ - SAVE_ARG(FUNCNAME, 2); \ - SAVE_ARG(FUNCNAME, 3); \ - SAVE_ARG(FUNCNAME, 4); \ - SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ - SAVE_ARG(FUNCNAME, 18); \ - SAVE_ARG(FUNCNAME, 19); \ - SAVE_ARG(FUNCNAME, 20); \ - SAVE_ARG(FUNCNAME, 21); \ - if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ - SAVE_ARG_HISTORY(FUNCNAME, 0); \ - SAVE_ARG_HISTORY(FUNCNAME, 1); \ - SAVE_ARG_HISTORY(FUNCNAME, 2); \ - SAVE_ARG_HISTORY(FUNCNAME, 3); \ - SAVE_ARG_HISTORY(FUNCNAME, 4); \ - SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ - SAVE_ARG_HISTORY(FUNCNAME, 18); \ - SAVE_ARG_HISTORY(FUNCNAME, 19); \ - SAVE_ARG_HISTORY(FUNCNAME, 20); \ - SAVE_ARG_HISTORY(FUNCNAME, 21); \ - }\ - else{\ - HISTORY_DROPPED(FUNCNAME);\ - }\ - INCREMENT_CALL_COUNT(FUNCNAME); \ - REGISTER_CALL(FUNCNAME); \ - if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ - if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21); \ - } \ - else{ \ - FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21); \ - } \ - } \ - if (FUNCNAME##_fake.custom_fake) FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21); \ - } \ - DEFINE_RESET_FUNCTION(FUNCNAME) \ - FFF_END_EXTERN_C \ - -#define FAKE_VOID_FUNC22(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE) \ - DECLARE_FAKE_VOID_FUNC22(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE) \ - DEFINE_FAKE_VOID_FUNC22(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE) \ - - -#define DECLARE_FAKE_VOID_FUNC23(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE) \ - FFF_EXTERN_C \ - typedef struct FUNCNAME##_Fake { \ - DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ - DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ - DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ - DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ - DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ - DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ - DECLARE_ARG(ARG19_TYPE, 19, FUNCNAME) \ - DECLARE_ARG(ARG20_TYPE, 20, FUNCNAME) \ - DECLARE_ARG(ARG21_TYPE, 21, FUNCNAME) \ - DECLARE_ARG(ARG22_TYPE, 22, FUNCNAME) \ - DECLARE_ALL_FUNC_COMMON \ - DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22); \ - } FUNCNAME##_Fake;\ - extern FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME##_reset(); \ - FFF_END_EXTERN_C \ - -#define DEFINE_FAKE_VOID_FUNC23(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE) \ - FFF_EXTERN_C \ - FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22){ \ - SAVE_ARG(FUNCNAME, 0); \ - SAVE_ARG(FUNCNAME, 1); \ - SAVE_ARG(FUNCNAME, 2); \ - SAVE_ARG(FUNCNAME, 3); \ - SAVE_ARG(FUNCNAME, 4); \ - SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ - SAVE_ARG(FUNCNAME, 18); \ - SAVE_ARG(FUNCNAME, 19); \ - SAVE_ARG(FUNCNAME, 20); \ - SAVE_ARG(FUNCNAME, 21); \ - SAVE_ARG(FUNCNAME, 22); \ - if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ - SAVE_ARG_HISTORY(FUNCNAME, 0); \ - SAVE_ARG_HISTORY(FUNCNAME, 1); \ - SAVE_ARG_HISTORY(FUNCNAME, 2); \ - SAVE_ARG_HISTORY(FUNCNAME, 3); \ - SAVE_ARG_HISTORY(FUNCNAME, 4); \ - SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ - SAVE_ARG_HISTORY(FUNCNAME, 18); \ - SAVE_ARG_HISTORY(FUNCNAME, 19); \ - SAVE_ARG_HISTORY(FUNCNAME, 20); \ - SAVE_ARG_HISTORY(FUNCNAME, 21); \ - SAVE_ARG_HISTORY(FUNCNAME, 22); \ - }\ - else{\ - HISTORY_DROPPED(FUNCNAME);\ - }\ - INCREMENT_CALL_COUNT(FUNCNAME); \ - REGISTER_CALL(FUNCNAME); \ - if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ - if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22); \ - } \ - else{ \ - FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22); \ - } \ - } \ - if (FUNCNAME##_fake.custom_fake) FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22); \ - } \ - DEFINE_RESET_FUNCTION(FUNCNAME) \ - FFF_END_EXTERN_C \ - -#define FAKE_VOID_FUNC23(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE) \ - DECLARE_FAKE_VOID_FUNC23(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE) \ - DEFINE_FAKE_VOID_FUNC23(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE) \ - - -#define DECLARE_FAKE_VOID_FUNC24(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE) \ - FFF_EXTERN_C \ - typedef struct FUNCNAME##_Fake { \ - DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ - DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ - DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ - DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ - DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ - DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ - DECLARE_ARG(ARG19_TYPE, 19, FUNCNAME) \ - DECLARE_ARG(ARG20_TYPE, 20, FUNCNAME) \ - DECLARE_ARG(ARG21_TYPE, 21, FUNCNAME) \ - DECLARE_ARG(ARG22_TYPE, 22, FUNCNAME) \ - DECLARE_ARG(ARG23_TYPE, 23, FUNCNAME) \ - DECLARE_ALL_FUNC_COMMON \ - DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22, ARG23_TYPE arg23); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22, ARG23_TYPE arg23); \ - } FUNCNAME##_Fake;\ - extern FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME##_reset(); \ - FFF_END_EXTERN_C \ - -#define DEFINE_FAKE_VOID_FUNC24(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE) \ - FFF_EXTERN_C \ - FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22, ARG23_TYPE arg23){ \ - SAVE_ARG(FUNCNAME, 0); \ - SAVE_ARG(FUNCNAME, 1); \ - SAVE_ARG(FUNCNAME, 2); \ - SAVE_ARG(FUNCNAME, 3); \ - SAVE_ARG(FUNCNAME, 4); \ - SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ - SAVE_ARG(FUNCNAME, 18); \ - SAVE_ARG(FUNCNAME, 19); \ - SAVE_ARG(FUNCNAME, 20); \ - SAVE_ARG(FUNCNAME, 21); \ - SAVE_ARG(FUNCNAME, 22); \ - SAVE_ARG(FUNCNAME, 23); \ - if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ - SAVE_ARG_HISTORY(FUNCNAME, 0); \ - SAVE_ARG_HISTORY(FUNCNAME, 1); \ - SAVE_ARG_HISTORY(FUNCNAME, 2); \ - SAVE_ARG_HISTORY(FUNCNAME, 3); \ - SAVE_ARG_HISTORY(FUNCNAME, 4); \ - SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ - SAVE_ARG_HISTORY(FUNCNAME, 18); \ - SAVE_ARG_HISTORY(FUNCNAME, 19); \ - SAVE_ARG_HISTORY(FUNCNAME, 20); \ - SAVE_ARG_HISTORY(FUNCNAME, 21); \ - SAVE_ARG_HISTORY(FUNCNAME, 22); \ - SAVE_ARG_HISTORY(FUNCNAME, 23); \ - }\ - else{\ - HISTORY_DROPPED(FUNCNAME);\ - }\ - INCREMENT_CALL_COUNT(FUNCNAME); \ - REGISTER_CALL(FUNCNAME); \ - if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ - if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, arg23); \ - } \ - else{ \ - FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, arg23); \ - } \ - } \ - if (FUNCNAME##_fake.custom_fake) FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, arg23); \ - } \ - DEFINE_RESET_FUNCTION(FUNCNAME) \ - FFF_END_EXTERN_C \ - -#define FAKE_VOID_FUNC24(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE) \ - DECLARE_FAKE_VOID_FUNC24(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE) \ - DEFINE_FAKE_VOID_FUNC24(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE) \ - - -#define DECLARE_FAKE_VOID_FUNC25(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE, ARG24_TYPE) \ - FFF_EXTERN_C \ - typedef struct FUNCNAME##_Fake { \ - DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ - DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ - DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ - DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ - DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ - DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ - DECLARE_ARG(ARG19_TYPE, 19, FUNCNAME) \ - DECLARE_ARG(ARG20_TYPE, 20, FUNCNAME) \ - DECLARE_ARG(ARG21_TYPE, 21, FUNCNAME) \ - DECLARE_ARG(ARG22_TYPE, 22, FUNCNAME) \ - DECLARE_ARG(ARG23_TYPE, 23, FUNCNAME) \ - DECLARE_ARG(ARG24_TYPE, 24, FUNCNAME) \ - DECLARE_ALL_FUNC_COMMON \ - DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22, ARG23_TYPE arg23, ARG24_TYPE arg24); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22, ARG23_TYPE arg23, ARG24_TYPE arg24); \ - } FUNCNAME##_Fake;\ - extern FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME##_reset(); \ - FFF_END_EXTERN_C \ - -#define DEFINE_FAKE_VOID_FUNC25(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE, ARG24_TYPE) \ - FFF_EXTERN_C \ - FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22, ARG23_TYPE arg23, ARG24_TYPE arg24){ \ - SAVE_ARG(FUNCNAME, 0); \ - SAVE_ARG(FUNCNAME, 1); \ - SAVE_ARG(FUNCNAME, 2); \ - SAVE_ARG(FUNCNAME, 3); \ - SAVE_ARG(FUNCNAME, 4); \ - SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ - SAVE_ARG(FUNCNAME, 18); \ - SAVE_ARG(FUNCNAME, 19); \ - SAVE_ARG(FUNCNAME, 20); \ - SAVE_ARG(FUNCNAME, 21); \ - SAVE_ARG(FUNCNAME, 22); \ - SAVE_ARG(FUNCNAME, 23); \ - SAVE_ARG(FUNCNAME, 24); \ - if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ - SAVE_ARG_HISTORY(FUNCNAME, 0); \ - SAVE_ARG_HISTORY(FUNCNAME, 1); \ - SAVE_ARG_HISTORY(FUNCNAME, 2); \ - SAVE_ARG_HISTORY(FUNCNAME, 3); \ - SAVE_ARG_HISTORY(FUNCNAME, 4); \ - SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ - SAVE_ARG_HISTORY(FUNCNAME, 18); \ - SAVE_ARG_HISTORY(FUNCNAME, 19); \ - SAVE_ARG_HISTORY(FUNCNAME, 20); \ - SAVE_ARG_HISTORY(FUNCNAME, 21); \ - SAVE_ARG_HISTORY(FUNCNAME, 22); \ - SAVE_ARG_HISTORY(FUNCNAME, 23); \ - SAVE_ARG_HISTORY(FUNCNAME, 24); \ - }\ - else{\ - HISTORY_DROPPED(FUNCNAME);\ - }\ - INCREMENT_CALL_COUNT(FUNCNAME); \ - REGISTER_CALL(FUNCNAME); \ - if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ - if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, arg23, arg24); \ - } \ - else{ \ - FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, arg23, arg24); \ - } \ - } \ - if (FUNCNAME##_fake.custom_fake) FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, arg23, arg24); \ - } \ - DEFINE_RESET_FUNCTION(FUNCNAME) \ - FFF_END_EXTERN_C \ - -#define FAKE_VOID_FUNC25(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE, ARG24_TYPE) \ - DECLARE_FAKE_VOID_FUNC25(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE, ARG24_TYPE) \ - DEFINE_FAKE_VOID_FUNC25(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE, ARG24_TYPE) \ - - -#define DECLARE_FAKE_VALUE_FUNC0(RETURN_TYPE, FUNCNAME) \ - FFF_EXTERN_C \ - typedef struct FUNCNAME##_Fake { \ - DECLARE_ALL_FUNC_COMMON \ - DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ - DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(); \ - RETURN_TYPE(**custom_fake_seq)(); \ - } FUNCNAME##_Fake;\ - extern FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME##_reset(); \ - FFF_END_EXTERN_C \ - -#define DEFINE_FAKE_VALUE_FUNC0(RETURN_TYPE, FUNCNAME) \ - FFF_EXTERN_C \ - FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(){ \ - if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ - }\ - else{\ - HISTORY_DROPPED(FUNCNAME);\ - }\ - INCREMENT_CALL_COUNT(FUNCNAME); \ - REGISTER_CALL(FUNCNAME); \ - if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ - if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](); \ - } \ - else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](); \ - } \ - } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(); \ - RETURN_FAKE_RESULT(FUNCNAME) \ - } \ - DEFINE_RESET_FUNCTION(FUNCNAME) \ - FFF_END_EXTERN_C \ - -#define FAKE_VALUE_FUNC0(RETURN_TYPE, FUNCNAME) \ - DECLARE_FAKE_VALUE_FUNC0(RETURN_TYPE, FUNCNAME) \ - DEFINE_FAKE_VALUE_FUNC0(RETURN_TYPE, FUNCNAME) \ - - -#define DECLARE_FAKE_VALUE_FUNC1(RETURN_TYPE, FUNCNAME, ARG0_TYPE) \ - FFF_EXTERN_C \ - typedef struct FUNCNAME##_Fake { \ - DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ - DECLARE_ALL_FUNC_COMMON \ - DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ - DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0); \ - } FUNCNAME##_Fake;\ - extern FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME##_reset(); \ - FFF_END_EXTERN_C \ - -#define DEFINE_FAKE_VALUE_FUNC1(RETURN_TYPE, FUNCNAME, ARG0_TYPE) \ - FFF_EXTERN_C \ - FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0){ \ - SAVE_ARG(FUNCNAME, 0); \ - if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ - SAVE_ARG_HISTORY(FUNCNAME, 0); \ - }\ - else{\ - HISTORY_DROPPED(FUNCNAME);\ - }\ - INCREMENT_CALL_COUNT(FUNCNAME); \ - REGISTER_CALL(FUNCNAME); \ - if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ - if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0); \ - } \ - else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0); \ - } \ - } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0); \ - RETURN_FAKE_RESULT(FUNCNAME) \ - } \ - DEFINE_RESET_FUNCTION(FUNCNAME) \ - FFF_END_EXTERN_C \ - -#define FAKE_VALUE_FUNC1(RETURN_TYPE, FUNCNAME, ARG0_TYPE) \ - DECLARE_FAKE_VALUE_FUNC1(RETURN_TYPE, FUNCNAME, ARG0_TYPE) \ - DEFINE_FAKE_VALUE_FUNC1(RETURN_TYPE, FUNCNAME, ARG0_TYPE) \ - - -#define DECLARE_FAKE_VALUE_FUNC2(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE) \ - FFF_EXTERN_C \ - typedef struct FUNCNAME##_Fake { \ - DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ - DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ - DECLARE_ALL_FUNC_COMMON \ - DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ - DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1); \ - } FUNCNAME##_Fake;\ - extern FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME##_reset(); \ - FFF_END_EXTERN_C \ - -#define DEFINE_FAKE_VALUE_FUNC2(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE) \ - FFF_EXTERN_C \ - FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1){ \ - SAVE_ARG(FUNCNAME, 0); \ - SAVE_ARG(FUNCNAME, 1); \ - if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ - SAVE_ARG_HISTORY(FUNCNAME, 0); \ - SAVE_ARG_HISTORY(FUNCNAME, 1); \ - }\ - else{\ - HISTORY_DROPPED(FUNCNAME);\ - }\ - INCREMENT_CALL_COUNT(FUNCNAME); \ - REGISTER_CALL(FUNCNAME); \ - if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ - if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1); \ - } \ - else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1); \ - } \ - } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1); \ - RETURN_FAKE_RESULT(FUNCNAME) \ - } \ - DEFINE_RESET_FUNCTION(FUNCNAME) \ - FFF_END_EXTERN_C \ - -#define FAKE_VALUE_FUNC2(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE) \ - DECLARE_FAKE_VALUE_FUNC2(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE) \ - DEFINE_FAKE_VALUE_FUNC2(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE) \ - - -#define DECLARE_FAKE_VALUE_FUNC3(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE) \ - FFF_EXTERN_C \ - typedef struct FUNCNAME##_Fake { \ - DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ - DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ - DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ - DECLARE_ALL_FUNC_COMMON \ - DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ - DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2); \ - } FUNCNAME##_Fake;\ - extern FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME##_reset(); \ - FFF_END_EXTERN_C \ - -#define DEFINE_FAKE_VALUE_FUNC3(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE) \ - FFF_EXTERN_C \ - FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2){ \ - SAVE_ARG(FUNCNAME, 0); \ - SAVE_ARG(FUNCNAME, 1); \ - SAVE_ARG(FUNCNAME, 2); \ - if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ - SAVE_ARG_HISTORY(FUNCNAME, 0); \ - SAVE_ARG_HISTORY(FUNCNAME, 1); \ - SAVE_ARG_HISTORY(FUNCNAME, 2); \ - }\ - else{\ - HISTORY_DROPPED(FUNCNAME);\ - }\ - INCREMENT_CALL_COUNT(FUNCNAME); \ - REGISTER_CALL(FUNCNAME); \ - if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ - if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2); \ - } \ - else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2); \ - } \ - } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2); \ - RETURN_FAKE_RESULT(FUNCNAME) \ - } \ - DEFINE_RESET_FUNCTION(FUNCNAME) \ - FFF_END_EXTERN_C \ - -#define FAKE_VALUE_FUNC3(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE) \ - DECLARE_FAKE_VALUE_FUNC3(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE) \ - DEFINE_FAKE_VALUE_FUNC3(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE) \ - - -#define DECLARE_FAKE_VALUE_FUNC4(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE) \ - FFF_EXTERN_C \ - typedef struct FUNCNAME##_Fake { \ - DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ - DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ - DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ - DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ - DECLARE_ALL_FUNC_COMMON \ - DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ - DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3); \ - } FUNCNAME##_Fake;\ - extern FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME##_reset(); \ - FFF_END_EXTERN_C \ - -#define DEFINE_FAKE_VALUE_FUNC4(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE) \ - FFF_EXTERN_C \ - FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3){ \ - SAVE_ARG(FUNCNAME, 0); \ - SAVE_ARG(FUNCNAME, 1); \ - SAVE_ARG(FUNCNAME, 2); \ - SAVE_ARG(FUNCNAME, 3); \ - if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ - SAVE_ARG_HISTORY(FUNCNAME, 0); \ - SAVE_ARG_HISTORY(FUNCNAME, 1); \ - SAVE_ARG_HISTORY(FUNCNAME, 2); \ - SAVE_ARG_HISTORY(FUNCNAME, 3); \ - }\ - else{\ - HISTORY_DROPPED(FUNCNAME);\ - }\ - INCREMENT_CALL_COUNT(FUNCNAME); \ - REGISTER_CALL(FUNCNAME); \ - if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ - if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3); \ - } \ - else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3); \ - } \ - } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3); \ - RETURN_FAKE_RESULT(FUNCNAME) \ - } \ - DEFINE_RESET_FUNCTION(FUNCNAME) \ - FFF_END_EXTERN_C \ - -#define FAKE_VALUE_FUNC4(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE) \ - DECLARE_FAKE_VALUE_FUNC4(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE) \ - DEFINE_FAKE_VALUE_FUNC4(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE) \ - - -#define DECLARE_FAKE_VALUE_FUNC5(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE) \ - FFF_EXTERN_C \ - typedef struct FUNCNAME##_Fake { \ - DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ - DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ - DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ - DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ - DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ALL_FUNC_COMMON \ - DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ - DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4); \ - } FUNCNAME##_Fake;\ - extern FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME##_reset(); \ - FFF_END_EXTERN_C \ - -#define DEFINE_FAKE_VALUE_FUNC5(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE) \ - FFF_EXTERN_C \ - FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4){ \ - SAVE_ARG(FUNCNAME, 0); \ - SAVE_ARG(FUNCNAME, 1); \ - SAVE_ARG(FUNCNAME, 2); \ - SAVE_ARG(FUNCNAME, 3); \ - SAVE_ARG(FUNCNAME, 4); \ - if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ - SAVE_ARG_HISTORY(FUNCNAME, 0); \ - SAVE_ARG_HISTORY(FUNCNAME, 1); \ - SAVE_ARG_HISTORY(FUNCNAME, 2); \ - SAVE_ARG_HISTORY(FUNCNAME, 3); \ - SAVE_ARG_HISTORY(FUNCNAME, 4); \ - }\ - else{\ - HISTORY_DROPPED(FUNCNAME);\ - }\ - INCREMENT_CALL_COUNT(FUNCNAME); \ - REGISTER_CALL(FUNCNAME); \ - if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ - if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4); \ - } \ - else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4); \ - } \ - } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4); \ - RETURN_FAKE_RESULT(FUNCNAME) \ - } \ - DEFINE_RESET_FUNCTION(FUNCNAME) \ - FFF_END_EXTERN_C \ - -#define FAKE_VALUE_FUNC5(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE) \ - DECLARE_FAKE_VALUE_FUNC5(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE) \ - DEFINE_FAKE_VALUE_FUNC5(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE) \ - - -#define DECLARE_FAKE_VALUE_FUNC6(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE) \ - FFF_EXTERN_C \ - typedef struct FUNCNAME##_Fake { \ - DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ - DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ - DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ - DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ - DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ALL_FUNC_COMMON \ - DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ - DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5); \ - } FUNCNAME##_Fake;\ - extern FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME##_reset(); \ - FFF_END_EXTERN_C \ - -#define DEFINE_FAKE_VALUE_FUNC6(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE) \ - FFF_EXTERN_C \ - FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5){ \ - SAVE_ARG(FUNCNAME, 0); \ - SAVE_ARG(FUNCNAME, 1); \ - SAVE_ARG(FUNCNAME, 2); \ - SAVE_ARG(FUNCNAME, 3); \ - SAVE_ARG(FUNCNAME, 4); \ - SAVE_ARG(FUNCNAME, 5); \ - if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ - SAVE_ARG_HISTORY(FUNCNAME, 0); \ - SAVE_ARG_HISTORY(FUNCNAME, 1); \ - SAVE_ARG_HISTORY(FUNCNAME, 2); \ - SAVE_ARG_HISTORY(FUNCNAME, 3); \ - SAVE_ARG_HISTORY(FUNCNAME, 4); \ - SAVE_ARG_HISTORY(FUNCNAME, 5); \ - }\ - else{\ - HISTORY_DROPPED(FUNCNAME);\ - }\ - INCREMENT_CALL_COUNT(FUNCNAME); \ - REGISTER_CALL(FUNCNAME); \ - if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ - if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5); \ - } \ - else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5); \ - } \ - } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5); \ - RETURN_FAKE_RESULT(FUNCNAME) \ - } \ - DEFINE_RESET_FUNCTION(FUNCNAME) \ - FFF_END_EXTERN_C \ - -#define FAKE_VALUE_FUNC6(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE) \ - DECLARE_FAKE_VALUE_FUNC6(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE) \ - DEFINE_FAKE_VALUE_FUNC6(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE) \ - - -#define DECLARE_FAKE_VALUE_FUNC7(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE) \ - FFF_EXTERN_C \ - typedef struct FUNCNAME##_Fake { \ - DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ - DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ - DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ - DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ - DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ALL_FUNC_COMMON \ - DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ - DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6); \ - } FUNCNAME##_Fake;\ - extern FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME##_reset(); \ - FFF_END_EXTERN_C \ - -#define DEFINE_FAKE_VALUE_FUNC7(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE) \ - FFF_EXTERN_C \ - FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6){ \ - SAVE_ARG(FUNCNAME, 0); \ - SAVE_ARG(FUNCNAME, 1); \ - SAVE_ARG(FUNCNAME, 2); \ - SAVE_ARG(FUNCNAME, 3); \ - SAVE_ARG(FUNCNAME, 4); \ - SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ - if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ - SAVE_ARG_HISTORY(FUNCNAME, 0); \ - SAVE_ARG_HISTORY(FUNCNAME, 1); \ - SAVE_ARG_HISTORY(FUNCNAME, 2); \ - SAVE_ARG_HISTORY(FUNCNAME, 3); \ - SAVE_ARG_HISTORY(FUNCNAME, 4); \ - SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ - }\ - else{\ - HISTORY_DROPPED(FUNCNAME);\ - }\ - INCREMENT_CALL_COUNT(FUNCNAME); \ - REGISTER_CALL(FUNCNAME); \ - if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ - if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6); \ - } \ - else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6); \ - } \ - } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6); \ - RETURN_FAKE_RESULT(FUNCNAME) \ - } \ - DEFINE_RESET_FUNCTION(FUNCNAME) \ - FFF_END_EXTERN_C \ - -#define FAKE_VALUE_FUNC7(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE) \ - DECLARE_FAKE_VALUE_FUNC7(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE) \ - DEFINE_FAKE_VALUE_FUNC7(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE) \ - - -#define DECLARE_FAKE_VALUE_FUNC8(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE) \ - FFF_EXTERN_C \ - typedef struct FUNCNAME##_Fake { \ - DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ - DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ - DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ - DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ - DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ALL_FUNC_COMMON \ - DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ - DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7); \ - } FUNCNAME##_Fake;\ - extern FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME##_reset(); \ - FFF_END_EXTERN_C \ - -#define DEFINE_FAKE_VALUE_FUNC8(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE) \ - FFF_EXTERN_C \ - FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7){ \ - SAVE_ARG(FUNCNAME, 0); \ - SAVE_ARG(FUNCNAME, 1); \ - SAVE_ARG(FUNCNAME, 2); \ - SAVE_ARG(FUNCNAME, 3); \ - SAVE_ARG(FUNCNAME, 4); \ - SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ - if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ - SAVE_ARG_HISTORY(FUNCNAME, 0); \ - SAVE_ARG_HISTORY(FUNCNAME, 1); \ - SAVE_ARG_HISTORY(FUNCNAME, 2); \ - SAVE_ARG_HISTORY(FUNCNAME, 3); \ - SAVE_ARG_HISTORY(FUNCNAME, 4); \ - SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ - }\ - else{\ - HISTORY_DROPPED(FUNCNAME);\ - }\ - INCREMENT_CALL_COUNT(FUNCNAME); \ - REGISTER_CALL(FUNCNAME); \ - if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ - if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); \ - } \ - else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); \ - } \ - } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); \ - RETURN_FAKE_RESULT(FUNCNAME) \ - } \ - DEFINE_RESET_FUNCTION(FUNCNAME) \ - FFF_END_EXTERN_C \ - -#define FAKE_VALUE_FUNC8(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE) \ - DECLARE_FAKE_VALUE_FUNC8(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE) \ - DEFINE_FAKE_VALUE_FUNC8(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE) \ - - -#define DECLARE_FAKE_VALUE_FUNC9(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE) \ +#define DECLARE_FAKE_VALUE_FUNC0(RETURN_TYPE, FUNCNAME) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ - DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ - DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ - DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ - DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ - DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8); \ + RETURN_TYPE(*custom_fake)(); \ + RETURN_TYPE(**custom_fake_seq)(); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC9(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE) \ +#define DEFINE_FAKE_VALUE_FUNC0(RETURN_TYPE, FUNCNAME) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8){ \ - SAVE_ARG(FUNCNAME, 0); \ - SAVE_ARG(FUNCNAME, 1); \ - SAVE_ARG(FUNCNAME, 2); \ - SAVE_ARG(FUNCNAME, 3); \ - SAVE_ARG(FUNCNAME, 4); \ - SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ + RETURN_TYPE FUNCNAME(){ \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ - SAVE_ARG_HISTORY(FUNCNAME, 0); \ - SAVE_ARG_HISTORY(FUNCNAME, 1); \ - SAVE_ARG_HISTORY(FUNCNAME, 2); \ - SAVE_ARG_HISTORY(FUNCNAME, 3); \ - SAVE_ARG_HISTORY(FUNCNAME, 4); \ - SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -2717,71 +1645,44 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](); \ } \ else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](); \ } \ } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); \ + if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(); \ RETURN_FAKE_RESULT(FUNCNAME) \ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC9(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE) \ - DECLARE_FAKE_VALUE_FUNC9(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE) \ - DEFINE_FAKE_VALUE_FUNC9(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE) \ +#define FAKE_VALUE_FUNC0(RETURN_TYPE, FUNCNAME) \ + DECLARE_FAKE_VALUE_FUNC0(RETURN_TYPE, FUNCNAME) \ + DEFINE_FAKE_VALUE_FUNC0(RETURN_TYPE, FUNCNAME) \ -#define DECLARE_FAKE_VALUE_FUNC10(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE) \ +#define DECLARE_FAKE_VALUE_FUNC1(RETURN_TYPE, FUNCNAME, ARG0_TYPE) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ - DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ - DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ - DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ - DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC10(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE) \ +#define DEFINE_FAKE_VALUE_FUNC1(RETURN_TYPE, FUNCNAME, ARG0_TYPE) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0){ \ SAVE_ARG(FUNCNAME, 0); \ - SAVE_ARG(FUNCNAME, 1); \ - SAVE_ARG(FUNCNAME, 2); \ - SAVE_ARG(FUNCNAME, 3); \ - SAVE_ARG(FUNCNAME, 4); \ - SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ - SAVE_ARG_HISTORY(FUNCNAME, 1); \ - SAVE_ARG_HISTORY(FUNCNAME, 2); \ - SAVE_ARG_HISTORY(FUNCNAME, 3); \ - SAVE_ARG_HISTORY(FUNCNAME, 4); \ - SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -2790,74 +1691,47 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0); \ } \ else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0); \ } \ } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); \ + if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0); \ RETURN_FAKE_RESULT(FUNCNAME) \ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC10(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE) \ - DECLARE_FAKE_VALUE_FUNC10(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE) \ - DEFINE_FAKE_VALUE_FUNC10(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE) \ +#define FAKE_VALUE_FUNC1(RETURN_TYPE, FUNCNAME, ARG0_TYPE) \ + DECLARE_FAKE_VALUE_FUNC1(RETURN_TYPE, FUNCNAME, ARG0_TYPE) \ + DEFINE_FAKE_VALUE_FUNC1(RETURN_TYPE, FUNCNAME, ARG0_TYPE) \ -#define DECLARE_FAKE_VALUE_FUNC11(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE) \ +#define DECLARE_FAKE_VALUE_FUNC2(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ - DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ - DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ - DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC11(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE) \ +#define DEFINE_FAKE_VALUE_FUNC2(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10){ \ - SAVE_ARG(FUNCNAME, 0); \ - SAVE_ARG(FUNCNAME, 1); \ - SAVE_ARG(FUNCNAME, 2); \ - SAVE_ARG(FUNCNAME, 3); \ - SAVE_ARG(FUNCNAME, 4); \ - SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ - if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ - SAVE_ARG_HISTORY(FUNCNAME, 0); \ - SAVE_ARG_HISTORY(FUNCNAME, 1); \ - SAVE_ARG_HISTORY(FUNCNAME, 2); \ - SAVE_ARG_HISTORY(FUNCNAME, 3); \ - SAVE_ARG_HISTORY(FUNCNAME, 4); \ - SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1){ \ + SAVE_ARG(FUNCNAME, 0); \ + SAVE_ARG(FUNCNAME, 1); \ + if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ + SAVE_ARG_HISTORY(FUNCNAME, 0); \ + SAVE_ARG_HISTORY(FUNCNAME, 1); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -2866,77 +1740,50 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1); \ } \ else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1); \ } \ } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10); \ + if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1); \ RETURN_FAKE_RESULT(FUNCNAME) \ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC11(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE) \ - DECLARE_FAKE_VALUE_FUNC11(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE) \ - DEFINE_FAKE_VALUE_FUNC11(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE) \ +#define FAKE_VALUE_FUNC2(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE) \ + DECLARE_FAKE_VALUE_FUNC2(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE) \ + DEFINE_FAKE_VALUE_FUNC2(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE) \ -#define DECLARE_FAKE_VALUE_FUNC12(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE) \ +#define DECLARE_FAKE_VALUE_FUNC3(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ - DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ - DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC12(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE) \ +#define DEFINE_FAKE_VALUE_FUNC3(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ - SAVE_ARG(FUNCNAME, 3); \ - SAVE_ARG(FUNCNAME, 4); \ - SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ SAVE_ARG_HISTORY(FUNCNAME, 2); \ - SAVE_ARG_HISTORY(FUNCNAME, 3); \ - SAVE_ARG_HISTORY(FUNCNAME, 4); \ - SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -2945,80 +1792,53 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2); \ } \ else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2); \ } \ } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11); \ + if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2); \ RETURN_FAKE_RESULT(FUNCNAME) \ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC12(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE) \ - DECLARE_FAKE_VALUE_FUNC12(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE) \ - DEFINE_FAKE_VALUE_FUNC12(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE) \ +#define FAKE_VALUE_FUNC3(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE) \ + DECLARE_FAKE_VALUE_FUNC3(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE) \ + DEFINE_FAKE_VALUE_FUNC3(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE) \ -#define DECLARE_FAKE_VALUE_FUNC13(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE) \ +#define DECLARE_FAKE_VALUE_FUNC4(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ - DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC13(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE) \ +#define DEFINE_FAKE_VALUE_FUNC4(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ SAVE_ARG(FUNCNAME, 3); \ - SAVE_ARG(FUNCNAME, 4); \ - SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ SAVE_ARG_HISTORY(FUNCNAME, 2); \ SAVE_ARG_HISTORY(FUNCNAME, 3); \ - SAVE_ARG_HISTORY(FUNCNAME, 4); \ - SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -3027,24 +1847,24 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3); \ } \ else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3); \ } \ } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12); \ + if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3); \ RETURN_FAKE_RESULT(FUNCNAME) \ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC13(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE) \ - DECLARE_FAKE_VALUE_FUNC13(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE) \ - DEFINE_FAKE_VALUE_FUNC13(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE) \ +#define FAKE_VALUE_FUNC4(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE) \ + DECLARE_FAKE_VALUE_FUNC4(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE) \ + DEFINE_FAKE_VALUE_FUNC4(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE) \ -#define DECLARE_FAKE_VALUE_FUNC14(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE) \ +#define DECLARE_FAKE_VALUE_FUNC5(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -3052,58 +1872,31 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC14(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE) \ +#define DEFINE_FAKE_VALUE_FUNC5(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ SAVE_ARG(FUNCNAME, 3); \ SAVE_ARG(FUNCNAME, 4); \ - SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ SAVE_ARG_HISTORY(FUNCNAME, 2); \ SAVE_ARG_HISTORY(FUNCNAME, 3); \ SAVE_ARG_HISTORY(FUNCNAME, 4); \ - SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -3112,24 +1905,24 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4); \ } \ else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4); \ } \ } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13); \ + if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4); \ RETURN_FAKE_RESULT(FUNCNAME) \ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC14(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE) \ - DECLARE_FAKE_VALUE_FUNC14(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE) \ - DEFINE_FAKE_VALUE_FUNC14(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE) \ +#define FAKE_VALUE_FUNC5(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE) \ + DECLARE_FAKE_VALUE_FUNC5(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE) \ + DEFINE_FAKE_VALUE_FUNC5(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE) \ -#define DECLARE_FAKE_VALUE_FUNC15(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE) \ +#define DECLARE_FAKE_VALUE_FUNC6(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -3138,44 +1931,26 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC15(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE) \ +#define DEFINE_FAKE_VALUE_FUNC6(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ SAVE_ARG(FUNCNAME, 3); \ SAVE_ARG(FUNCNAME, 4); \ SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -3183,15 +1958,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 3); \ SAVE_ARG_HISTORY(FUNCNAME, 4); \ SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -3200,24 +1966,24 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5); \ } \ else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5); \ } \ } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14); \ + if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5); \ RETURN_FAKE_RESULT(FUNCNAME) \ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC15(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE) \ - DECLARE_FAKE_VALUE_FUNC15(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE) \ - DEFINE_FAKE_VALUE_FUNC15(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE) \ +#define FAKE_VALUE_FUNC6(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE) \ + DECLARE_FAKE_VALUE_FUNC6(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE) \ + DEFINE_FAKE_VALUE_FUNC6(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE) \ -#define DECLARE_FAKE_VALUE_FUNC16(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE) \ +#define DECLARE_FAKE_VALUE_FUNC7(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -3227,29 +1993,20 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC16(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE) \ +#define DEFINE_FAKE_VALUE_FUNC7(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -3257,15 +2014,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 4); \ SAVE_ARG(FUNCNAME, 5); \ SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -3274,15 +2022,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 4); \ SAVE_ARG_HISTORY(FUNCNAME, 5); \ SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -3291,24 +2030,24 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6); \ } \ else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6); \ } \ } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15); \ + if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6); \ RETURN_FAKE_RESULT(FUNCNAME) \ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC16(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE) \ - DECLARE_FAKE_VALUE_FUNC16(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE) \ - DEFINE_FAKE_VALUE_FUNC16(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE) \ +#define FAKE_VALUE_FUNC7(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE) \ + DECLARE_FAKE_VALUE_FUNC7(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE) \ + DEFINE_FAKE_VALUE_FUNC7(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE) \ -#define DECLARE_FAKE_VALUE_FUNC17(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE) \ +#define DECLARE_FAKE_VALUE_FUNC8(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -3319,29 +2058,20 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC17(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE) \ +#define DEFINE_FAKE_VALUE_FUNC8(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -3350,15 +2080,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 5); \ SAVE_ARG(FUNCNAME, 6); \ SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -3368,15 +2089,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 5); \ SAVE_ARG_HISTORY(FUNCNAME, 6); \ SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -3385,24 +2097,24 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); \ } \ else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); \ } \ } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16); \ + if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); \ RETURN_FAKE_RESULT(FUNCNAME) \ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC17(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE) \ - DECLARE_FAKE_VALUE_FUNC17(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE) \ - DEFINE_FAKE_VALUE_FUNC17(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE) \ +#define FAKE_VALUE_FUNC8(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE) \ + DECLARE_FAKE_VALUE_FUNC8(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE) \ + DEFINE_FAKE_VALUE_FUNC8(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE) \ -#define DECLARE_FAKE_VALUE_FUNC18(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE) \ +#define DECLARE_FAKE_VALUE_FUNC9(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -3414,29 +2126,20 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC18(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE) \ +#define DEFINE_FAKE_VALUE_FUNC9(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -3446,15 +2149,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 6); \ SAVE_ARG(FUNCNAME, 7); \ SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -3465,15 +2159,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 6); \ SAVE_ARG_HISTORY(FUNCNAME, 7); \ SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -3482,24 +2167,24 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); \ } \ else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); \ } \ } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17); \ + if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); \ RETURN_FAKE_RESULT(FUNCNAME) \ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC18(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE) \ - DECLARE_FAKE_VALUE_FUNC18(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE) \ - DEFINE_FAKE_VALUE_FUNC18(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE) \ +#define FAKE_VALUE_FUNC9(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE) \ + DECLARE_FAKE_VALUE_FUNC9(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE) \ + DEFINE_FAKE_VALUE_FUNC9(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE) \ -#define DECLARE_FAKE_VALUE_FUNC19(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE) \ +#define DECLARE_FAKE_VALUE_FUNC10(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -3512,29 +2197,20 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ - DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC19(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE) \ +#define DEFINE_FAKE_VALUE_FUNC10(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -3545,15 +2221,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 7); \ SAVE_ARG(FUNCNAME, 8); \ SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ - SAVE_ARG(FUNCNAME, 18); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -3565,15 +2232,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 7); \ SAVE_ARG_HISTORY(FUNCNAME, 8); \ SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ - SAVE_ARG_HISTORY(FUNCNAME, 18); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -3582,24 +2240,24 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); \ } \ else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); \ } \ } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18); \ + if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); \ RETURN_FAKE_RESULT(FUNCNAME) \ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC19(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE) \ - DECLARE_FAKE_VALUE_FUNC19(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE) \ - DEFINE_FAKE_VALUE_FUNC19(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE) \ +#define FAKE_VALUE_FUNC10(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE) \ + DECLARE_FAKE_VALUE_FUNC10(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE) \ + DEFINE_FAKE_VALUE_FUNC10(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE) \ -#define DECLARE_FAKE_VALUE_FUNC20(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE) \ +#define DECLARE_FAKE_VALUE_FUNC11(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -3613,29 +2271,20 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ - DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ - DECLARE_ARG(ARG19_TYPE, 19, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC20(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE) \ +#define DEFINE_FAKE_VALUE_FUNC11(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -3647,15 +2296,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 8); \ SAVE_ARG(FUNCNAME, 9); \ SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ - SAVE_ARG(FUNCNAME, 18); \ - SAVE_ARG(FUNCNAME, 19); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -3668,15 +2308,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 8); \ SAVE_ARG_HISTORY(FUNCNAME, 9); \ SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ - SAVE_ARG_HISTORY(FUNCNAME, 18); \ - SAVE_ARG_HISTORY(FUNCNAME, 19); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -3685,24 +2316,24 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10); \ } \ else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10); \ } \ } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19); \ + if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10); \ RETURN_FAKE_RESULT(FUNCNAME) \ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC20(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE) \ - DECLARE_FAKE_VALUE_FUNC20(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE) \ - DEFINE_FAKE_VALUE_FUNC20(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE) \ +#define FAKE_VALUE_FUNC11(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE) \ + DECLARE_FAKE_VALUE_FUNC11(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE) \ + DEFINE_FAKE_VALUE_FUNC11(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE) \ -#define DECLARE_FAKE_VALUE_FUNC21(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE) \ +#define DECLARE_FAKE_VALUE_FUNC12(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -3717,29 +2348,20 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ - DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ - DECLARE_ARG(ARG19_TYPE, 19, FUNCNAME) \ - DECLARE_ARG(ARG20_TYPE, 20, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC21(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE) \ +#define DEFINE_FAKE_VALUE_FUNC12(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -3752,15 +2374,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 9); \ SAVE_ARG(FUNCNAME, 10); \ SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ - SAVE_ARG(FUNCNAME, 18); \ - SAVE_ARG(FUNCNAME, 19); \ - SAVE_ARG(FUNCNAME, 20); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -3774,15 +2387,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 9); \ SAVE_ARG_HISTORY(FUNCNAME, 10); \ SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ - SAVE_ARG_HISTORY(FUNCNAME, 18); \ - SAVE_ARG_HISTORY(FUNCNAME, 19); \ - SAVE_ARG_HISTORY(FUNCNAME, 20); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -3791,24 +2395,24 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11); \ } \ else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11); \ } \ } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20); \ + if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11); \ RETURN_FAKE_RESULT(FUNCNAME) \ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC21(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE) \ - DECLARE_FAKE_VALUE_FUNC21(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE) \ - DEFINE_FAKE_VALUE_FUNC21(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE) \ +#define FAKE_VALUE_FUNC12(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE) \ + DECLARE_FAKE_VALUE_FUNC12(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE) \ + DEFINE_FAKE_VALUE_FUNC12(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE) \ -#define DECLARE_FAKE_VALUE_FUNC22(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE) \ +#define DECLARE_FAKE_VALUE_FUNC13(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -3824,29 +2428,20 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ - DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ - DECLARE_ARG(ARG19_TYPE, 19, FUNCNAME) \ - DECLARE_ARG(ARG20_TYPE, 20, FUNCNAME) \ - DECLARE_ARG(ARG21_TYPE, 21, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC22(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE) \ +#define DEFINE_FAKE_VALUE_FUNC13(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -3860,15 +2455,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 10); \ SAVE_ARG(FUNCNAME, 11); \ SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ - SAVE_ARG(FUNCNAME, 18); \ - SAVE_ARG(FUNCNAME, 19); \ - SAVE_ARG(FUNCNAME, 20); \ - SAVE_ARG(FUNCNAME, 21); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -3883,15 +2469,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 10); \ SAVE_ARG_HISTORY(FUNCNAME, 11); \ SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ - SAVE_ARG_HISTORY(FUNCNAME, 18); \ - SAVE_ARG_HISTORY(FUNCNAME, 19); \ - SAVE_ARG_HISTORY(FUNCNAME, 20); \ - SAVE_ARG_HISTORY(FUNCNAME, 21); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -3900,24 +2477,24 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12); \ } \ else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12); \ } \ } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21); \ + if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12); \ RETURN_FAKE_RESULT(FUNCNAME) \ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC22(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE) \ - DECLARE_FAKE_VALUE_FUNC22(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE) \ - DEFINE_FAKE_VALUE_FUNC22(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE) \ +#define FAKE_VALUE_FUNC13(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE) \ + DECLARE_FAKE_VALUE_FUNC13(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE) \ + DEFINE_FAKE_VALUE_FUNC13(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE) \ -#define DECLARE_FAKE_VALUE_FUNC23(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE) \ +#define DECLARE_FAKE_VALUE_FUNC14(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -3934,29 +2511,20 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ - DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ - DECLARE_ARG(ARG19_TYPE, 19, FUNCNAME) \ - DECLARE_ARG(ARG20_TYPE, 20, FUNCNAME) \ - DECLARE_ARG(ARG21_TYPE, 21, FUNCNAME) \ - DECLARE_ARG(ARG22_TYPE, 22, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC23(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE) \ +#define DEFINE_FAKE_VALUE_FUNC14(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -3971,15 +2539,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 11); \ SAVE_ARG(FUNCNAME, 12); \ SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ - SAVE_ARG(FUNCNAME, 18); \ - SAVE_ARG(FUNCNAME, 19); \ - SAVE_ARG(FUNCNAME, 20); \ - SAVE_ARG(FUNCNAME, 21); \ - SAVE_ARG(FUNCNAME, 22); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -3995,15 +2554,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 11); \ SAVE_ARG_HISTORY(FUNCNAME, 12); \ SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ - SAVE_ARG_HISTORY(FUNCNAME, 18); \ - SAVE_ARG_HISTORY(FUNCNAME, 19); \ - SAVE_ARG_HISTORY(FUNCNAME, 20); \ - SAVE_ARG_HISTORY(FUNCNAME, 21); \ - SAVE_ARG_HISTORY(FUNCNAME, 22); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -4012,24 +2562,24 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13); \ } \ else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13); \ } \ } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22); \ + if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13); \ RETURN_FAKE_RESULT(FUNCNAME) \ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC23(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE) \ - DECLARE_FAKE_VALUE_FUNC23(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE) \ - DEFINE_FAKE_VALUE_FUNC23(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE) \ +#define FAKE_VALUE_FUNC14(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE) \ + DECLARE_FAKE_VALUE_FUNC14(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE) \ + DEFINE_FAKE_VALUE_FUNC14(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE) \ -#define DECLARE_FAKE_VALUE_FUNC24(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE) \ +#define DECLARE_FAKE_VALUE_FUNC15(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -4047,29 +2597,20 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ - DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ - DECLARE_ARG(ARG19_TYPE, 19, FUNCNAME) \ - DECLARE_ARG(ARG20_TYPE, 20, FUNCNAME) \ - DECLARE_ARG(ARG21_TYPE, 21, FUNCNAME) \ - DECLARE_ARG(ARG22_TYPE, 22, FUNCNAME) \ - DECLARE_ARG(ARG23_TYPE, 23, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22, ARG23_TYPE arg23); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22, ARG23_TYPE arg23); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC24(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE) \ +#define DEFINE_FAKE_VALUE_FUNC15(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22, ARG23_TYPE arg23){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -4085,15 +2626,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 12); \ SAVE_ARG(FUNCNAME, 13); \ SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ - SAVE_ARG(FUNCNAME, 18); \ - SAVE_ARG(FUNCNAME, 19); \ - SAVE_ARG(FUNCNAME, 20); \ - SAVE_ARG(FUNCNAME, 21); \ - SAVE_ARG(FUNCNAME, 22); \ - SAVE_ARG(FUNCNAME, 23); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -4110,15 +2642,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 12); \ SAVE_ARG_HISTORY(FUNCNAME, 13); \ SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ - SAVE_ARG_HISTORY(FUNCNAME, 18); \ - SAVE_ARG_HISTORY(FUNCNAME, 19); \ - SAVE_ARG_HISTORY(FUNCNAME, 20); \ - SAVE_ARG_HISTORY(FUNCNAME, 21); \ - SAVE_ARG_HISTORY(FUNCNAME, 22); \ - SAVE_ARG_HISTORY(FUNCNAME, 23); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -4127,24 +2650,24 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, arg23); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14); \ } \ else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, arg23); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14); \ } \ } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, arg23); \ + if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14); \ RETURN_FAKE_RESULT(FUNCNAME) \ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC24(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE) \ - DECLARE_FAKE_VALUE_FUNC24(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE) \ - DEFINE_FAKE_VALUE_FUNC24(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE) \ +#define FAKE_VALUE_FUNC15(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE) \ + DECLARE_FAKE_VALUE_FUNC15(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE) \ + DEFINE_FAKE_VALUE_FUNC15(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE) \ -#define DECLARE_FAKE_VALUE_FUNC25(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE, ARG24_TYPE) \ +#define DECLARE_FAKE_VALUE_FUNC16(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -4163,29 +2686,20 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ - DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ - DECLARE_ARG(ARG19_TYPE, 19, FUNCNAME) \ - DECLARE_ARG(ARG20_TYPE, 20, FUNCNAME) \ - DECLARE_ARG(ARG21_TYPE, 21, FUNCNAME) \ - DECLARE_ARG(ARG22_TYPE, 22, FUNCNAME) \ - DECLARE_ARG(ARG23_TYPE, 23, FUNCNAME) \ - DECLARE_ARG(ARG24_TYPE, 24, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22, ARG23_TYPE arg23, ARG24_TYPE arg24); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22, ARG23_TYPE arg23, ARG24_TYPE arg24); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC25(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE, ARG24_TYPE) \ +#define DEFINE_FAKE_VALUE_FUNC16(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22, ARG23_TYPE arg23, ARG24_TYPE arg24){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -4202,15 +2716,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 13); \ SAVE_ARG(FUNCNAME, 14); \ SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ - SAVE_ARG(FUNCNAME, 18); \ - SAVE_ARG(FUNCNAME, 19); \ - SAVE_ARG(FUNCNAME, 20); \ - SAVE_ARG(FUNCNAME, 21); \ - SAVE_ARG(FUNCNAME, 22); \ - SAVE_ARG(FUNCNAME, 23); \ - SAVE_ARG(FUNCNAME, 24); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -4228,15 +2733,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 13); \ SAVE_ARG_HISTORY(FUNCNAME, 14); \ SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ - SAVE_ARG_HISTORY(FUNCNAME, 18); \ - SAVE_ARG_HISTORY(FUNCNAME, 19); \ - SAVE_ARG_HISTORY(FUNCNAME, 20); \ - SAVE_ARG_HISTORY(FUNCNAME, 21); \ - SAVE_ARG_HISTORY(FUNCNAME, 22); \ - SAVE_ARG_HISTORY(FUNCNAME, 23); \ - SAVE_ARG_HISTORY(FUNCNAME, 24); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -4245,206 +2741,118 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, arg23, arg24); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15); \ } \ else{ \ - return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, arg23, arg24); \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15); \ } \ } \ - if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, arg23, arg24); \ + if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15); \ RETURN_FAKE_RESULT(FUNCNAME) \ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC25(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE, ARG24_TYPE) \ - DECLARE_FAKE_VALUE_FUNC25(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE, ARG24_TYPE) \ - DEFINE_FAKE_VALUE_FUNC25(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE, ARG24_TYPE) \ - - -#define DECLARE_FAKE_VOID_FUNC2_VARARG(FUNCNAME, ARG0_TYPE, ...) \ - FFF_EXTERN_C \ - typedef struct FUNCNAME##_Fake { \ - DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ - DECLARE_ALL_FUNC_COMMON \ - DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, va_list ap); \ - } FUNCNAME##_Fake;\ - extern FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME##_reset(); \ - FFF_END_EXTERN_C \ - -#define DEFINE_FAKE_VOID_FUNC2_VARARG(FUNCNAME, ARG0_TYPE, ...) \ - FFF_EXTERN_C \ - FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ...){ \ - SAVE_ARG(FUNCNAME, 0); \ - if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ - SAVE_ARG_HISTORY(FUNCNAME, 0); \ - }\ - else{\ - HISTORY_DROPPED(FUNCNAME);\ - }\ - INCREMENT_CALL_COUNT(FUNCNAME); \ - REGISTER_CALL(FUNCNAME); \ - if(FUNCNAME##_fake.custom_fake){\ - va_list ap;\ - va_start(ap, arg0);\ - FUNCNAME##_fake.custom_fake(arg0, ap);\ - va_end(ap);\ - }\ - } \ - DEFINE_RESET_FUNCTION(FUNCNAME) \ - FFF_END_EXTERN_C \ - -#define FAKE_VOID_FUNC2_VARARG(FUNCNAME, ARG0_TYPE, ...) \ - DECLARE_FAKE_VOID_FUNC2_VARARG(FUNCNAME, ARG0_TYPE, ...) \ - DEFINE_FAKE_VOID_FUNC2_VARARG(FUNCNAME, ARG0_TYPE, ...) \ - - -#define DECLARE_FAKE_VOID_FUNC3_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ...) \ - FFF_EXTERN_C \ - typedef struct FUNCNAME##_Fake { \ - DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ - DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ - DECLARE_ALL_FUNC_COMMON \ - DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, va_list ap); \ - } FUNCNAME##_Fake;\ - extern FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME##_reset(); \ - FFF_END_EXTERN_C \ - -#define DEFINE_FAKE_VOID_FUNC3_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ...) \ - FFF_EXTERN_C \ - FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ...){ \ - SAVE_ARG(FUNCNAME, 0); \ - SAVE_ARG(FUNCNAME, 1); \ - if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ - SAVE_ARG_HISTORY(FUNCNAME, 0); \ - SAVE_ARG_HISTORY(FUNCNAME, 1); \ - }\ - else{\ - HISTORY_DROPPED(FUNCNAME);\ - }\ - INCREMENT_CALL_COUNT(FUNCNAME); \ - REGISTER_CALL(FUNCNAME); \ - if(FUNCNAME##_fake.custom_fake){\ - va_list ap;\ - va_start(ap, arg1);\ - FUNCNAME##_fake.custom_fake(arg0, arg1, ap);\ - va_end(ap);\ - }\ - } \ - DEFINE_RESET_FUNCTION(FUNCNAME) \ - FFF_END_EXTERN_C \ - -#define FAKE_VOID_FUNC3_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ...) \ - DECLARE_FAKE_VOID_FUNC3_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ...) \ - DEFINE_FAKE_VOID_FUNC3_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ...) \ - - -#define DECLARE_FAKE_VOID_FUNC4_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ...) \ - FFF_EXTERN_C \ - typedef struct FUNCNAME##_Fake { \ - DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ - DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ - DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ - DECLARE_ALL_FUNC_COMMON \ - DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, va_list ap); \ - } FUNCNAME##_Fake;\ - extern FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME##_reset(); \ - FFF_END_EXTERN_C \ - -#define DEFINE_FAKE_VOID_FUNC4_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ...) \ - FFF_EXTERN_C \ - FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ...){ \ - SAVE_ARG(FUNCNAME, 0); \ - SAVE_ARG(FUNCNAME, 1); \ - SAVE_ARG(FUNCNAME, 2); \ - if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ - SAVE_ARG_HISTORY(FUNCNAME, 0); \ - SAVE_ARG_HISTORY(FUNCNAME, 1); \ - SAVE_ARG_HISTORY(FUNCNAME, 2); \ - }\ - else{\ - HISTORY_DROPPED(FUNCNAME);\ - }\ - INCREMENT_CALL_COUNT(FUNCNAME); \ - REGISTER_CALL(FUNCNAME); \ - if(FUNCNAME##_fake.custom_fake){\ - va_list ap;\ - va_start(ap, arg2);\ - FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, ap);\ - va_end(ap);\ - }\ - } \ - DEFINE_RESET_FUNCTION(FUNCNAME) \ - FFF_END_EXTERN_C \ - -#define FAKE_VOID_FUNC4_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ...) \ - DECLARE_FAKE_VOID_FUNC4_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ...) \ - DEFINE_FAKE_VOID_FUNC4_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ...) \ +#define FAKE_VALUE_FUNC16(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE) \ + DECLARE_FAKE_VALUE_FUNC16(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE) \ + DEFINE_FAKE_VALUE_FUNC16(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE) \ -#define DECLARE_FAKE_VOID_FUNC5_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ...) \ +#define DECLARE_FAKE_VALUE_FUNC17(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ + DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ + DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ + DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ + DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ + DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ + DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ + DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ + DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ + DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ + DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ + DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ + DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ + DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ + DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, va_list ap); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VOID_FUNC5_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ...) \ +#define DEFINE_FAKE_VALUE_FUNC17(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ...){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ SAVE_ARG(FUNCNAME, 3); \ + SAVE_ARG(FUNCNAME, 4); \ + SAVE_ARG(FUNCNAME, 5); \ + SAVE_ARG(FUNCNAME, 6); \ + SAVE_ARG(FUNCNAME, 7); \ + SAVE_ARG(FUNCNAME, 8); \ + SAVE_ARG(FUNCNAME, 9); \ + SAVE_ARG(FUNCNAME, 10); \ + SAVE_ARG(FUNCNAME, 11); \ + SAVE_ARG(FUNCNAME, 12); \ + SAVE_ARG(FUNCNAME, 13); \ + SAVE_ARG(FUNCNAME, 14); \ + SAVE_ARG(FUNCNAME, 15); \ + SAVE_ARG(FUNCNAME, 16); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ SAVE_ARG_HISTORY(FUNCNAME, 2); \ SAVE_ARG_HISTORY(FUNCNAME, 3); \ + SAVE_ARG_HISTORY(FUNCNAME, 4); \ + SAVE_ARG_HISTORY(FUNCNAME, 5); \ + SAVE_ARG_HISTORY(FUNCNAME, 6); \ + SAVE_ARG_HISTORY(FUNCNAME, 7); \ + SAVE_ARG_HISTORY(FUNCNAME, 8); \ + SAVE_ARG_HISTORY(FUNCNAME, 9); \ + SAVE_ARG_HISTORY(FUNCNAME, 10); \ + SAVE_ARG_HISTORY(FUNCNAME, 11); \ + SAVE_ARG_HISTORY(FUNCNAME, 12); \ + SAVE_ARG_HISTORY(FUNCNAME, 13); \ + SAVE_ARG_HISTORY(FUNCNAME, 14); \ + SAVE_ARG_HISTORY(FUNCNAME, 15); \ + SAVE_ARG_HISTORY(FUNCNAME, 16); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ }\ INCREMENT_CALL_COUNT(FUNCNAME); \ REGISTER_CALL(FUNCNAME); \ - if(FUNCNAME##_fake.custom_fake){\ - va_list ap;\ - va_start(ap, arg3);\ - FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, ap);\ - va_end(ap);\ - }\ + if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ + if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16); \ + } \ + else{ \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16); \ + } \ + } \ + if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16); \ + RETURN_FAKE_RESULT(FUNCNAME) \ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VOID_FUNC5_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ...) \ - DECLARE_FAKE_VOID_FUNC5_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ...) \ - DEFINE_FAKE_VOID_FUNC5_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ...) \ +#define FAKE_VALUE_FUNC17(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE) \ + DECLARE_FAKE_VALUE_FUNC17(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE) \ + DEFINE_FAKE_VALUE_FUNC17(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE) \ -#define DECLARE_FAKE_VOID_FUNC6_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ...) \ +#define DECLARE_FAKE_VALUE_FUNC18(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -4452,52 +2860,96 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ + DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ + DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ + DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ + DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ + DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ + DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ + DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ + DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ + DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ + DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ + DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ + DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ + DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ + DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, va_list ap); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VOID_FUNC6_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ...) \ +#define DEFINE_FAKE_VALUE_FUNC18(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ...){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ SAVE_ARG(FUNCNAME, 3); \ SAVE_ARG(FUNCNAME, 4); \ + SAVE_ARG(FUNCNAME, 5); \ + SAVE_ARG(FUNCNAME, 6); \ + SAVE_ARG(FUNCNAME, 7); \ + SAVE_ARG(FUNCNAME, 8); \ + SAVE_ARG(FUNCNAME, 9); \ + SAVE_ARG(FUNCNAME, 10); \ + SAVE_ARG(FUNCNAME, 11); \ + SAVE_ARG(FUNCNAME, 12); \ + SAVE_ARG(FUNCNAME, 13); \ + SAVE_ARG(FUNCNAME, 14); \ + SAVE_ARG(FUNCNAME, 15); \ + SAVE_ARG(FUNCNAME, 16); \ + SAVE_ARG(FUNCNAME, 17); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ SAVE_ARG_HISTORY(FUNCNAME, 2); \ SAVE_ARG_HISTORY(FUNCNAME, 3); \ SAVE_ARG_HISTORY(FUNCNAME, 4); \ + SAVE_ARG_HISTORY(FUNCNAME, 5); \ + SAVE_ARG_HISTORY(FUNCNAME, 6); \ + SAVE_ARG_HISTORY(FUNCNAME, 7); \ + SAVE_ARG_HISTORY(FUNCNAME, 8); \ + SAVE_ARG_HISTORY(FUNCNAME, 9); \ + SAVE_ARG_HISTORY(FUNCNAME, 10); \ + SAVE_ARG_HISTORY(FUNCNAME, 11); \ + SAVE_ARG_HISTORY(FUNCNAME, 12); \ + SAVE_ARG_HISTORY(FUNCNAME, 13); \ + SAVE_ARG_HISTORY(FUNCNAME, 14); \ + SAVE_ARG_HISTORY(FUNCNAME, 15); \ + SAVE_ARG_HISTORY(FUNCNAME, 16); \ + SAVE_ARG_HISTORY(FUNCNAME, 17); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ }\ INCREMENT_CALL_COUNT(FUNCNAME); \ REGISTER_CALL(FUNCNAME); \ - if(FUNCNAME##_fake.custom_fake){\ - va_list ap;\ - va_start(ap, arg4);\ - FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, ap);\ - va_end(ap);\ - }\ + if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ + if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17); \ + } \ + else{ \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17); \ + } \ + } \ + if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17); \ + RETURN_FAKE_RESULT(FUNCNAME) \ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VOID_FUNC6_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ...) \ - DECLARE_FAKE_VOID_FUNC6_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ...) \ - DEFINE_FAKE_VOID_FUNC6_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ...) \ +#define FAKE_VALUE_FUNC18(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE) \ + DECLARE_FAKE_VALUE_FUNC18(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE) \ + DEFINE_FAKE_VALUE_FUNC18(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE) \ -#define DECLARE_FAKE_VOID_FUNC7_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ...) \ +#define DECLARE_FAKE_VALUE_FUNC19(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -4506,25 +2958,52 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ + DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ + DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ + DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ + DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ + DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ + DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ + DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ + DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ + DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ + DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ + DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ + DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ + DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ + DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, va_list ap); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VOID_FUNC7_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ...) \ +#define DEFINE_FAKE_VALUE_FUNC19(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ...){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ SAVE_ARG(FUNCNAME, 3); \ SAVE_ARG(FUNCNAME, 4); \ SAVE_ARG(FUNCNAME, 5); \ + SAVE_ARG(FUNCNAME, 6); \ + SAVE_ARG(FUNCNAME, 7); \ + SAVE_ARG(FUNCNAME, 8); \ + SAVE_ARG(FUNCNAME, 9); \ + SAVE_ARG(FUNCNAME, 10); \ + SAVE_ARG(FUNCNAME, 11); \ + SAVE_ARG(FUNCNAME, 12); \ + SAVE_ARG(FUNCNAME, 13); \ + SAVE_ARG(FUNCNAME, 14); \ + SAVE_ARG(FUNCNAME, 15); \ + SAVE_ARG(FUNCNAME, 16); \ + SAVE_ARG(FUNCNAME, 17); \ + SAVE_ARG(FUNCNAME, 18); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -4532,28 +3011,45 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 3); \ SAVE_ARG_HISTORY(FUNCNAME, 4); \ SAVE_ARG_HISTORY(FUNCNAME, 5); \ + SAVE_ARG_HISTORY(FUNCNAME, 6); \ + SAVE_ARG_HISTORY(FUNCNAME, 7); \ + SAVE_ARG_HISTORY(FUNCNAME, 8); \ + SAVE_ARG_HISTORY(FUNCNAME, 9); \ + SAVE_ARG_HISTORY(FUNCNAME, 10); \ + SAVE_ARG_HISTORY(FUNCNAME, 11); \ + SAVE_ARG_HISTORY(FUNCNAME, 12); \ + SAVE_ARG_HISTORY(FUNCNAME, 13); \ + SAVE_ARG_HISTORY(FUNCNAME, 14); \ + SAVE_ARG_HISTORY(FUNCNAME, 15); \ + SAVE_ARG_HISTORY(FUNCNAME, 16); \ + SAVE_ARG_HISTORY(FUNCNAME, 17); \ + SAVE_ARG_HISTORY(FUNCNAME, 18); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ }\ INCREMENT_CALL_COUNT(FUNCNAME); \ REGISTER_CALL(FUNCNAME); \ - if(FUNCNAME##_fake.custom_fake){\ - va_list ap;\ - va_start(ap, arg5);\ - FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, ap);\ - va_end(ap);\ - }\ + if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ + if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18); \ + } \ + else{ \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18); \ + } \ + } \ + if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18); \ + RETURN_FAKE_RESULT(FUNCNAME) \ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VOID_FUNC7_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ...) \ - DECLARE_FAKE_VOID_FUNC7_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ...) \ - DEFINE_FAKE_VOID_FUNC7_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ...) \ +#define FAKE_VALUE_FUNC19(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE) \ + DECLARE_FAKE_VALUE_FUNC19(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE) \ + DEFINE_FAKE_VALUE_FUNC19(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE) \ -#define DECLARE_FAKE_VOID_FUNC8_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ...) \ +#define DECLARE_FAKE_VALUE_FUNC20(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -4563,19 +3059,33 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ + DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ + DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ + DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ + DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ + DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ + DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ + DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ + DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ + DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ + DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ + DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ + DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ + DECLARE_ARG(ARG19_TYPE, 19, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ + DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, va_list ap); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VOID_FUNC8_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ...) \ +#define DEFINE_FAKE_VALUE_FUNC20(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ...){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -4583,6 +3093,19 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 4); \ SAVE_ARG(FUNCNAME, 5); \ SAVE_ARG(FUNCNAME, 6); \ + SAVE_ARG(FUNCNAME, 7); \ + SAVE_ARG(FUNCNAME, 8); \ + SAVE_ARG(FUNCNAME, 9); \ + SAVE_ARG(FUNCNAME, 10); \ + SAVE_ARG(FUNCNAME, 11); \ + SAVE_ARG(FUNCNAME, 12); \ + SAVE_ARG(FUNCNAME, 13); \ + SAVE_ARG(FUNCNAME, 14); \ + SAVE_ARG(FUNCNAME, 15); \ + SAVE_ARG(FUNCNAME, 16); \ + SAVE_ARG(FUNCNAME, 17); \ + SAVE_ARG(FUNCNAME, 18); \ + SAVE_ARG(FUNCNAME, 19); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -4591,68 +3114,64 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 4); \ SAVE_ARG_HISTORY(FUNCNAME, 5); \ SAVE_ARG_HISTORY(FUNCNAME, 6); \ + SAVE_ARG_HISTORY(FUNCNAME, 7); \ + SAVE_ARG_HISTORY(FUNCNAME, 8); \ + SAVE_ARG_HISTORY(FUNCNAME, 9); \ + SAVE_ARG_HISTORY(FUNCNAME, 10); \ + SAVE_ARG_HISTORY(FUNCNAME, 11); \ + SAVE_ARG_HISTORY(FUNCNAME, 12); \ + SAVE_ARG_HISTORY(FUNCNAME, 13); \ + SAVE_ARG_HISTORY(FUNCNAME, 14); \ + SAVE_ARG_HISTORY(FUNCNAME, 15); \ + SAVE_ARG_HISTORY(FUNCNAME, 16); \ + SAVE_ARG_HISTORY(FUNCNAME, 17); \ + SAVE_ARG_HISTORY(FUNCNAME, 18); \ + SAVE_ARG_HISTORY(FUNCNAME, 19); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ }\ INCREMENT_CALL_COUNT(FUNCNAME); \ REGISTER_CALL(FUNCNAME); \ - if(FUNCNAME##_fake.custom_fake){\ - va_list ap;\ - va_start(ap, arg6);\ - FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, ap);\ - va_end(ap);\ - }\ + if (FUNCNAME##_fake.custom_fake_seq_len){ /* a sequence of custom fakes */ \ + if (FUNCNAME##_fake.custom_fake_seq_idx < FUNCNAME##_fake.custom_fake_seq_len){ \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_idx++](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19); \ + } \ + else{ \ + return FUNCNAME##_fake.custom_fake_seq[FUNCNAME##_fake.custom_fake_seq_len-1](arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19); \ + } \ + } \ + if (FUNCNAME##_fake.custom_fake) return FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19); \ + RETURN_FAKE_RESULT(FUNCNAME) \ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VOID_FUNC8_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ...) \ - DECLARE_FAKE_VOID_FUNC8_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ...) \ - DEFINE_FAKE_VOID_FUNC8_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ...) \ +#define FAKE_VALUE_FUNC20(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE) \ + DECLARE_FAKE_VALUE_FUNC20(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE) \ + DEFINE_FAKE_VALUE_FUNC20(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE) \ -#define DECLARE_FAKE_VOID_FUNC9_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ...) \ +#define DECLARE_FAKE_VOID_FUNC2_VARARG(FUNCNAME, ARG0_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ - DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ - DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ - DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ - DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, va_list ap); \ + void(*custom_fake)(ARG0_TYPE arg0, va_list ap); \ + void(**custom_fake_seq)(ARG0_TYPE arg0, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VOID_FUNC9_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ...) \ +#define DEFINE_FAKE_VOID_FUNC2_VARARG(FUNCNAME, ARG0_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ...){ \ + void FUNCNAME(ARG0_TYPE arg0, ...){ \ SAVE_ARG(FUNCNAME, 0); \ - SAVE_ARG(FUNCNAME, 1); \ - SAVE_ARG(FUNCNAME, 2); \ - SAVE_ARG(FUNCNAME, 3); \ - SAVE_ARG(FUNCNAME, 4); \ - SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ - SAVE_ARG_HISTORY(FUNCNAME, 1); \ - SAVE_ARG_HISTORY(FUNCNAME, 2); \ - SAVE_ARG_HISTORY(FUNCNAME, 3); \ - SAVE_ARG_HISTORY(FUNCNAME, 4); \ - SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -4661,63 +3180,42 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if(FUNCNAME##_fake.custom_fake){\ va_list ap;\ - va_start(ap, arg7);\ - FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, ap);\ + va_start(ap, arg0);\ + FUNCNAME##_fake.custom_fake(arg0, ap);\ va_end(ap);\ }\ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VOID_FUNC9_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ...) \ - DECLARE_FAKE_VOID_FUNC9_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ...) \ - DEFINE_FAKE_VOID_FUNC9_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ...) \ +#define FAKE_VOID_FUNC2_VARARG(FUNCNAME, ARG0_TYPE, ...) \ + DECLARE_FAKE_VOID_FUNC2_VARARG(FUNCNAME, ARG0_TYPE, ...) \ + DEFINE_FAKE_VOID_FUNC2_VARARG(FUNCNAME, ARG0_TYPE, ...) \ -#define DECLARE_FAKE_VOID_FUNC10_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ...) \ +#define DECLARE_FAKE_VOID_FUNC3_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ - DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ - DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ - DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, va_list ap); \ + void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, va_list ap); \ + void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VOID_FUNC10_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ...) \ +#define DEFINE_FAKE_VOID_FUNC3_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ...){ \ + void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ - SAVE_ARG(FUNCNAME, 2); \ - SAVE_ARG(FUNCNAME, 3); \ - SAVE_ARG(FUNCNAME, 4); \ - SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ - SAVE_ARG_HISTORY(FUNCNAME, 2); \ - SAVE_ARG_HISTORY(FUNCNAME, 3); \ - SAVE_ARG_HISTORY(FUNCNAME, 4); \ - SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -4726,66 +3224,45 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if(FUNCNAME##_fake.custom_fake){\ va_list ap;\ - va_start(ap, arg8);\ - FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, ap);\ + va_start(ap, arg1);\ + FUNCNAME##_fake.custom_fake(arg0, arg1, ap);\ va_end(ap);\ }\ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VOID_FUNC10_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ...) \ - DECLARE_FAKE_VOID_FUNC10_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ...) \ - DEFINE_FAKE_VOID_FUNC10_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ...) \ +#define FAKE_VOID_FUNC3_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ...) \ + DECLARE_FAKE_VOID_FUNC3_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ...) \ + DEFINE_FAKE_VOID_FUNC3_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ...) \ -#define DECLARE_FAKE_VOID_FUNC11_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ...) \ +#define DECLARE_FAKE_VOID_FUNC4_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ - DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ - DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, va_list ap); \ + void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, va_list ap); \ + void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VOID_FUNC11_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ...) \ +#define DEFINE_FAKE_VOID_FUNC4_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ...){ \ + void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ - SAVE_ARG(FUNCNAME, 3); \ - SAVE_ARG(FUNCNAME, 4); \ - SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ SAVE_ARG_HISTORY(FUNCNAME, 2); \ - SAVE_ARG_HISTORY(FUNCNAME, 3); \ - SAVE_ARG_HISTORY(FUNCNAME, 4); \ - SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -4794,69 +3271,48 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if(FUNCNAME##_fake.custom_fake){\ va_list ap;\ - va_start(ap, arg9);\ - FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, ap);\ + va_start(ap, arg2);\ + FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, ap);\ va_end(ap);\ }\ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VOID_FUNC11_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ...) \ - DECLARE_FAKE_VOID_FUNC11_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ...) \ - DEFINE_FAKE_VOID_FUNC11_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ...) \ +#define FAKE_VOID_FUNC4_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ...) \ + DECLARE_FAKE_VOID_FUNC4_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ...) \ + DEFINE_FAKE_VOID_FUNC4_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ...) \ -#define DECLARE_FAKE_VOID_FUNC12_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ...) \ +#define DECLARE_FAKE_VOID_FUNC5_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ - DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, va_list ap); \ + void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, va_list ap); \ + void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VOID_FUNC12_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ...) \ +#define DEFINE_FAKE_VOID_FUNC5_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ...){ \ + void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ SAVE_ARG(FUNCNAME, 3); \ - SAVE_ARG(FUNCNAME, 4); \ - SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ SAVE_ARG_HISTORY(FUNCNAME, 2); \ SAVE_ARG_HISTORY(FUNCNAME, 3); \ - SAVE_ARG_HISTORY(FUNCNAME, 4); \ - SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -4865,20 +3321,20 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if(FUNCNAME##_fake.custom_fake){\ va_list ap;\ - va_start(ap, arg10);\ - FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, ap);\ + va_start(ap, arg3);\ + FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, ap);\ va_end(ap);\ }\ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VOID_FUNC12_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ...) \ - DECLARE_FAKE_VOID_FUNC12_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ...) \ - DEFINE_FAKE_VOID_FUNC12_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ...) \ +#define FAKE_VOID_FUNC5_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ...) \ + DECLARE_FAKE_VOID_FUNC5_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ...) \ + DEFINE_FAKE_VOID_FUNC5_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ...) \ -#define DECLARE_FAKE_VOID_FUNC13_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ...) \ +#define DECLARE_FAKE_VOID_FUNC6_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -4886,51 +3342,30 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, va_list ap); \ + void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, va_list ap); \ + void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VOID_FUNC13_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ...) \ +#define DEFINE_FAKE_VOID_FUNC6_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ...){ \ + void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ SAVE_ARG(FUNCNAME, 3); \ SAVE_ARG(FUNCNAME, 4); \ - SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ SAVE_ARG_HISTORY(FUNCNAME, 2); \ SAVE_ARG_HISTORY(FUNCNAME, 3); \ SAVE_ARG_HISTORY(FUNCNAME, 4); \ - SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -4939,20 +3374,20 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if(FUNCNAME##_fake.custom_fake){\ va_list ap;\ - va_start(ap, arg11);\ - FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, ap);\ + va_start(ap, arg4);\ + FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, ap);\ va_end(ap);\ }\ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VOID_FUNC13_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ...) \ - DECLARE_FAKE_VOID_FUNC13_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ...) \ - DEFINE_FAKE_VOID_FUNC13_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ...) \ +#define FAKE_VOID_FUNC6_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ...) \ + DECLARE_FAKE_VOID_FUNC6_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ...) \ + DEFINE_FAKE_VOID_FUNC6_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ...) \ -#define DECLARE_FAKE_VOID_FUNC14_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ...) \ +#define DECLARE_FAKE_VOID_FUNC7_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -4961,39 +3396,25 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, va_list ap); \ + void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, va_list ap); \ + void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VOID_FUNC14_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ...) \ +#define DEFINE_FAKE_VOID_FUNC7_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ...){ \ + void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ SAVE_ARG(FUNCNAME, 3); \ SAVE_ARG(FUNCNAME, 4); \ SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -5001,13 +3422,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 3); \ SAVE_ARG_HISTORY(FUNCNAME, 4); \ SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -5016,20 +3430,20 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if(FUNCNAME##_fake.custom_fake){\ va_list ap;\ - va_start(ap, arg12);\ - FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, ap);\ + va_start(ap, arg5);\ + FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, ap);\ va_end(ap);\ }\ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VOID_FUNC14_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ...) \ - DECLARE_FAKE_VOID_FUNC14_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ...) \ - DEFINE_FAKE_VOID_FUNC14_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ...) \ +#define FAKE_VOID_FUNC7_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ...) \ + DECLARE_FAKE_VOID_FUNC7_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ...) \ + DEFINE_FAKE_VOID_FUNC7_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ...) \ -#define DECLARE_FAKE_VOID_FUNC15_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ...) \ +#define DECLARE_FAKE_VOID_FUNC8_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -5039,26 +3453,19 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, va_list ap); \ + void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, va_list ap); \ + void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VOID_FUNC15_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ...) \ +#define DEFINE_FAKE_VOID_FUNC8_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ...){ \ + void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -5066,13 +3473,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 4); \ SAVE_ARG(FUNCNAME, 5); \ SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -5081,13 +3481,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 4); \ SAVE_ARG_HISTORY(FUNCNAME, 5); \ SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -5096,20 +3489,20 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if(FUNCNAME##_fake.custom_fake){\ va_list ap;\ - va_start(ap, arg13);\ - FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, ap);\ + va_start(ap, arg6);\ + FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, ap);\ va_end(ap);\ }\ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VOID_FUNC15_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ...) \ - DECLARE_FAKE_VOID_FUNC15_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ...) \ - DEFINE_FAKE_VOID_FUNC15_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ...) \ +#define FAKE_VOID_FUNC8_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ...) \ + DECLARE_FAKE_VOID_FUNC8_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ...) \ + DEFINE_FAKE_VOID_FUNC8_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ...) \ -#define DECLARE_FAKE_VOID_FUNC16_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ...) \ +#define DECLARE_FAKE_VOID_FUNC9_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -5120,26 +3513,19 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, va_list ap); \ + void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, va_list ap); \ + void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VOID_FUNC16_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ...) \ +#define DEFINE_FAKE_VOID_FUNC9_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ...){ \ + void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -5148,13 +3534,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 5); \ SAVE_ARG(FUNCNAME, 6); \ SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -5164,13 +3543,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 5); \ SAVE_ARG_HISTORY(FUNCNAME, 6); \ SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -5179,20 +3551,20 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if(FUNCNAME##_fake.custom_fake){\ va_list ap;\ - va_start(ap, arg14);\ - FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, ap);\ + va_start(ap, arg7);\ + FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, ap);\ va_end(ap);\ }\ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VOID_FUNC16_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ...) \ - DECLARE_FAKE_VOID_FUNC16_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ...) \ - DEFINE_FAKE_VOID_FUNC16_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ...) \ +#define FAKE_VOID_FUNC9_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ...) \ + DECLARE_FAKE_VOID_FUNC9_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ...) \ + DEFINE_FAKE_VOID_FUNC9_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ...) \ -#define DECLARE_FAKE_VOID_FUNC17_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ...) \ +#define DECLARE_FAKE_VOID_FUNC10_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -5204,26 +3576,19 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, va_list ap); \ + void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, va_list ap); \ + void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VOID_FUNC17_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ...) \ +#define DEFINE_FAKE_VOID_FUNC10_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ...){ \ + void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -5233,13 +3598,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 6); \ SAVE_ARG(FUNCNAME, 7); \ SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -5250,13 +3608,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 6); \ SAVE_ARG_HISTORY(FUNCNAME, 7); \ SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -5265,20 +3616,20 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if(FUNCNAME##_fake.custom_fake){\ va_list ap;\ - va_start(ap, arg15);\ - FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, ap);\ + va_start(ap, arg8);\ + FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, ap);\ va_end(ap);\ }\ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VOID_FUNC17_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ...) \ - DECLARE_FAKE_VOID_FUNC17_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ...) \ - DEFINE_FAKE_VOID_FUNC17_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ...) \ +#define FAKE_VOID_FUNC10_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ...) \ + DECLARE_FAKE_VOID_FUNC10_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ...) \ + DEFINE_FAKE_VOID_FUNC10_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ...) \ -#define DECLARE_FAKE_VOID_FUNC18_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ...) \ +#define DECLARE_FAKE_VOID_FUNC11_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -5291,26 +3642,19 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, va_list ap); \ + void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, va_list ap); \ + void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VOID_FUNC18_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ...) \ +#define DEFINE_FAKE_VOID_FUNC11_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ...){ \ + void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -5321,13 +3665,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 7); \ SAVE_ARG(FUNCNAME, 8); \ SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -5339,13 +3676,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 7); \ SAVE_ARG_HISTORY(FUNCNAME, 8); \ SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -5354,20 +3684,20 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if(FUNCNAME##_fake.custom_fake){\ va_list ap;\ - va_start(ap, arg16);\ - FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, ap);\ + va_start(ap, arg9);\ + FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, ap);\ va_end(ap);\ }\ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VOID_FUNC18_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ...) \ - DECLARE_FAKE_VOID_FUNC18_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ...) \ - DEFINE_FAKE_VOID_FUNC18_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ...) \ +#define FAKE_VOID_FUNC11_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ...) \ + DECLARE_FAKE_VOID_FUNC11_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ...) \ + DEFINE_FAKE_VOID_FUNC11_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ...) \ -#define DECLARE_FAKE_VOID_FUNC19_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ...) \ +#define DECLARE_FAKE_VOID_FUNC12_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -5381,26 +3711,19 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, va_list ap); \ + void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, va_list ap); \ + void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VOID_FUNC19_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ...) \ +#define DEFINE_FAKE_VOID_FUNC12_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ...){ \ + void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -5412,13 +3735,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 8); \ SAVE_ARG(FUNCNAME, 9); \ SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -5431,13 +3747,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 8); \ SAVE_ARG_HISTORY(FUNCNAME, 9); \ SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -5446,20 +3755,20 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if(FUNCNAME##_fake.custom_fake){\ va_list ap;\ - va_start(ap, arg17);\ - FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, ap);\ + va_start(ap, arg10);\ + FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, ap);\ va_end(ap);\ }\ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VOID_FUNC19_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ...) \ - DECLARE_FAKE_VOID_FUNC19_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ...) \ - DEFINE_FAKE_VOID_FUNC19_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ...) \ +#define FAKE_VOID_FUNC12_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ...) \ + DECLARE_FAKE_VOID_FUNC12_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ...) \ + DEFINE_FAKE_VOID_FUNC12_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ...) \ -#define DECLARE_FAKE_VOID_FUNC20_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ...) \ +#define DECLARE_FAKE_VOID_FUNC13_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -5474,26 +3783,19 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ - DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, va_list ap); \ + void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, va_list ap); \ + void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VOID_FUNC20_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ...) \ +#define DEFINE_FAKE_VOID_FUNC13_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ...){ \ + void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -5506,13 +3808,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 9); \ SAVE_ARG(FUNCNAME, 10); \ SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ - SAVE_ARG(FUNCNAME, 18); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -5526,13 +3821,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 9); \ SAVE_ARG_HISTORY(FUNCNAME, 10); \ SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ - SAVE_ARG_HISTORY(FUNCNAME, 18); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -5541,20 +3829,20 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if(FUNCNAME##_fake.custom_fake){\ va_list ap;\ - va_start(ap, arg18);\ - FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, ap);\ + va_start(ap, arg11);\ + FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, ap);\ va_end(ap);\ }\ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VOID_FUNC20_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ...) \ - DECLARE_FAKE_VOID_FUNC20_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ...) \ - DEFINE_FAKE_VOID_FUNC20_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ...) \ +#define FAKE_VOID_FUNC13_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ...) \ + DECLARE_FAKE_VOID_FUNC13_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ...) \ + DEFINE_FAKE_VOID_FUNC13_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ...) \ -#define DECLARE_FAKE_VOID_FUNC21_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ...) \ +#define DECLARE_FAKE_VOID_FUNC14_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -5570,26 +3858,19 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ - DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ - DECLARE_ARG(ARG19_TYPE, 19, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, va_list ap); \ + void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, va_list ap); \ + void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VOID_FUNC21_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ...) \ +#define DEFINE_FAKE_VOID_FUNC14_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ...){ \ + void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -5601,15 +3882,8 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 8); \ SAVE_ARG(FUNCNAME, 9); \ SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ - SAVE_ARG(FUNCNAME, 18); \ - SAVE_ARG(FUNCNAME, 19); \ + SAVE_ARG(FUNCNAME, 11); \ + SAVE_ARG(FUNCNAME, 12); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -5624,13 +3898,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 10); \ SAVE_ARG_HISTORY(FUNCNAME, 11); \ SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ - SAVE_ARG_HISTORY(FUNCNAME, 18); \ - SAVE_ARG_HISTORY(FUNCNAME, 19); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -5639,20 +3906,20 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if(FUNCNAME##_fake.custom_fake){\ va_list ap;\ - va_start(ap, arg19);\ - FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, ap);\ + va_start(ap, arg12);\ + FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, ap);\ va_end(ap);\ }\ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VOID_FUNC21_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ...) \ - DECLARE_FAKE_VOID_FUNC21_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ...) \ - DEFINE_FAKE_VOID_FUNC21_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ...) \ +#define FAKE_VOID_FUNC14_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ...) \ + DECLARE_FAKE_VOID_FUNC14_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ...) \ + DEFINE_FAKE_VOID_FUNC14_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ...) \ -#define DECLARE_FAKE_VOID_FUNC22_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ...) \ +#define DECLARE_FAKE_VOID_FUNC15_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -5669,26 +3936,19 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ - DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ - DECLARE_ARG(ARG19_TYPE, 19, FUNCNAME) \ - DECLARE_ARG(ARG20_TYPE, 20, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, va_list ap); \ + void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, va_list ap); \ + void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VOID_FUNC22_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ...) \ +#define DEFINE_FAKE_VOID_FUNC15_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ...){ \ + void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -5703,13 +3963,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 11); \ SAVE_ARG(FUNCNAME, 12); \ SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ - SAVE_ARG(FUNCNAME, 18); \ - SAVE_ARG(FUNCNAME, 19); \ - SAVE_ARG(FUNCNAME, 20); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -5725,13 +3978,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 11); \ SAVE_ARG_HISTORY(FUNCNAME, 12); \ SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ - SAVE_ARG_HISTORY(FUNCNAME, 18); \ - SAVE_ARG_HISTORY(FUNCNAME, 19); \ - SAVE_ARG_HISTORY(FUNCNAME, 20); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -5740,20 +3986,20 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if(FUNCNAME##_fake.custom_fake){\ va_list ap;\ - va_start(ap, arg20);\ - FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, ap);\ + va_start(ap, arg13);\ + FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, ap);\ va_end(ap);\ }\ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VOID_FUNC22_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ...) \ - DECLARE_FAKE_VOID_FUNC22_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ...) \ - DEFINE_FAKE_VOID_FUNC22_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ...) \ +#define FAKE_VOID_FUNC15_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ...) \ + DECLARE_FAKE_VOID_FUNC15_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ...) \ + DEFINE_FAKE_VOID_FUNC15_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ...) \ -#define DECLARE_FAKE_VOID_FUNC23_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ...) \ +#define DECLARE_FAKE_VOID_FUNC16_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -5771,26 +4017,19 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ - DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ - DECLARE_ARG(ARG19_TYPE, 19, FUNCNAME) \ - DECLARE_ARG(ARG20_TYPE, 20, FUNCNAME) \ - DECLARE_ARG(ARG21_TYPE, 21, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, va_list ap); \ + void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, va_list ap); \ + void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VOID_FUNC23_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ...) \ +#define DEFINE_FAKE_VOID_FUNC16_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ...){ \ + void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -5806,13 +4045,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 12); \ SAVE_ARG(FUNCNAME, 13); \ SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ - SAVE_ARG(FUNCNAME, 18); \ - SAVE_ARG(FUNCNAME, 19); \ - SAVE_ARG(FUNCNAME, 20); \ - SAVE_ARG(FUNCNAME, 21); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -5829,13 +4061,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 12); \ SAVE_ARG_HISTORY(FUNCNAME, 13); \ SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ - SAVE_ARG_HISTORY(FUNCNAME, 18); \ - SAVE_ARG_HISTORY(FUNCNAME, 19); \ - SAVE_ARG_HISTORY(FUNCNAME, 20); \ - SAVE_ARG_HISTORY(FUNCNAME, 21); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -5844,20 +4069,20 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if(FUNCNAME##_fake.custom_fake){\ va_list ap;\ - va_start(ap, arg21);\ - FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, ap);\ + va_start(ap, arg14);\ + FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, ap);\ va_end(ap);\ }\ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VOID_FUNC23_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ...) \ - DECLARE_FAKE_VOID_FUNC23_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ...) \ - DEFINE_FAKE_VOID_FUNC23_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ...) \ +#define FAKE_VOID_FUNC16_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ...) \ + DECLARE_FAKE_VOID_FUNC16_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ...) \ + DEFINE_FAKE_VOID_FUNC16_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ...) \ -#define DECLARE_FAKE_VOID_FUNC24_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ...) \ +#define DECLARE_FAKE_VOID_FUNC17_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -5876,26 +4101,19 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ - DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ - DECLARE_ARG(ARG19_TYPE, 19, FUNCNAME) \ - DECLARE_ARG(ARG20_TYPE, 20, FUNCNAME) \ - DECLARE_ARG(ARG21_TYPE, 21, FUNCNAME) \ - DECLARE_ARG(ARG22_TYPE, 22, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22, va_list ap); \ + void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, va_list ap); \ + void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VOID_FUNC24_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ...) \ +#define DEFINE_FAKE_VOID_FUNC17_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22, ...){ \ + void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -5912,13 +4130,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 13); \ SAVE_ARG(FUNCNAME, 14); \ SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ - SAVE_ARG(FUNCNAME, 18); \ - SAVE_ARG(FUNCNAME, 19); \ - SAVE_ARG(FUNCNAME, 20); \ - SAVE_ARG(FUNCNAME, 21); \ - SAVE_ARG(FUNCNAME, 22); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -5936,13 +4147,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 13); \ SAVE_ARG_HISTORY(FUNCNAME, 14); \ SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ - SAVE_ARG_HISTORY(FUNCNAME, 18); \ - SAVE_ARG_HISTORY(FUNCNAME, 19); \ - SAVE_ARG_HISTORY(FUNCNAME, 20); \ - SAVE_ARG_HISTORY(FUNCNAME, 21); \ - SAVE_ARG_HISTORY(FUNCNAME, 22); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -5951,20 +4155,20 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if(FUNCNAME##_fake.custom_fake){\ va_list ap;\ - va_start(ap, arg22);\ - FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, ap);\ + va_start(ap, arg15);\ + FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, ap);\ va_end(ap);\ }\ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VOID_FUNC24_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ...) \ - DECLARE_FAKE_VOID_FUNC24_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ...) \ - DEFINE_FAKE_VOID_FUNC24_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ...) \ +#define FAKE_VOID_FUNC17_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ...) \ + DECLARE_FAKE_VOID_FUNC17_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ...) \ + DEFINE_FAKE_VOID_FUNC17_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ...) \ -#define DECLARE_FAKE_VOID_FUNC25_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE, ...) \ +#define DECLARE_FAKE_VOID_FUNC18_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -5984,26 +4188,19 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ - DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ - DECLARE_ARG(ARG19_TYPE, 19, FUNCNAME) \ - DECLARE_ARG(ARG20_TYPE, 20, FUNCNAME) \ - DECLARE_ARG(ARG21_TYPE, 21, FUNCNAME) \ - DECLARE_ARG(ARG22_TYPE, 22, FUNCNAME) \ - DECLARE_ARG(ARG23_TYPE, 23, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22, ARG23_TYPE arg23, va_list ap); \ - void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22, ARG23_TYPE arg23, va_list ap); \ + void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, va_list ap); \ + void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VOID_FUNC25_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE, ...) \ +#define DEFINE_FAKE_VOID_FUNC18_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22, ARG23_TYPE arg23, ...){ \ + void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -6021,13 +4218,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 14); \ SAVE_ARG(FUNCNAME, 15); \ SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ - SAVE_ARG(FUNCNAME, 18); \ - SAVE_ARG(FUNCNAME, 19); \ - SAVE_ARG(FUNCNAME, 20); \ - SAVE_ARG(FUNCNAME, 21); \ - SAVE_ARG(FUNCNAME, 22); \ - SAVE_ARG(FUNCNAME, 23); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -6046,154 +4236,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 14); \ SAVE_ARG_HISTORY(FUNCNAME, 15); \ SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ - SAVE_ARG_HISTORY(FUNCNAME, 18); \ - SAVE_ARG_HISTORY(FUNCNAME, 19); \ - SAVE_ARG_HISTORY(FUNCNAME, 20); \ - SAVE_ARG_HISTORY(FUNCNAME, 21); \ - SAVE_ARG_HISTORY(FUNCNAME, 22); \ - SAVE_ARG_HISTORY(FUNCNAME, 23); \ - }\ - else{\ - HISTORY_DROPPED(FUNCNAME);\ - }\ - INCREMENT_CALL_COUNT(FUNCNAME); \ - REGISTER_CALL(FUNCNAME); \ - if(FUNCNAME##_fake.custom_fake){\ - va_list ap;\ - va_start(ap, arg23);\ - FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, arg23, ap);\ - va_end(ap);\ - }\ - } \ - DEFINE_RESET_FUNCTION(FUNCNAME) \ - FFF_END_EXTERN_C \ - -#define FAKE_VOID_FUNC25_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE, ...) \ - DECLARE_FAKE_VOID_FUNC25_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE, ...) \ - DEFINE_FAKE_VOID_FUNC25_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE, ...) \ - - -#define DECLARE_FAKE_VALUE_FUNC2_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ...) \ - FFF_EXTERN_C \ - typedef struct FUNCNAME##_Fake { \ - DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ - DECLARE_ALL_FUNC_COMMON \ - DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ - DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, va_list ap); \ - } FUNCNAME##_Fake;\ - extern FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME##_reset(); \ - FFF_END_EXTERN_C \ - -#define DEFINE_FAKE_VALUE_FUNC2_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ...) \ - FFF_EXTERN_C \ - FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ...){ \ - SAVE_ARG(FUNCNAME, 0); \ - if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ - SAVE_ARG_HISTORY(FUNCNAME, 0); \ - }\ - else{\ - HISTORY_DROPPED(FUNCNAME);\ - }\ - INCREMENT_CALL_COUNT(FUNCNAME); \ - REGISTER_CALL(FUNCNAME); \ - if(FUNCNAME##_fake.custom_fake){\ - RETURN_TYPE ret;\ - va_list ap;\ - va_start(ap, arg0);\ - ret = FUNCNAME##_fake.custom_fake(arg0, ap);\ - va_end(ap);\ - return ret;\ - }\ - RETURN_FAKE_RESULT(FUNCNAME) \ - } \ - DEFINE_RESET_FUNCTION(FUNCNAME) \ - FFF_END_EXTERN_C \ - -#define FAKE_VALUE_FUNC2_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ...) \ - DECLARE_FAKE_VALUE_FUNC2_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ...) \ - DEFINE_FAKE_VALUE_FUNC2_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ...) \ - - -#define DECLARE_FAKE_VALUE_FUNC3_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ...) \ - FFF_EXTERN_C \ - typedef struct FUNCNAME##_Fake { \ - DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ - DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ - DECLARE_ALL_FUNC_COMMON \ - DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ - DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, va_list ap); \ - } FUNCNAME##_Fake;\ - extern FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME##_reset(); \ - FFF_END_EXTERN_C \ - -#define DEFINE_FAKE_VALUE_FUNC3_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ...) \ - FFF_EXTERN_C \ - FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ...){ \ - SAVE_ARG(FUNCNAME, 0); \ - SAVE_ARG(FUNCNAME, 1); \ - if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ - SAVE_ARG_HISTORY(FUNCNAME, 0); \ - SAVE_ARG_HISTORY(FUNCNAME, 1); \ - }\ - else{\ - HISTORY_DROPPED(FUNCNAME);\ - }\ - INCREMENT_CALL_COUNT(FUNCNAME); \ - REGISTER_CALL(FUNCNAME); \ - if(FUNCNAME##_fake.custom_fake){\ - RETURN_TYPE ret;\ - va_list ap;\ - va_start(ap, arg1);\ - ret = FUNCNAME##_fake.custom_fake(arg0, arg1, ap);\ - va_end(ap);\ - return ret;\ - }\ - RETURN_FAKE_RESULT(FUNCNAME) \ - } \ - DEFINE_RESET_FUNCTION(FUNCNAME) \ - FFF_END_EXTERN_C \ - -#define FAKE_VALUE_FUNC3_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ...) \ - DECLARE_FAKE_VALUE_FUNC3_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ...) \ - DEFINE_FAKE_VALUE_FUNC3_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ...) \ - - -#define DECLARE_FAKE_VALUE_FUNC4_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ...) \ - FFF_EXTERN_C \ - typedef struct FUNCNAME##_Fake { \ - DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ - DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ - DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ - DECLARE_ALL_FUNC_COMMON \ - DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ - DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, va_list ap); \ - } FUNCNAME##_Fake;\ - extern FUNCNAME##_Fake FUNCNAME##_fake;\ - void FUNCNAME##_reset(); \ - FFF_END_EXTERN_C \ - -#define DEFINE_FAKE_VALUE_FUNC4_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ...) \ - FFF_EXTERN_C \ - FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ...){ \ - SAVE_ARG(FUNCNAME, 0); \ - SAVE_ARG(FUNCNAME, 1); \ - SAVE_ARG(FUNCNAME, 2); \ - if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ - SAVE_ARG_HISTORY(FUNCNAME, 0); \ - SAVE_ARG_HISTORY(FUNCNAME, 1); \ - SAVE_ARG_HISTORY(FUNCNAME, 2); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -6201,53 +4243,91 @@ FFF_END_EXTERN_C \ INCREMENT_CALL_COUNT(FUNCNAME); \ REGISTER_CALL(FUNCNAME); \ if(FUNCNAME##_fake.custom_fake){\ - RETURN_TYPE ret;\ va_list ap;\ - va_start(ap, arg2);\ - ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, ap);\ + va_start(ap, arg16);\ + FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, ap);\ va_end(ap);\ - return ret;\ }\ - RETURN_FAKE_RESULT(FUNCNAME) \ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC4_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ...) \ - DECLARE_FAKE_VALUE_FUNC4_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ...) \ - DEFINE_FAKE_VALUE_FUNC4_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ...) \ +#define FAKE_VOID_FUNC18_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ...) \ + DECLARE_FAKE_VOID_FUNC18_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ...) \ + DEFINE_FAKE_VOID_FUNC18_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ...) \ -#define DECLARE_FAKE_VALUE_FUNC5_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ...) \ +#define DECLARE_FAKE_VOID_FUNC19_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ + DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ + DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ + DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ + DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ + DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ + DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ + DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ + DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ + DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ + DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ + DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ + DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ + DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ + DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ - DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, va_list ap); \ + void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, va_list ap); \ + void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC5_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ...) \ +#define DEFINE_FAKE_VOID_FUNC19_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ...){ \ + void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ SAVE_ARG(FUNCNAME, 3); \ + SAVE_ARG(FUNCNAME, 4); \ + SAVE_ARG(FUNCNAME, 5); \ + SAVE_ARG(FUNCNAME, 6); \ + SAVE_ARG(FUNCNAME, 7); \ + SAVE_ARG(FUNCNAME, 8); \ + SAVE_ARG(FUNCNAME, 9); \ + SAVE_ARG(FUNCNAME, 10); \ + SAVE_ARG(FUNCNAME, 11); \ + SAVE_ARG(FUNCNAME, 12); \ + SAVE_ARG(FUNCNAME, 13); \ + SAVE_ARG(FUNCNAME, 14); \ + SAVE_ARG(FUNCNAME, 15); \ + SAVE_ARG(FUNCNAME, 16); \ + SAVE_ARG(FUNCNAME, 17); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ SAVE_ARG_HISTORY(FUNCNAME, 2); \ SAVE_ARG_HISTORY(FUNCNAME, 3); \ + SAVE_ARG_HISTORY(FUNCNAME, 4); \ + SAVE_ARG_HISTORY(FUNCNAME, 5); \ + SAVE_ARG_HISTORY(FUNCNAME, 6); \ + SAVE_ARG_HISTORY(FUNCNAME, 7); \ + SAVE_ARG_HISTORY(FUNCNAME, 8); \ + SAVE_ARG_HISTORY(FUNCNAME, 9); \ + SAVE_ARG_HISTORY(FUNCNAME, 10); \ + SAVE_ARG_HISTORY(FUNCNAME, 11); \ + SAVE_ARG_HISTORY(FUNCNAME, 12); \ + SAVE_ARG_HISTORY(FUNCNAME, 13); \ + SAVE_ARG_HISTORY(FUNCNAME, 14); \ + SAVE_ARG_HISTORY(FUNCNAME, 15); \ + SAVE_ARG_HISTORY(FUNCNAME, 16); \ + SAVE_ARG_HISTORY(FUNCNAME, 17); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -6255,24 +4335,21 @@ FFF_END_EXTERN_C \ INCREMENT_CALL_COUNT(FUNCNAME); \ REGISTER_CALL(FUNCNAME); \ if(FUNCNAME##_fake.custom_fake){\ - RETURN_TYPE ret;\ va_list ap;\ - va_start(ap, arg3);\ - ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, ap);\ + va_start(ap, arg17);\ + FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, ap);\ va_end(ap);\ - return ret;\ }\ - RETURN_FAKE_RESULT(FUNCNAME) \ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC5_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ...) \ - DECLARE_FAKE_VALUE_FUNC5_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ...) \ - DEFINE_FAKE_VALUE_FUNC5_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ...) \ +#define FAKE_VOID_FUNC19_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ...) \ + DECLARE_FAKE_VOID_FUNC19_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ...) \ + DEFINE_FAKE_VOID_FUNC19_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ...) \ -#define DECLARE_FAKE_VALUE_FUNC6_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ...) \ +#define DECLARE_FAKE_VOID_FUNC20_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -6280,31 +4357,72 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ + DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ + DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ + DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ + DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ + DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ + DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ + DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ + DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ + DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ + DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ + DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ + DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ + DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ + DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ - DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, va_list ap); \ + void(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, va_list ap); \ + void(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC6_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ...) \ +#define DEFINE_FAKE_VOID_FUNC20_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ...){ \ + void FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ SAVE_ARG(FUNCNAME, 3); \ SAVE_ARG(FUNCNAME, 4); \ + SAVE_ARG(FUNCNAME, 5); \ + SAVE_ARG(FUNCNAME, 6); \ + SAVE_ARG(FUNCNAME, 7); \ + SAVE_ARG(FUNCNAME, 8); \ + SAVE_ARG(FUNCNAME, 9); \ + SAVE_ARG(FUNCNAME, 10); \ + SAVE_ARG(FUNCNAME, 11); \ + SAVE_ARG(FUNCNAME, 12); \ + SAVE_ARG(FUNCNAME, 13); \ + SAVE_ARG(FUNCNAME, 14); \ + SAVE_ARG(FUNCNAME, 15); \ + SAVE_ARG(FUNCNAME, 16); \ + SAVE_ARG(FUNCNAME, 17); \ + SAVE_ARG(FUNCNAME, 18); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ SAVE_ARG_HISTORY(FUNCNAME, 2); \ SAVE_ARG_HISTORY(FUNCNAME, 3); \ SAVE_ARG_HISTORY(FUNCNAME, 4); \ + SAVE_ARG_HISTORY(FUNCNAME, 5); \ + SAVE_ARG_HISTORY(FUNCNAME, 6); \ + SAVE_ARG_HISTORY(FUNCNAME, 7); \ + SAVE_ARG_HISTORY(FUNCNAME, 8); \ + SAVE_ARG_HISTORY(FUNCNAME, 9); \ + SAVE_ARG_HISTORY(FUNCNAME, 10); \ + SAVE_ARG_HISTORY(FUNCNAME, 11); \ + SAVE_ARG_HISTORY(FUNCNAME, 12); \ + SAVE_ARG_HISTORY(FUNCNAME, 13); \ + SAVE_ARG_HISTORY(FUNCNAME, 14); \ + SAVE_ARG_HISTORY(FUNCNAME, 15); \ + SAVE_ARG_HISTORY(FUNCNAME, 16); \ + SAVE_ARG_HISTORY(FUNCNAME, 17); \ + SAVE_ARG_HISTORY(FUNCNAME, 18); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -6312,59 +4430,41 @@ FFF_END_EXTERN_C \ INCREMENT_CALL_COUNT(FUNCNAME); \ REGISTER_CALL(FUNCNAME); \ if(FUNCNAME##_fake.custom_fake){\ - RETURN_TYPE ret;\ va_list ap;\ - va_start(ap, arg4);\ - ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, ap);\ + va_start(ap, arg18);\ + FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, ap);\ va_end(ap);\ - return ret;\ }\ - RETURN_FAKE_RESULT(FUNCNAME) \ } \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC6_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ...) \ - DECLARE_FAKE_VALUE_FUNC6_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ...) \ - DEFINE_FAKE_VALUE_FUNC6_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ...) \ +#define FAKE_VOID_FUNC20_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ...) \ + DECLARE_FAKE_VOID_FUNC20_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ...) \ + DEFINE_FAKE_VOID_FUNC20_VARARG(FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ...) \ -#define DECLARE_FAKE_VALUE_FUNC7_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ...) \ +#define DECLARE_FAKE_VALUE_FUNC2_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ - DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ - DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ - DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ - DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, va_list ap); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, va_list ap); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC7_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ...) \ +#define DEFINE_FAKE_VALUE_FUNC2_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ...){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ...){ \ SAVE_ARG(FUNCNAME, 0); \ - SAVE_ARG(FUNCNAME, 1); \ - SAVE_ARG(FUNCNAME, 2); \ - SAVE_ARG(FUNCNAME, 3); \ - SAVE_ARG(FUNCNAME, 4); \ - SAVE_ARG(FUNCNAME, 5); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ - SAVE_ARG_HISTORY(FUNCNAME, 1); \ - SAVE_ARG_HISTORY(FUNCNAME, 2); \ - SAVE_ARG_HISTORY(FUNCNAME, 3); \ - SAVE_ARG_HISTORY(FUNCNAME, 4); \ - SAVE_ARG_HISTORY(FUNCNAME, 5); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -6374,8 +4474,8 @@ FFF_END_EXTERN_C \ if(FUNCNAME##_fake.custom_fake){\ RETURN_TYPE ret;\ va_list ap;\ - va_start(ap, arg5);\ - ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, ap);\ + va_start(ap, arg0);\ + ret = FUNCNAME##_fake.custom_fake(arg0, ap);\ va_end(ap);\ return ret;\ }\ @@ -6384,50 +4484,35 @@ FFF_END_EXTERN_C \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC7_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ...) \ - DECLARE_FAKE_VALUE_FUNC7_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ...) \ - DEFINE_FAKE_VALUE_FUNC7_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ...) \ +#define FAKE_VALUE_FUNC2_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ...) \ + DECLARE_FAKE_VALUE_FUNC2_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ...) \ + DEFINE_FAKE_VALUE_FUNC2_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ...) \ -#define DECLARE_FAKE_VALUE_FUNC8_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ...) \ +#define DECLARE_FAKE_VALUE_FUNC3_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ - DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ - DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ - DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, va_list ap); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, va_list ap); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC8_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ...) \ +#define DEFINE_FAKE_VALUE_FUNC3_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ...){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ - SAVE_ARG(FUNCNAME, 2); \ - SAVE_ARG(FUNCNAME, 3); \ - SAVE_ARG(FUNCNAME, 4); \ - SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ - SAVE_ARG_HISTORY(FUNCNAME, 2); \ - SAVE_ARG_HISTORY(FUNCNAME, 3); \ - SAVE_ARG_HISTORY(FUNCNAME, 4); \ - SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -6437,8 +4522,8 @@ FFF_END_EXTERN_C \ if(FUNCNAME##_fake.custom_fake){\ RETURN_TYPE ret;\ va_list ap;\ - va_start(ap, arg6);\ - ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, ap);\ + va_start(ap, arg1);\ + ret = FUNCNAME##_fake.custom_fake(arg0, arg1, ap);\ va_end(ap);\ return ret;\ }\ @@ -6447,53 +4532,38 @@ FFF_END_EXTERN_C \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC8_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ...) \ - DECLARE_FAKE_VALUE_FUNC8_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ...) \ - DEFINE_FAKE_VALUE_FUNC8_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ...) \ +#define FAKE_VALUE_FUNC3_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ...) \ + DECLARE_FAKE_VALUE_FUNC3_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ...) \ + DEFINE_FAKE_VALUE_FUNC3_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ...) \ -#define DECLARE_FAKE_VALUE_FUNC9_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ...) \ +#define DECLARE_FAKE_VALUE_FUNC4_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ - DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ - DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, va_list ap); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, va_list ap); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC9_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ...) \ +#define DEFINE_FAKE_VALUE_FUNC4_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ...){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ - SAVE_ARG(FUNCNAME, 3); \ - SAVE_ARG(FUNCNAME, 4); \ - SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ SAVE_ARG_HISTORY(FUNCNAME, 2); \ - SAVE_ARG_HISTORY(FUNCNAME, 3); \ - SAVE_ARG_HISTORY(FUNCNAME, 4); \ - SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -6503,8 +4573,8 @@ FFF_END_EXTERN_C \ if(FUNCNAME##_fake.custom_fake){\ RETURN_TYPE ret;\ va_list ap;\ - va_start(ap, arg7);\ - ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, ap);\ + va_start(ap, arg2);\ + ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, ap);\ va_end(ap);\ return ret;\ }\ @@ -6513,56 +4583,41 @@ FFF_END_EXTERN_C \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC9_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ...) \ - DECLARE_FAKE_VALUE_FUNC9_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ...) \ - DEFINE_FAKE_VALUE_FUNC9_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ...) \ +#define FAKE_VALUE_FUNC4_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ...) \ + DECLARE_FAKE_VALUE_FUNC4_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ...) \ + DEFINE_FAKE_VALUE_FUNC4_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ...) \ -#define DECLARE_FAKE_VALUE_FUNC10_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ...) \ +#define DECLARE_FAKE_VALUE_FUNC5_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ DECLARE_ARG(ARG1_TYPE, 1, FUNCNAME) \ DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ - DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, va_list ap); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, va_list ap); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC10_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ...) \ +#define DEFINE_FAKE_VALUE_FUNC5_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ...){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ...){ \ SAVE_ARG(FUNCNAME, 0); \ - SAVE_ARG(FUNCNAME, 1); \ - SAVE_ARG(FUNCNAME, 2); \ - SAVE_ARG(FUNCNAME, 3); \ - SAVE_ARG(FUNCNAME, 4); \ - SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ + SAVE_ARG(FUNCNAME, 1); \ + SAVE_ARG(FUNCNAME, 2); \ + SAVE_ARG(FUNCNAME, 3); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ SAVE_ARG_HISTORY(FUNCNAME, 2); \ SAVE_ARG_HISTORY(FUNCNAME, 3); \ - SAVE_ARG_HISTORY(FUNCNAME, 4); \ - SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -6572,8 +4627,8 @@ FFF_END_EXTERN_C \ if(FUNCNAME##_fake.custom_fake){\ RETURN_TYPE ret;\ va_list ap;\ - va_start(ap, arg8);\ - ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, ap);\ + va_start(ap, arg3);\ + ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, ap);\ va_end(ap);\ return ret;\ }\ @@ -6582,12 +4637,12 @@ FFF_END_EXTERN_C \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC10_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ...) \ - DECLARE_FAKE_VALUE_FUNC10_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ...) \ - DEFINE_FAKE_VALUE_FUNC10_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ...) \ +#define FAKE_VALUE_FUNC5_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ...) \ + DECLARE_FAKE_VALUE_FUNC5_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ...) \ + DEFINE_FAKE_VALUE_FUNC5_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ...) \ -#define DECLARE_FAKE_VALUE_FUNC11_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ...) \ +#define DECLARE_FAKE_VALUE_FUNC6_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -6595,46 +4650,31 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG2_TYPE, 2, FUNCNAME) \ DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ - DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, va_list ap); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, va_list ap); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC11_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ...) \ +#define DEFINE_FAKE_VALUE_FUNC6_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ...){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ SAVE_ARG(FUNCNAME, 3); \ SAVE_ARG(FUNCNAME, 4); \ - SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ SAVE_ARG_HISTORY(FUNCNAME, 2); \ SAVE_ARG_HISTORY(FUNCNAME, 3); \ SAVE_ARG_HISTORY(FUNCNAME, 4); \ - SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -6644,8 +4684,8 @@ FFF_END_EXTERN_C \ if(FUNCNAME##_fake.custom_fake){\ RETURN_TYPE ret;\ va_list ap;\ - va_start(ap, arg9);\ - ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, ap);\ + va_start(ap, arg4);\ + ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, ap);\ va_end(ap);\ return ret;\ }\ @@ -6654,12 +4694,12 @@ FFF_END_EXTERN_C \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC11_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ...) \ - DECLARE_FAKE_VALUE_FUNC11_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ...) \ - DEFINE_FAKE_VALUE_FUNC11_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ...) \ +#define FAKE_VALUE_FUNC6_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ...) \ + DECLARE_FAKE_VALUE_FUNC6_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ...) \ + DEFINE_FAKE_VALUE_FUNC6_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ...) \ -#define DECLARE_FAKE_VALUE_FUNC12_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ...) \ +#define DECLARE_FAKE_VALUE_FUNC7_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -6668,36 +4708,26 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG3_TYPE, 3, FUNCNAME) \ DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ - DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, va_list ap); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, va_list ap); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC12_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ...) \ +#define DEFINE_FAKE_VALUE_FUNC7_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ...){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ SAVE_ARG(FUNCNAME, 3); \ SAVE_ARG(FUNCNAME, 4); \ SAVE_ARG(FUNCNAME, 5); \ - SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -6705,11 +4735,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 3); \ SAVE_ARG_HISTORY(FUNCNAME, 4); \ SAVE_ARG_HISTORY(FUNCNAME, 5); \ - SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -6719,8 +4744,8 @@ FFF_END_EXTERN_C \ if(FUNCNAME##_fake.custom_fake){\ RETURN_TYPE ret;\ va_list ap;\ - va_start(ap, arg10);\ - ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, ap);\ + va_start(ap, arg5);\ + ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, ap);\ va_end(ap);\ return ret;\ }\ @@ -6729,12 +4754,12 @@ FFF_END_EXTERN_C \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC12_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ...) \ - DECLARE_FAKE_VALUE_FUNC12_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ...) \ - DEFINE_FAKE_VALUE_FUNC12_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ...) \ +#define FAKE_VALUE_FUNC7_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ...) \ + DECLARE_FAKE_VALUE_FUNC7_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ...) \ + DEFINE_FAKE_VALUE_FUNC7_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ...) \ -#define DECLARE_FAKE_VALUE_FUNC13_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ...) \ +#define DECLARE_FAKE_VALUE_FUNC8_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -6744,25 +4769,20 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG4_TYPE, 4, FUNCNAME) \ DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ - DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, va_list ap); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, va_list ap); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC13_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ...) \ +#define DEFINE_FAKE_VALUE_FUNC8_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ...){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -6770,11 +4790,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 4); \ SAVE_ARG(FUNCNAME, 5); \ SAVE_ARG(FUNCNAME, 6); \ - SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -6783,11 +4798,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 4); \ SAVE_ARG_HISTORY(FUNCNAME, 5); \ SAVE_ARG_HISTORY(FUNCNAME, 6); \ - SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -6797,8 +4807,8 @@ FFF_END_EXTERN_C \ if(FUNCNAME##_fake.custom_fake){\ RETURN_TYPE ret;\ va_list ap;\ - va_start(ap, arg11);\ - ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, ap);\ + va_start(ap, arg6);\ + ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, ap);\ va_end(ap);\ return ret;\ }\ @@ -6807,12 +4817,12 @@ FFF_END_EXTERN_C \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC13_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ...) \ - DECLARE_FAKE_VALUE_FUNC13_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ...) \ - DEFINE_FAKE_VALUE_FUNC13_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ...) \ +#define FAKE_VALUE_FUNC8_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ...) \ + DECLARE_FAKE_VALUE_FUNC8_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ...) \ + DEFINE_FAKE_VALUE_FUNC8_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ...) \ -#define DECLARE_FAKE_VALUE_FUNC14_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ...) \ +#define DECLARE_FAKE_VALUE_FUNC9_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -6823,25 +4833,20 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG5_TYPE, 5, FUNCNAME) \ DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ - DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, va_list ap); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, va_list ap); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC14_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ...) \ +#define DEFINE_FAKE_VALUE_FUNC9_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ...){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -6850,11 +4855,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 5); \ SAVE_ARG(FUNCNAME, 6); \ SAVE_ARG(FUNCNAME, 7); \ - SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -6864,11 +4864,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 5); \ SAVE_ARG_HISTORY(FUNCNAME, 6); \ SAVE_ARG_HISTORY(FUNCNAME, 7); \ - SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -6878,8 +4873,8 @@ FFF_END_EXTERN_C \ if(FUNCNAME##_fake.custom_fake){\ RETURN_TYPE ret;\ va_list ap;\ - va_start(ap, arg12);\ - ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, ap);\ + va_start(ap, arg7);\ + ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, ap);\ va_end(ap);\ return ret;\ }\ @@ -6888,12 +4883,12 @@ FFF_END_EXTERN_C \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC14_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ...) \ - DECLARE_FAKE_VALUE_FUNC14_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ...) \ - DEFINE_FAKE_VALUE_FUNC14_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ...) \ +#define FAKE_VALUE_FUNC9_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ...) \ + DECLARE_FAKE_VALUE_FUNC9_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ...) \ + DEFINE_FAKE_VALUE_FUNC9_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ...) \ -#define DECLARE_FAKE_VALUE_FUNC15_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ...) \ +#define DECLARE_FAKE_VALUE_FUNC10_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -6905,25 +4900,20 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG6_TYPE, 6, FUNCNAME) \ DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ - DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, va_list ap); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, va_list ap); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC15_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ...) \ +#define DEFINE_FAKE_VALUE_FUNC10_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ...){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -6933,11 +4923,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 6); \ SAVE_ARG(FUNCNAME, 7); \ SAVE_ARG(FUNCNAME, 8); \ - SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -6948,11 +4933,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 6); \ SAVE_ARG_HISTORY(FUNCNAME, 7); \ SAVE_ARG_HISTORY(FUNCNAME, 8); \ - SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -6962,8 +4942,8 @@ FFF_END_EXTERN_C \ if(FUNCNAME##_fake.custom_fake){\ RETURN_TYPE ret;\ va_list ap;\ - va_start(ap, arg13);\ - ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, ap);\ + va_start(ap, arg8);\ + ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, ap);\ va_end(ap);\ return ret;\ }\ @@ -6972,12 +4952,12 @@ FFF_END_EXTERN_C \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC15_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ...) \ - DECLARE_FAKE_VALUE_FUNC15_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ...) \ - DEFINE_FAKE_VALUE_FUNC15_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ...) \ +#define FAKE_VALUE_FUNC10_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ...) \ + DECLARE_FAKE_VALUE_FUNC10_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ...) \ + DEFINE_FAKE_VALUE_FUNC10_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ...) \ -#define DECLARE_FAKE_VALUE_FUNC16_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ...) \ +#define DECLARE_FAKE_VALUE_FUNC11_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -6990,25 +4970,20 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG7_TYPE, 7, FUNCNAME) \ DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ - DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, va_list ap); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, va_list ap); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC16_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ...) \ +#define DEFINE_FAKE_VALUE_FUNC11_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ...){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -7019,11 +4994,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 7); \ SAVE_ARG(FUNCNAME, 8); \ SAVE_ARG(FUNCNAME, 9); \ - SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -7035,11 +5005,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 7); \ SAVE_ARG_HISTORY(FUNCNAME, 8); \ SAVE_ARG_HISTORY(FUNCNAME, 9); \ - SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -7049,8 +5014,8 @@ FFF_END_EXTERN_C \ if(FUNCNAME##_fake.custom_fake){\ RETURN_TYPE ret;\ va_list ap;\ - va_start(ap, arg14);\ - ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, ap);\ + va_start(ap, arg9);\ + ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, ap);\ va_end(ap);\ return ret;\ }\ @@ -7059,12 +5024,12 @@ FFF_END_EXTERN_C \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC16_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ...) \ - DECLARE_FAKE_VALUE_FUNC16_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ...) \ - DEFINE_FAKE_VALUE_FUNC16_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ...) \ +#define FAKE_VALUE_FUNC11_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ...) \ + DECLARE_FAKE_VALUE_FUNC11_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ...) \ + DEFINE_FAKE_VALUE_FUNC11_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ...) \ -#define DECLARE_FAKE_VALUE_FUNC17_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ...) \ +#define DECLARE_FAKE_VALUE_FUNC12_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -7078,25 +5043,20 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG8_TYPE, 8, FUNCNAME) \ DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ - DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, va_list ap); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, va_list ap); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC17_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ...) \ +#define DEFINE_FAKE_VALUE_FUNC12_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ...){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -7108,11 +5068,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 8); \ SAVE_ARG(FUNCNAME, 9); \ SAVE_ARG(FUNCNAME, 10); \ - SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -7125,11 +5080,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 8); \ SAVE_ARG_HISTORY(FUNCNAME, 9); \ SAVE_ARG_HISTORY(FUNCNAME, 10); \ - SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -7138,9 +5088,9 @@ FFF_END_EXTERN_C \ REGISTER_CALL(FUNCNAME); \ if(FUNCNAME##_fake.custom_fake){\ RETURN_TYPE ret;\ - va_list ap;\ - va_start(ap, arg15);\ - ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, ap);\ + va_list ap;\ + va_start(ap, arg10);\ + ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, ap);\ va_end(ap);\ return ret;\ }\ @@ -7149,12 +5099,12 @@ FFF_END_EXTERN_C \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC17_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ...) \ - DECLARE_FAKE_VALUE_FUNC17_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ...) \ - DEFINE_FAKE_VALUE_FUNC17_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ...) \ +#define FAKE_VALUE_FUNC12_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ...) \ + DECLARE_FAKE_VALUE_FUNC12_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ...) \ + DEFINE_FAKE_VALUE_FUNC12_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ...) \ -#define DECLARE_FAKE_VALUE_FUNC18_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ...) \ +#define DECLARE_FAKE_VALUE_FUNC13_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -7169,25 +5119,20 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG9_TYPE, 9, FUNCNAME) \ DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ - DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, va_list ap); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, va_list ap); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC18_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ...) \ +#define DEFINE_FAKE_VALUE_FUNC13_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ...){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -7200,11 +5145,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 9); \ SAVE_ARG(FUNCNAME, 10); \ SAVE_ARG(FUNCNAME, 11); \ - SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -7218,11 +5158,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 9); \ SAVE_ARG_HISTORY(FUNCNAME, 10); \ SAVE_ARG_HISTORY(FUNCNAME, 11); \ - SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -7232,8 +5167,8 @@ FFF_END_EXTERN_C \ if(FUNCNAME##_fake.custom_fake){\ RETURN_TYPE ret;\ va_list ap;\ - va_start(ap, arg16);\ - ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, ap);\ + va_start(ap, arg11);\ + ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, ap);\ va_end(ap);\ return ret;\ }\ @@ -7242,12 +5177,12 @@ FFF_END_EXTERN_C \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC18_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ...) \ - DECLARE_FAKE_VALUE_FUNC18_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ...) \ - DEFINE_FAKE_VALUE_FUNC18_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ...) \ +#define FAKE_VALUE_FUNC13_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ...) \ + DECLARE_FAKE_VALUE_FUNC13_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ...) \ + DEFINE_FAKE_VALUE_FUNC13_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ...) \ -#define DECLARE_FAKE_VALUE_FUNC19_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ...) \ +#define DECLARE_FAKE_VALUE_FUNC14_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -7263,25 +5198,20 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG10_TYPE, 10, FUNCNAME) \ DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ - DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, va_list ap); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, va_list ap); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC19_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ...) \ +#define DEFINE_FAKE_VALUE_FUNC14_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ...){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -7295,11 +5225,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 10); \ SAVE_ARG(FUNCNAME, 11); \ SAVE_ARG(FUNCNAME, 12); \ - SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -7314,11 +5239,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 10); \ SAVE_ARG_HISTORY(FUNCNAME, 11); \ SAVE_ARG_HISTORY(FUNCNAME, 12); \ - SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -7328,8 +5248,8 @@ FFF_END_EXTERN_C \ if(FUNCNAME##_fake.custom_fake){\ RETURN_TYPE ret;\ va_list ap;\ - va_start(ap, arg17);\ - ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, ap);\ + va_start(ap, arg12);\ + ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, ap);\ va_end(ap);\ return ret;\ }\ @@ -7338,12 +5258,12 @@ FFF_END_EXTERN_C \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC19_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ...) \ - DECLARE_FAKE_VALUE_FUNC19_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ...) \ - DEFINE_FAKE_VALUE_FUNC19_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ...) \ +#define FAKE_VALUE_FUNC14_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ...) \ + DECLARE_FAKE_VALUE_FUNC14_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ...) \ + DEFINE_FAKE_VALUE_FUNC14_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ...) \ -#define DECLARE_FAKE_VALUE_FUNC20_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ...) \ +#define DECLARE_FAKE_VALUE_FUNC15_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -7360,25 +5280,20 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG11_TYPE, 11, FUNCNAME) \ DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ - DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ - DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, va_list ap); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, va_list ap); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC20_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ...) \ +#define DEFINE_FAKE_VALUE_FUNC15_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ...){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -7393,11 +5308,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 11); \ SAVE_ARG(FUNCNAME, 12); \ SAVE_ARG(FUNCNAME, 13); \ - SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ - SAVE_ARG(FUNCNAME, 18); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -7413,11 +5323,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 11); \ SAVE_ARG_HISTORY(FUNCNAME, 12); \ SAVE_ARG_HISTORY(FUNCNAME, 13); \ - SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ - SAVE_ARG_HISTORY(FUNCNAME, 18); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -7427,8 +5332,8 @@ FFF_END_EXTERN_C \ if(FUNCNAME##_fake.custom_fake){\ RETURN_TYPE ret;\ va_list ap;\ - va_start(ap, arg18);\ - ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, ap);\ + va_start(ap, arg13);\ + ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, ap);\ va_end(ap);\ return ret;\ }\ @@ -7437,12 +5342,12 @@ FFF_END_EXTERN_C \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC20_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ...) \ - DECLARE_FAKE_VALUE_FUNC20_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ...) \ - DEFINE_FAKE_VALUE_FUNC20_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ...) \ +#define FAKE_VALUE_FUNC15_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ...) \ + DECLARE_FAKE_VALUE_FUNC15_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ...) \ + DEFINE_FAKE_VALUE_FUNC15_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ...) \ -#define DECLARE_FAKE_VALUE_FUNC21_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ...) \ +#define DECLARE_FAKE_VALUE_FUNC16_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -7460,25 +5365,20 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG12_TYPE, 12, FUNCNAME) \ DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ - DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ - DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ - DECLARE_ARG(ARG19_TYPE, 19, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, va_list ap); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, va_list ap); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC21_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ...) \ +#define DEFINE_FAKE_VALUE_FUNC16_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ...){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -7494,11 +5394,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 12); \ SAVE_ARG(FUNCNAME, 13); \ SAVE_ARG(FUNCNAME, 14); \ - SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ - SAVE_ARG(FUNCNAME, 18); \ - SAVE_ARG(FUNCNAME, 19); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -7515,11 +5410,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 12); \ SAVE_ARG_HISTORY(FUNCNAME, 13); \ SAVE_ARG_HISTORY(FUNCNAME, 14); \ - SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ - SAVE_ARG_HISTORY(FUNCNAME, 18); \ - SAVE_ARG_HISTORY(FUNCNAME, 19); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -7529,8 +5419,8 @@ FFF_END_EXTERN_C \ if(FUNCNAME##_fake.custom_fake){\ RETURN_TYPE ret;\ va_list ap;\ - va_start(ap, arg19);\ - ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, ap);\ + va_start(ap, arg14);\ + ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, ap);\ va_end(ap);\ return ret;\ }\ @@ -7539,12 +5429,12 @@ FFF_END_EXTERN_C \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC21_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ...) \ - DECLARE_FAKE_VALUE_FUNC21_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ...) \ - DEFINE_FAKE_VALUE_FUNC21_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ...) \ +#define FAKE_VALUE_FUNC16_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ...) \ + DECLARE_FAKE_VALUE_FUNC16_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ...) \ + DEFINE_FAKE_VALUE_FUNC16_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ...) \ -#define DECLARE_FAKE_VALUE_FUNC22_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ...) \ +#define DECLARE_FAKE_VALUE_FUNC17_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -7563,25 +5453,20 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG13_TYPE, 13, FUNCNAME) \ DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ - DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ - DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ - DECLARE_ARG(ARG19_TYPE, 19, FUNCNAME) \ - DECLARE_ARG(ARG20_TYPE, 20, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, va_list ap); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, va_list ap); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC22_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ...) \ +#define DEFINE_FAKE_VALUE_FUNC17_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ...){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -7598,11 +5483,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 13); \ SAVE_ARG(FUNCNAME, 14); \ SAVE_ARG(FUNCNAME, 15); \ - SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ - SAVE_ARG(FUNCNAME, 18); \ - SAVE_ARG(FUNCNAME, 19); \ - SAVE_ARG(FUNCNAME, 20); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -7620,11 +5500,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 13); \ SAVE_ARG_HISTORY(FUNCNAME, 14); \ SAVE_ARG_HISTORY(FUNCNAME, 15); \ - SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ - SAVE_ARG_HISTORY(FUNCNAME, 18); \ - SAVE_ARG_HISTORY(FUNCNAME, 19); \ - SAVE_ARG_HISTORY(FUNCNAME, 20); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -7634,8 +5509,8 @@ FFF_END_EXTERN_C \ if(FUNCNAME##_fake.custom_fake){\ RETURN_TYPE ret;\ va_list ap;\ - va_start(ap, arg20);\ - ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, ap);\ + va_start(ap, arg15);\ + ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, ap);\ va_end(ap);\ return ret;\ }\ @@ -7644,12 +5519,12 @@ FFF_END_EXTERN_C \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC22_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ...) \ - DECLARE_FAKE_VALUE_FUNC22_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ...) \ - DEFINE_FAKE_VALUE_FUNC22_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ...) \ +#define FAKE_VALUE_FUNC17_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ...) \ + DECLARE_FAKE_VALUE_FUNC17_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ...) \ + DEFINE_FAKE_VALUE_FUNC17_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ...) \ -#define DECLARE_FAKE_VALUE_FUNC23_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ...) \ +#define DECLARE_FAKE_VALUE_FUNC18_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -7669,25 +5544,20 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG14_TYPE, 14, FUNCNAME) \ DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ - DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ - DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ - DECLARE_ARG(ARG19_TYPE, 19, FUNCNAME) \ - DECLARE_ARG(ARG20_TYPE, 20, FUNCNAME) \ - DECLARE_ARG(ARG21_TYPE, 21, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, va_list ap); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, va_list ap); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC23_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ...) \ +#define DEFINE_FAKE_VALUE_FUNC18_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ...){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -7705,11 +5575,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 14); \ SAVE_ARG(FUNCNAME, 15); \ SAVE_ARG(FUNCNAME, 16); \ - SAVE_ARG(FUNCNAME, 17); \ - SAVE_ARG(FUNCNAME, 18); \ - SAVE_ARG(FUNCNAME, 19); \ - SAVE_ARG(FUNCNAME, 20); \ - SAVE_ARG(FUNCNAME, 21); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -7728,11 +5593,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 14); \ SAVE_ARG_HISTORY(FUNCNAME, 15); \ SAVE_ARG_HISTORY(FUNCNAME, 16); \ - SAVE_ARG_HISTORY(FUNCNAME, 17); \ - SAVE_ARG_HISTORY(FUNCNAME, 18); \ - SAVE_ARG_HISTORY(FUNCNAME, 19); \ - SAVE_ARG_HISTORY(FUNCNAME, 20); \ - SAVE_ARG_HISTORY(FUNCNAME, 21); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -7742,8 +5602,8 @@ FFF_END_EXTERN_C \ if(FUNCNAME##_fake.custom_fake){\ RETURN_TYPE ret;\ va_list ap;\ - va_start(ap, arg21);\ - ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, ap);\ + va_start(ap, arg16);\ + ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, ap);\ va_end(ap);\ return ret;\ }\ @@ -7752,12 +5612,12 @@ FFF_END_EXTERN_C \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC23_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ...) \ - DECLARE_FAKE_VALUE_FUNC23_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ...) \ - DEFINE_FAKE_VALUE_FUNC23_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ...) \ +#define FAKE_VALUE_FUNC18_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ...) \ + DECLARE_FAKE_VALUE_FUNC18_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ...) \ + DEFINE_FAKE_VALUE_FUNC18_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ...) \ -#define DECLARE_FAKE_VALUE_FUNC24_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ...) \ +#define DECLARE_FAKE_VALUE_FUNC19_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -7778,25 +5638,20 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG15_TYPE, 15, FUNCNAME) \ DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ - DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ - DECLARE_ARG(ARG19_TYPE, 19, FUNCNAME) \ - DECLARE_ARG(ARG20_TYPE, 20, FUNCNAME) \ - DECLARE_ARG(ARG21_TYPE, 21, FUNCNAME) \ - DECLARE_ARG(ARG22_TYPE, 22, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22, va_list ap); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, va_list ap); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC24_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ...) \ +#define DEFINE_FAKE_VALUE_FUNC19_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22, ...){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -7815,11 +5670,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 15); \ SAVE_ARG(FUNCNAME, 16); \ SAVE_ARG(FUNCNAME, 17); \ - SAVE_ARG(FUNCNAME, 18); \ - SAVE_ARG(FUNCNAME, 19); \ - SAVE_ARG(FUNCNAME, 20); \ - SAVE_ARG(FUNCNAME, 21); \ - SAVE_ARG(FUNCNAME, 22); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -7839,11 +5689,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 15); \ SAVE_ARG_HISTORY(FUNCNAME, 16); \ SAVE_ARG_HISTORY(FUNCNAME, 17); \ - SAVE_ARG_HISTORY(FUNCNAME, 18); \ - SAVE_ARG_HISTORY(FUNCNAME, 19); \ - SAVE_ARG_HISTORY(FUNCNAME, 20); \ - SAVE_ARG_HISTORY(FUNCNAME, 21); \ - SAVE_ARG_HISTORY(FUNCNAME, 22); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -7853,8 +5698,8 @@ FFF_END_EXTERN_C \ if(FUNCNAME##_fake.custom_fake){\ RETURN_TYPE ret;\ va_list ap;\ - va_start(ap, arg22);\ - ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, ap);\ + va_start(ap, arg17);\ + ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, ap);\ va_end(ap);\ return ret;\ }\ @@ -7863,12 +5708,12 @@ FFF_END_EXTERN_C \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC24_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ...) \ - DECLARE_FAKE_VALUE_FUNC24_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ...) \ - DEFINE_FAKE_VALUE_FUNC24_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ...) \ +#define FAKE_VALUE_FUNC19_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ...) \ + DECLARE_FAKE_VALUE_FUNC19_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ...) \ + DEFINE_FAKE_VALUE_FUNC19_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ...) \ -#define DECLARE_FAKE_VALUE_FUNC25_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE, ...) \ +#define DECLARE_FAKE_VALUE_FUNC20_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ...) \ FFF_EXTERN_C \ typedef struct FUNCNAME##_Fake { \ DECLARE_ARG(ARG0_TYPE, 0, FUNCNAME) \ @@ -7890,25 +5735,20 @@ FFF_END_EXTERN_C \ DECLARE_ARG(ARG16_TYPE, 16, FUNCNAME) \ DECLARE_ARG(ARG17_TYPE, 17, FUNCNAME) \ DECLARE_ARG(ARG18_TYPE, 18, FUNCNAME) \ - DECLARE_ARG(ARG19_TYPE, 19, FUNCNAME) \ - DECLARE_ARG(ARG20_TYPE, 20, FUNCNAME) \ - DECLARE_ARG(ARG21_TYPE, 21, FUNCNAME) \ - DECLARE_ARG(ARG22_TYPE, 22, FUNCNAME) \ - DECLARE_ARG(ARG23_TYPE, 23, FUNCNAME) \ DECLARE_ALL_FUNC_COMMON \ DECLARE_VALUE_FUNCTION_VARIABLES(RETURN_TYPE) \ DECLARE_CUSTOM_FAKE_SEQ_VARIABLES \ - RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22, ARG23_TYPE arg23, va_list ap); \ - RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22, ARG23_TYPE arg23, va_list ap); \ + RETURN_TYPE(*custom_fake)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, va_list ap); \ + RETURN_TYPE(**custom_fake_seq)(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, va_list ap); \ } FUNCNAME##_Fake;\ extern FUNCNAME##_Fake FUNCNAME##_fake;\ void FUNCNAME##_reset(); \ FFF_END_EXTERN_C \ -#define DEFINE_FAKE_VALUE_FUNC25_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE, ...) \ +#define DEFINE_FAKE_VALUE_FUNC20_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ...) \ FFF_EXTERN_C \ FUNCNAME##_Fake FUNCNAME##_fake;\ - RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ARG19_TYPE arg19, ARG20_TYPE arg20, ARG21_TYPE arg21, ARG22_TYPE arg22, ARG23_TYPE arg23, ...){ \ + RETURN_TYPE FUNCNAME(ARG0_TYPE arg0, ARG1_TYPE arg1, ARG2_TYPE arg2, ARG3_TYPE arg3, ARG4_TYPE arg4, ARG5_TYPE arg5, ARG6_TYPE arg6, ARG7_TYPE arg7, ARG8_TYPE arg8, ARG9_TYPE arg9, ARG10_TYPE arg10, ARG11_TYPE arg11, ARG12_TYPE arg12, ARG13_TYPE arg13, ARG14_TYPE arg14, ARG15_TYPE arg15, ARG16_TYPE arg16, ARG17_TYPE arg17, ARG18_TYPE arg18, ...){ \ SAVE_ARG(FUNCNAME, 0); \ SAVE_ARG(FUNCNAME, 1); \ SAVE_ARG(FUNCNAME, 2); \ @@ -7928,11 +5768,6 @@ FFF_END_EXTERN_C \ SAVE_ARG(FUNCNAME, 16); \ SAVE_ARG(FUNCNAME, 17); \ SAVE_ARG(FUNCNAME, 18); \ - SAVE_ARG(FUNCNAME, 19); \ - SAVE_ARG(FUNCNAME, 20); \ - SAVE_ARG(FUNCNAME, 21); \ - SAVE_ARG(FUNCNAME, 22); \ - SAVE_ARG(FUNCNAME, 23); \ if(ROOM_FOR_MORE_HISTORY(FUNCNAME)){\ SAVE_ARG_HISTORY(FUNCNAME, 0); \ SAVE_ARG_HISTORY(FUNCNAME, 1); \ @@ -7953,11 +5788,6 @@ FFF_END_EXTERN_C \ SAVE_ARG_HISTORY(FUNCNAME, 16); \ SAVE_ARG_HISTORY(FUNCNAME, 17); \ SAVE_ARG_HISTORY(FUNCNAME, 18); \ - SAVE_ARG_HISTORY(FUNCNAME, 19); \ - SAVE_ARG_HISTORY(FUNCNAME, 20); \ - SAVE_ARG_HISTORY(FUNCNAME, 21); \ - SAVE_ARG_HISTORY(FUNCNAME, 22); \ - SAVE_ARG_HISTORY(FUNCNAME, 23); \ }\ else{\ HISTORY_DROPPED(FUNCNAME);\ @@ -7967,8 +5797,8 @@ FFF_END_EXTERN_C \ if(FUNCNAME##_fake.custom_fake){\ RETURN_TYPE ret;\ va_list ap;\ - va_start(ap, arg23);\ - ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20, arg21, arg22, arg23, ap);\ + va_start(ap, arg18);\ + ret = FUNCNAME##_fake.custom_fake(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, ap);\ va_end(ap);\ return ret;\ }\ @@ -7977,35 +5807,37 @@ FFF_END_EXTERN_C \ DEFINE_RESET_FUNCTION(FUNCNAME) \ FFF_END_EXTERN_C \ -#define FAKE_VALUE_FUNC25_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE, ...) \ - DECLARE_FAKE_VALUE_FUNC25_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE, ...) \ - DEFINE_FAKE_VALUE_FUNC25_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ARG19_TYPE, ARG20_TYPE, ARG21_TYPE, ARG22_TYPE, ARG23_TYPE, ...) \ +#define FAKE_VALUE_FUNC20_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ...) \ + DECLARE_FAKE_VALUE_FUNC20_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ...) \ + DEFINE_FAKE_VALUE_FUNC20_VARARG(RETURN_TYPE, FUNCNAME, ARG0_TYPE, ARG1_TYPE, ARG2_TYPE, ARG3_TYPE, ARG4_TYPE, ARG5_TYPE, ARG6_TYPE, ARG7_TYPE, ARG8_TYPE, ARG9_TYPE, ARG10_TYPE, ARG11_TYPE, ARG12_TYPE, ARG13_TYPE, ARG14_TYPE, ARG15_TYPE, ARG16_TYPE, ARG17_TYPE, ARG18_TYPE, ...) \ #define PP_NARG_MINUS2(...) PP_NARG_MINUS2_(__VA_ARGS__, PP_RSEQ_N_MINUS2()) #define PP_NARG_MINUS2_(...) PP_ARG_MINUS2_N(__VA_ARGS__) -#define PP_ARG_MINUS2_N(returnVal, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, N, ...) N +#define PP_ARG_MINUS2_N(returnVal, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, N, ...) N #define PP_RSEQ_N_MINUS2() 19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 -#define FAKE_VALUE_FUNC(...) FUNC_VALUE_(PP_NARG_MINUS2(__VA_ARGS__), __VA_ARGS__) +#define PP_NARG_MINUS1(...) PP_NARG_MINUS1_(__VA_ARGS__, PP_RSEQ_N_MINUS1()) -#define FUNC_VALUE_(N,...) FUNC_VALUE_N(N,__VA_ARGS__) +#define PP_NARG_MINUS1_(...) PP_ARG_MINUS1_N(__VA_ARGS__) -#define FUNC_VALUE_N(N,...) FAKE_VALUE_FUNC ## N(__VA_ARGS__) +#define PP_ARG_MINUS1_N(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, N, ...) N +#define PP_RSEQ_N_MINUS1() 20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 -#define PP_NARG_MINUS1(...) PP_NARG_MINUS1_(__VA_ARGS__, PP_RSEQ_N_MINUS1()) -#define PP_NARG_MINUS1_(...) PP_ARG_MINUS1_N(__VA_ARGS__) +/* DECLARE AND DEFINE FAKE FUNCTIONS - PLACE IN TEST FILES */ -#define PP_ARG_MINUS1_N(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, N, ...) N +#define FAKE_VALUE_FUNC(...) FUNC_VALUE_(PP_NARG_MINUS2(__VA_ARGS__), __VA_ARGS__) + +#define FUNC_VALUE_(N,...) FUNC_VALUE_N(N,__VA_ARGS__) -#define PP_RSEQ_N_MINUS1() 25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 +#define FUNC_VALUE_N(N,...) FAKE_VALUE_FUNC ## N(__VA_ARGS__) #define FAKE_VOID_FUNC(...) FUNC_VOID_(PP_NARG_MINUS1(__VA_ARGS__), __VA_ARGS__) @@ -8029,4 +5861,66 @@ FFF_END_EXTERN_C \ #define FUNC_VOID_VARARG_N(N,...) FAKE_VOID_FUNC ## N ## _VARARG(__VA_ARGS__) + +/* DECLARE FAKE FUNCTIONS - PLACE IN HEADER FILES */ + +#define DECLARE_FAKE_VALUE_FUNC(...) DEC_FUNC_VALUE_(PP_NARG_MINUS2(__VA_ARGS__), __VA_ARGS__) + +#define DEC_FUNC_VALUE_(N,...) DEC_FUNC_VALUE_N(N,__VA_ARGS__) + +#define DEC_FUNC_VALUE_N(N,...) DECLARE_FAKE_VALUE_FUNC ## N(__VA_ARGS__) + + +#define DECLARE_FAKE_VOID_FUNC(...) DEC_FUNC_VOID_(PP_NARG_MINUS1(__VA_ARGS__), __VA_ARGS__) + +#define DEC_FUNC_VOID_(N,...) DEC_FUNC_VOID_N(N, __VA_ARGS__) + +#define DEC_FUNC_VOID_N(N,...) DECLARE_FAKE_VOID_FUNC ## N(__VA_ARGS__) + + +#define DECLARE_FAKE_VALUE_FUNC_VARARG(...) DEC_FUNC_VALUE_VARARG_(PP_NARG_MINUS2(__VA_ARGS__), __VA_ARGS__) + +#define DEC_FUNC_VALUE_VARARG_(N,...) DEC_FUNC_VALUE_VARARG_N(N, __VA_ARGS__) + +#define DEC_FUNC_VALUE_VARARG_N(N,...) DECLARE_FAKE_VALUE_FUNC ## N ## _VARARG(__VA_ARGS__) + + +#define DECLARE_FAKE_VOID_FUNC_VARARG(...) DEC_FUNC_VOID_VARARG_(PP_NARG_MINUS1(__VA_ARGS__), __VA_ARGS__) + +#define DEC_FUNC_VOID_VARARG_(N,...) DEC_FUNC_VOID_VARARG_N(N, __VA_ARGS__) + +#define DEC_FUNC_VOID_VARARG_N(N,...) DECLARE_FAKE_VOID_FUNC ## N ## _VARARG(__VA_ARGS__) + + + +/* DEFINE FAKE FUNCTIONS - PLACE IN SOURCE FILES */ + +#define DEFINE_FAKE_VALUE_FUNC(...) DEF_FUNC_VALUE_(PP_NARG_MINUS2(__VA_ARGS__), __VA_ARGS__) + +#define DEF_FUNC_VALUE_(N,...) DEF_FUNC_VALUE_N(N,__VA_ARGS__) + +#define DEF_FUNC_VALUE_N(N,...) DEFINE_FAKE_VALUE_FUNC ## N(__VA_ARGS__) + + +#define DEFINE_FAKE_VOID_FUNC(...) DEF_FUNC_VOID_(PP_NARG_MINUS1(__VA_ARGS__), __VA_ARGS__) + +#define DEF_FUNC_VOID_(N,...) DEF_FUNC_VOID_N(N,__VA_ARGS__) + +#define DEF_FUNC_VOID_N(N,...) DEFINE_FAKE_VOID_FUNC ## N(__VA_ARGS__) + + +#define DEFINE_FAKE_VALUE_FUNC_VARARG(...) DEF_FUNC_VALUE_VARARG(PP_NARG_MINUS2(__VA_ARGS__), __VA_ARGS__) + +#define DEF_FUNC_VALUE_VARARG(N,...) DEF_FUNC_VALUE_VARARG_N(N,__VA_ARGS__) + +#define DEF_FUNC_VALUE_VARARG_N(N,...) DEFINE_FAKE_VALUE_FUNC ## N ## _VARARG(__VA_ARGS__) + + +#define DEFINE_FAKE_VOID_FUNC_VARARG(...) DEF_FUNC_VOID_VARARG(PP_NARG_MINUS1(__VA_ARGS__), __VA_ARGS__) + +#define DEF_FUNC_VOID_VARARG(N,...) DEF_FUNC_VOID_VARARG_N(N,__VA_ARGS__) + +#define DEF_FUNC_VOID_VARARG_N(N,...) DEFINE_FAKE_VOID_FUNC ## N ## _VARARG(__VA_ARGS__) + + #endif /* FAKE_FUNCTIONS */ diff --git a/ruby_test.rb b/ruby_test.rb new file mode 100644 index 0000000..f770541 --- /dev/null +++ b/ruby_test.rb @@ -0,0 +1,50 @@ +$MAX_ARGS = 20 + + +#{ $MAX_ARGS.times {|arg_count| '_' + arg_count.to_s } +def generate_reverse_arg_sequence(args) + (0..args).flat_map {|i| ['_' + i.to_s]}.join(", ") +end + +def generate_arg_sequence(args, prefix, do_reverse) + fmap = (0..args).flat_map {|i| [prefix + i.to_s]} + if do_reverse then fmap.reverse.join(", ") else fmap.join(", ") end +end + + +def output_macro_counting_shortcuts + puts <<-MACRO_COUNTING + +#define PP_NARG_MINUS2(...) \ + PP_NARG_MINUS2_(__VA_ARGS__, PP_RSEQ_N_MINUS2()) + +#define PP_NARG_MINUS2_(...) \ + PP_ARG_MINUS2_N(__VA_ARGS__) + +#define PP_ARG_MINUS2_N(returnVal, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, N, ...) N +#define PP_ARG_MINUS2_N(returnVal, #{ generate_arg_sequence($MAX_ARGS - 1, '_', false) }, N, ...) N + +#define PP_RSEQ_N_MINUS2() \ + 19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 +#define PP_RSEQ_N_MINUS2() \ + #{ generate_arg_sequence($MAX_ARGS - 1, '', true) } + + +#define FAKE_VALUE_FUNC(...) \ + FUNC_VALUE_(PP_NARG_MINUS2(__VA_ARGS__), __VA_ARGS__) + +#define FUNC_VALUE_(N,...) \ + FUNC_VALUE_N(N,__VA_ARGS__) + +#define FUNC_VALUE_N(N,...) \ + FAKE_VALUE_FUNC ## N(__VA_ARGS__) + + MACRO_COUNTING +end + +puts generate_arg_sequence($MAX_ARGS, '', false) +puts generate_arg_sequence($MAX_ARGS, '_', false) +puts generate_arg_sequence($MAX_ARGS, '', true) +puts generate_arg_sequence($MAX_ARGS, '_', true) + +output_macro_counting_shortcuts \ No newline at end of file diff --git a/test/global_fakes.c b/test/global_fakes.c index 1b93394..0acfe05 100644 --- a/test/global_fakes.c +++ b/test/global_fakes.c @@ -1,15 +1,16 @@ #include "global_fakes.h" #include // for memcpy -DEFINE_FAKE_VOID_FUNC1(voidfunc1, int); -DEFINE_FAKE_VOID_FUNC2(voidfunc2, char, char); -DEFINE_FAKE_VOID_FUNC1(voidfunc1outparam, char *); -DEFINE_FAKE_VALUE_FUNC0(long, longfunc0); -DEFINE_FAKE_VALUE_FUNC0(enum MYBOOL, enumfunc0); -DEFINE_FAKE_VALUE_FUNC0(struct MyStruct, structfunc0); -DEFINE_FAKE_VOID_FUNC3_VARARG(voidfunc3var, const char *, int, ...); -DEFINE_FAKE_VALUE_FUNC3_VARARG(int, valuefunc3var, const char *, int, ...); +DEFINE_FAKE_VOID_FUNC(voidfunc1, int); +DEFINE_FAKE_VOID_FUNC(voidfunc2, char, char); +DEFINE_FAKE_VOID_FUNC(voidfunc1outparam, char *); + +DEFINE_FAKE_VALUE_FUNC(long, longfunc0); +DEFINE_FAKE_VALUE_FUNC(enum MYBOOL, enumfunc0); +DEFINE_FAKE_VALUE_FUNC(struct MyStruct, structfunc0); +DEFINE_FAKE_VOID_FUNC_VARARG(voidfunc3var, const char *, int, ...); +DEFINE_FAKE_VALUE_FUNC_VARARG(int, valuefunc3var, const char *, int, ...); #ifndef __cplusplus -DEFINE_FAKE_VALUE_FUNC3(int, strlcpy3, char* const, const char* const, const size_t); +DEFINE_FAKE_VALUE_FUNC(int, strlcpy3, char* const, const char* const, const size_t); #endif /* __cplusplus */ -DEFINE_FAKE_VOID_FUNC20(voidfunc20, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int); +DEFINE_FAKE_VOID_FUNC(voidfunc20, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int); diff --git a/test/global_fakes.h b/test/global_fakes.h index 8ee7c3f..57afb4d 100644 --- a/test/global_fakes.h +++ b/test/global_fakes.h @@ -24,18 +24,18 @@ enum MYBOOL enumfunc(); struct MyStruct structfunc(); //// End Imaginary production code header file /// -DECLARE_FAKE_VOID_FUNC1(voidfunc1, int); -DECLARE_FAKE_VOID_FUNC2(voidfunc2, char, char); -DECLARE_FAKE_VOID_FUNC1(voidfunc1outparam, char *); -DECLARE_FAKE_VALUE_FUNC0(long, longfunc0); -DECLARE_FAKE_VALUE_FUNC0(enum MYBOOL, enumfunc0); -DECLARE_FAKE_VALUE_FUNC0(struct MyStruct, structfunc0); -DECLARE_FAKE_VOID_FUNC3_VARARG(voidfunc3var, const char *, int, ...); -DECLARE_FAKE_VALUE_FUNC3_VARARG(int, valuefunc3var, const char *, int, ...); -DECLARE_FAKE_VOID_FUNC20(voidfunc20, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int); +DECLARE_FAKE_VOID_FUNC(voidfunc1, int); +DECLARE_FAKE_VOID_FUNC(voidfunc2, char, char); +DECLARE_FAKE_VOID_FUNC(voidfunc1outparam, char *); +DECLARE_FAKE_VALUE_FUNC(long, longfunc0); +DECLARE_FAKE_VALUE_FUNC(enum MYBOOL, enumfunc0); +DECLARE_FAKE_VALUE_FUNC(struct MyStruct, structfunc0); +DECLARE_FAKE_VOID_FUNC_VARARG(voidfunc3var, const char *, int, ...); +DECLARE_FAKE_VALUE_FUNC_VARARG(int, valuefunc3var, const char *, int, ...); +DECLARE_FAKE_VOID_FUNC(voidfunc20, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int); #ifndef __cplusplus int strlcpy3(char* const, const char* const, const size_t); -DECLARE_FAKE_VALUE_FUNC3(int, strlcpy3, char* const, const char* const, const size_t); +DECLARE_FAKE_VALUE_FUNC(int, strlcpy3, char* const, const char* const, const size_t); #endif /* __cplusplus */ #endif /* GLOBAL_FAKES_H_ */