ansi.h 687 B

1234567891011121314151617181920212223242526
  1. /*
  2. * (C) Copyright 2012
  3. * Pali Rohár <pali.rohar@gmail.com>
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. /*
  8. * ANSI terminal
  9. */
  10. #define ANSI_CURSOR_UP "\e[%dA"
  11. #define ANSI_CURSOR_DOWN "\e[%dB"
  12. #define ANSI_CURSOR_FORWARD "\e[%dC"
  13. #define ANSI_CURSOR_BACK "\e[%dD"
  14. #define ANSI_CURSOR_NEXTLINE "\e[%dE"
  15. #define ANSI_CURSOR_PREVIOUSLINE "\e[%dF"
  16. #define ANSI_CURSOR_COLUMN "\e[%dG"
  17. #define ANSI_CURSOR_POSITION "\e[%d;%dH"
  18. #define ANSI_CURSOR_SHOW "\e[?25h"
  19. #define ANSI_CURSOR_HIDE "\e[?25l"
  20. #define ANSI_CLEAR_CONSOLE "\e[2J"
  21. #define ANSI_CLEAR_LINE_TO_END "\e[0K"
  22. #define ANSI_CLEAR_LINE "\e[2K"
  23. #define ANSI_COLOR_RESET "\e[0m"
  24. #define ANSI_COLOR_REVERSE "\e[7m"