# include "addusno.h"

ConfigInit (int argc, char **argv) {

  char *config, *file;

  /*** load configuration info ***/
  file = SelectConfigFile (&argc, argv, "ptolemy");
  config = LoadConfigFile (file);
  if (config == (char *) NULL) {
    fprintf (stderr, "ERROR: can't find configuration file %s\n", file);
    if (file != (char *) NULL) free (file);
    exit (0);
  }
  if (VERBOSE) fprintf (stderr, "loaded config file: %s\n", file);

  ScanConfig (config, "PHOTCODE_FILE",         "%s",  0, PhotCodeFile);
  ScanConfig (config, "USNO_RADIUS",           "%lf", 0, &RADIUS);
  ScanConfig (config, "USNO_PROPER",           "%lf", 0, &PROPER);
  ScanConfig (config, "USNO_CDROM",            "%s",  0, CDROM);
  ScanConfig (config, "CATDIR",                "%s",  0, CATDIR);

  free (config);
  free (file);
}
