Mercurial > libavutil.hg
comparison log.c @ 904:01dd0deb8e8d libavutil
Merge the 2 ANSI ESC codes.
author | michael |
---|---|
date | Fri, 23 Apr 2010 08:11:53 +0000 |
parents | b0cedb31562f |
children | 77c445d28611 |
comparison
equal
deleted
inserted
replaced
903:b0cedb31562f | 904:01dd0deb8e8d |
---|---|
38 #endif | 38 #endif |
39 | 39 |
40 #undef fprintf | 40 #undef fprintf |
41 static void colored_fputs(int color, const char *str){ | 41 static void colored_fputs(int color, const char *str){ |
42 if(isatty(2)){ | 42 if(isatty(2)){ |
43 fprintf(stderr, "\033[%dm\033[3%dm", color>>4, color&15); | 43 fprintf(stderr, "\033[%d;3%dm", color>>4, color&15); |
44 } | 44 } |
45 fputs(str, stderr); | 45 fputs(str, stderr); |
46 if(isatty(2)){ | 46 if(isatty(2)){ |
47 fprintf(stderr, "\033[0m"); | 47 fprintf(stderr, "\033[0m"); |
48 } | 48 } |