gpib_parser_casts.h 778 B

123456789101112131415161718192021222324252627
  1. #ifndef GPIB_PARSER_CASTS_H
  2. #define GPIB_PARSER_CASTS_H
  3. #include "main.h"
  4. #ifndef TRUE
  5. #define TRUE (true)
  6. #endif
  7. #ifndef FALSE
  8. #define FALSE (false)
  9. #endif
  10. #define TernaryOperator(bool_expression,true_cond_value,false_cond_value) \
  11. ((bool_expression)?(true_cond_value):(false_cond_value))
  12. #define MAKE_BOOL(expression) TernaryOperator(expression, TRUE, FALSE)
  13. /* #define TOINT(A) ((int)(A)) */
  14. /* #define TOPINT(A) ((int*)(A)) */
  15. #define TOUINT(A) ((unsigned int)(A))
  16. /* #define TOPUINT(A) ((unsigned int *)(A)) */
  17. /* #define TOCHAR(A) ((char)(A)) */
  18. /* #define TOPCHAR(A) ((char*)(A)) */
  19. #endif