I would like to discuss about the design of how the user should be able
to define their own colorization options. I've received a patch to allow
this with the HCOLORS environment:
--- radare-20070410/src/print.c 2007-04-10 09:03:19.000000000 +0200
+++ radare-20070410-prk/src/print.c 2007-04-10 13:04:28.000000000 +0200
@@ -36,6 +36,11 @@
char *get_color_for(int c)
{
+ unsigned char *hc=(unsigned char*)getenv("HCOLORS");
+
+ if (hc)
+ while(*hc!=0x00) { if(c == (int)*hc++) return C_BYELLOW; }
+
if (c==0) return COLOR_00; else
if (c==0xff) return COLOR_FF; else
if (c==0x7f) return COLOR_7F; else
@@ -311,24 +316,41 @@
This is a little hack to do this in a fast way but forces the user to define
binary data on a environment variable. And this is not very nice :) So ideas
and tips are welcome! :)
--pancake
_______________________________________________
radare mailing list
[email protected]
https://lists.nopcode.org/mailman/listinfo/radare