dd_getopts.c condensed code, prepared for improvements