ansi.h 682 B

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