diff options
author | Steven Schubiger <stsc@refcnt.org> | 2013-02-07 23:50:09 +0100 |
---|---|---|
committer | Steven Schubiger <stsc@refcnt.org> | 2013-02-07 23:50:09 +0100 |
commit | 5b543402df3ecb2e5c5cb973ee4951d22f9cd52c (patch) | |
tree | ca6011873be4aa9f1119ed952d601574f8028688 /COPYING | |
parent | 0802a010b347abd0172beb4411cd2b6af946f73b (diff) | |
download | colorize-5b543402df3ecb2e5c5cb973ee4951d22f9cd52c.tar.gz colorize-5b543402df3ecb2e5c5cb973ee4951d22f9cd52c.tar.bz2 |
Clean text from color escape sequences
In order to handle end-of-buffer reads with partial line chunks,
merge those when cleaning text. Pass each line then to the offset
extracting function which gathers begin/end offsets of escape
sequences. Finally, for printing cleaned lines of text, omit all
color escape sequences as defined by their set of offsets (and
restore characters temporarily overwritten with terminating NUL).
Furthermore, add a basic string concatenation function and wrap
the free memory function to have it nullify pointers.
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions