# include # include # include # include # include "../stis.h" # include "calstis12.h" # include "../stiserr.h" /* This routine updates the WAVECORR switch to COMPLETE and appends a history record to the header. Phil Hodge, 1998 Mar 18: Remove references to the apdestab, and write wavecal name instead. Phil Hodge, 2000 June 16: Update the comment. */ int History12 (Hdr *phdr, char *wavecal_name) { /* arguments: Hdr *phdr i: header to receive history records char *wavecal_name i: as above, but from wavecal row */ int status; char *history; int Put_KeyS (Hdr *, char *, char *, char *); if ((history = calloc (STIS_LINE+1, sizeof(char))) == NULL) return (OUT_OF_MEMORY); if (status = Put_KeyS (phdr, "WAVECORR", "COMPLETE", "")) return (status); addHistoryKw (phdr, "WAVECORR complete ..."); if (hstio_err()) return (HEADER_PROBLEM); strcpy (history, " wavecal = "); strcat (history, wavecal_name); addHistoryKw (phdr, history); if (hstio_err()) return (HEADER_PROBLEM); free (history); return (0); }