Am 07.10.2011, 14:51 Uhr, schrieb Jens Mueller <jens.k.muel...@gmx.de>:
Trass3r wrote:
>You could use ANSI codes on posix to avoid a dependency on curses:
>http://en.wikipedia.org/wiki/ANSI_escape_code#Colors
>But I think using curses is ok. ncurses is MIT licensed and can be
>used as a dynamic library, so I don't think there are license problems.
>
>However, I'd recommend to load ncurses dynamically with dlopen/dlsym
>and fallback to simple text output if the ncurses library cannot be
>loaded.
+1
There shouldn't be a hard dependency on curses.
I had the impression that even though there is this standard how do I
know that I have a standard-compliant terminal. Can I just assume this?
I started using curses because I had the impression there may be
non-standard terminals. But this seems to be minor issue. I will change
this if people are happy with Windows and ISO/IEC 6429 compliant
terminals only.
Thanks.
As Johannes already said, it's perfectly possible to implement both
approaches and choose at runtime.