headas.hHeader file containing function prototypes, etc.
headas_init.cContains routines called internally - developers should not ever need to call these explicitly:
int headas_init(int, char **)Calls routines to initialize PIL and output streams. It also deals with standard HEADAS parameters (chatter, clobber, history).
int headas_close()Closes output streams and PIL.
int hdIOInit()Checks environment variables (e.g. HEADASOUTPUT, HEADASERROR) and sets up output streams.
int hd_pil_err_logger(char *s)Default PIL error logging routine. Simply prints to stderr.
int headas_start_up(int, char **, const char *)Set up logging.
headas_main.cThis file comprises the main program unit for every task. It calls headas_init() followed by the task subroutine itself and then calls headas_close() after the task completes. This main routine is not part of any library and must be explicitly included by all C tasks (via #include "headas_main.c"). For Fortran tasks it is automatically compiled and linked in by the Makefile.