• Laslo Hunhold's avatar
    Add efread() and efwrite() · 02b05163
    Laslo Hunhold authored
    Given we have a util.c anyway it does not make any sense to duplicate
    code here. This way, error handling and output is in one place and one
    does not have to change things in multiple different files. This also
    reduces code duplication by a lot.
    
    It also solves an older bug where the error reporting was not on point:
    
       $ echo "farb" | ff2png
       ff2png: fread: Success
    
    (It also lacked a newline)
    
    Now it properly reports
    
       $ echo "farb" | ff2png
       ff2png: fread: Unexpected end of file
    
    I also fixed some other minor details, for instance that all error
    messages should begin with a capital letter.
    02b05163
Name
Last commit
Last update
2ff Loading commit data...
2ff.1 Loading commit data...
FORMAT Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README Loading commit data...
arg.h Loading commit data...
config.mk Loading commit data...
farbfeld.5 Loading commit data...
ff2jpg.1 Loading commit data...
ff2jpg.c Loading commit data...
ff2pam.1 Loading commit data...
ff2pam.c Loading commit data...
ff2png.1 Loading commit data...
ff2png.c Loading commit data...
ff2ppm.1 Loading commit data...
ff2ppm.c Loading commit data...
jpg2ff.1 Loading commit data...
jpg2ff.c Loading commit data...
png2ff.1 Loading commit data...
png2ff.c Loading commit data...
util.c Loading commit data...
util.h Loading commit data...