Fixups to _getopts() functions in leg.c and peg.c