Directory "C" Routines

These routines allow default directories and file extensions to be set and used by the FITS Io and region pool routines.

Valid values for the DEFDIRENUM argument can be found in shCFitsIo.h.

shDirSet

This routine will set the default directory and or default extension for reading from a file into a region or from the pool.

C SYNTAX: RET_CODE shDirSet ( DEFDIRENUM a_type, /* IN : Type of default to get */ char *a_dir, /* IN : Default directory */ char *a_ext, /* IN : Default file extension */ int a_slash /* IN : Append "/" after directory (if = 1) */ ) RETURNS: SH_SUCCESS - Successful completion. SH_EXT_TOO_LONG - Specified extension is too long. SH_DIR_TOO_LONG - Specified directory is too long.



shDirGet

This routine will return a pointer to the default directory and extension for reading into a region from a file or from the pool. Storage for 'a_dir' and 'a_ext' must be allocated in the calling routine. This storage must be sufficient to hold the directory and file extension.

C SYNTAX: RET_CODE shDirGet ( DEFDIRENUM a_type, /* IN : Type of default to get */ char *a_dir, /* OUT : Default directory */ char *a_ext /* OUT : Default file extension */ ) RETURNS: SH_SUCCESS - Successful completion.