cut another syscall; avoid magic numbers
No need to bother the operating system to close the
file descriptor, because it will clean up after me.
Also, -1 is less readable than INDEX_INVALID.
lib: avoid propagating types needlessly
Just because a libc function returns unsigned long doesn't mean the
entire codebase has to use unsigned long. The numbers fit into 13 bits;
typecasting is OK.
lib: reduce number of syscalls
Nine is getting to a tolerable range.
get max brightness at compile time
Fourteen syscalls is too many for me.
lib: correct usage message
I deleted that option a while ago.
Use a more conventional integration technique
lib: update style to my current persuasion
lib: avoid writing function prototypes
Makefile: let valgrind return nonzero on error
lib.c: remove unused "rep" feature
rename notes -> README.md
lib.c: fix an OOB access introduced by -Os flag
This is not really fixing the place responsible for the error, just
routing around it, but I think it reads better, so I'm going with it.
Valgrind didn't catch this bug because the location of the OOB access
is a global static array. exp-sgcheck is supposed to check this, but
it didn't work for me.
Add new argument: number of repetitions
Move all bl.c logic into lib.c
auto: don't print so much