# include <dvo.h>

int LoadPhotcodes (char *catdir_file, char *master_file) {

  /* first try to load the photcodes from the specified CATDIR location */
  if (LoadPhotcodesFITS (catdir_file)) return TRUE;
  
  /* next try to load the photcodes from the master text photcode file */
  /* automatically (or on demand?) save the text file to the FITS version */
  if (LoadPhotcodesText (master_file)) { 
      if (!check_file_access (catdir_file, TRUE, TRUE)) return TRUE;
      SavePhotcodesFITS (catdir_file);
      return TRUE;
  }

  return FALSE;
}
