__macro.h 942 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef VIRTUALMATH___MACRO_H
  2. #define VIRTUALMATH___MACRO_H
  3. #include <stdio.h>
  4. #include <string.h>
  5. #include <stdlib.h>
  6. #include <stdarg.h>
  7. #define bool int
  8. #define true 1
  9. #define false 0
  10. #define PASS do{}while(0)
  11. #define NUMBER_TYPE long int
  12. #define HASH_INDEX unsigned int
  13. #define INTER_FUNCTIONSIG_CORE Inter *inter, VarList *var_list
  14. #define INTER_FUNCTIONSIG Statement *st, INTER_FUNCTIONSIG_CORE
  15. #define CALL_INTER_FUNCTIONSIG_CORE(var_list) inter, var_list
  16. #define CALL_INTER_FUNCTIONSIG(st, var_list) st, CALL_INTER_FUNCTIONSIG_CORE(var_list)
  17. #define freeBase(element, return_) do{ \
  18. if (element == NULL){ \
  19. goto return_; \
  20. } \
  21. }while(0) \
  22. #define runContinue(result) (result.type == not_return || result.type == operation_return)
  23. #define is_error(result) (result.type == error_return)
  24. #define checkResult(check_result) do{ \
  25. if (is_error(check_result)){ \
  26. return check_result; \
  27. } \
  28. }while(0) \
  29. #endif //VIRTUALMATH___MACRO_H