# include # include # include # include # include "../stis.h" # include "../stiserr.h" # include "calstis6.h" /* Checks status of reference file. Revision history: ---------------- 07 Aug 00 - Moved from GetFlags6 (I.Busko) */ int GetCheckRef (Hdr *phdr, char *keyword, RefTab *table, int *calswitch, int *missing, int no_fatal) { int status; int Get_KeyS (Hdr *, char *, int, char *, char *, int); int TabPedigree (RefTab *); /* The default name must be a null string, since this is the way to tell GetPCT that the PC table does not exist. */ if (Get_KeyS (phdr, keyword, no_fatal, "", table->name, STIS_LINE)) return (KEYWORD_MISSING); /* TabPedigree opens the table to verify that it exists, and if so, gets pedigree & descrip. */ if (status = TabPedigree (table)) return (status); if (table->exists != EXISTS_YES) { (*missing)++; if (no_fatal == 0) printf ("ERROR %s `%s' not found\n", keyword, table->name); } if (table->goodPedigree != GOOD_PEDIGREE) *calswitch = DUMMY; return (0); }