aboutsummaryrefslogtreecommitdiffstats
path: root/colorize.c
AgeCommit message (Collapse)AuthorFilesLines
2017-01-07Fix spelling of preceededGravatar Steven Schubiger 1-2/+2
I: colorize: spelling-error-in-binary usr/bin/colorize preceeded preceded
2016-10-25Stack and release color names memoryGravatar Steven Schubiger 1-7/+7
Don't call the color_names memory freeing code explicitly in the cleanup function as it is taken care of via {STACK,RELEASE}_VAR(). This implies the memory is "garbage collected" like other uses of those macros, too. Also, declare and initialize the color_names array in a non-global, tighter scope.
2016-08-19Print list of options dynamically in help outputGravatar Steven Schubiger 1-23/+44
2016-07-27colorize 0.59v0.59Gravatar Steven Schubiger 1-1/+1
2016-05-20Const pointerGravatar Steven Schubiger 1-1/+1
2016-04-07Use more descriptive enumerator nameGravatar Steven Schubiger 1-5/+5
2016-03-21Terminate buffer with single NULGravatar Steven Schubiger 1-1/+1
2016-01-21colorize 0.58v0.58Gravatar Steven Schubiger 1-2/+2
2016-01-20List color separator in version outputGravatar Steven Schubiger 1-0/+1
2016-01-19Make color separator configurableGravatar Steven Schubiger 1-1/+7
2016-01-15Optimize merging for partial lines furtherGravatar Steven Schubiger 1-12/+18
Completing partial lines (i.e., to ones without truncated escape sequences) can be handled more efficiently by concatenating only the partial line beginning at the last escape control character with the characters read from the input stream. Compared to previous code which concatenated the *entire* partial line with the characters read, pass now the resulting string of aforementioned concatenation separately to the escape sequence cleaning function. Even though it may appear as a minor optimisation, it is a /substantial/ improvement in terms of memory being allocated when cleaning lines.
2015-11-28Bring data type into lineGravatar Steven Schubiger 1-4/+3
2015-11-07Circumvent cleanup function for testing outputGravatar Steven Schubiger 1-2/+2
2015-10-27Move path skipping code to a functionGravatar Steven Schubiger 1-47/+52
2015-10-27Move color names code to a functionGravatar Steven Schubiger 1-55/+64
2015-10-25Simplify code in cleanup functionGravatar Steven Schubiger 1-3/+1
2015-10-25Don't initialize arg_cntGravatar Steven Schubiger 1-1/+1
2015-10-04colorize 0.57v0.57Gravatar Steven Schubiger 1-1/+1
2015-09-20Lazily allocate memoryGravatar Steven Schubiger 1-11/+12
2015-09-03Double memory when increasing bufferGravatar Steven Schubiger 1-10/+21
2015-08-28Choose larger integer data typeGravatar Steven Schubiger 1-3/+3
2015-08-18Properly indent pair of bracesGravatar Steven Schubiger 1-4/+5
2015-08-09First draft of improved merging partial linesGravatar Steven Schubiger 1-25/+130
2015-07-24Move option processing code to a functionGravatar Steven Schubiger 1-60/+67
2015-06-17colorize 0.56v0.56Gravatar Steven Schubiger 1-1/+1
2015-06-15Don't initialize static variables explicitlyGravatar Steven Schubiger 1-8/+8
2015-06-07Cast variable properlyGravatar Steven Schubiger 1-9/+9
2015-05-14Refactor print_cleanGravatar Steven Schubiger 1-116/+154
Avoid allocating memory for escape sequence offsets by printing text in between directly. Furthermore, divide resulting code into numerous functions in order to reduce complexity. Thanks Urs Fässler
2015-04-03Declare color sets variables as constantGravatar Steven Schubiger 1-3/+3
2015-03-02Convert short version option to uppercaseGravatar Steven Schubiger 1-3/+3
2015-02-15Nullify pointers only where appropriateGravatar Steven Schubiger 1-4/+4
2015-02-13Omit unnecessary break statementGravatar Steven Schubiger 1-1/+0
2015-01-26Follow symbolic link to obtain file statusGravatar Steven Schubiger 1-1/+1
2015-01-25Reuse file opening functionGravatar Steven Schubiger 1-7/+1
2015-01-21colorize 0.55v0.55Gravatar Steven Schubiger 1-2/+2
2015-01-20Log debug output to fileGravatar Steven Schubiger 1-3/+30
2015-01-10Support files larger than 2GB on 32-bit systemsGravatar Steven Schubiger 1-0/+1
2015-01-08Keep return value check simpleGravatar Steven Schubiger 1-1/+1
2014-12-14Check if BUF_SIZE is definedGravatar Steven Schubiger 1-1/+1
2014-10-28Pass file/line on for string allocation routinesGravatar Steven Schubiger 1-13/+22
2014-10-26Make diagnostics more consistentGravatar Steven Schubiger 1-3/+3
2014-10-25Print memory allocation diagnosticsGravatar Steven Schubiger 1-0/+3
2014-10-01Use more portable exit failure status macroGravatar Steven Schubiger 1-2/+2
2014-07-24Merge duplicated version printing codeGravatar Steven Schubiger 1-4/+5
2014-06-26Comment end of conditional inclusionGravatar Steven Schubiger 1-1/+1
2014-06-26Include commit hash in version outputGravatar Steven Schubiger 1-1/+9
Extracting the abbreviated commit hash will break when git will be replaced by a different version control system. But until it does, get the hash from the git repository.
2014-06-10Print abbreviated size of bufferGravatar Steven Schubiger 1-2/+36
2014-06-02colorize 0.54v0.54Gravatar Steven Schubiger 1-1/+1
2014-05-16Don't declare errnoGravatar Steven Schubiger 1-1/+1
2014-04-04Localize variable with name of existing fileGravatar Steven Schubiger 1-3/+4