[FFmpeg-cvslog] r22946 - trunk/libavutil/log.c
Fri Apr 23 00:41:22 CEST 2010
On Fri, Apr 23, 2010 at 12:29:06AM +0200, James Darnley wrote:
> 2010/4/22 M?ns Rullg?rd <mans at mansr.com>:
> > Michael Niedermayer <michaelni at gmx.at> writes:
> >> On Thu, Apr 22, 2010 at 10:01:22PM +0100, M?ns Rullg?rd wrote:
> >>> Michael Niedermayer <michaelni at gmx.at> writes:
> >>> > On Thu, Apr 22, 2010 at 09:32:24PM +0100, M?ns Rullg?rd wrote:
> >>> >> Please revert or disable this code while you figure out something that
> >>> >> works.
> >>> >
> >>> > ok
> >>> > does anyone know how we can cleanly detect if the used terminal supports
> >>> > ANSI codes?
> >>> That's what termcap/terminfo is for. ?This means either using ncurses
> >>> or doing a lot of dirty work ourselves, neither of which is very
> >>> thrilling.
> >> :/
> >> what about getenv("TERM") and an array of terms that support ANSI?
> > That's the wrong solution. ?Using curses would also make it work on
> > non-ANSI terminals with colour information in terminfo. ?Let's see how
> > hard it is to do this with curses before embarking on further hack
> > trails.
> >>> On windows ANSI codes work only if the ansi.sys driver is loaded. ?I
> >>> don't know if that can be detected. ?I also don't know about other
> >>> systems.
> >> on dos there was the mem command that listed things (like ps)
> >> it should list ansi.sys too
> > Smells like a hack.
> Then use a hack-free solution like attached. Granted, some works
> still needs to be done. Perhaps the Windows functions should only be
> called if the colour will be changed. Perhaps a cleaner way of
> getting the windows colours.
> Michael, something for you to consider:
> can be replaced by:
i realized that too at some point after my commit
> log.c | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
> 36b4504f5900c42a7de92a28ac64863add236f60 colours.diff
i think this could be done with fewer ifdefs
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Thouse who are best at talking, realize last or never when they are wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-cvslog