REDRUM.h 900 B

123456789101112131415161718192021222324252627
  1. #ifndef IGL_REDRUM_H
  2. #define IGL_REDRUM_H
  3. // Q: These should probably be inside the igl namespace. What's the correct
  4. // way to do that?
  5. // A: I guess the right way is to not use a macro but a proper function with
  6. // streams as input and output.
  7. // ANSI color codes for formating iostream style output
  8. // Bold Red, etc.
  9. #define REDRUM(X) "\e[1m\e[31m"<<X<<"\e[m"
  10. #define GREENRUM(X) "\e[1m\e[32m"<<X<<"\e[m"
  11. #define YELLOWRUM(X) "\e[1m\e[33m"<<X<<"\e[m"
  12. #define BLUERUM(X) "\e[1m\e[34m"<<X<<"\e[m"
  13. #define MAGENTARUM(X) "\e[1m\e[35m"<<X<<"\e[m"
  14. #define CYANRUM(X) "\e[1m\e[36m"<<X<<"\e[m"
  15. // Regular Red, etc.
  16. #define REDGIN(X) "\e[31m"<<X<<"\e[m"
  17. #define GREENGIN(X) "\e[32m"<<X<<"\e[m"
  18. #define YELLOWGIN(X) "\e[33m"<<X<<"\e[m"
  19. #define BLUEGIN(X) "\e[34m"<<X<<"\e[m"
  20. #define MAGENTAGIN(X) "\e[35m"<<X<<"\e[m"
  21. #define CYANGIN(X) "\e[36m"<<X<<"\e[m"
  22. #endif