Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 495 Bytes

README.md

File metadata and controls

30 lines (20 loc) · 495 Bytes

ansicolor-w32.c

ANSI color support on windows

Usage

You can display ANSI color on windows without hacks

#include <stdio.h>
#ifdef _WIN32
# include "ansicolor-w32.h"
#endif

int
main(int argc, char* argv[]) {
  printf("\x1b[2J\x1b[1;1H\x1b[40mhello"); 
  return 0;
}

The library replaces the printf family functions with wrappers that recognize the ANSI escape code and render the input using the specified colors.

License

MIT

Author

Yasuhiro Matsumoto (a.k.a mattn)