A number of symbolic constants have been defined within CFITSIO (in fitsio.h) for the convenience of application programmers. Use of these symbolic constants, rather than the actual numeric value, may help to make the source code more readable and easier for others to understand.
String Lengths, for use when allocating character arrays: #define FLEN_KEYWORD 9 /* max length of a keyword */ #define FLEN_CARD 81 /* max length of a FITS header card */ #define FLEN_VALUE 71 /* max length of a keyword value string */ #define FLEN_COMMENT 73 /* max length of a keyword comment string */ #define FLEN_ERRMSG 81 /* max length of a FITSIO error message */ #define FLEN_STATUS 31 /* max length of a FITSIO status text string */ Access modes when opening a FITS file: #define READONLY 0 #define READWRITE 1 BITPIX code values for FITS image data types: #define BYTE_IMG 8 /* 8-bit unsigned integers */ #define SHORT_IMG 16 /* 16-bit signed integers */ #define LONG_IMG 32 /* 32-bit signed integers */ #define FLOAT_IMG -32 /* 32-bit single precision floating point */ #define DOUBLE_IMG -64 /* 64-bit double precision floating point */ The following 2 codes are used internally by CFITSIO: #define USHORT_IMG 20 /* 16-bit unsigned integers, equivalent to */ /* BITPIX = 16, BSCALE = 1, BZERO = 32768 */ #define ULONG_IMG 40 /* 32-bit unsigned integers, equivalent to */ /* BITPIX = 32, BSCALE = 1, BZERO = 2147483648 */ Codes for the datatype of binary table columns and/or for the datatype of variables when reading or writing keywords or data: DATATYPE TFORM CODE #define TBIT 1 /* 'X' */ #define TBYTE 11 /* 8-bit unsigned byte, 'B' */ #define TLOGICAL 14 /* logicals (int) 'L' */ #define TSTRING 16 /* ASCII string, 'A' */ #define TSHORT 21 /* signed short, 'I' */ #define TLONG 41 /* signed long, 'J' */ #define TFLOAT 42 /* single precision float, 'E' */ #define TDOUBLE 82 /* double precision float, 'D' */ #define TCOMPLEX 83 /* complex (pair of floats) 'C' */ #define TDBLCOMPLEX 163 /* double complex (2 doubles) 'M' */ The following codes are used internally by CFITSIO: #define TINT 31 /* int */ #define TUSHORT 20 /* unsigned short */ #define TULONG 40 /* unsigned long */ HDU type code values (value returned when moving to new HDU): #define IMAGE_HDU 0 /* Primary Array or IMAGE HDU */ #define ASCII_TBL 1 /* ASCII table HDU */ #define BINARY_TBL 2 /* Binary table HDU */ Column name and string matching case-sensitivity: #define CASESEN 1 /* do case-sensitive string match */ #define CASEINSEN 0 /* do case-insensitive string match */ Logical states: #define TRUE 1 #define FALSE 0