aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-04-14 02:12:01 +0200
committerNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-09-10 18:50:04 +1000
commitfa37e9da4b02810eedbb0ac82e8cd0b99336aa82 (patch)
tree47434020dbb9699ea6d51a708d376518dfba6abc /include
parent909696f1394a67f38f678eb9cfb0d794173095fd (diff)
downloadbusybox-w32-fa37e9da4b02810eedbb0ac82e8cd0b99336aa82.tar.gz
busybox-w32-fa37e9da4b02810eedbb0ac82e8cd0b99336aa82.tar.bz2
busybox-w32-fa37e9da4b02810eedbb0ac82e8cd0b99336aa82.zip
win32: Support certain ANSI sequences on cmd.exe
Support sequences are mostly color ones. This was extracted from commit e56b799d6ad8afba4168fffa7218d44c041a72d2 in Git repository. Changes from original version: > diff --git a/home/pclouds/w/git/compat/winansi.c b/tmp/winansi2.c > index 44dc293..e2e7010 100644 > --- a/home/pclouds/w/git/compat/winansi.c > +++ b/tmp/winansi2.c > @@ -2,8 +2,9 @@ > * Copyright 2008 Peter Harris <git@peter.is-a-geek.org> > */ > > +#include "libbb.h" > #include <windows.h> > -#include "../git-compat-util.h" > +#undef PACKED > > /* > Functions to be wrapped:
Diffstat (limited to 'include')
-rw-r--r--include/mingw.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/mingw.h b/include/mingw.h
index d5a675507..fd9630a58 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -122,6 +122,17 @@ NOIMPL(sigfillset,int *mask UNUSED_PARAM);
122int fdprintf(int fd, const char *format, ...); 122int fdprintf(int fd, const char *format, ...);
123 123
124/* 124/*
125 * ANSI emulation wrappers
126 */
127
128int winansi_fputs(const char *str, FILE *stream);
129int winansi_printf(const char *format, ...) __attribute__((format (printf, 1, 2)));
130int winansi_fprintf(FILE *stream, const char *format, ...) __attribute__((format (printf, 2, 3)));
131#define fputs winansi_fputs
132#define printf(...) winansi_printf(__VA_ARGS__)
133#define fprintf(...) winansi_fprintf(__VA_ARGS__)
134
135/*
125 * stdlib.h 136 * stdlib.h
126 */ 137 */
127#define WIFEXITED(x) ((unsigned)(x) < 259) /* STILL_ACTIVE */ 138#define WIFEXITED(x) ((unsigned)(x) < 259) /* STILL_ACTIVE */