1
0
mirror of https://github.com/GOSTSec/ccminer synced 2025-01-09 22:38:05 +00:00
ccminer/compat/winansi.h
Tanguy Pruvot aefb64c369 windows: implements the color option
based on old git implementation (2009)

Signed-off-by: Tanguy Pruvot <tanguy.pruvot@gmail.com>
2014-08-26 03:39:23 +02:00

32 lines
644 B
C

/*
* ANSI emulation wrappers
*/
#ifdef WIN32
#include <windows.h>
#include <stddef.h>
#include <stdio.h>
#define isatty(fd) _isatty(fd)
#define fileno(fd) _fileno(fd)
#ifdef __cplusplus
extern "C" {
#endif
int winansi_fputs(const char *str, FILE *stream);
int winansi_printf(const char *format, ...);
int winansi_fprintf(FILE *stream, const char *format, ...);
int winansi_vfprintf(FILE *stream, const char *format, va_list list);
#ifdef __cplusplus
}
#endif
#undef fputs
#undef fprintf
#undef vfprintf
#define fputs winansi_fputs
#define printf winansi_printf
#define fprintf winansi_fprintf
#define vfprintf winansi_vfprintf
#endif