aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
AgeCommit message (Collapse)Author
2017-11-25Don't duplicate license text in all source filesHarry Jeffery
If moving to dual-licensing, this text will be confusing. It's also a lot of noise.
2017-08-22Remove year from copyright noticesHarry Jeffery
It was falling out of date, and has no legal bearing to my knowledge.
2017-06-18Support loading image data from stdinHarry Jeffery
2017-04-12Add generic list containerHarry Jeffery
2016-10-23Simplify hex color parserDmitrij D. Czarkoff
It is actually a trivial task for strtoul + some bit shifting, so there is no need for two separate functions.
2016-10-09Be more correct in read_from_stdin()Dmitrij D. Czarkoff
From read(2) manual page on OpenBSD: Error checks should explicitly test for -1. Code such as while ((nr = read(fd, buf, sizeof(buf))) > 0) is not maximally portable, as some platforms allow for nbytes to range between SSIZE_MAX and SIZE_MAX - 2, in which case the return value of an error-free read() may appear as a negative number distinct from -1. Proper loops should use while ((nr = read(fd, buf, sizeof(buf))) != -1 && nr != 0) Distingushing between error and eof would also help for debugging.
2016-09-27Fix minor memory leak in load_font()Harry Jeffery
2016-04-26Add vim modelinesDmitrij D. Czarkoff
2016-01-14Loading image data from standard inputDmitrij D. Czarkoff
This commit changes processing of arguments: * When called without arguments (with or without flags), imv reads list of files from standard input. * When called with "-" among arguments, read image data from standard input.
2015-12-28Remove names from file copyright headersHarry Jeffery
2015-12-10Move text rendering into a util functionHarry Jeffery
2015-11-28Move utility functions from main.c to util.cHarry Jeffery