fix setting next_ifd to 0
refactored to use a struct
more vars are part of the struct
some defines added for clarity
more comments for clarity
free memory
extracted function
extracted common code to raw.c
use raw.c in rawfs.c
cr2test renamed to rawextract
better usage info
write only a single file
rename function; exif_offset is not needed
some error checking added
better error checks and types
now output jpeg with exif
reuse file handle