__macro.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef VIRTUALMATH___MACRO_H
  2. #define VIRTUALMATH___MACRO_H
  3. #include "macro.h"
  4. // PASS语句的定义
  5. #define PASS
  6. #define RUN_TYPE(type) (type == R_not || type == R_opt)
  7. #define CHECK_RESULT(result) (result->type == R_not || result->type == R_opt)
  8. #define FREE_BASE(element, return_) do{if(element == NULL)goto return_;}while(0)
  9. #define FUNC_CORE struct Inter *inter, struct VarList *var_list
  10. #define FUNC_NT struct LinkValue *belong, struct Result *result, FUNC_CORE
  11. #define FUNC struct Statement *st, FUNC_NT
  12. #define CFUNC_CORE(var_list) inter, var_list
  13. #define CFUNC_NT(var_list, result, belong) belong, result, CFUNC_CORE(var_list)
  14. #define CFUNC(st, var_list, result, belong) st, CFUNC_NT(var_list, result, belong)
  15. #define CNEXT CFUNC(st, var_list, result, belong)
  16. #define CNEXT_NT CFUNC_NT(var_list, result, belong)
  17. #define O_FUNC struct Argument *arg, FUNC_NT
  18. #define CO_FUNC(arg, var_list, result, belong) arg, CFUNC_NT(var_list, result, belong)
  19. #define R_FUNC struct LinkValue *belong, FUNC_CORE
  20. #define CR_FUNC(belong, var_list) belong, CFUNC_CORE(var_list)
  21. #define LINEFILE __LINE__, __FILE__
  22. #ifdef __linux__
  23. #define SEP "/"
  24. #define SEP_CH '/'
  25. #else
  26. #define SEP "\\"
  27. #define SEP_CH '\\'
  28. #endif
  29. #define MD5_SIZE (16)
  30. #define MD5_STR_LEN (MD5_SIZE * 2)
  31. #define MD5_STRING (MD5_STR_LEN + 1)
  32. typedef long long vint;
  33. typedef long double vdou;
  34. typedef unsigned long long vhashn;
  35. typedef unsigned long long fline;
  36. #endif //VIRTUALMATH___MACRO_H