Refactored same code in file
Refactored same code in file

DRY -- don't repeat yourself. Much code was repeated,
mostly error control. Also used ferror instead of checking
return code from fscanf. Resulting code is cleaner and shorter.

geommer/yabar