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

Tilghman Lesher reviewboard at asterisk.org
Mon Dec 24 17:13:50 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
-----

  /trunk/apps/app_queue.c 377511 
  /trunk/include/asterisk/term.h 377511 
  /trunk/main/asterisk.c 377511 
  /trunk/main/data.c 377511 
  /trunk/main/logger.c 377511 
  /trunk/main/manager.c 377511 
  /trunk/main/pbx.c 377511 
  /trunk/main/term.c 377511 

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/1e2da845/attachment.htm>


More information about the asterisk-dev mailing list