diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-04-14 02:12:01 +0200 |
---|---|---|
committer | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-04-20 19:14:11 +0200 |
commit | 4b393c73cbfd40c40dc40e609cf248883ce52573 (patch) | |
tree | 53c04ea54addd2b09f9f5ce9e256fdb6bbf2312a /include/mingw.h | |
parent | a1b05ef61f4d1c4ba64f758292cece2fdf2828bf (diff) | |
download | busybox-w32-4b393c73cbfd40c40dc40e609cf248883ce52573.tar.gz busybox-w32-4b393c73cbfd40c40dc40e609cf248883ce52573.tar.bz2 busybox-w32-4b393c73cbfd40c40dc40e609cf248883ce52573.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:
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Diffstat (limited to 'include/mingw.h')
-rw-r--r-- | include/mingw.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/mingw.h b/include/mingw.h index 9d102a93f..479fbbe2b 100644 --- a/include/mingw.h +++ b/include/mingw.h | |||
@@ -123,6 +123,17 @@ NOIMPL(sigfillset,int *mask UNUSED_PARAM); | |||
123 | int fdprintf(int fd, const char *format, ...); | 123 | int fdprintf(int fd, const char *format, ...); |
124 | 124 | ||
125 | /* | 125 | /* |
126 | * ANSI emulation wrappers | ||
127 | */ | ||
128 | |||
129 | int winansi_fputs(const char *str, FILE *stream); | ||
130 | int winansi_printf(const char *format, ...) __attribute__((format (printf, 1, 2))); | ||
131 | int winansi_fprintf(FILE *stream, const char *format, ...) __attribute__((format (printf, 2, 3))); | ||
132 | #define fputs winansi_fputs | ||
133 | #define printf(...) winansi_printf(__VA_ARGS__) | ||
134 | #define fprintf(...) winansi_fprintf(__VA_ARGS__) | ||
135 | |||
136 | /* | ||
126 | * stdlib.h | 137 | * stdlib.h |
127 | */ | 138 | */ |
128 | #define WIFEXITED(x) ((unsigned)(x) < 259) /* STILL_ACTIVE */ | 139 | #define WIFEXITED(x) ((unsigned)(x) < 259) /* STILL_ACTIVE */ |