256 colors support in cygwin

This commit is contained in:
XVilka 2015-01-26 21:41:57 +03:00
parent 80d016e0ed
commit 94a7ca141c
2 changed files with 4 additions and 4 deletions

View file

@ -64,7 +64,7 @@ static void unrgb(int color, int *r, int *g, int *b) {
}
static inline void rgbinit(int r, int g, int b) {
#if __UNIX__
#if __UNIX__ || __CYGWIN__
r_cons_printf ("\x1b]4;%d;rgb:%2.2x/%2.2x/%2.2x\x1b\\",
16 + (r * 36) + (g * 6) + b,
(r ? (r * 40 + 55) : 0),
@ -161,7 +161,7 @@ R_API char *r_cons_rgb_str (char *outstr, ut8 r, ut8 g, ut8 b, int is_bg) {
}
R_API void r_cons_rgb (ut8 r, ut8 g, ut8 b, int is_bg) {
#if __WINDOWS__
#if __WINDOWS__ && !__CYGWIN__
#warning r_cons_rgb not yet supported on windows
#else
char outstr[64];

View file

@ -964,7 +964,7 @@ R_API int r_core_config_init(RCore *core) {
SETCB("cfg.datefmt", "%d:%m:%Y %H:%M:%S %z", &cb_cfgdatefmt, "Date format (%d:%m:%Y %H:%M:%S %z)");
SETCB("cfg.debug", "false", &cb_cfgdebug, "set/unset the debugger mode");
p = r_sys_getenv ("EDITOR");
#if __WINDOWS__
#if __WINDOWS__ && !__CYGWIN__
r_config_set (cfg, "cfg.editor", p? p: "notepad");
#else
r_config_set (cfg, "cfg.editor", p? p: "vi");
@ -1153,7 +1153,7 @@ R_API int r_core_config_init(RCore *core) {
SETCB("scr.rows", "0", &cb_scrrows, "Set the rows number");
SETCB("scr.tee", "", &cb_teefile, "Pipe console output to file if not empty");
SETPREF("scr.seek", "", "Seek to the specified address on startup");
#if __WINDOWS__
#if __WINDOWS__ && !__CYGWIN__
r_config_set_cb (cfg, "scr.rgbcolor", "false", &cb_rgbcolors);
#else
r_config_set_cb (cfg, "scr.rgbcolor", "true", &cb_rgbcolors);