aboutsummaryrefslogtreecommitdiffstats
path: root/colorize.c
AgeCommit message (Collapse)AuthorFilesLines
2013-02-24Add blank lineGravatar Steven Schubiger 1-0/+1
2013-02-19Print actual color separator in help outputGravatar Steven Schubiger 1-1/+1
2013-02-19Define color separator onceGravatar Steven Schubiger 1-4/+6
2013-02-18Adjust format specifier for unsigned integersGravatar Steven Schubiger 1-4/+4
2013-02-17colorize 0.49v0.49Gravatar Steven Schubiger 1-1/+1
2013-02-17Use size_t instead of unsigned integer typeGravatar Steven Schubiger 1-2/+2
2013-02-11Advance position for end sequenceGravatar Steven Schubiger 1-1/+2
2013-02-09Improve wrapping memory functionsGravatar Steven Schubiger 1-20/+41
2013-02-08Skip invalid sequences correctlyGravatar Steven Schubiger 1-1/+2
2013-02-07Clean text from color escape sequencesGravatar Steven Schubiger 1-29/+213
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.
2013-01-28Enhance message if color string exists as fileGravatar Steven Schubiger 1-1/+6
2013-01-25Capitalize first letter of diagnosticsGravatar Steven Schubiger 1-2/+2
2013-01-25update copyright year and increase versionGravatar Steven Schubiger 1-2/+2
2013-01-24Wrap memory allocation functionsGravatar Steven Schubiger 1-6/+45
This covers currently calls to malloc(), realloc() and the custom strdup() (which uses malloc, too). If allocation of memory fails (i.e., NULL is returned from one of former two calls), a fatal diagnostic is emitted (accompanied by source filename and line number if compiled with DEBUG=1).
2012-12-18Initial commit.Gravatar Steven Schubiger 1-0/+730