home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1999 February / PCO_0299.ISO / filesbbs / os2 / i2htm091.arj / I2HTM091.ZIP / source / ansi.h next >
Encoding:
C/C++ Source or Header  |  1998-11-02  |  846 b   |  24 lines

  1. /*
  2.  * ansi.h:
  3.  *      a few #define's for easy ANSI escape sequence
  4.  *      access.
  5.  *
  6.  *      Part of ANSISCRN.H as contributed to the
  7.  *      public domain 12-26-91 by Matthew J. Glass.
  8.  */
  9.  
  10. #define   ESC                  27
  11. #define   ANSI_cup(a,b)        printf("%c[%d;%dH",ESC,a,b)
  12. #define   ANSI_up(a)           printf("%c[%dA",ESC,a)
  13. #define   ANSI_down(a)         printf("%c[%dB",ESC,a)
  14. #define   ANSI_right(a)        printf("%c[%dC",ESC,a)
  15. #define   ANSI_left(a)         printf("%c[%dD",ESC,a)
  16. #define   ANSI_locate(a,b)     printf("%c[%d;%df",ESC,a,b)
  17. #define   ANSI_savecurs()      printf("%c[s",ESC)
  18. #define   ANSI_restcurs()      printf("%c[u",ESC)
  19. #define   ANSI_cls()           printf("%c[2J",ESC)
  20. #define   ANSI_cleol()         printf("%c[K",ESC)
  21. #define   ANSI_margins(a,b)    printf("%c[%d;%dr",ESC,a,b)
  22.  
  23.  
  24.