[asterisk-dev] [Code Review] Revamp of terminal color codes

Mark Michelson reviewboard at asterisk.org
Tue Jan 22 16:05:00 CST 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2241/#review7706
-----------------------------------------------------------

Ship it!


Looks good to me!

- Mark


On Dec. 24, 2012, 5:13 p.m., Tilghman Lesher wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2241/
> -----------------------------------------------------------
> 
> (Updated Dec. 24, 2012, 5:13 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> The core module related to coloring terminal output was old and needed some love.  The main thing here was an attempt to get rid of the obscene number of stack-local buffers that were allocated for no other reason than to colorize some output.  Instead, this uses a simple trick to allocate several buffers within threadlocal storage, then automatically rotates between them, so that you can make multiple calls to the colorization routine within one function and not need to allocate multiple buffers.
> 
> 
> Diffs
> -----
> 
>   /trunk/apps/app_queue.c 378204 
>   /trunk/include/asterisk/term.h 378204 
>   /trunk/main/asterisk.c 378204 
>   /trunk/main/data.c 378204 
>   /trunk/main/logger.c 378204 
>   /trunk/main/manager.c 378204 
>   /trunk/main/pbx.c 378204 
>   /trunk/main/term.c 378204 
> 
> Diff: https://reviewboard.asterisk.org/r/2241/diff
> 
> 
> Testing
> -------
> 
> The code works, however, I haven't extended the change to all parts of Asterisk, simply because I wanted to get other eyes on the code and agree on the method employed.
> 
> 
> Thanks,
> 
> Tilghman
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130122/06dcb4d7/attachment-0001.htm>


More information about the asterisk-dev mailing list