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

Tilghman Lesher reviewboard at asterisk.org
Mon Dec 24 17:13:53 CST 2012


-----------------------------------------------------------
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 (updated)
-----

  /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/20121224/b6c70416/attachment.htm>


More information about the asterisk-dev mailing list