aboutsummaryrefslogtreecommitdiffstats
path: root/release.sh
diff options
context:
space:
mode:
authorGravatar Steven Schubiger <stsc@refcnt.org> 2013-02-07 23:50:09 +0100
committerGravatar Steven Schubiger <stsc@refcnt.org> 2013-02-07 23:50:09 +0100
commit5b543402df3ecb2e5c5cb973ee4951d22f9cd52c (patch)
treeca6011873be4aa9f1119ed952d601574f8028688 /release.sh
parent0802a010b347abd0172beb4411cd2b6af946f73b (diff)
downloadcolorize-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 'release.sh')
0 files changed, 0 insertions, 0 deletions